bundler: tests various combinations of referring to installables

This commit is contained in:
Tom Bereknyei 2022-01-28 10:17:51 -05:00
parent 4ebc50d92e
commit 73e82ae954

View file

@ -10,10 +10,11 @@ cd $TEST_HOME
cat <<EOF > flake.nix cat <<EOF > flake.nix
{ {
outputs = {self}: { outputs = {self}: {
defaultBundler.$system = drv: bundlers.$system.simple = drv:
if drv?type && drv.type == "derivation" if drv?type && drv.type == "derivation"
then drv then drv
else self.defaultPackage.$system; else self.defaultPackage.$system;
defaultBundler.$system = self.bundlers.$system.simple;
defaultPackage.$system = import ./simple.nix; defaultPackage.$system = import ./simple.nix;
defaultApp.$system = { defaultApp.$system = {
type = "app"; type = "app";
@ -24,7 +25,11 @@ cat <<EOF > flake.nix
EOF EOF
nix build .# nix build .#
nix bundle --bundler .# .# nix bundle --bundler .# .#
nix bundle --bundler .#defaultBundler.$system .#defaultPackage.$system 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
clearStore clearStore