1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-09 16:13:54 +02:00

Move the 'nix bundle' tests

Note: these were previously not actually called.
This commit is contained in:
Eelco Dolstra 2022-07-13 20:49:07 +02:00
parent d16f1070f4
commit 7abcafcfea
2 changed files with 3 additions and 7 deletions

32
tests/flakes/bundle.sh Normal file
View file

@ -0,0 +1,32 @@
source common.sh
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