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