Age | Commit message (Collapse) | Author |
|
Fix flake profile use of originalUrl vs. originalUri
|
|
install-multi-user.sh: Preserve symlinks
|
|
We need to pass -P to ensure that symlinks are copied correctly. Fixes #6303.
|
|
Fixes #5872
|
|
lexer: add error location to lexer errors
|
|
Before the change lexter errors did not report the location:
$ nix build -f. mc
error: path has a trailing slash
(use '--show-trace' to show detailed location information)
Note that it's not clear what file generates the error.
After the change location is reported:
$ src/nix/nix --extra-experimental-features nix-command build -f ~/nm mc
error: path has a trailing slash
at .../pkgs/development/libraries/glib/default.nix:54:18:
53| };
54| src = /tmp/foo/;
| ^
55|
(use '--show-trace' to show detailed location information)
Here we see both problematic file and the string itself.
|
|
doc: Add detailed uninstall section for macOS
|
|
nix edit: support kakoune
|
|
|
|
Don't hide repeated values while generating manifest.nix
|
|
Fixes #6243.
|
|
This ensures that it doesn't get parsed as a valid Nix expression.
|
|
buildProfile(): Ignore manifest.{nix,json}
|
|
If a package installs a file named manifest.json, it caused nix-env to
consider the profile a new-style profile created by 'nix
profile'. Fixes #6032.
|
|
Decode string context straight to using StorePaths
|
|
Fix sourcehut tags refs resolving
|
|
The new implementation relies on tab separting the hash and ref (this is how sourcehut does it). This fixes the integration test to use a tab instead of a space.
|
|
|
|
|
|
Generalize DerivationType in preparation for impure derivations
|
|
I gather decoding happens on demand, so I hope don't think this should
have any perf implications one way or the other.
|
|
|
|
|
|
Easier than using dummy path with input addressed.
|
|
Clean up `DerivationOutput`, and headers
|
|
1. `DerivationOutput` now as the `std::variant` as a base class. And the
variants are given hierarchical names under `DerivationOutput`.
In 8e0d0689be797f9e42f9b43b06f50c1af7f20b4a @matthewbauer and I
didn't know a better idiom, and so we made it a field. But this sort
of "newtype" is anoying for literals downstream.
Since then we leaned the base class, inherit the constructors trick,
e.g. used in `DerivedPath`. Switching to use that makes this more
ergonomic, and consistent.
2. `store-api.hh` and `derivations.hh` are now independent.
In bcde5456cc3295061a0726881c3e441444dd6680 I swapped the dependency,
but I now know it is better to just keep on using incomplete types as
much as possible for faster compilation and good separation of
concerns.
|
|
Fix `nix build --dry-run` with CA derivations
|
|
|
|
Before the change garbage collector was not considering
`.drv` and outputs as alive even if configuration says otherwise.
As a result `nix store gc --dry-run` could visit (and parse)
`.drv` files multiple times (worst case it's quadratic).
It happens because `alive` set was populating only runtime closure
without regard for actual configuration. The change fixes it.
Benchmark: my system has about 139MB, 40K `.drv` files.
Performance before the change:
$ time nix store gc --dry-run
real 4m22,148s
Performance after the change:
$ time nix store gc --dry-run
real 0m14,178s
|
|
nix: allow using --file - to read from stdin
|
|
Don’t try and assume that we know the output paths when we’ve just built
with `--dry-run`. Instead make `--dry-run` follow a different code path
that won’t assume the knowledge of the output paths at all.
Fix #6275
|
|
nix-env: always print output names in JSON and XML
|
|
|
|
|
|
The current `--out-path` flag has two disadvantages when one is only
concerned with querying the names of outputs:
- it requires evaluating every output's `outPath`, which takes
significantly more resources and runs into more failures
- it destroys the information of the order of outputs so we can't tell
which one is the main output
This patch makes the output names always present (replacing paths with
`null` in JSON if `--out-path` isn't given), and adds an `outputName`
field.
|
|
distributed-builds.md: fixing typo of the most minor sort
|
|
|
|
|
|
|
|
nix store gc: account for auto-optimised store
|
|
Fix the tests on 32bits machines
|
|
Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>
|
|
Overhaul derivation hash modulo somewhat
|
|
year 2222 is too much for a 32 bit timestamp. So replace it by something
smaller
|
|
libfetchers/path: set `lastModified` to path's mtime
|
|
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
|
|
|
|
When importing e.g. a local `nixpkgs` in a flake to test a change like
{
inputs.nixpkgs.url = path:/home/ma27/Projects/nixpkgs;
outputs = /* ... */
}
then the input is missing a `lastModified`-field that's e.g. used in
`nixpkgs.lib.nixosSystem`. Due to the missing `lastMoified`-field, the
mtime is set to 19700101:
result -> /nix/store/b7dg1lmmsill2rsgyv2w7b6cnmixkvc1-nixos-system-nixos-22.05.19700101.dirty
With this change, the `path`-fetcher now sets a `lastModified` attribute
to the `mtime` just like it's the case in the `tarball`-fetcher already.
When building NixOS systems with `nixpkgs` being a `path`-input and this
patch, the output-path now looks like this:
result -> /nix/store/ld2qf9c1s98dxmiwcaq5vn9k5ylzrm1s-nixos-system-nixos-22.05.20220217.dirty
|
|
nix-env: Add a suggestion for when there's a name collision in channels
|
|
Factor out a `LogStore` interface
|