Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e044ccb67c | ||
|
|
d0632f4c48 | ||
|
|
573b3aab66 | ||
|
|
5d00dc9d67 | ||
|
|
bda64b4b65 | ||
|
|
a07ecbc548 | ||
|
|
32a7724c22 | ||
|
|
45ed4e6178 | ||
|
|
21c23031c1 | ||
|
|
a1cd7e5860 |
No files matched your search
@@ -71,7 +71,6 @@
|
|||||||
- [Hacking](contributing/hacking.md)
|
- [Hacking](contributing/hacking.md)
|
||||||
- [CLI guideline](contributing/cli-guideline.md)
|
- [CLI guideline](contributing/cli-guideline.md)
|
||||||
- [Release Notes](release-notes/release-notes.md)
|
- [Release Notes](release-notes/release-notes.md)
|
||||||
- [Release X.Y (202?-??-??)](release-notes/rl-next.md)
|
|
||||||
- [Release 2.6 (2022-01-24)](release-notes/rl-2.6.md)
|
- [Release 2.6 (2022-01-24)](release-notes/rl-2.6.md)
|
||||||
- [Release 2.5 (2021-12-13)](release-notes/rl-2.5.md)
|
- [Release 2.5 (2021-12-13)](release-notes/rl-2.5.md)
|
||||||
- [Release 2.4 (2021-11-01)](release-notes/rl-2.4.md)
|
- [Release 2.4 (2021-11-01)](release-notes/rl-2.4.md)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
then ""
|
then ""
|
||||||
else "pre${builtins.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}_${self.shortRev or "dirty"}";
|
else "pre${builtins.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}_${self.shortRev or "dirty"}";
|
||||||
|
|
||||||
officialRelease = false;
|
officialRelease = true;
|
||||||
|
|
||||||
linux64BitSystems = [ "x86_64-linux" "aarch64-linux" ];
|
linux64BitSystems = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
linuxSystems = linux64BitSystems ++ [ "i686-linux" ];
|
linuxSystems = linux64BitSystems ++ [ "i686-linux" ];
|
||||||
|
|||||||
@@ -590,7 +590,7 @@ create_directories() {
|
|||||||
"$get_chr_own" -R "root:$NIX_BUILD_GROUP_NAME" "$NIX_ROOT" || true
|
"$get_chr_own" -R "root:$NIX_BUILD_GROUP_NAME" "$NIX_ROOT" || true
|
||||||
fi
|
fi
|
||||||
_sudo "to make the basic directory structure of Nix (part 1)" \
|
_sudo "to make the basic directory structure of Nix (part 1)" \
|
||||||
install -dv -m 0755 /nix /nix/var /nix/var/log /nix/var/log/nix /nix/var/log/nix/drvs /nix/var/nix{,/db,/gcroots,/profiles,/temproots,/userpool} /nix/var/nix/{gcroots,profiles}/per-user
|
install -dv -m 0755 /nix /nix/var /nix/var/log /nix/var/log/nix /nix/var/log/nix/drvs /nix/var/nix{,/db,/gcroots,/profiles,/temproots,/userpool,/daemon-socket} /nix/var/nix/{gcroots,profiles}/per-user
|
||||||
|
|
||||||
_sudo "to make the basic directory structure of Nix (part 2)" \
|
_sudo "to make the basic directory structure of Nix (part 2)" \
|
||||||
install -dv -g "$NIX_BUILD_GROUP_NAME" -m 1775 /nix/store
|
install -dv -g "$NIX_BUILD_GROUP_NAME" -m 1775 /nix/store
|
||||||
|
|||||||
@@ -364,15 +364,19 @@ struct StaticEnv
|
|||||||
|
|
||||||
void sort()
|
void sort()
|
||||||
{
|
{
|
||||||
std::sort(vars.begin(), vars.end(),
|
std::stable_sort(vars.begin(), vars.end(),
|
||||||
[](const Vars::value_type & a, const Vars::value_type & b) { return a.first < b.first; });
|
[](const Vars::value_type & a, const Vars::value_type & b) { return a.first < b.first; });
|
||||||
}
|
}
|
||||||
|
|
||||||
void deduplicate()
|
void deduplicate()
|
||||||
{
|
{
|
||||||
const auto last = std::unique(vars.begin(), vars.end(),
|
auto it = vars.begin(), jt = it, end = vars.end();
|
||||||
[] (const Vars::value_type & a, const Vars::value_type & b) { return a.first == b.first; });
|
while (jt != end) {
|
||||||
vars.erase(last, vars.end());
|
*it = *jt++;
|
||||||
|
while (jt != end && it->first == jt->first) *it = *jt++;
|
||||||
|
it++;
|
||||||
|
}
|
||||||
|
vars.erase(it, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vars::const_iterator find(const Symbol & name) const
|
Vars::const_iterator find(const Symbol & name) const
|
||||||
|
|||||||
@@ -405,7 +405,7 @@ expr_select
|
|||||||
expr_simple
|
expr_simple
|
||||||
: ID {
|
: ID {
|
||||||
std::string_view s = "__curPos";
|
std::string_view s = "__curPos";
|
||||||
if (strncmp($1.p, s.data(), s.size()) == 0)
|
if ($1.l == s.size() && strncmp($1.p, s.data(), s.size()) == 0)
|
||||||
$$ = new ExprPos(CUR_POS);
|
$$ = new ExprPos(CUR_POS);
|
||||||
else
|
else
|
||||||
$$ = new ExprVar(CUR_POS, data->symbols.create($1));
|
$$ = new ExprVar(CUR_POS, data->symbols.create($1));
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ struct curlFileTransfer : public FileTransfer
|
|||||||
if (requestHeaders) curl_slist_free_all(requestHeaders);
|
if (requestHeaders) curl_slist_free_all(requestHeaders);
|
||||||
try {
|
try {
|
||||||
if (!done)
|
if (!done)
|
||||||
fail(FileTransferError(Interrupted, nullptr, "download of '%s' was interrupted", request.uri));
|
fail(FileTransferError(Interrupted, {}, "download of '%s' was interrupted", request.uri));
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
ignoreException();
|
ignoreException();
|
||||||
}
|
}
|
||||||
@@ -704,7 +704,7 @@ struct curlFileTransfer : public FileTransfer
|
|||||||
auto s3Res = s3Helper.getObject(bucketName, key);
|
auto s3Res = s3Helper.getObject(bucketName, key);
|
||||||
FileTransferResult res;
|
FileTransferResult res;
|
||||||
if (!s3Res.data)
|
if (!s3Res.data)
|
||||||
throw FileTransferError(NotFound, nullptr, "S3 object '%s' does not exist", request.uri);
|
throw FileTransferError(NotFound, {}, "S3 object '%s' does not exist", request.uri);
|
||||||
res.data = std::move(*s3Res.data);
|
res.data = std::move(*s3Res.data);
|
||||||
callback(std::move(res));
|
callback(std::move(res));
|
||||||
#else
|
#else
|
||||||
|
|||||||
+1
-1
@@ -147,7 +147,7 @@ Path canonPath(PathView path, bool resolveSymlinks)
|
|||||||
path = {};
|
path = {};
|
||||||
} else {
|
} else {
|
||||||
s += path.substr(0, slash);
|
s += path.substr(0, slash);
|
||||||
path = path.substr(slash + 1);
|
path = path.substr(slash);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If s points to a symlink, resolve it and continue from there */
|
/* If s points to a symlink, resolve it and continue from there */
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
3
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
((__curPosFoo: __curPosFoo) 1) + ((__curPosBar: __curPosBar) 2)
|
||||||
|
|
||||||
@@ -40,3 +40,26 @@ testRepl () {
|
|||||||
testRepl
|
testRepl
|
||||||
# Same thing (kind-of), but with a remote store.
|
# Same thing (kind-of), but with a remote store.
|
||||||
testRepl --store "$TEST_ROOT/store?real=$NIX_STORE_DIR"
|
testRepl --store "$TEST_ROOT/store?real=$NIX_STORE_DIR"
|
||||||
|
|
||||||
|
testReplResponse () {
|
||||||
|
local response="$(nix repl <<< "$1")"
|
||||||
|
echo "$response" | grep -qs "$2" \
|
||||||
|
|| fail "repl command set:
|
||||||
|
|
||||||
|
$1
|
||||||
|
|
||||||
|
does not respond with:
|
||||||
|
|
||||||
|
$2
|
||||||
|
|
||||||
|
but with:
|
||||||
|
|
||||||
|
$response"
|
||||||
|
}
|
||||||
|
|
||||||
|
# :a uses the newest version of a symbol
|
||||||
|
testReplResponse '
|
||||||
|
:a { a = "1"; }
|
||||||
|
:a { a = "2"; }
|
||||||
|
"result: ${a}"
|
||||||
|
' "result: 2"
|
||||||
Reference in new issue
Block a user