mirror of
https://github.com/NixOS/nix
synced 2025-07-18 02:58:27 +02:00
Tagging release 2.26.2
-----BEGIN PGP SIGNATURE----- iQFHBAABCAAxFiEEtUHVUwEnDgvPFcpdgXC0cm1xmN4FAmetA5oTHGVkb2xzdHJh QGdtYWlsLmNvbQAKCRCBcLRybXGY3g2pB/9JAFyjmaXuccbMTO/6x9qwsWuuXNLk OQWzfbdUekvsihZZSFZg1r7KqqXHCi64f0nxLPsJ/0oeDWZktJ5KnbV630nuUlDj ulLCpKdvhWFa8dVx9LiziGwQw4KLx8PjOfwThtQ4DqCWxWEmu6lKkijag9cE+ai4 3mw9YtUjBRxlXyhYLzWz3whLbv37c/m+R8iGS8xm8W260pmei6D0beOIPdfXYBQF PzPlPORyI08A06uqyA3z7bTxzmSMnzvu0QInCPCKSHzFUnTZPHUYuYStFl28NrZS fXKK59L0G7QEfdTRAmqQkdHdtPj2RlYFiMN0kQiNLflvKfGGWdi/kvdx =rRix -----END PGP SIGNATURE----- Merge tag '2.26.2' into sync-2.26.2 Tagging release 2.26.2
This commit is contained in:
commit
4055239936
1395 changed files with 24694 additions and 16040 deletions
2
tests/functional/ca/config.nix
Normal file
2
tests/functional/ca/config.nix
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Shim to get generated file
|
||||
import "${builtins.getEnv "_NIX_TEST_BUILD_DIR"}/ca/config.nix"
|
|
@ -1,13 +1,21 @@
|
|||
with import ./config.nix;
|
||||
|
||||
let mkCADerivation = args: mkDerivation ({
|
||||
__contentAddressed = true;
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
} // args);
|
||||
let
|
||||
mkCADerivation =
|
||||
args:
|
||||
mkDerivation (
|
||||
{
|
||||
__contentAddressed = true;
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
}
|
||||
// args
|
||||
);
|
||||
in
|
||||
|
||||
{ seed ? 0 }:
|
||||
{
|
||||
seed ? 0,
|
||||
}:
|
||||
# A simple content-addressed derivation.
|
||||
# The derivation can be arbitrarily modified by passing a different `seed`,
|
||||
# but the output will always be the same
|
||||
|
@ -23,7 +31,11 @@ rec {
|
|||
};
|
||||
rootCA = mkCADerivation {
|
||||
name = "rootCA";
|
||||
outputs = [ "out" "dev" "foo" ];
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
"foo"
|
||||
];
|
||||
buildCommand = ''
|
||||
echo "building a CA derivation"
|
||||
echo "The seed is ${toString seed}"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
|
||||
source common.sh
|
||||
|
||||
export NIX_TESTS_CA_BY_DEFAULT=1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source ./common.sh
|
||||
source common.sh
|
||||
|
||||
requireDaemonNewerThan "2.4pre20210625"
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
outputs = { self }: import ./content-addressed.nix {};
|
||||
outputs = { self }: import ./content-addressed.nix { };
|
||||
}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
source common.sh
|
||||
|
||||
export NIX_TESTS_CA_BY_DEFAULT=1
|
||||
|
||||
cd .. && source import-derivation.sh
|
||||
|
8
tests/functional/ca/import-from-derivation.sh
Normal file
8
tests/functional/ca/import-from-derivation.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source common.sh
|
||||
|
||||
export NIX_TESTS_CA_BY_DEFAULT=1
|
||||
|
||||
cd .. && source import-from-derivation.sh
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
ca-tests := \
|
||||
$(d)/build-with-garbage-path.sh \
|
||||
$(d)/build.sh \
|
||||
$(d)/build-cache.sh \
|
||||
$(d)/concurrent-builds.sh \
|
||||
$(d)/derivation-json.sh \
|
||||
$(d)/duplicate-realisation-in-closure.sh \
|
||||
$(d)/eval-store.sh \
|
||||
$(d)/gc.sh \
|
||||
$(d)/import-derivation.sh \
|
||||
$(d)/new-build-cmd.sh \
|
||||
$(d)/nix-copy.sh \
|
||||
$(d)/nix-run.sh \
|
||||
$(d)/nix-shell.sh \
|
||||
$(d)/post-hook.sh \
|
||||
$(d)/recursive.sh \
|
||||
$(d)/repl.sh \
|
||||
$(d)/selfref-gc.sh \
|
||||
$(d)/signatures.sh \
|
||||
$(d)/substitute.sh \
|
||||
$(d)/why-depends.sh
|
||||
|
||||
install-tests-groups += ca
|
||||
|
||||
clean-files += \
|
||||
$(d)/config.nix
|
||||
|
||||
test-deps += \
|
||||
tests/functional/ca/config.nix
|
33
tests/functional/ca/meson.build
Normal file
33
tests/functional/ca/meson.build
Normal file
|
@ -0,0 +1,33 @@
|
|||
configure_file(
|
||||
input : 'config.nix.in',
|
||||
output : 'config.nix',
|
||||
configuration : test_confdata,
|
||||
)
|
||||
|
||||
suites += {
|
||||
'name': 'ca',
|
||||
'deps': [],
|
||||
'tests': [
|
||||
'build-with-garbage-path.sh',
|
||||
'build.sh',
|
||||
'build-cache.sh',
|
||||
'concurrent-builds.sh',
|
||||
'derivation-json.sh',
|
||||
'duplicate-realisation-in-closure.sh',
|
||||
'eval-store.sh',
|
||||
'gc.sh',
|
||||
'import-from-derivation.sh',
|
||||
'new-build-cmd.sh',
|
||||
'nix-copy.sh',
|
||||
'nix-run.sh',
|
||||
'nix-shell.sh',
|
||||
'post-hook.sh',
|
||||
'recursive.sh',
|
||||
'repl.sh',
|
||||
'selfref-gc.sh',
|
||||
'signatures.sh',
|
||||
'substitute.sh',
|
||||
'why-depends.sh',
|
||||
],
|
||||
'workdir': meson.current_source_dir(),
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source common.sh
|
||||
|
||||
export NIX_TESTS_CA_BY_DEFAULT=1
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
source common.sh
|
||||
|
||||
FLAKE_PATH=path:$PWD
|
||||
flakeDir="$TEST_HOME/flake"
|
||||
mkdir -p "${flakeDir}"
|
||||
cp flake.nix "${_NIX_TEST_BUILD_DIR}/ca/config.nix" content-addressed.nix "${flakeDir}"
|
||||
|
||||
nix run --no-write-lock-file "$FLAKE_PATH#runnable"
|
||||
nix run --no-write-lock-file "path:${flakeDir}#runnable"
|
||||
|
|
|
@ -5,4 +5,3 @@ source common.sh
|
|||
CONTENT_ADDRESSED=true
|
||||
cd ..
|
||||
source ./nix-shell.sh
|
||||
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
with import ./config.nix;
|
||||
|
||||
let mkCADerivation = args: mkDerivation ({
|
||||
__contentAddressed = true;
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
} // args);
|
||||
let
|
||||
mkCADerivation =
|
||||
args:
|
||||
mkDerivation (
|
||||
{
|
||||
__contentAddressed = true;
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
}
|
||||
// args
|
||||
);
|
||||
in
|
||||
|
||||
rec {
|
||||
|
@ -15,13 +21,15 @@ rec {
|
|||
echo $(date) > $out/current-time
|
||||
'';
|
||||
};
|
||||
dep = seed: mkCADerivation {
|
||||
name = "dep";
|
||||
inherit seed;
|
||||
buildCommand = ''
|
||||
echo ${currentTime} > $out
|
||||
'';
|
||||
};
|
||||
dep =
|
||||
seed:
|
||||
mkCADerivation {
|
||||
name = "dep";
|
||||
inherit seed;
|
||||
buildCommand = ''
|
||||
echo ${currentTime} > $out
|
||||
'';
|
||||
};
|
||||
dep1 = dep 1;
|
||||
dep2 = dep 2;
|
||||
toplevel = mkCADerivation {
|
||||
|
@ -32,4 +40,3 @@ rec {
|
|||
'';
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# A derivation that would certainly fail if several builders tried to
|
||||
# build it at once.
|
||||
|
||||
|
||||
with import ./config.nix;
|
||||
|
||||
mkDerivation {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source common.sh
|
||||
|
||||
export NIX_TESTS_CA_BY_DEFAULT=1
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source common.sh
|
||||
|
||||
export NIX_TESTS_CA_BY_DEFAULT=1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue