mirror of
https://github.com/NixOS/nix.git
synced 2025-11-18 16:29:36 +01:00
Merge pull request #146 from DeterminateSystems/sync-2.30.1
Sync with 2.30.1
This commit is contained in:
commit
adab14705e
14 changed files with 58 additions and 15 deletions
2
.version
2
.version
|
|
@ -1 +1 @@
|
||||||
2.30.0
|
2.30.1
|
||||||
|
|
|
||||||
13
docker.nix
13
docker.nix
|
|
@ -184,11 +184,14 @@ let
|
||||||
} " = ";
|
} " = ";
|
||||||
};
|
};
|
||||||
|
|
||||||
nixConfContents = toConf {
|
nixConfContents = toConf (
|
||||||
sandbox = false;
|
{
|
||||||
build-users-group = "nixbld";
|
sandbox = false;
|
||||||
trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
|
build-users-group = "nixbld";
|
||||||
};
|
trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
|
||||||
|
}
|
||||||
|
// nixConf
|
||||||
|
);
|
||||||
|
|
||||||
userHome = if uid == 0 then "/root" else "/home/${uname}";
|
userHome = if uid == 0 then "/root" else "/home/${uname}";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -834,8 +834,13 @@ install_from_extracted_nix() {
|
||||||
(
|
(
|
||||||
cd "$EXTRACTED_NIX_PATH"
|
cd "$EXTRACTED_NIX_PATH"
|
||||||
|
|
||||||
_sudo "to copy the basic Nix files to the new store at $NIX_ROOT/store" \
|
if is_os_darwin; then
|
||||||
cp -RPp ./store/* "$NIX_ROOT/store/"
|
_sudo "to copy the basic Nix files to the new store at $NIX_ROOT/store" \
|
||||||
|
cp -RPp ./store/* "$NIX_ROOT/store/"
|
||||||
|
else
|
||||||
|
_sudo "to copy the basic Nix files to the new store at $NIX_ROOT/store" \
|
||||||
|
cp -RP --preserve=ownership,timestamps ./store/* "$NIX_ROOT/store/"
|
||||||
|
fi
|
||||||
|
|
||||||
_sudo "to make the new store non-writable at $NIX_ROOT/store" \
|
_sudo "to make the new store non-writable at $NIX_ROOT/store" \
|
||||||
chmod -R ugo-w "$NIX_ROOT/store/"
|
chmod -R ugo-w "$NIX_ROOT/store/"
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,11 @@ for i in $(cd "$self/store" >/dev/null && echo ./*); do
|
||||||
rm -rf "$i_tmp"
|
rm -rf "$i_tmp"
|
||||||
fi
|
fi
|
||||||
if ! [ -e "$dest/store/$i" ]; then
|
if ! [ -e "$dest/store/$i" ]; then
|
||||||
cp -RPp "$self/store/$i" "$i_tmp"
|
if [ "$(uname -s)" = "Darwin" ]; then
|
||||||
|
cp -RPp "$self/store/$i" "$i_tmp"
|
||||||
|
else
|
||||||
|
cp -RP --preserve=ownership,timestamps "$self/store/$i" "$i_tmp"
|
||||||
|
fi
|
||||||
chmod -R a-w "$i_tmp"
|
chmod -R a-w "$i_tmp"
|
||||||
chmod +w "$i_tmp"
|
chmod +w "$i_tmp"
|
||||||
mv "$i_tmp" "$dest/store/$i"
|
mv "$i_tmp" "$dest/store/$i"
|
||||||
|
|
|
||||||
|
|
@ -1609,7 +1609,7 @@ void EvalState::callFunction(Value & fun, std::span<Value *> args, Value & vRes,
|
||||||
symbols[i.name])
|
symbols[i.name])
|
||||||
.atPos(lambda.pos)
|
.atPos(lambda.pos)
|
||||||
.withTrace(pos, "from call site")
|
.withTrace(pos, "from call site")
|
||||||
.withFrame(*fun.lambda().env, lambda)
|
.withFrame(*vCur.lambda().env, lambda)
|
||||||
.debugThrow();
|
.debugThrow();
|
||||||
}
|
}
|
||||||
env2.values[displ++] = i.def->maybeThunk(*this, env2);
|
env2.values[displ++] = i.def->maybeThunk(*this, env2);
|
||||||
|
|
@ -1636,7 +1636,7 @@ void EvalState::callFunction(Value & fun, std::span<Value *> args, Value & vRes,
|
||||||
.atPos(lambda.pos)
|
.atPos(lambda.pos)
|
||||||
.withTrace(pos, "from call site")
|
.withTrace(pos, "from call site")
|
||||||
.withSuggestions(suggestions)
|
.withSuggestions(suggestions)
|
||||||
.withFrame(*fun.lambda().env, lambda)
|
.withFrame(*vCur.lambda().env, lambda)
|
||||||
.debugThrow();
|
.debugThrow();
|
||||||
}
|
}
|
||||||
unreachable();
|
unreachable();
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ static void prim_fetchClosure(EvalState & state, const PosIdx pos, Value * * arg
|
||||||
for (auto & attr : *args[0]->attrs()) {
|
for (auto & attr : *args[0]->attrs()) {
|
||||||
const auto & attrName = state.symbols[attr.name];
|
const auto & attrName = state.symbols[attr.name];
|
||||||
auto attrHint = [&]() -> std::string {
|
auto attrHint = [&]() -> std::string {
|
||||||
return "while evaluating the '" + attrName + "' attribute passed to builtins.fetchClosure";
|
return fmt("while evaluating the attribute '%s' passed to builtins.fetchClosure", attrName);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (attrName == "fromPath") {
|
if (attrName == "fromPath") {
|
||||||
|
|
|
||||||
12
tests/functional/lang/eval-fail-missing-arg-import.err.exp
Normal file
12
tests/functional/lang/eval-fail-missing-arg-import.err.exp
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
error:
|
||||||
|
… from call site
|
||||||
|
at /pwd/lang/eval-fail-missing-arg-import.nix:1:1:
|
||||||
|
1| import ./non-eval-trivial-lambda-formals.nix { }
|
||||||
|
| ^
|
||||||
|
2|
|
||||||
|
|
||||||
|
error: function 'anonymous lambda' called without required argument 'a'
|
||||||
|
at /pwd/lang/non-eval-trivial-lambda-formals.nix:1:1:
|
||||||
|
1| { a }: a
|
||||||
|
| ^
|
||||||
|
2|
|
||||||
1
tests/functional/lang/eval-fail-missing-arg-import.nix
Normal file
1
tests/functional/lang/eval-fail-missing-arg-import.nix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
import ./non-eval-trivial-lambda-formals.nix { }
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
error:
|
||||||
|
… from call site
|
||||||
|
at /pwd/lang/eval-fail-undeclared-arg-import.nix:1:1:
|
||||||
|
1| import ./non-eval-trivial-lambda-formals.nix {
|
||||||
|
| ^
|
||||||
|
2| a = "a";
|
||||||
|
|
||||||
|
error: function 'anonymous lambda' called with unexpected argument 'b'
|
||||||
|
at /pwd/lang/non-eval-trivial-lambda-formals.nix:1:1:
|
||||||
|
1| { a }: a
|
||||||
|
| ^
|
||||||
|
2|
|
||||||
|
Did you mean a?
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
import ./non-eval-trivial-lambda-formals.nix {
|
||||||
|
a = "a";
|
||||||
|
b = "b";
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
{ a }: a
|
||||||
|
|
@ -81,7 +81,7 @@ let
|
||||||
mkdir -p $out/archive
|
mkdir -p $out/archive
|
||||||
|
|
||||||
dir=NixOS-nixpkgs-${nixpkgs.shortRev}
|
dir=NixOS-nixpkgs-${nixpkgs.shortRev}
|
||||||
cp -prd ${nixpkgs} $dir
|
cp -rd --preserve=ownership,timestamps ${nixpkgs} $dir
|
||||||
# Set the correct timestamp in the tarball.
|
# Set the correct timestamp in the tarball.
|
||||||
find $dir -print0 | xargs -0 touch -h -t ${builtins.substring 0 12 nixpkgs.lastModifiedDate}.${
|
find $dir -print0 | xargs -0 touch -h -t ${builtins.substring 0 12 nixpkgs.lastModifiedDate}.${
|
||||||
builtins.substring 12 2 nixpkgs.lastModifiedDate
|
builtins.substring 12 2 nixpkgs.lastModifiedDate
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ let
|
||||||
|
|
||||||
nixpkgs-repo = pkgs.runCommand "nixpkgs-flake" { } ''
|
nixpkgs-repo = pkgs.runCommand "nixpkgs-flake" { } ''
|
||||||
dir=NixOS-nixpkgs-${nixpkgs.shortRev}
|
dir=NixOS-nixpkgs-${nixpkgs.shortRev}
|
||||||
cp -prd ${nixpkgs} $dir
|
cp -rd --preserve=ownership,timestamps ${nixpkgs} $dir
|
||||||
|
|
||||||
# Set the correct timestamp in the tarball.
|
# Set the correct timestamp in the tarball.
|
||||||
find $dir -print0 | xargs -0 touch -h -t ${builtins.substring 0 12 nixpkgs.lastModifiedDate}.${
|
find $dir -print0 | xargs -0 touch -h -t ${builtins.substring 0 12 nixpkgs.lastModifiedDate}.${
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ let
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
dir=nixpkgs-${nixpkgs.shortRev}
|
dir=nixpkgs-${nixpkgs.shortRev}
|
||||||
cp -prd ${nixpkgs} $dir
|
cp -rd --preserve=ownership,timestamps ${nixpkgs} $dir
|
||||||
# Set the correct timestamp in the tarball.
|
# Set the correct timestamp in the tarball.
|
||||||
find $dir -print0 | xargs -0 touch -h -t ${builtins.substring 0 12 nixpkgs.lastModifiedDate}.${
|
find $dir -print0 | xargs -0 touch -h -t ${builtins.substring 0 12 nixpkgs.lastModifiedDate}.${
|
||||||
builtins.substring 12 2 nixpkgs.lastModifiedDate
|
builtins.substring 12 2 nixpkgs.lastModifiedDate
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue