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