chore: simplify nix package

This commit is contained in:
Nydragon 2024-11-12 01:37:14 +01:00
parent 02a72fb5d2
commit 6407497220
Signed by: nydragon
SSH key fingerprint: SHA256:WcjW5NJPQ8Dx4uQDmoIlVPLWE27Od3fxoe0IUvuoPHE

View file

@ -1,19 +1,21 @@
{ stdenv, quickshell, ... }:
stdenv.mkDerivation rec {
{
stdenv,
quickshell,
makeWrapper,
...
}:
stdenv.mkDerivation {
name = "nysh";
unpackPhase = ":";
buildPhase = ''
cat > ${name} <<EOF
#! $SHELL
${quickshell}/bin/quickshell -p ${./..}/src
EOF
chmod +x ${name}
'';
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
cp ${name} $out/bin/
cp ${quickshell}/bin/quickshell $out/bin
wrapProgram $out/bin/quickshell \
--add-flags "-p ${./..}/src"
'';
}