1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-30 11:43:15 +02:00
Commit graph

19235 commits

Author SHA1 Message Date
Shahar "Dawn" Or
162081618f stack overflow is EvalBaseError
(cherry picked from commit 23c7a45a05)
2025-03-21 14:12:36 +00:00
mergify[bot]
70cb4b40e4
Merge pull request #12695 from NixOS/mergify/bp/2.26-maintenance/pr-12682
libfetchers: fix double quote in path printed in logger (backport #12682)
2025-03-19 22:42:55 +00:00
Jörg Thalheim
3176e024f6 libfetchers: fix double quote in path printed in logger
(cherry picked from commit 314e9fbeda)
2025-03-19 22:24:28 +00:00
mergify[bot]
7430d002bc
Merge pull request #12685 from NixOS/mergify/bp/2.26-maintenance/pr-12570
Fix macos sandbox issue (backport #12570)
2025-03-19 21:02:17 +00:00
Pierre-Etienne Meunier
2868a471d2 Fix macos sandbox issue
Co-authored-by: John Ericson <git@JohnEricson.me>

Co-authored-by: Poliorcetics <poliorcetics@users.noreply.github.com>
(cherry picked from commit 300465c7b8)
2025-03-19 20:21:40 +00:00
mergify[bot]
74b786bf9a
Merge pull request #12654 from NixOS/mergify/bp/2.26-maintenance/pr-12645
Make debugger significantly faster (backport #12645)
2025-03-14 20:40:50 +00:00
Sergei Zimmerman
9d54f34ed0 {libexpr,libcmd}: Make debugger significantly faster
The underlying issue is that debugger code path was
calling PosTable::operator[] in each eval method.
This has become incredibly expensive since 5d9fdab3de.

While we are it it, I've reworked the code to
not use std::shared_ptr where it really isn't necessary.

As I've documented in previous commits, this is actually
more a workaround for recursive header dependencies now
and is only necessary in `error.hh` code.

Some ad-hoc benchmarking:

After this commit:

```
Benchmark 1: nix eval nixpkgs#hello --impure --ignore-try --no-eval-cache --debugger
  Time (mean ± σ):     784.2 ms ±   7.1 ms    [User: 561.4 ms, System: 147.7 ms]
  Range (min … max):   773.5 ms … 792.6 ms    10 runs
```

On master 3604c7c51:

```
Benchmark 1: nix eval nixpkgs#hello --impure --ignore-try --no-eval-cache --debugger
  Time (mean ± σ):     22.914 s ±  0.178 s    [User: 18.524 s, System: 4.151 s]
  Range (min … max):   22.738 s … 23.290 s    10 runs
```

(cherry picked from commit adbd08399c)
2025-03-14 13:22:45 +00:00
Sergei Zimmerman
bee21af2a1 libutil: Fix Pos::getSourcePath
Previous implementation didn't actually check if
std::get_if returned a nullptr:

std::optional<SourcePath> getSourcePath() const {
    return *std::get_if<SourcePath>(&origin);
}

(cherry picked from commit 50123f2a56)
2025-03-14 13:22:44 +00:00
Sergei Zimmerman
5a3b0d9c7a libutil: Document hacks and problems around Pos class
This should provide context for follow-up commits in
the patch series.

(cherry picked from commit bf12aedf2e)
2025-03-14 13:22:44 +00:00
Sergei Zimmerman
6384a65baf {libutil,libexpr}: Move pos-idx,pos-table code to libutil
All of this code doesn't actually depend on anything from
libexpr. Because Pos is so tigtly coupled with Error, it
makes sense to have in the same library.

(cherry picked from commit a53b184e63)
2025-03-14 13:22:44 +00:00
Eelco Dolstra
3bd0406fa4 Bump version 2025-03-05 19:34:04 +01:00
mergify[bot]
42fc03dd1f
Merge pull request #12601 from NixOS/mergify/bp/2.26-maintenance/pr-12600
packaging: Typo in setVersionLayer / preConfigure (backport #12600)
2025-03-04 17:08:09 +00:00
Robert Hensing
87bf338612 packaging: Typo in setVersionLayer / preConfigure
Apparently dead code in our use case, but good to keep nonetheless.
Credit: ztzg in https://github.com/NixOS/nix/pull/12498#pullrequestreview-2658031853

(cherry picked from commit dcaea8cb1c)
2025-03-04 16:46:15 +00:00
mergify[bot]
cd3688101d
Merge pull request #12585 from NixOS/mergify/bp/2.26-maintenance/pr-12582
packaging/everything.nix: Use a multi-output derivation (backport #12582)
2025-03-01 10:41:47 +00:00
Robert Hensing
d8606f96ee packaging/everything.nix: Use a multi-output derivation
This should fix a few packaging regressions.

`dev` also includes a merged `includes/`, which may be helpful until
inter-component includes are fixed properly.

(cherry picked from commit 41085295ab)
2025-03-01 10:36:41 +00:00
mergify[bot]
1dda07eef2
Merge pull request #12562 from NixOS/mergify/bp/2.26-maintenance/pr-12559
nix flake archive: Recurse into relative path inputs (backport #12559)
2025-02-24 22:18:03 +00:00
Eelco Dolstra
827f760ad7
Fix test
We didn't backport `nix flake prefetch --out-link`.
2025-02-24 23:00:07 +01:00
Eelco Dolstra
91508de315 nix flake archive: Recurse into relative path inputs
We can't ignore them entirely, since we do want to archive their
transitive inputs.

Fixes #12438.

(cherry picked from commit 14c9755462)
2025-02-24 21:30:45 +00:00
mergify[bot]
605b2371f9
windows: fix compilation after recent changes (backport #12495) (#12561)
* windows: fix compilation after recent changes

Specifically last few week's merges involving legacy SSH options and
dynamic derivations.

(cherry picked from commit e0617d2545)

# Conflicts:
#	src/libstore/build/derivation-creation-and-realisation-goal.hh

* Remove unneeded

* Remove unneeded

---------

Co-authored-by: Brian McKenna <brian@brianmckenna.org>
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2025-02-24 21:30:35 +00:00
Eelco Dolstra
6d9724a2b3
Merge pull request #12560 from NixOS/mergify/bp/2.26-maintenance/pr-12557
packaging: Use correct stdenv for x86_64-darwin (backport #12557)
2025-02-24 22:04:52 +01:00
Robert Hensing
9e87a58314 packaging: Use correct stdenv for x86_64-darwin
(cherry picked from commit 0772c2e3ab)
2025-02-24 20:55:05 +00:00
mergify[bot]
31a29e66ea
Merge pull request #12554 from NixOS/mergify/bp/2.26-maintenance/pr-12553
nix flake archive: Skip relative path inputs (backport #12553)
2025-02-24 15:03:38 +00:00
Eelco Dolstra
d670380bd9 nix flake archive: Skip relative path inputs
Fixes #12438.

(cherry picked from commit b4dfeafed5)
2025-02-24 14:49:11 +00:00
mergify[bot]
6d3ee99463
Merge pull request #12545 from NixOS/mergify/bp/2.26-maintenance/pr-12543
Fix perl store bindings (backport #12543)
2025-02-22 18:34:00 +00:00
mergify[bot]
a30588365b
Merge pull request #12547 from NixOS/mergify/bp/2.26-maintenance/pr-12510
libstore: fix expected bytes in progress bar (backport #12510)
2025-02-21 19:34:30 +00:00
Ivan Trubach
c69d5af105 libstore: fix expected bytes in progress bar
(cherry picked from commit eb73bfcf73)
2025-02-21 19:12:02 +00:00
Fabian Möller
cd1935468d Fix perl store bindings
When #9863 converted the `Nix::Store` free functions into member functions, the
implicit `this` argument was not accounted for when iterating over the variable
number of arguments in some functions.

(cherry picked from commit 5cf9e18167)
2025-02-21 14:47:37 +00:00
mergify[bot]
0d039d4abe
Merge pull request #12537 from NixOS/mergify/bp/2.26-maintenance/pr-12391
Only try to chmod /nix/var/nix/profiles/per-user when necessary (backport #12391)
2025-02-20 16:45:41 +00:00
Sandro Jäckel
65583ca79b Only try to chmod /nix/var/nix/profiles/per-user when necessary
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
(cherry picked from commit dcbf4dcc09)
2025-02-20 16:11:27 +00:00
mergify[bot]
514f1dea44
Merge pull request #12530 from NixOS/mergify/bp/2.26-maintenance/pr-12439
Set FD_CLOEXEC on sockets created by curl (backport #12439)
2025-02-19 20:24:14 +00:00
MaxHearnden
cd149b56c7 Set FD_CLOEXEC on sockets created by curl
Curl creates sockets without setting FD_CLOEXEC/SOCK_CLOEXEC, this can
cause connections to remain open forever when using commands like `nix
shell`

This change sets the FD_CLOEXEC flag using a CURLOPT_SOCKOPTFUNCTION
callback.

(cherry picked from commit 12d2527276)
2025-02-19 19:47:45 +00:00
mergify[bot]
029dd96b8b
Merge pull request #12523 from NixOS/mergify/bp/2.26-maintenance/pr-12518
packaging: Restore libgit2 USE_SSH=exec (backport #12518)
2025-02-19 09:14:56 +00:00
Robert Hensing
8028579060 packaging: Restore libgit2 USE_SSH=exec
... when nixpkgs is nixos-unstable or the overlay is used.

(cherry picked from commit 5488e29d2f)
2025-02-19 08:54:28 +00:00
mergify[bot]
dae4dac76e
Merge pull request #12519 from NixOS/mergify/bp/2.26-maintenance/pr-12503
Overriding the componentized build (backport #12503)
2025-02-19 00:59:46 +00:00
Robert Hensing
244735270a packaging: Remove dead code
... from nixpkgs, my bad.

(cherry picked from commit f0bdb65216)
2025-02-19 01:33:20 +01:00
Robert Hensing
dade40573e packaging: Make patch count lazier
This makes `nix.version` quicker to evaluate, which should speed up
package listing operations.

If you want an accurate count, use `lib.optionals` in your override
instead of `null` values.

(cherry picked from commit d47e3c9576)
2025-02-19 01:33:20 +01:00
Robert Hensing
bfb6f37b37 packaging: Add patch count to version
(cherry picked from commit 0dbe28ad9d)
2025-02-19 01:33:20 +01:00
Robert Hensing
a4641be4e9 test: Ignore packaging-overriding check on darwin for now
(cherry picked from commit 03efba30da)
2025-02-19 01:33:20 +01:00
Robert Hensing
cc3fb61249 packaging: Add source overriding "methods"
(cherry picked from commit 48fb6fdde9)
2025-02-19 01:33:20 +01:00
Robert Hensing
44fb647986 packaging: Add overrideAllMesonComponents
(cherry picked from commit f31d86284f)
2025-02-19 01:32:53 +01:00
Robert Hensing
540e8cb908 packaging: Move layers from dependencies to components
This makes it easier to implement batch overriding for the components.

(cherry picked from commit cca01407a7)
2025-02-19 01:32:40 +01:00
mergify[bot]
8a2bb811ac
Merge pull request #12506 from NixOS/mergify/bp/2.26-maintenance/pr-12498
Restore detailed Nix CLI version (backport #12498)
2025-02-19 00:29:13 +00:00
Robert Hensing
fd062585ac tests: Fix installTests
(cherry picked from commit 2b5365bcf7)
2025-02-19 01:04:04 +01:00
Robert Hensing
b175e5bb6d Write just ./.version on all components
This way it's easier to get right. See previous commit.

(cherry picked from commit 3556f6bf4c)
2025-02-19 01:04:04 +01:00
Robert Hensing
21998464b7 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.

(cherry picked from commit bba4e6b061)
2025-02-19 01:04:02 +01:00
mergify[bot]
d6a66b366e
Merge pull request #12517 from NixOS/mergify/bp/2.26-maintenance/pr-12484
Support libgit2 1.9.0 (backport #12484)
2025-02-18 23:30:27 +00:00
Robert Hensing
cc3ad9bd3a Support libgit2 1.9.0
For when the overlay is used with nixos-unstable.
1.9.0 has our patches.

(cherry picked from commit b0bbb1252a)
2025-02-18 23:16:12 +00:00
John Ericson
e310c19a1a
Merge pull request #12509 from NixOS/mergify/bp/2.26-maintenance/pr-12499
startDaemon(): Detect if the daemon crashes before creating the socket (backport #12499)
2025-02-18 12:23:20 -05:00
John Ericson
6c15761b0e
Merge pull request #12505 from NixOS/mergify/bp/2.26-maintenance/pr-12497
Don't override default man search paths (backport #12497)
2025-02-18 12:17:08 -05:00
Eelco Dolstra
f02a7b880e startDaemon(): Detect if the daemon crashes before creating the socket
This avoids timeouts like those seen in
3735812034.

(cherry picked from commit 11c42cb2e1)
2025-02-18 16:39:48 +00:00