add mkApp
This commit is contained in:
parent
f6ee9d535f
commit
464b6ecb9b
11
default.nix
11
default.nix
|
@ -23,4 +23,15 @@ rec {
|
||||||
# > x86_64-linux = null; }
|
# > x86_64-linux = null; }
|
||||||
# (system -> attrs) -> attrs
|
# (system -> attrs) -> attrs
|
||||||
forAllSupported = genAttrs supportedSystems;
|
forAllSupported = genAttrs supportedSystems;
|
||||||
|
|
||||||
|
# Returns the structure used by `nix app`
|
||||||
|
mkApp =
|
||||||
|
{ drv
|
||||||
|
, name ? drv.pname or drv.name
|
||||||
|
, exePath ? drv.passthru.exePath or "/bin/${name}"
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
type = "app";
|
||||||
|
program = "${drv}${exePath}";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue