1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00
Commit graph

12190 commits

Author SHA1 Message Date
Sergei Zimmerman
d95b7fea8e libfetchers-tests: Add back git-utils.cc
Seems like this got dropped at some point during meson migration, so
put it back in the build system.

Drop all tests for `parseGitUrl`, since that function doesn't exist
and migrating doesn't look sensible because git-lfs stuff seems to use
`ParsedURL`.
2025-02-20 20:19:16 +00:00
Robert Hensing
76f4119605
Merge pull request #12391 from SuperSandro2000/per-user-stat-chmod
Only try to chmod /nix/var/nix/profiles/per-user when necessary
2025-02-20 17:10:24 +01:00
John Ericson
de22f58dfc Introduce EvalStore::storePath
This abstracts over a common case. Good for brevity, and enabling
further experiments.
2025-02-19 21:24:26 -05:00
Eelco Dolstra
ec7dc56f4e Remove unused variable 2025-02-20 01:09:18 +01:00
Eelco Dolstra
8dc2b2715b In pure eval mode, restrict rootFS to just the Nix store
Note that in pure mode, we don't need to use the union FS even when
using a chroot store, since the user shouldn't have access to the
physical /nix/store.
2025-02-19 23:13:11 +01:00
Eelco Dolstra
4206d95996 Remove sourcePathToStorePath()
It's no longer needed now that all store paths inside the evaluator
are logical rather than real paths.
2025-02-19 21:31:25 +01:00
Eelco Dolstra
584ddd1b4d UnionSourceAccessor: Don't filter out underlying files of the wrong type
https://github.com/NixOS/nix/pull/12512#discussion_r1961567140
2025-02-19 13:34:42 +01:00
Eelco Dolstra
99e78c37f7 Use UnionSourceAccessor to mount the chroot store on top of the real store directory 2025-02-19 12:54:09 +01:00
Eelco Dolstra
5b7c240ebd Add a UnionSourceAccessor 2025-02-19 12:54:09 +01:00
Eelco Dolstra
c3d8799f9f MountedSourceAccessor: Remove redundant pathExists() method 2025-02-19 12:47:28 +01:00
Eelco Dolstra
774b924398 Add a storeFS accessor for paths resulting from IFD
Hopefully fixes #11503.
2025-02-19 12:47:28 +01:00
Eelco Dolstra
e5e0ce2334 Remove redundant call to canonPath()
The CanonPath constructor already does that.
2025-02-19 12:47:28 +01:00
Eelco Dolstra
d7f2c1b7f4 Remove mounted-source-accessor.hh 2025-02-19 10:44:46 +01:00
Eelco Dolstra
0da81343d7 Move MountedSourceAccessor to libutil 2025-02-19 10:44:42 +01:00
Ivan Trubach
eb73bfcf73 libstore: fix expected bytes in progress bar 2025-02-18 22:09:05 +03:00
John Ericson
da5109835b
Merge pull request #12498 from NixOS/fix-cli-fine-version
Restore detailed Nix CLI version
2025-02-18 11:34:07 -05:00
John Ericson
dfb5b2c7cb
Merge pull request #12497 from xokdvium/fix/dont-override-default-man-search-paths
Don't override default man search paths
2025-02-18 11:31:01 -05:00
Eelco Dolstra
cca4e8c8c7
Merge pull request #12504 from NaN-git/fix-repl
repl: suppress progress bar in printValue()
2025-02-18 17:10:56 +01:00
Philipp Otterbein
dc359f8b7b repl: suppress progress bar in printValue() 2025-02-18 16:52:48 +01:00
Sergei Zimmerman
95f16a3275 Don't override default man search paths
By appending a colon to MANPATH NIX_MAN_DIR gets prepended to the
final MANPATH before default search paths.
This makes man still consider default search paths, but prefers
NIX_MAN_DIR (if it exists).

It still makes sense to point NIX_MAN_DIR to a correct location
by moving man pages build from nix-manual.man to nix-cli.man, but
this should fix most common use-cases where nix is installed globally.
2025-02-18 18:46:52 +03:00
Eelco Dolstra
9b57f9be5e Remove createDefaultLogger() 2025-02-18 15:19:57 +01:00
Eelco Dolstra
227114d127 Remove startProgressBar() 2025-02-18 15:18:16 +01:00
Eelco Dolstra
1aee6cf974 stopProgressBar() -> logger->stop() 2025-02-18 15:08:32 +01:00
Eelco Dolstra
258b5ef80b
Merge pull request #6962 from edolstra/unique-ptr-logger
Make 'logger' a std::unique_ptr
2025-02-18 14:54:44 +01:00
Eelco Dolstra
b576e6254a Fix crash on macOS 2025-02-18 05:12:31 -08:00
Eelco Dolstra
2018413e3e Make 'logger' a std::unique_ptr
This prevents it from being leaked (see
bb411e4ae1 for an example of this).
2025-02-18 05:12:31 -08:00
Robert Hensing
3556f6bf4c Write just ./.version on all components
This way it's easier to get right. See previous commit.
2025-02-18 11:41:35 +01:00
Robert Hensing
bba4e6b061 Restore detailed Nix CLI version
... as intended.

Requirements:
- don't build fresh libraries for each git commit
- have git commit in the CLI

Bug:
- echo ${version} went into the wrong file => use the fact that it's
  a symlink, not just for reading but also for writing.
2025-02-18 11:22:00 +01:00
mergify[bot]
9427c028ec
Merge pull request #12495 from nix-windows/windows-fixes
windows: fix compilation after recent changes
2025-02-18 04:34:28 +00:00
Brian McKenna
e0617d2545 windows: fix compilation after recent changes
Specifically last few week's merges involving legacy SSH options and
dynamic derivations.
2025-02-18 14:42:24 +11:00
Sergei Zimmerman
b1a38b3efe Move code related to NIX_MAN_DIR from libstore to nix-cli
This is a prerequisite to properly fixing man-pages once and
for all [1]. Note that this patch leaves manpages for legacy
commands in a borked state, pending the movement of manpages from
nix-manual to nix-cli [2].

[1]: https://www.github.com/NixOS/nix/issues/12382
[2]: https://www.github.com/NixOS/nix/issues/12382#issuecomment-2663782043
2025-02-18 01:57:33 +03:00
Eelco Dolstra
1f688d62d7
Merge pull request #12490 from NixOS/warnings-2025-02-17
Fix a few warnings
2025-02-17 19:53:15 +01:00
John Ericson
c003f3a4b4
Merge pull request #12292 from obsidiansystems/derivation-options
Introduce `DerivationOptions`
2025-02-17 13:37:26 -05:00
Robert Hensing
c5fcb1bd50 Fix a few warnings 2025-02-17 19:29:01 +01:00
Eelco Dolstra
db7577a660
Merge pull request #12483 from DeterminateSystems/json-logger
JSONLogger: Log to a file descriptor instead of another Logger
2025-02-17 18:48:46 +01:00
Eelco Dolstra
c0c14698a3 Use getStandardError() 2025-02-17 18:09:59 +01:00
John Ericson
2ea8d3580c
Merge pull request #12481 from DeterminateSystems/search-path-spam
resolveLookupPathPath(): Fix caching of negative lookups
2025-02-17 12:02:48 -05:00
Eelco Dolstra
bc66a9bbcf JSONLogger: Log to a file descriptor instead of another Logger
Logging to another Logger was kind of nonsensical - it was really just
an easy way to get it to write its output to stderr, but that only
works if the underlying logger writes to stderr.

This change is needed to make it easy to log JSON output somewhere
else (like a file or socket).
2025-02-17 17:02:15 +01:00
Eelco Dolstra
df08e1e204 resolveLookupPathPath(): Fix caching of negative lookups
This avoids spamming in case the missing search path entry does not
exist (#12480).
2025-02-17 11:50:54 +01:00
Eelco Dolstra
8ac49ea5de getDefaultNixPath(): Don't add symlinks if the target doesn't exist 2025-02-17 11:36:47 +01:00
John Ericson
94a7c34b2f Allow setting ssh:// pipe size
Exposed for Hydra. We could make it fancier but with (a) new store
settings (b) switch to `ssh-ng://` both in the works, it doesn't seem
worth it.
2025-02-16 20:02:56 -05:00
John Ericson
0d25cc6541 Add SSHMaster::Connection::trySetBufferSize
It is unused in Nix currently, but will be used in Hydra. This reflects
what Hydra does in https://github.com/NixOS/hydra/pull/1387.

We may probably to use it more widely for better SSH store performance,
but this needs to be subject to more testing before we do that.
2025-02-16 19:45:02 -05:00
John Ericson
917b8b2f77 Introduce DerivationOptions
This is a first step towards PR #10760, and the issues it addresses.
See the Doxygen for details.

Thanks to these changes, we are able to drastically restrict how the
rest of the code-base uses `ParseDerivation`.

Co-Authored-By: HaeNoe <git@haenoe.party>
2025-02-16 18:52:44 -05:00
Robert Hensing
07f853b295
Merge pull request #9415 from NixOS/fix-dynamic-derivations
Revert "Revert "Adapt scheduler to work with dynamic derivations
2025-02-16 23:59:39 +01:00
John Ericson
8b911271f1
Merge pull request #10748 from NixOS/legacy-ssh-extensions-for-hydra
Expose a bunch of things in the Legacy SSH Store for Hydra
2025-02-16 17:37:50 -05:00
Robert Hensing
1068b9657f
Merge pull request #12400 from aidenfoxivey/add-rosetta-2-info-msg
Add Rosetta 2 Info Message
2025-02-15 17:47:04 +01:00
Robert Hensing
2d36679663
Merge pull request #12468 from kip93/self-input-attrs-lfs
Add `inputs.self.lfs` flake attribute
2025-02-15 17:30:57 +01:00
John Ericson
5eade48252 Expose a bunch of things in the Legacy SSH Store for Hydra 2025-02-14 17:04:57 -05:00
Someone
6985598153
doc: recursive-nix: advertise requiredSystemFeatures
It's best we teach users that the "foo" derivation is less than pure in the sense that it cannot be built just on any system, in particular that builders cannot be selected arbitrarily but based on their system-features. The `"recursive-nix"` system-feature is automatically defined by `--extra-experimental-features recursive-nix`
2025-02-14 09:50:18 +00:00
Thomas Bereknyei
3b5514e0c6 fix: linting 2025-02-13 13:04:38 -05:00