aboutsummaryrefslogtreecommitdiff
path: root/tests/flake-bundler.sh
diff options
context:
space:
mode:
authorTom Bereknyei <tomberek@gmail.com>2022-01-28 09:56:58 -0500
committerTom Bereknyei <tomberek@gmail.com>2022-01-28 09:56:58 -0500
commit4ebc50d92e65e7fd9cf30fb84a0c39a13475a31f (patch)
tree822f495936f78465dc762f0ff57e104bd8692ff3 /tests/flake-bundler.sh
parentdc85e20684c6763330d35f7855e8ac741dfdfa23 (diff)
bundler: revert default behavior to use defaultApp
Bundlers are now responsible for correctly handling their inputs which are no longer constrained to be (Drv->Drv)->Drv->Drv, but can be of type (attrset->Drv)->attrset->Drv.
Diffstat (limited to 'tests/flake-bundler.sh')
-rw-r--r--tests/flake-bundler.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/flake-bundler.sh b/tests/flake-bundler.sh
index 2e52f999d..30e2fbd1d 100644
--- a/tests/flake-bundler.sh
+++ b/tests/flake-bundler.sh
@@ -10,8 +10,15 @@ cd $TEST_HOME
cat <<EOF > flake.nix
{
outputs = {self}: {
- defaultBundler.$system = drv: drv;
+ defaultBundler.$system = drv:
+ if drv?type && drv.type == "derivation"
+ then drv
+ else self.defaultPackage.$system;
defaultPackage.$system = import ./simple.nix;
+ defaultApp.$system = {
+ type = "app";
+ program = "\${import ./simple.nix}/hello";
+ };
};
}
EOF