mirror of
https://github.com/NixOS/nix.git
synced 2025-11-24 19:29:36 +01:00
Make nix flake show less strict wrt what apps can be
Allow `apps.foo` and `defaultApp` to be a plain derivation like `nix run` does. Fix #5560
This commit is contained in:
parent
1f7584d24c
commit
14cd643375
2 changed files with 16 additions and 7 deletions
|
|
@ -380,6 +380,11 @@ cat > $templatesDir/trivial/flake.nix <<EOF
|
|||
outputs = { self, nixpkgs }: {
|
||||
packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello;
|
||||
defaultPackage.x86_64-linux = self.packages.x86_64-linux.hello;
|
||||
apps.x86_64-linux.helloWorld = {
|
||||
type = "app";
|
||||
program = "\${nixpkgs.legacyPackages.x86_64-linux.hello}/bin/hello";
|
||||
};
|
||||
apps.x86_64-linux.helloWorld2 = nixpkgs.legacyPackages.x86_64-linux.hello;
|
||||
};
|
||||
}
|
||||
EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue