2022-01-25 08:39:18 +00:00
|
|
|
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}: {
|
2022-02-11 17:11:08 +00:00
|
|
|
bundlers.$system = rec {
|
|
|
|
simple = drv:
|
2022-01-28 14:56:58 +00:00
|
|
|
if drv?type && drv.type == "derivation"
|
|
|
|
then drv
|
2022-02-11 17:11:08 +00:00
|
|
|
else self.packages.$system.default;
|
|
|
|
default = simple;
|
|
|
|
};
|
|
|
|
packages.$system.default = import ./simple.nix;
|
|
|
|
apps.$system.default = {
|
|
|
|
type = "app";
|
|
|
|
program = "\${import ./simple.nix}/hello";
|
|
|
|
};
|
2022-01-25 08:39:18 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
nix build .#
|
|
|
|
nix bundle --bundler .# .#
|
2022-02-11 17:11:08 +00:00
|
|
|
nix bundle --bundler .#bundlers.$system.default .#packages.$system.default
|
|
|
|
nix bundle --bundler .#bundlers.$system.simple .#packages.$system.default
|
2022-01-28 15:17:51 +00:00
|
|
|
|
2022-02-11 17:11:08 +00:00
|
|
|
nix bundle --bundler .#bundlers.$system.default .#apps.$system.default
|
|
|
|
nix bundle --bundler .#bundlers.$system.simple .#apps.$system.default
|
2022-01-25 08:39:18 +00:00
|
|
|
|
|
|
|
clearStore
|
|
|
|
|