mirror of
https://github.com/numtide/flake-utils.git
synced 2024-11-29 23:30:00 +03:00
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; }
|
||||
# (system -> attrs) -> attrs
|
||||
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
Block a user