aboutsummaryrefslogtreecommitdiff
path: root/tests/flake-bundler.sh
diff options
context:
space:
mode:
authorTom Bereknyei <tomberek@gmail.com>2022-01-25 03:39:18 -0500
committerTom Bereknyei <tomberek@gmail.com>2022-01-25 03:39:18 -0500
commit93299efc7c587194de4c88ddcba5d33df3b51bf6 (patch)
treed42f0cea8d165a30c2ce2a731627b1a30027ffbf /tests/flake-bundler.sh
parentc94db0535c4ddd32957fd80d0713797ec73cc70b (diff)
bundler: add tests and change defaults to use a derivation
Diffstat (limited to 'tests/flake-bundler.sh')
-rw-r--r--tests/flake-bundler.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/flake-bundler.sh b/tests/flake-bundler.sh
new file mode 100644
index 000000000..2e52f999d
--- /dev/null
+++ b/tests/flake-bundler.sh
@@ -0,0 +1,23 @@
+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}: {
+ defaultBundler.$system = drv: drv;
+ defaultPackage.$system = import ./simple.nix;
+ };
+}
+EOF
+nix build .#
+nix bundle --bundler .# .#
+nix bundle --bundler .#defaultBundler.$system .#defaultPackage.$system
+
+clearStore
+