mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
bundler: add tests and change defaults to use a derivation
This commit is contained in:
parent
c94db0535c
commit
93299efc7c
3 changed files with 29 additions and 5 deletions
23
tests/flake-bundler.sh
Normal file
23
tests/flake-bundler.sh
Normal file
|
@ -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
|
||||
|
|
@ -48,6 +48,7 @@ nix_tests = \
|
|||
flakes.sh \
|
||||
flake-local-settings.sh \
|
||||
flake-searching.sh \
|
||||
flake-bundler.sh \
|
||||
build.sh \
|
||||
repl.sh ca/repl.sh \
|
||||
ca/build.sh \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue