Compare commits
42
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71353962cf | ||
|
|
dc5399dedc | ||
|
|
19ad871b74 | ||
|
|
f76b2961e7 | ||
|
|
fa92f41a18 | ||
|
|
6e0ca02425 | ||
|
|
accfd8aa9d | ||
|
|
f5ff70d7f3 | ||
|
|
d461cc1d7b | ||
|
|
55a32f24d3 | ||
|
|
5af76dee37 | ||
|
|
4162a66cee | ||
|
|
b6a08a2fed | ||
|
|
f4f6d1d8e2 | ||
|
|
06220a71c1 | ||
|
|
b51ea465de | ||
|
|
b9f91ec3c5 | ||
|
|
4c7165be86 | ||
|
|
14bf54bd39 | ||
|
|
d00edfb28d | ||
|
|
139cfdfb53 | ||
|
|
59bf6825ef | ||
|
|
4f0c27abe1 | ||
|
|
e040b762a4 | ||
|
|
af1dcc2d5e | ||
|
|
5eec6418de | ||
|
|
c65f5dd18e | ||
|
|
b252b3c6e3 | ||
|
|
4857feb910 | ||
|
|
73ddc4540f | ||
|
|
45ac449d39 | ||
|
|
18a06aad52 | ||
|
|
e7517419a6 | ||
|
|
24852355d8 | ||
|
|
865a3732fa | ||
|
|
0dd1d8ca1c | ||
|
|
d3286d0990 | ||
|
|
010ff57ebb | ||
|
|
a55112898e | ||
|
|
b2944d93a6 | ||
|
|
d85309f7ca | ||
|
|
d92712673b |
@@ -44,6 +44,11 @@ cole-h:
|
||||
display_name: Cole Helbling
|
||||
github: cole-h
|
||||
|
||||
delan:
|
||||
display_name: delan
|
||||
forgejo: delan
|
||||
github: delan
|
||||
|
||||
edolstra:
|
||||
display_name: Eelco Dolstra
|
||||
github: edolstra
|
||||
@@ -91,6 +96,10 @@ puck:
|
||||
forgejo: puck
|
||||
github: puckipedia
|
||||
|
||||
quantumjump:
|
||||
display_name: Quantum Jump
|
||||
github: QuantumBJump
|
||||
|
||||
r-vdp:
|
||||
github: r-vdp
|
||||
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
---
|
||||
synopsis: "Trace which part of a `foo.bar.baz` expression errors"
|
||||
cls: 1505, 1506
|
||||
credits: Qyriad
|
||||
category: Improvements
|
||||
---
|
||||
|
||||
Previously, if an attribute path selection expression like `linux_4_9.meta.description` it wouldn't show you which one of those parts in the attribute path, or even that that line of code is what caused evaluation of the failing expression.
|
||||
The previous error looks like this:
|
||||
|
||||
```
|
||||
pkgs.linuxKernel.kernels.linux_4_9.meta.description
|
||||
|
||||
error:
|
||||
… while evaluating the attribute 'linuxKernel.kernels.linux_4_9.meta.description'
|
||||
at /nix/store/dk2rpyb6ndvfbf19bkb2plcz5y3k8i5v-source/pkgs/top-level/linux-kernels.nix:278:5:
|
||||
277| } // lib.optionalAttrs config.allowAliases {
|
||||
278| linux_4_9 = throw "linux 4.9 was removed because it will reach its end of life within 22.11";
|
||||
| ^
|
||||
279| linux_4_14 = throw "linux 4.14 was removed because it will reach its end of life within 23.11";
|
||||
|
||||
… while calling the 'throw' builtin
|
||||
at /nix/store/dk2rpyb6ndvfbf19bkb2plcz5y3k8i5v-source/pkgs/top-level/linux-kernels.nix:278:17:
|
||||
277| } // lib.optionalAttrs config.allowAliases {
|
||||
278| linux_4_9 = throw "linux 4.9 was removed because it will reach its end of life within 22.11";
|
||||
| ^
|
||||
279| linux_4_14 = throw "linux 4.14 was removed because it will reach its end of life within 23.11";
|
||||
|
||||
error: linux 4.9 was removed because it will reach its end of life within 22.11
|
||||
```
|
||||
|
||||
Now, the error will look like this:
|
||||
|
||||
```
|
||||
pkgs.linuxKernel.kernels.linux_4_9.meta.description
|
||||
|
||||
error:
|
||||
… while evaluating the attribute 'linuxKernel.kernels.linux_4_9.meta.description'
|
||||
at /nix/store/dk2rpyb6ndvfbf19bkb2plcz5y3k8i5v-source/pkgs/top-level/linux-kernels.nix:278:5:
|
||||
277| } // lib.optionalAttrs config.allowAliases {
|
||||
278| linux_4_9 = throw "linux 4.9 was removed because it will reach its end of life within 22.11";
|
||||
| ^
|
||||
279| linux_4_14 = throw "linux 4.14 was removed because it will reach its end of life within 23.11";
|
||||
|
||||
… while evaluating 'pkgs.linuxKernel.kernels.linux_4_9' to select 'meta' on it
|
||||
at «string»:1:1:
|
||||
1| pkgs.linuxKernel.kernels.linux_4_9.meta.description
|
||||
| ^
|
||||
|
||||
… caused by explicit throw
|
||||
at /nix/store/dk2rpyb6ndvfbf19bkb2plcz5y3k8i5v-source/pkgs/top-level/linux-kernels.nix:278:17:
|
||||
277| } // lib.optionalAttrs config.allowAliases {
|
||||
278| linux_4_9 = throw "linux 4.9 was removed because it will reach its end of life within 22.11";
|
||||
| ^
|
||||
279| linux_4_14 = throw "linux 4.14 was removed because it will reach its end of life within 23.11";
|
||||
|
||||
error: linux 4.9 was removed because it will reach its end of life within 22.11
|
||||
```
|
||||
|
||||
Not only does the line of code that referenced the failing attribute show up in the trace, it also tells you that it was specifically the `linux_4_9` part that failed.
|
||||
|
||||
This includes if the failing part is a top-level binding:
|
||||
|
||||
```
|
||||
let
|
||||
inherit (pkgs.linuxKernel.kernels) linux_4_9;
|
||||
in linux_4_9.meta.description
|
||||
error:
|
||||
… while evaluating 'linux_4_9' to select 'meta.description' on it
|
||||
at «string»:3:4:
|
||||
2| inherit (pkgs.linuxKernel.kernels) linux_4_9;
|
||||
3| in linux_4_9.meta.description
|
||||
| ^
|
||||
|
||||
… while evaluating the attribute 'linux_4_9'
|
||||
at /nix/store/dk2rpyb6ndvfbf19bkb2plcz5y3k8i5v-source/pkgs/top-level/linux-kernels.nix:278:5:
|
||||
277| } // lib.optionalAttrs config.allowAliases {
|
||||
278| linux_4_9 = throw "linux 4.9 was removed because it will reach its end of life within 22.11";
|
||||
| ^
|
||||
279| linux_4_14 = throw "linux 4.14 was removed because it will reach its end of life within 23.11";
|
||||
|
||||
… caused by explicit throw
|
||||
at /nix/store/dk2rpyb6ndvfbf19bkb2plcz5y3k8i5v-source/pkgs/top-level/linux-kernels.nix:278:17:
|
||||
277| } // lib.optionalAttrs config.allowAliases {
|
||||
278| linux_4_9 = throw "linux 4.9 was removed because it will reach its end of life within 22.11";
|
||||
| ^
|
||||
279| linux_4_14 = throw "linux 4.14 was removed because it will reach its end of life within 23.11";
|
||||
|
||||
error: linux 4.9 was removed because it will reach its end of life within 22.11
|
||||
```
|
||||
@@ -0,0 +1,70 @@
|
||||
---
|
||||
synopsis: "Distinguish between explicit throws and errors that happened while evaluating a throw"
|
||||
cls: 1511
|
||||
credits: Qyriad
|
||||
category: Improvements
|
||||
---
|
||||
|
||||
Previously, errors caused by an expression like `throw "invalid argument"` were treated like an error that happened simply while some builtin function was being called:
|
||||
|
||||
```
|
||||
let
|
||||
throwMsg = p: throw "${p} isn't the right package";
|
||||
in throwMsg "linuz"
|
||||
|
||||
error:
|
||||
… while calling the 'throw' builtin
|
||||
at «string»:2:17:
|
||||
1| let
|
||||
2| throwMsg = p: throw "${p} isn't the right package";
|
||||
| ^
|
||||
3| in throwMsg "linuz"
|
||||
|
||||
error: linuz isn't the right package
|
||||
```
|
||||
|
||||
But the error didn't just happen "while" calling the `throw` builtin — it's a throw error!
|
||||
Now it looks like this:
|
||||
|
||||
```
|
||||
let
|
||||
throwMsg = p: throw "${p} isn't the right package";
|
||||
in throwMsg "linuz"
|
||||
|
||||
error:
|
||||
… caused by explicit throw
|
||||
at «string»:2:17:
|
||||
1| let
|
||||
2| throwMsg = p: throw "${p} isn't the right package";
|
||||
| ^
|
||||
3| in throwMsg "linuz"
|
||||
|
||||
error: linuz isn't the right package
|
||||
```
|
||||
|
||||
This also means that incorrect usage of `throw` or errors evaluating its arguments are easily distinguishable from explicit throws:
|
||||
|
||||
```
|
||||
let
|
||||
throwMsg = p: throw "${p} isn't the right package";
|
||||
in throwMsg { attrs = "error when coerced in string interpolation"; }
|
||||
|
||||
error:
|
||||
… while calling the 'throw' builtin
|
||||
at «string»:2:17:
|
||||
1| let
|
||||
2| throwMsg = p: throw "${p} isn't the right package";
|
||||
| ^
|
||||
3| in throwMsg { attrs = "error when coerced in string interpolation"; }
|
||||
|
||||
… while evaluating a path segment
|
||||
at «string»:2:24:
|
||||
1| let
|
||||
2| throwMsg = p: throw "${p} isn't the right package";
|
||||
| ^
|
||||
3| in throwMsg { attrs = "error when coerced in string interpolation"; }
|
||||
|
||||
error: cannot coerce a set to a string: { attrs = "error when coerced in string interpolation"; }
|
||||
```
|
||||
|
||||
Here, instead of an actual thrown error, a type error happens first (trying to coerce an attribute set to a string), but that type error happened *while* calling `throw`.
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
synopsis: Fix nix-collect-garbage --dry-run
|
||||
issues: [fj#432]
|
||||
cls: [1566]
|
||||
category: Fixes
|
||||
credits: [quantumjump]
|
||||
---
|
||||
|
||||
`nix-collect-garbage --dry-run` did not previously give any output - it simply
|
||||
exited without even checking to see what paths would be deleted.
|
||||
|
||||
```
|
||||
$ nix-collect-garbage --dry-run
|
||||
$
|
||||
```
|
||||
|
||||
We updated the behaviour of the flag such that instead it prints out how many
|
||||
paths it *would* delete, but doesn't actually delete them.
|
||||
|
||||
```
|
||||
$ nix-collect-garbage --dry-run
|
||||
finding garbage collector roots...
|
||||
determining live/dead paths...
|
||||
...
|
||||
<nix store paths>
|
||||
...
|
||||
2670 store paths deleted, 0.00MiB freed
|
||||
$
|
||||
```
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
synopsis: "Hash mismatch diagnostics for fixed-output derivations include the URL"
|
||||
cls: [1536]
|
||||
credits: [jade]
|
||||
category: Improvements
|
||||
---
|
||||
|
||||
Now, when building fixed-output derivations, Lix will guess the URL that was used in the derivation using the `url` or `urls` properties in the derivation environment.
|
||||
This is a layering violation but making these diagnostics tractable when there are multiple instances of the `AAAA` hash is too significant of an improvement to pass it up.
|
||||
|
||||
```
|
||||
error: hash mismatch in fixed-output derivation '/nix/store/sjfw324j4533lwnpmr5z4icpb85r63ai-x1.drv':
|
||||
likely URL: https://meow.puppy.forge/puppy.tar.gz
|
||||
specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
|
||||
got: sha256-a1Qvp3FOOkWpL9kFHgugU1ok5UtRPSu+NwCZKbbaEro=
|
||||
```
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
synopsis: "`nix registry add` now requires a shorthand flakeref on the 'from' side"
|
||||
cls: 1494
|
||||
credits: delan
|
||||
category: Improvements
|
||||
---
|
||||
|
||||
The 'from' argument must now be a shorthand flakeref like `nixpkgs` or `nixpkgs/nixos-20.03`, making it harder to accidentally swap the 'from' and 'to' arguments.
|
||||
|
||||
Registry entries that map from other flake URLs can still be specified in registry.json, the `nix.registry` option in NixOS, or the `--override-flake` option in the CLI, but they are not guaranteed to work correctly.
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
synopsis: Allow automatic rejection of configuration options from flakes
|
||||
cls: [1541]
|
||||
credits: [alois31]
|
||||
category: Improvements
|
||||
---
|
||||
|
||||
Setting `accept-flake-config` to `false` now respects user choice by automatically rejecting configuration options set by flakes.
|
||||
The old behaviour of asking each time is still available (and default) by setting it to the special value `ask`.
|
||||
@@ -433,9 +433,6 @@ I grepped `src/` for `get[eE]nv\("` to find the mentions in Lix code.
|
||||
- `NIX_PROFILE` - Selects which profile `nix-env` will operate on. Documented elsewhere.
|
||||
- `NIX_SSHOPTS` - Options passed to `ssh(1)` when using a ssh remote store.
|
||||
Incorrectly documented on `nix-copy-closure` which is *surely* not the only place they are used??
|
||||
- `_NIX_TEST_NO_LSOF` - Used on non-Linux, non-macOS platforms to disable using `lsof` when finding gc roots.
|
||||
|
||||
Since https://git.lix.systems/lix-project/lix/issues/156 was fixed, this should probably just be removed as it was a bad workaround for a macOS issue.
|
||||
- `_NIX_TEST_GC_SYNC_1` - Path to a pipe that is used to block the GC briefly to validate invariants from the test suite.
|
||||
- `_NIX_TEST_GC_SYNC_2` - Path to a pipe that is used to block the GC briefly to validate invariants from the test suite.
|
||||
- `_NIX_TEST_FREE_SPACE_FILE` - Path to a file containing a decimal number with the free space that the GC is to believe it has.
|
||||
|
||||
+11
@@ -142,6 +142,16 @@ else
|
||||
cpp_pch = []
|
||||
endif
|
||||
|
||||
# gcc 12 is known to miscompile some coroutine-based code quite horribly,
|
||||
# causing (among other things) copies of move-only objects and the double
|
||||
# frees one would expect when the objects are unique_ptrs. these problems
|
||||
# often show up as memory corruption when nesting generators (since we do
|
||||
# treat generators like owned memory) and will cause inexplicable crashs.
|
||||
assert(
|
||||
cxx.get_id() != 'gcc' or cxx.version().version_compare('>=13'),
|
||||
'GCC 12 and earlier are known to miscompile lix coroutines, use GCC 13 or clang.'
|
||||
)
|
||||
|
||||
|
||||
# Translate some historical and Mesony CPU names to Lixy CPU names.
|
||||
# FIXME(Qyriad): the 32-bit x86 code is not tested right now, because cross compilation for Lix
|
||||
@@ -432,6 +442,7 @@ add_project_arguments(
|
||||
'-Wimplicit-fallthrough',
|
||||
'-Werror=switch',
|
||||
'-Werror=switch-enum',
|
||||
'-Werror=unused-result',
|
||||
'-Wdeprecated-copy',
|
||||
'-Wignored-qualifiers',
|
||||
# Enable assertions in libstdc++ by default. Harmless on libc++. Benchmarked
|
||||
|
||||
@@ -65,5 +65,6 @@ if cxx.get_linker_id() in ['ld.bfd', 'ld.gold']
|
||||
endif
|
||||
|
||||
libstore = dependency('lixstore', 'lix-store', required : true)
|
||||
libutil = dependency('lixutil', 'lix-util', required : true)
|
||||
|
||||
subdir('lib/Nix')
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "built-path.hh"
|
||||
#include "derivations.hh"
|
||||
#include "store-api.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
#include "derived-path.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include <set>
|
||||
|
||||
#include "cmd-profiles.hh"
|
||||
@@ -244,7 +248,7 @@ StorePath ProfileManifest::build(ref<Store> store)
|
||||
|
||||
/* Add the symlink tree to the store. */
|
||||
StringSink sink;
|
||||
dumpPath(tempDir, sink);
|
||||
sink << dumpPath(tempDir);
|
||||
|
||||
auto narHash = hashString(htSHA256, sink.s);
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "command.hh"
|
||||
#include "store-api.hh"
|
||||
#include "local-fs-store.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "eval-settings.hh"
|
||||
#include "common-eval-args.hh"
|
||||
#include "shared.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "editor-for.hh"
|
||||
#include "environment-variables.hh"
|
||||
#include "source-path.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "globals.hh"
|
||||
#include "installable-attr-path.hh"
|
||||
#include "outputs-spec.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "installable-derived-path.hh"
|
||||
#include "derivations.hh"
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "globals.hh"
|
||||
#include "installable-flake.hh"
|
||||
#include "installable-derived-path.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "installable-value.hh"
|
||||
#include "eval-cache.hh"
|
||||
#include "fetch-to-store.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "globals.hh"
|
||||
#include "installables.hh"
|
||||
#include "installable-derived-path.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "legacy.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "markdown.hh"
|
||||
#include "error.hh"
|
||||
#include "finally.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
libcmd_sources = files(
|
||||
'built-path.cc',
|
||||
'cmd-profiles.cc',
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "error.hh"
|
||||
#include "file-system.hh"
|
||||
#include "logging.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
/// @file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
info: initial: functions:
|
||||
let
|
||||
final = builtins.foldl' (prev: function: prev // (function info final prev)) initial functions;
|
||||
|
||||
+10
-6
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include <cstdio>
|
||||
#include <editline.h>
|
||||
#include <iostream>
|
||||
@@ -32,7 +36,6 @@
|
||||
#include "local-fs-store.hh"
|
||||
#include "signals.hh"
|
||||
#include "print.hh"
|
||||
#include "progress-bar.hh"
|
||||
#include "gc-small-vector.hh"
|
||||
#include "users.hh"
|
||||
|
||||
@@ -252,7 +255,7 @@ void runNix(Path program, const Strings & args)
|
||||
.program = settings.nixBinDir+ "/" + program,
|
||||
.args = args,
|
||||
.environment = subprocessEnv,
|
||||
});
|
||||
}).wait();
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -300,7 +303,7 @@ ReplExitStatus NixRepl::mainLoop()
|
||||
|
||||
/* Stop the progress bar because it interferes with the display of
|
||||
the repl. */
|
||||
stopProgressBar();
|
||||
logger->pause();
|
||||
|
||||
std::string input;
|
||||
|
||||
@@ -651,7 +654,7 @@ ProcessLineResult NixRepl::processLine(std::string line)
|
||||
|
||||
// runProgram redirects stdout to a StringSink,
|
||||
// using runProgram2 to allow editors to display their UI
|
||||
runProgram2(RunOptions { .program = editor, .searchPath = true, .args = args });
|
||||
runProgram2(RunOptions { .program = editor, .searchPath = true, .args = args }).wait();
|
||||
|
||||
// Reload right after exiting the editor
|
||||
state->resetFileCache();
|
||||
@@ -684,9 +687,10 @@ ProcessLineResult NixRepl::processLine(std::string line)
|
||||
// TODO: this only shows a progress bar for explicitly initiated builds,
|
||||
// not eval-time fetching or builds performed for IFD.
|
||||
// But we can't just show it everywhere, since that would erase partial output from evaluation.
|
||||
startProgressBar();
|
||||
logger->resetProgress();
|
||||
logger->resume();
|
||||
Finally stopLogger([&]() {
|
||||
stopProgressBar();
|
||||
logger->pause();
|
||||
});
|
||||
|
||||
state->store->buildPaths({
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "attr-path.hh"
|
||||
#include "eval-inline.hh"
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "attr-set.hh"
|
||||
#include "eval-inline.hh"
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "eval-cache.hh"
|
||||
#include "sqlite.hh"
|
||||
#include "eval.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "eval-error.hh"
|
||||
#include "eval.hh"
|
||||
#include "value.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "file-system.hh"
|
||||
#include "globals.hh"
|
||||
#include "profiles.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
#include "config.hh"
|
||||
|
||||
+67
-4
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "eval.hh"
|
||||
#include "eval-settings.hh"
|
||||
#include "hash.hh"
|
||||
@@ -1432,7 +1436,20 @@ void ExprSelect::eval(EvalState & state, Env & env, Value & v)
|
||||
Value * vCurrent = &vFirst;
|
||||
// Position for the current attrset Value in this select chain.
|
||||
PosIdx posCurrent;
|
||||
e->eval(state, env, vFirst);
|
||||
|
||||
try {
|
||||
e->eval(state, env, vFirst);
|
||||
} catch (Error & e) {
|
||||
assert(this->e != nullptr);
|
||||
state.addErrorTrace(
|
||||
e,
|
||||
getPos(),
|
||||
"while evaluating '%s' to select '%s' on it",
|
||||
ExprPrinter(state, *this->e),
|
||||
showAttrPath(state.symbols, this->attrPath)
|
||||
);
|
||||
throw;
|
||||
}
|
||||
|
||||
try {
|
||||
auto dts = state.debugRepl
|
||||
@@ -1445,12 +1462,46 @@ void ExprSelect::eval(EvalState & state, Env & env, Value & v)
|
||||
showAttrPath(state, env, attrPath))
|
||||
: nullptr;
|
||||
|
||||
for (auto const & currentAttrName : attrPath) {
|
||||
for (auto const & [partIdx, currentAttrName] : enumerate(attrPath)) {
|
||||
state.nrLookups++;
|
||||
|
||||
Symbol const name = getName(currentAttrName, state, env);
|
||||
|
||||
state.forceValue(*vCurrent, pos);
|
||||
// For formatting errors, which should be done only when needed.
|
||||
auto partsSoFar = [&]() -> std::string {
|
||||
std::stringstream ss;
|
||||
// We start with the base thing this ExprSelect is selecting on.
|
||||
assert(this->e != nullptr);
|
||||
this->e->show(state.symbols, ss);
|
||||
|
||||
// Then grab each part of the attr path up to this one.
|
||||
assert(partIdx < attrPath.size());
|
||||
std::span<AttrName> const parts(
|
||||
attrPath.begin(),
|
||||
attrPath.begin() + partIdx
|
||||
);
|
||||
|
||||
// And convert them to strings and join them.
|
||||
for (auto const & part : parts) {
|
||||
auto const partName = getName(part, state, env);
|
||||
ss << "." << state.symbols[partName];
|
||||
}
|
||||
|
||||
return ss.str();
|
||||
};
|
||||
|
||||
try {
|
||||
state.forceValue(*vCurrent, pos);
|
||||
} catch (Error & e) {
|
||||
state.addErrorTrace(
|
||||
e,
|
||||
getPos(),
|
||||
"while evaluating '%s' to select '%s' on it",
|
||||
partsSoFar(),
|
||||
state.symbols[name]
|
||||
);
|
||||
throw;
|
||||
}
|
||||
|
||||
if (vCurrent->type() != nAttrs) {
|
||||
|
||||
@@ -1466,7 +1517,10 @@ void ExprSelect::eval(EvalState & state, Env & env, Value & v)
|
||||
"expected a set but found %s: %s",
|
||||
showType(*vCurrent),
|
||||
ValuePrinter(state, *vCurrent, errorPrintOptions)
|
||||
).withTrace(pos, "while selecting an attribute").debugThrow();
|
||||
).addTrace(
|
||||
pos,
|
||||
HintFmt("while selecting '%s' on '%s'", state.symbols[name], partsSoFar())
|
||||
).debugThrow();
|
||||
}
|
||||
|
||||
// Now that we know this is actually an attrset, try to find an attr
|
||||
@@ -1757,6 +1811,15 @@ void EvalState::callFunction(Value & fun, size_t nrArgs, Value * * args, Value &
|
||||
|
||||
try {
|
||||
fn->fun(*this, vCur.determinePos(noPos), args, vCur);
|
||||
} catch (ThrownError & e) {
|
||||
// Distinguish between an error that simply happened while "throw"
|
||||
// was being evaluated and an explicit thrown error.
|
||||
if (fn->name == "throw") {
|
||||
addErrorTrace(e, pos, "caused by explicit %s", "throw");
|
||||
} else {
|
||||
addErrorTrace(e, pos, "while calling the '%s' builtin", fn->name);
|
||||
}
|
||||
throw;
|
||||
} catch (Error & e) {
|
||||
addErrorTrace(e, pos, "while calling the '%1%' builtin", fn->name);
|
||||
throw;
|
||||
|
||||
+30
-24
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
@@ -9,14 +13,13 @@
|
||||
#include "symbol-table.hh"
|
||||
#include "config.hh"
|
||||
#include "experimental-features.hh"
|
||||
#include "input-accessor.hh"
|
||||
#include "search-path.hh"
|
||||
#include "repl-exit-status.hh"
|
||||
|
||||
#include <gc/gc_allocator.h>
|
||||
#include <map>
|
||||
#include <optional>
|
||||
#include <unordered_map>
|
||||
#include <mutex>
|
||||
#include <functional>
|
||||
|
||||
namespace nix {
|
||||
@@ -38,11 +41,26 @@ namespace eval_cache {
|
||||
class EvalCache;
|
||||
}
|
||||
|
||||
/** Alias for std::map which uses boehmgc's allocator conditional on us actually
|
||||
* using boehmgc in this build.
|
||||
*/
|
||||
#if HAVE_BOEHMGC
|
||||
template<typename KeyT, typename ValueT>
|
||||
using GcMap = std::map<
|
||||
KeyT,
|
||||
ValueT,
|
||||
std::less<KeyT>,
|
||||
traceable_allocator<std::pair<KeyT const, ValueT>>
|
||||
>;
|
||||
#else
|
||||
using GcMap = std::map<KeyT, ValueT>
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Function that implements a primop.
|
||||
*/
|
||||
typedef void (* PrimOpFun) (EvalState & state, const PosIdx pos, Value * * args, Value & v);
|
||||
using PrimOpImpl = void(EvalState & state, PosIdx pos, Value ** args, Value & v);
|
||||
|
||||
/**
|
||||
* Info about a primitive operation, and its implementation
|
||||
@@ -76,7 +94,7 @@ struct PrimOp
|
||||
/**
|
||||
* Implementation of the primop.
|
||||
*/
|
||||
std::function<std::remove_pointer<PrimOpFun>::type> fun;
|
||||
std::function<PrimOpImpl> fun;
|
||||
|
||||
/**
|
||||
* Optional experimental for this to be gated on.
|
||||
@@ -115,11 +133,7 @@ struct Constant
|
||||
bool impureOnly = false;
|
||||
};
|
||||
|
||||
#if HAVE_BOEHMGC
|
||||
typedef std::map<std::string, Value *, std::less<std::string>, traceable_allocator<std::pair<const std::string, Value *> > > ValMap;
|
||||
#else
|
||||
typedef std::map<std::string, Value *> ValMap;
|
||||
#endif
|
||||
using ValMap = GcMap<std::string, Value *>;
|
||||
|
||||
struct Env
|
||||
{
|
||||
@@ -214,7 +228,7 @@ public:
|
||||
/**
|
||||
* Debugger
|
||||
*/
|
||||
ReplExitStatus (* debugRepl)(ref<EvalState> es, const ValMap & extraEnv);
|
||||
std::function<ReplExitStatus(ref<EvalState> es, ValMap const & extraEnv)> debugRepl;
|
||||
bool debugStop;
|
||||
bool inDebugger = false;
|
||||
int trylevel;
|
||||
@@ -252,21 +266,13 @@ private:
|
||||
/**
|
||||
* A cache from path names to parse trees.
|
||||
*/
|
||||
#if HAVE_BOEHMGC
|
||||
typedef std::map<SourcePath, Expr *, std::less<SourcePath>, traceable_allocator<std::pair<const SourcePath, Expr *>>> FileParseCache;
|
||||
#else
|
||||
typedef std::map<SourcePath, Expr *> FileParseCache;
|
||||
#endif
|
||||
using FileParseCache = GcMap<SourcePath, Expr *>;
|
||||
FileParseCache fileParseCache;
|
||||
|
||||
/**
|
||||
* A cache from path names to values.
|
||||
*/
|
||||
#if HAVE_BOEHMGC
|
||||
typedef std::map<SourcePath, Value, std::less<SourcePath>, traceable_allocator<std::pair<const SourcePath, Value>>> FileEvalCache;
|
||||
#else
|
||||
typedef std::map<SourcePath, Value> FileEvalCache;
|
||||
#endif
|
||||
using FileEvalCache = GcMap<SourcePath, Value>;
|
||||
FileEvalCache fileEvalCache;
|
||||
|
||||
SearchPath searchPath;
|
||||
@@ -737,15 +743,15 @@ private:
|
||||
|
||||
bool countCalls;
|
||||
|
||||
typedef std::map<std::string, size_t> PrimOpCalls;
|
||||
using PrimOpCalls = std::map<std::string, size_t>;
|
||||
PrimOpCalls primOpCalls;
|
||||
|
||||
typedef std::map<ExprLambda *, size_t> FunctionCalls;
|
||||
using FunctionCalls = std::map<ExprLambda *, size_t>;
|
||||
FunctionCalls functionCalls;
|
||||
|
||||
void incrFunctionCall(ExprLambda * fun);
|
||||
|
||||
typedef std::map<PosIdx, size_t> AttrSelects;
|
||||
using AttrSelects = std::map<PosIdx, size_t>;
|
||||
AttrSelects attrSelects;
|
||||
|
||||
friend struct ExprOpUpdate;
|
||||
@@ -787,7 +793,7 @@ std::string showType(const Value & v);
|
||||
*/
|
||||
SourcePath resolveExprPath(SourcePath path);
|
||||
|
||||
static const std::string corepkgsPrefix{"/__corepkgs__/"};
|
||||
static constexpr std::string_view corepkgsPrefix{"/__corepkgs__/"};
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
{
|
||||
system ? "", # obsolete
|
||||
url,
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
lockFileStr: rootSrc: rootSubdir:
|
||||
|
||||
let
|
||||
|
||||
+40
-20
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "flake.hh"
|
||||
#include "logging.hh"
|
||||
#include "users.hh"
|
||||
@@ -51,30 +55,46 @@ void ConfigFile::apply()
|
||||
else
|
||||
assert(false);
|
||||
|
||||
if (!whitelist.count(baseName) && !nix::fetchSettings.acceptFlakeConfig) {
|
||||
bool trusted = false;
|
||||
auto trustedList = readTrustedList();
|
||||
auto tlname = get(trustedList, name);
|
||||
if (auto saved = tlname ? get(*tlname, valueS) : nullptr) {
|
||||
trusted = *saved;
|
||||
printInfo("Using saved setting for '%s = %s' from ~/.local/share/nix/trusted-settings.json.", name, valueS);
|
||||
} else {
|
||||
// FIXME: filter ANSI escapes, newlines, \r, etc.
|
||||
if (std::tolower(logger->ask(fmt("do you want to allow configuration setting '%s' to be set to '" ANSI_RED "%s" ANSI_NORMAL "' (y/N)?", name, valueS)).value_or('n')) == 'y') {
|
||||
trusted = true;
|
||||
}
|
||||
if (std::tolower(logger->ask(fmt("do you want to permanently mark this value as %s (y/N)?", trusted ? "trusted": "untrusted" )).value_or('n')) == 'y') {
|
||||
trustedList[name][valueS] = trusted;
|
||||
writeTrustedList(trustedList);
|
||||
}
|
||||
bool trusted = whitelist.count(baseName);
|
||||
if (!trusted) {
|
||||
switch (nix::fetchSettings.acceptFlakeConfig) {
|
||||
case AcceptFlakeConfig::True: {
|
||||
trusted = true;
|
||||
break;
|
||||
}
|
||||
if (!trusted) {
|
||||
warn("ignoring untrusted flake configuration setting '%s'.\nPass '%s' to trust it", name, "--accept-flake-config");
|
||||
continue;
|
||||
case AcceptFlakeConfig::Ask: {
|
||||
auto trustedList = readTrustedList();
|
||||
auto tlname = get(trustedList, name);
|
||||
if (auto saved = tlname ? get(*tlname, valueS) : nullptr) {
|
||||
trusted = *saved;
|
||||
printInfo("Using saved setting for '%s = %s' from ~/.local/share/nix/trusted-settings.json.", name, valueS);
|
||||
} else {
|
||||
// FIXME: filter ANSI escapes, newlines, \r, etc.
|
||||
if (std::tolower(logger->ask(fmt("Do you want to allow configuration setting '%s' to be set to '" ANSI_RED "%s" ANSI_NORMAL "' (y/N)? This may allow the flake to gain root, see the nix.conf manual page.", name, valueS)).value_or('n')) == 'y') {
|
||||
trusted = true;
|
||||
} else {
|
||||
warn("you can set '%s' to '%b' to automatically reject configuration options supplied by flakes", "accept-flake-config", false);
|
||||
}
|
||||
if (std::tolower(logger->ask(fmt("do you want to permanently mark this value as %s (y/N)?", trusted ? "trusted": "untrusted" )).value_or('n')) == 'y') {
|
||||
trustedList[name][valueS] = trusted;
|
||||
writeTrustedList(trustedList);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case nix::AcceptFlakeConfig::False: {
|
||||
trusted = false;
|
||||
break;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
globalConfig.set(name, valueS);
|
||||
if (trusted) {
|
||||
debug("accepting trusted flake configuration setting '%s'", name);
|
||||
globalConfig.set(name, valueS);
|
||||
} else {
|
||||
warn("ignoring untrusted flake configuration setting '%s', pass '%s' to trust it (may allow the flake to gain root, see the nix.conf manual page)", name, "--accept-flake-config");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "flake.hh"
|
||||
#include "eval.hh"
|
||||
#include "eval-settings.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "flakeref.hh"
|
||||
#include "store-api.hh"
|
||||
#include "url.hh"
|
||||
@@ -85,8 +89,8 @@ std::pair<FlakeRef, std::string> parseFlakeRefWithFragment(
|
||||
+ "(?:#(" + queryRegex + "))?",
|
||||
std::regex::ECMAScript);
|
||||
|
||||
static std::regex flakeRegex(
|
||||
"((" + flakeIdRegexS + ")(?:/(?:" + refAndOrRevRegex + "))?)"
|
||||
static std::regex flakeShorthandRegex(
|
||||
flakeShorthandRegexS
|
||||
+ "(?:#(" + queryRegex + "))?",
|
||||
std::regex::ECMAScript);
|
||||
|
||||
@@ -95,7 +99,7 @@ std::pair<FlakeRef, std::string> parseFlakeRefWithFragment(
|
||||
/* Check if 'url' is a flake ID. This is an abbreviated syntax for
|
||||
'flake:<flake-id>?ref=<ref>&rev=<rev>'. */
|
||||
|
||||
if (std::regex_match(url, match, flakeRegex)) {
|
||||
if (std::regex_match(url, match, flakeShorthandRegex)) {
|
||||
auto parsedURL = ParsedURL{
|
||||
.url = url,
|
||||
.base = "flake:" + match.str(1),
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "lockfile.hh"
|
||||
#include "store-api.hh"
|
||||
#include "url-parts.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
libexpr_generated_headers += custom_target(
|
||||
command : [ 'bash', '-c', 'echo \'R"__NIX_STR(\' | cat - @INPUT@ && echo \')__NIX_STR"\'' ],
|
||||
input : 'call-flake.nix',
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "function-trace.hh"
|
||||
#include "logging.hh"
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
+10
-6
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "get-drvs.hh"
|
||||
#include "eval-inline.hh"
|
||||
#include "derivations.hh"
|
||||
@@ -45,7 +49,7 @@ DrvInfo::DrvInfo(EvalState & state, ref<Store> store, const std::string & drvPat
|
||||
}
|
||||
|
||||
|
||||
std::string DrvInfo::queryName() const
|
||||
std::string DrvInfo::queryName()
|
||||
{
|
||||
if (name == "" && attrs) {
|
||||
auto i = attrs->find(state->sName);
|
||||
@@ -56,7 +60,7 @@ std::string DrvInfo::queryName() const
|
||||
}
|
||||
|
||||
|
||||
std::string DrvInfo::querySystem() const
|
||||
std::string DrvInfo::querySystem()
|
||||
{
|
||||
if (system == "" && attrs) {
|
||||
auto i = attrs->find(state->sSystem);
|
||||
@@ -66,7 +70,7 @@ std::string DrvInfo::querySystem() const
|
||||
}
|
||||
|
||||
|
||||
std::optional<StorePath> DrvInfo::queryDrvPath() const
|
||||
std::optional<StorePath> DrvInfo::queryDrvPath()
|
||||
{
|
||||
if (!drvPath && attrs) {
|
||||
Bindings::iterator i = attrs->find(state->sDrvPath);
|
||||
@@ -80,7 +84,7 @@ std::optional<StorePath> DrvInfo::queryDrvPath() const
|
||||
}
|
||||
|
||||
|
||||
StorePath DrvInfo::requireDrvPath() const
|
||||
StorePath DrvInfo::requireDrvPath()
|
||||
{
|
||||
if (auto drvPath = queryDrvPath())
|
||||
return *drvPath;
|
||||
@@ -88,7 +92,7 @@ StorePath DrvInfo::requireDrvPath() const
|
||||
}
|
||||
|
||||
|
||||
StorePath DrvInfo::queryOutPath() const
|
||||
StorePath DrvInfo::queryOutPath()
|
||||
{
|
||||
if (!outPath && attrs) {
|
||||
Bindings::iterator i = attrs->find(state->sOutPath);
|
||||
@@ -164,7 +168,7 @@ DrvInfo::Outputs DrvInfo::queryOutputs(bool withPaths, bool onlyOutputsToInstall
|
||||
}
|
||||
|
||||
|
||||
std::string DrvInfo::queryOutputName() const
|
||||
std::string DrvInfo::queryOutputName()
|
||||
{
|
||||
if (outputName == "" && attrs) {
|
||||
Bindings::iterator i = attrs->find(state->sOutputName);
|
||||
|
||||
+15
-11
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
@@ -19,11 +23,11 @@ public:
|
||||
private:
|
||||
EvalState * state;
|
||||
|
||||
mutable std::string name;
|
||||
mutable std::string system;
|
||||
mutable std::optional<std::optional<StorePath>> drvPath;
|
||||
mutable std::optional<StorePath> outPath;
|
||||
mutable std::string outputName;
|
||||
std::string name;
|
||||
std::string system;
|
||||
std::optional<std::optional<StorePath>> drvPath;
|
||||
std::optional<StorePath> outPath;
|
||||
std::string outputName;
|
||||
Outputs outputs;
|
||||
|
||||
/**
|
||||
@@ -47,12 +51,12 @@ public:
|
||||
DrvInfo(EvalState & state, std::string attrPath, Bindings * attrs);
|
||||
DrvInfo(EvalState & state, ref<Store> store, const std::string & drvPathWithOutputs);
|
||||
|
||||
std::string queryName() const;
|
||||
std::string querySystem() const;
|
||||
std::optional<StorePath> queryDrvPath() const;
|
||||
StorePath requireDrvPath() const;
|
||||
StorePath queryOutPath() const;
|
||||
std::string queryOutputName() const;
|
||||
std::string queryName();
|
||||
std::string querySystem();
|
||||
std::optional<StorePath> queryDrvPath();
|
||||
StorePath requireDrvPath();
|
||||
StorePath queryOutPath();
|
||||
std::string queryOutputName();
|
||||
/**
|
||||
* Return the unordered map of output names to (optional) output paths.
|
||||
* The "outputs to install" are determined by `meta.outputsToInstall`.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
attrs@{
|
||||
drvPath,
|
||||
outputs,
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "json-to-value.hh"
|
||||
#include "value.hh"
|
||||
#include "eval.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
libexpr_generated_headers = [
|
||||
gen_header.process('primops/derivation.nix', preserve_path_from : meson.current_source_dir()),
|
||||
]
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "nixexpr.hh"
|
||||
#include "derivations.hh"
|
||||
#include "eval.hh"
|
||||
@@ -50,6 +54,13 @@ void ExprVar::show(const SymbolTable & symbols, std::ostream & str) const
|
||||
str << symbols[name];
|
||||
}
|
||||
|
||||
void ExprInheritFrom::show(SymbolTable const & symbols, std::ostream & str) const
|
||||
{
|
||||
str << "(/* expanded inherit (expr) */ ";
|
||||
fromExpr->show(symbols, str);
|
||||
str << ")";
|
||||
}
|
||||
|
||||
void ExprSelect::show(const SymbolTable & symbols, std::ostream & str) const
|
||||
{
|
||||
str << "(";
|
||||
|
||||
+11
-3
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
@@ -144,14 +148,18 @@ struct ExprVar : Expr
|
||||
*/
|
||||
struct ExprInheritFrom : ExprVar
|
||||
{
|
||||
ExprInheritFrom(PosIdx pos, Displacement displ): ExprVar(pos, {})
|
||||
ref<Expr> fromExpr;
|
||||
|
||||
ExprInheritFrom(PosIdx pos, Displacement displ, ref<Expr> fromExpr)
|
||||
: ExprVar(pos, {}), fromExpr(fromExpr)
|
||||
{
|
||||
this->level = 0;
|
||||
this->displ = displ;
|
||||
this->fromWith = nullptr;
|
||||
}
|
||||
|
||||
void bindVars(EvalState & es, const std::shared_ptr<const StaticEnv> & env);
|
||||
void show(SymbolTable const & symbols, std::ostream & str) const override;
|
||||
void bindVars(EvalState & es, const std::shared_ptr<const StaticEnv> & env) override;
|
||||
};
|
||||
|
||||
struct ExprSelect : Expr
|
||||
@@ -222,7 +230,7 @@ struct ExprAttrs : Expr
|
||||
};
|
||||
typedef std::map<Symbol, AttrDef> AttrDefs;
|
||||
AttrDefs attrs;
|
||||
std::unique_ptr<std::vector<std::unique_ptr<Expr>>> inheritFromExprs;
|
||||
std::unique_ptr<std::vector<ref<Expr>>> inheritFromExprs;
|
||||
struct DynamicAttrDef {
|
||||
std::unique_ptr<Expr> nameExpr, valueExpr;
|
||||
PosIdx pos;
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "attr-set.hh"
|
||||
#include "error.hh"
|
||||
#include "eval-settings.hh"
|
||||
@@ -317,18 +321,23 @@ template<> struct BuildAST<grammar::inherit> : change_head<InheritState> {
|
||||
});
|
||||
}
|
||||
}
|
||||
if (auto fromE = std::move(s.from)) {
|
||||
if (s.from != nullptr) {
|
||||
if (!b.attrs.inheritFromExprs)
|
||||
b.attrs.inheritFromExprs = std::make_unique<std::vector<std::unique_ptr<Expr>>>();
|
||||
b.attrs.inheritFromExprs->push_back(std::move(fromE));
|
||||
b.attrs.inheritFromExprs = std::make_unique<std::vector<ref<Expr>>>();
|
||||
auto fromExpr = ref<Expr>(std::move(s.from));
|
||||
b.attrs.inheritFromExprs->push_back(fromExpr);
|
||||
for (auto & [i, iPos] : s.attrs) {
|
||||
if (attrs.find(i.symbol) != attrs.end())
|
||||
ps.dupAttr(i.symbol, iPos, attrs[i.symbol].pos);
|
||||
auto from = std::make_unique<ExprInheritFrom>(s.fromPos, b.attrs.inheritFromExprs->size() - 1);
|
||||
auto inheritFrom = std::make_unique<ExprInheritFrom>(
|
||||
s.fromPos,
|
||||
b.attrs.inheritFromExprs->size() - 1,
|
||||
fromExpr
|
||||
);
|
||||
attrs.emplace(
|
||||
i.symbol,
|
||||
ExprAttrs::AttrDef(
|
||||
std::make_unique<ExprSelect>(iPos, std::move(from), i.symbol),
|
||||
std::make_unique<ExprSelect>(iPos, std::move(inheritFrom), i.symbol),
|
||||
iPos,
|
||||
ExprAttrs::AttrDef::Kind::InheritedFrom));
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
@@ -103,7 +107,7 @@ inline void State::addAttr(ExprAttrs * attrs, AttrPath && attrPath, std::unique_
|
||||
auto * jAttrs = dynamic_cast<ExprAttrs *>(j->second.e.get());
|
||||
if (jAttrs && ae) {
|
||||
if (ae->inheritFromExprs && !jAttrs->inheritFromExprs)
|
||||
jAttrs->inheritFromExprs = std::make_unique<std::vector<std::unique_ptr<Expr>>>();
|
||||
jAttrs->inheritFromExprs = std::make_unique<std::vector<ref<Expr>>>();
|
||||
for (auto & ad : ae->attrs) {
|
||||
auto j2 = jAttrs->attrs.find(ad.first);
|
||||
if (j2 != jAttrs->attrs.end()) // Attr already defined in iAttrs, error.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "eval.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "archive.hh"
|
||||
#include "derivations.hh"
|
||||
#include "downstream-placeholder.hh"
|
||||
@@ -866,7 +870,7 @@ static void prim_tryEval(EvalState & state, const PosIdx pos, Value * * args, Va
|
||||
/* increment state.trylevel, and decrement it when this function returns. */
|
||||
MaintainCount trylevel(state.trylevel);
|
||||
|
||||
ReplExitStatus (* savedDebugRepl)(ref<EvalState> es, const ValMap & extraEnv) = nullptr;
|
||||
std::function<ReplExitStatus(ref<EvalState> es, ValMap const & extraEnv)> savedDebugRepl;
|
||||
if (state.debugRepl && evalSettings.ignoreExceptionsDuringTry)
|
||||
{
|
||||
/* to prevent starting the repl from exceptions withing a tryEval, null it. */
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "primops.hh"
|
||||
#include "eval-inline.hh"
|
||||
#include "derivations.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
/*
|
||||
This is the implementation of the ‘derivation’ builtin function.
|
||||
It's actually a wrapper around the ‘derivationStrict’ primop.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "primops.hh"
|
||||
#include "store-api.hh"
|
||||
#include "make-content-addressed.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "primops.hh"
|
||||
#include "eval-inline.hh"
|
||||
#include "eval-settings.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "primops.hh"
|
||||
#include "eval-inline.hh"
|
||||
#include "eval-settings.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "primops.hh"
|
||||
#include "eval-inline.hh"
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "print-ambiguous.hh"
|
||||
#include "attr-set.hh"
|
||||
#include "logging.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
/**
|
||||
* @file
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include <limits>
|
||||
#include <span>
|
||||
#include <unordered_set>
|
||||
@@ -574,4 +578,10 @@ fmt_internal::HintFmt & fmt_internal::HintFmt::operator%(const ValuePrinter & va
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::ostream & operator<<(std::ostream & output, ExprPrinter const & printer)
|
||||
{
|
||||
printer.expr.show(printer.state.symbols, output);
|
||||
return output;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
/**
|
||||
* @file
|
||||
@@ -15,6 +19,8 @@
|
||||
|
||||
namespace nix {
|
||||
|
||||
struct Expr;
|
||||
|
||||
class EvalState;
|
||||
struct Value;
|
||||
|
||||
@@ -50,6 +56,12 @@ void printValue(EvalState & state, std::ostream & str, Value & v, PrintOptions o
|
||||
/**
|
||||
* A partially-applied form of `printValue` which can be formatted using `<<`
|
||||
* without allocating an intermediate string.
|
||||
* This class should not outlive the eval state or it will UAF.
|
||||
* FIXME: This should take `nix::ref`s, to avoid that, but our eval methods all have
|
||||
* EvalState &, not ref<EvalState>, and constructing a new shared_ptr to data that
|
||||
* already has a shared_ptr is a much bigger footgun. In the current architecture of
|
||||
* libexpr, using a ValuePrinter after an EvalState has been destroyed would be
|
||||
* pretty hard.
|
||||
*/
|
||||
class ValuePrinter {
|
||||
friend std::ostream & operator << (std::ostream & output, const ValuePrinter & printer);
|
||||
@@ -73,4 +85,26 @@ std::ostream & operator<<(std::ostream & output, const ValuePrinter & printer);
|
||||
template<>
|
||||
fmt_internal::HintFmt & fmt_internal::HintFmt::operator%(const ValuePrinter & value);
|
||||
|
||||
/**
|
||||
* A partially-applied form of Expr::show(), which can be formatted using `<<`
|
||||
* without allocating an intermediate string.
|
||||
* This class should not outlive the eval state or it will UAF.
|
||||
* FIXME: This should take `nix::ref`s, to avoid that, but our eval methods all have
|
||||
* EvalState &, not ref<EvalState>, and constructing a new shared_ptr to data that
|
||||
* already has a shared_ptr is a much bigger footgun. In the current architecture of
|
||||
* libexpr, using an ExprPrinter after an EvalState has been destroyed would be
|
||||
* pretty hard.
|
||||
*/
|
||||
class ExprPrinter
|
||||
{
|
||||
/** The eval state used to get symbols. */
|
||||
EvalState const & state;
|
||||
/** The expression to print. */
|
||||
Expr const & expr;
|
||||
|
||||
public:
|
||||
ExprPrinter(EvalState const & state, Expr const & expr) : state(state), expr(expr) { }
|
||||
friend std::ostream & operator << (std::ostream & output, ExprPrinter const & printer);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "search-path.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#include "value-to-json.hh"
|
||||
#include "eval-inline.hh"
|
||||
#include "signals.hh"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2024 Nix and Lix Authors
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#pragma once
|
||||
///@file
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user