aboutsummaryrefslogtreecommitdiff
path: root/tests/flake-bundler.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-02-11 18:11:08 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-02-22 11:47:41 +0100
commit162fbe31ffe4c2b2d7648e5df2d5a0c9b4a44996 (patch)
tree583872a69ddbd873b4c08dcd61ab68f9e2a0443c /tests/flake-bundler.sh
parentcaf51729450d4c57d48ddbef8e855e9bf65f8792 (diff)
Replace defaultBla.$system with bla.$system.default
This also simplifies some InstallableFlake logic and fixes 'nix bundle' parsing its installable twice. Fixes #5532.
Diffstat (limited to 'tests/flake-bundler.sh')
-rw-r--r--tests/flake-bundler.sh26
1 files changed, 14 insertions, 12 deletions
diff --git a/tests/flake-bundler.sh b/tests/flake-bundler.sh
index 699920f60..9496b8f92 100644
--- a/tests/flake-bundler.sh
+++ b/tests/flake-bundler.sh
@@ -10,26 +10,28 @@ cd $TEST_HOME
cat <<EOF > flake.nix
{
outputs = {self}: {
- bundlers.$system.simple = drv:
+ bundlers.$system = rec {
+ simple = drv:
if drv?type && drv.type == "derivation"
then drv
- else self.defaultPackage.$system;
- defaultBundler.$system = self.bundlers.$system.simple;
- defaultPackage.$system = import ./simple.nix;
- defaultApp.$system = {
- type = "app";
- program = "\${import ./simple.nix}/hello";
- };
+ else self.packages.$system.default;
+ default = simple;
+ };
+ packages.$system.default = import ./simple.nix;
+ apps.$system.default = {
+ type = "app";
+ program = "\${import ./simple.nix}/hello";
+ };
};
}
EOF
nix build .#
nix bundle --bundler .# .#
-nix bundle --bundler .#defaultBundler.$system .#defaultPackage.$system
-nix bundle --bundler .#bundlers.$system.simple .#defaultPackage.$system
+nix bundle --bundler .#bundlers.$system.default .#packages.$system.default
+nix bundle --bundler .#bundlers.$system.simple .#packages.$system.default
-nix bundle --bundler .#defaultBundler.$system .#defaultApp.$system
-nix bundle --bundler .#bundlers.$system.simple .#defaultApp.$system
+nix bundle --bundler .#bundlers.$system.default .#apps.$system.default
+nix bundle --bundler .#bundlers.$system.simple .#apps.$system.default
clearStore