1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 02:43:54 +02:00

Tagging release 2.27.1

-----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCAAxFiEEtUHVUwEnDgvPFcpdgXC0cm1xmN4FAmfheacTHGVkb2xzdHJh
 QGdtYWlsLmNvbQAKCRCBcLRybXGY3kt2B/4tQvs6iDXA12d409ClHbVQjr1d0FLP
 rv8RxZ7Z4+Jaw8r2ra/I+gpr9juI5ULyEJWqfES72hTvbYPjH1Grsrrjak1tx57E
 +STs21oEPojE8LXsFH1oZamGPPIIpyQdxCvTgZs1N6cqUfCRQ3Jx97X6E6SIGJDR
 VqBM4ruSXCY57yT36HqwYydTkxzZHiNP5wwABGfSb7u9pYW5x3r8W7+fQ3udTnCw
 kCRhA5vnfxIQSlxu4j7dJqSCGzOIPnhYB19bXDV4aPhl4sn3pkBCdMZxPBlCWSwx
 it0ngMITf+TeiMpVl2TtvMBOHtlGrbhusbyKcsqzFYULGyGOC9ngTAY3
 =/JzB
 -----END PGP SIGNATURE-----

Merge tag '2.27.1' into detsys-main

Tagging release 2.27.1
This commit is contained in:
Eelco Dolstra 2025-03-24 21:28:03 +01:00
commit dab0ff4f9e
200 changed files with 4734 additions and 1977 deletions

View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
source common.sh
# Store layer needs bugfix
requireDaemonNewerThan "2.27pre20250205"
TODO_NixOS # can't enable a sandbox feature easily
enableFeatures 'recursive-nix'
restartDaemon
NIX_BIN_DIR="$(dirname "$(type -p nix)")"
export NIX_BIN_DIR
expectStderr 1 nix build -L --file ./non-trivial.nix --no-link | grepQuiet "Building dynamic derivations in one shot is not yet implemented"

View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
source common.sh
# Store layer needs bugfix
requireDaemonNewerThan "2.27pre20250205"
skipTest "dyn drv input scheduling had to be reverted for 2.27"
expected=100
if [[ -v NIX_DAEMON_PACKAGE ]]; then expected=1; fi # work around the daemon not returning a 100 status correctly
expectStderr "$expected" nix-build ./text-hashed-output.nix -A failingWrapper --no-out-link \
| grepQuiet "build of '.*use-dynamic-drv-in-non-dynamic-drv-wrong.drv' failed"

View file

@ -12,8 +12,10 @@ suites += {
'recursive-mod-json.sh',
'build-built-drv.sh',
'eval-outputOf.sh',
'failing-outer.sh',
'dep-built-drv.sh',
'old-daemon-error-hack.sh',
'dep-built-drv-2.sh',
],
'workdir': meson.current_source_dir(),
}

View file

@ -0,0 +1,77 @@
with import ./config.nix;
builtins.outputOf
(mkDerivation {
name = "make-derivations.drv";
requiredSystemFeatures = [ "recursive-nix" ];
buildCommand = ''
set -e
set -u
PATH=${builtins.getEnv "NIX_BIN_DIR"}:$PATH
export NIX_CONFIG='extra-experimental-features = nix-command ca-derivations dynamic-derivations'
declare -A deps=(
[a]=""
[b]="a"
[c]="a"
[d]="b c"
[e]="b c d"
)
# Cannot just literally include this, or Nix will think it is the
# *outer* derivation that's trying to refer to itself, and
# substitute the string too soon.
placeholder=$(nix eval --raw --expr 'builtins.placeholder "out"')
declare -A drvs=()
for word in a b c d e; do
inputDrvs=""
for dep in ''${deps[$word]}; do
if [[ "$inputDrvs" != "" ]]; then
inputDrvs+=","
fi
read -r -d "" line <<EOF || true
"''${drvs[$dep]}": {
"outputs": ["out"],
"dynamicOutputs": {}
}
EOF
inputDrvs+="$line"
done
read -r -d "" json <<EOF || true
{
"args": ["-c", "set -xeu; echo \"word env vav $word is \$$word\" >> \"\$out\""],
"builder": "${shell}",
"env": {
"out": "$placeholder",
"$word": "hello, from $word!",
"PATH": ${builtins.toJSON path}
},
"inputDrvs": {
$inputDrvs
},
"inputSrcs": [],
"name": "build-$word",
"outputs": {
"out": {
"method": "nar",
"hashAlgo": "sha256"
}
},
"system": "${system}"
}
EOF
drvs[$word]="$(echo "$json" | nix derivation add)"
done
cp "''${drvs[e]}" $out
'';
__contentAddressed = true;
outputHashMode = "text";
outputHashAlgo = "sha256";
}).outPath
"out"

View file

@ -1,6 +1,6 @@
with import ./config.nix;
# A simple content-addressed derivation.
# A simple content-addressing derivation.
# The derivation can be arbitrarily modified by passing a different `seed`,
# but the output will always be the same
rec {

View file

@ -1,6 +1,6 @@
with import ./config.nix;
# A simple content-addressed derivation.
# A simple content-addressing derivation.
# The derivation can be arbitrarily modified by passing a different `seed`,
# but the output will always be the same
rec {
@ -13,6 +13,7 @@ rec {
echo "Hello World" > $out/hello
'';
};
producingDrv = mkDerivation {
name = "hello.drv";
buildCommand = ''
@ -23,6 +24,7 @@ rec {
outputHashMode = "text";
outputHashAlgo = "sha256";
};
wrapper = mkDerivation {
name = "use-dynamic-drv-in-non-dynamic-drv";
buildCommand = ''
@ -30,4 +32,12 @@ rec {
cp -r ${builtins.outputOf producingDrv.outPath "out"} $out
'';
};
failingWrapper = mkDerivation {
name = "use-dynamic-drv-in-non-dynamic-drv-wrong";
buildCommand = ''
echo "Fail at copying the output of the dynamic derivation"
fail ${builtins.outputOf producingDrv.outPath "out"} $out
'';
};
}