diff --git a/default.nix b/default.nix index fa8603c..8a45449 100644 --- a/default.nix +++ b/default.nix @@ -4,6 +4,7 @@ , rustPlatform , makeWrapper , mpv +, wrapped ? false }: rustPlatform.buildRustPackage rec { @@ -36,7 +37,7 @@ rustPlatform.buildRustPackage rec { }; }; - postInstall = '' + postInstall = lib.optionalString wrapped '' wrapProgram $out/bin/greg-ng \ --prefix PATH : '${lib.makeBinPath [ mpv ]}' ''; diff --git a/flake.nix b/flake.nix index 09fe8dd..f419785 100644 --- a/flake.nix +++ b/flake.nix @@ -35,7 +35,7 @@ apps = forAllSystems (system: pkgs: _: { default = self.apps.${system}.greg-ng; greg-ng = let - package = self.packages.${system}.greg-ng; + package = self.packages.${system}.greg-ng-wrapped; in { type = "app"; program = lib.getExe package; @@ -63,6 +63,9 @@ packages = forAllSystems (system: pkgs: _: { default = self.packages.${system}.greg-ng; greg-ng = pkgs.callPackage ./default.nix { }; + greg-ng-wrapped = pkgs.callPackage ./default.nix { + wrapped = true; + }; }); } // { nixosModules.default = ./module.nix;