diff options
author | Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> | 2022-03-01 13:58:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-01 13:58:17 +0100 |
commit | 47dec825c5daeeb9d615eb4d1eead3dbaa06c7c9 (patch) | |
tree | 9d4426dfe847570906487649c32c5b320697705c /tests/flake-bundler.sh | |
parent | 79152e307e7eef667c3de9c21571d017654a7c32 (diff) | |
parent | dc92b01885c0c49d094148b1c4dc871ccdd265ad (diff) |
Merge pull request #6181 from obsidiansystems/auto-uid-allocation
Auto uid allocation -- update with latest master
Diffstat (limited to 'tests/flake-bundler.sh')
-rw-r--r-- | tests/flake-bundler.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/flake-bundler.sh b/tests/flake-bundler.sh new file mode 100644 index 000000000..9496b8f92 --- /dev/null +++ b/tests/flake-bundler.sh @@ -0,0 +1,37 @@ +source common.sh + +clearStore +rm -rf $TEST_HOME/.cache $TEST_HOME/.config $TEST_HOME/.local + +cp ./simple.nix ./simple.builder.sh ./config.nix $TEST_HOME + +cd $TEST_HOME + +cat <<EOF > flake.nix +{ + outputs = {self}: { + bundlers.$system = rec { + simple = drv: + if drv?type && drv.type == "derivation" + then drv + 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 .#bundlers.$system.default .#packages.$system.default +nix bundle --bundler .#bundlers.$system.simple .#packages.$system.default + +nix bundle --bundler .#bundlers.$system.default .#apps.$system.default +nix bundle --bundler .#bundlers.$system.simple .#apps.$system.default + +clearStore + |