nix: use unwrapped program by default in module
This commit is contained in:
parent
cfb6bbd7a7
commit
9934b11766
|
@ -4,6 +4,7 @@
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, mpv
|
, mpv
|
||||||
|
, wrapped ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
|
@ -36,7 +37,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = lib.optionalString wrapped ''
|
||||||
wrapProgram $out/bin/greg-ng \
|
wrapProgram $out/bin/greg-ng \
|
||||||
--prefix PATH : '${lib.makeBinPath [ mpv ]}'
|
--prefix PATH : '${lib.makeBinPath [ mpv ]}'
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
apps = forAllSystems (system: pkgs: _: {
|
apps = forAllSystems (system: pkgs: _: {
|
||||||
default = self.apps.${system}.greg-ng;
|
default = self.apps.${system}.greg-ng;
|
||||||
greg-ng = let
|
greg-ng = let
|
||||||
package = self.packages.${system}.greg-ng;
|
package = self.packages.${system}.greg-ng-wrapped;
|
||||||
in {
|
in {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = lib.getExe package;
|
program = lib.getExe package;
|
||||||
|
@ -63,6 +63,9 @@
|
||||||
packages = forAllSystems (system: pkgs: _: {
|
packages = forAllSystems (system: pkgs: _: {
|
||||||
default = self.packages.${system}.greg-ng;
|
default = self.packages.${system}.greg-ng;
|
||||||
greg-ng = pkgs.callPackage ./default.nix { };
|
greg-ng = pkgs.callPackage ./default.nix { };
|
||||||
|
greg-ng-wrapped = pkgs.callPackage ./default.nix {
|
||||||
|
wrapped = true;
|
||||||
|
};
|
||||||
});
|
});
|
||||||
} // {
|
} // {
|
||||||
nixosModules.default = ./module.nix;
|
nixosModules.default = ./module.nix;
|
||||||
|
|
Loading…
Reference in New Issue