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

2958 commits

Author SHA1 Message Date
Eelco Dolstra
852075ec9d Tagging release 2.28.0
-----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCAAxFiEEtUHVUwEnDgvPFcpdgXC0cm1xmN4FAmfv9fITHGVkb2xzdHJh
 QGdtYWlsLmNvbQAKCRCBcLRybXGY3ohrCAC1Uw/JJr3yEPlJ/jLc9t9HqEKMY08W
 W6SEjpYJHYixMXmoonexkqojncNWBaiytRa+vBY7JQq0xTOOBwj42TM2ZzMF4GXi
 vO4Ox0hEsRa/v7tSmK6GFz1sNEKEUOHDNbilg4kzkkBHPEGPUGMwdWkT0akO576Q
 SQ6ERwPPLsHDI2YtAeAD8R4p07CraiyA34ljDPz3rChTAXRPVKWxJUt1enwEWYTr
 cKk45RcR4S8rP1BVwf3wsNsrHjqjbaY45kPAo8GD79hFH0zkyJarS3Kgv8qsWLra
 9ph0DVVG0wiArlET7Y3uchqtAC0Z5LOnutAmOFYFw6DKfWp9yGfl/SVW
 =XRda
 -----END PGP SIGNATURE-----

Merge tag '2.28.0' into sync-2.28.0

Tagging release 2.28.0
2025-04-04 17:49:15 +02:00
mergify[bot]
4edd560269
Merge pull request #12907 from NixOS/revert-nixpkgs-unstable
Revert to Nixpkgs 24.11 [2.28]
2025-04-03 09:29:26 +00:00
Eelco Dolstra
f48a72afc5 Revert "Merge pull request #12862 from NixOS/mergify/bp/2.28-maintenance/pr-12853"
This reverts commit aff0058b82, reversing
changes made to cb50eb0370.
2025-04-03 10:05:58 +02:00
Eelco Dolstra
5f74cf9b7a Apply makeNotAllowedError to empty repos
(cherry picked from commit 67e957b636)
2025-04-02 18:33:03 +00:00
John Ericson
0c67777396 Expose the nix component in header include paths
For example, instead of doing

    #include "nix/store-config.hh"
    #include "nix/derived-path.hh"

Now do

    #include "nix/store/config.hh"
    #include "nix/store/derived-path.hh"

This was originally planned in the issue, and also recent requested by
Eelco.

Most of the change is purely mechanical. There is just one small
additional issue. See how, in the example above, we took this
opportunity to also turn `<comp>-config.hh` into `<comp>/config.hh`.
Well, there was already a `nix/util/config.{cc,hh}`. Even though there
is not a public configuration header for libutil (which also would be
called `nix/util/config.{cc,hh}`) that's still confusing, To avoid any
such confusion, we renamed that to `nix/util/configuration.{cc,hh}`.

Finally, note that the libflake headers already did this, so we didn't
need to do anything to them. We wouldn't want to mistakenly get
`nix/flake/flake/flake.hh`!

Progress on #7876

(cherry picked from commit cc24766fa6)
2025-04-02 11:37:17 -04:00
Eelco Dolstra
fb7bcdd554 Make Git error messages more consistent 2025-04-01 22:56:14 +02:00
Eelco Dolstra
2526293171 shellcheck 2025-04-01 20:52:27 +02:00
Eelco Dolstra
4e0346dcc1 Restore 'forbidden in restricted mode' errors 2025-04-01 20:46:26 +02:00
Robert Hensing
f5731aa9a2 tests/nixos: Work around network-online.target inactivity
(cherry picked from commit 58b657b976)
2025-04-01 16:50:37 +00:00
Eelco Dolstra
1564c8f9d9 Fix missing file error messages from 'import' 2025-04-01 18:37:21 +02:00
Eelco Dolstra
73b1754816 Mount flake input source accessors on top of storeFS
This way, we don't need the PathDisplaySourceAccessor source accessor
hack, since error messages are produced directly by the original
source accessor.

In fact, we don't even need to copy the inputs to the store at all, so
this gets us very close to lazy trees. We just need to know the store
path so that requires hashing the entire input, which isn't lazy. But
the next step will be to use a virtual store path that gets rewritten
to the actual store path only when needed.
2025-04-01 17:49:28 +02:00
mergify[bot]
b38fee24d7
Merge pull request #12857 from NixOS/mergify/bp/2.28-maintenance/pr-12765
Add various clang tidy fixes (backport #12765)
2025-04-01 15:31:30 +00:00
Jörg Thalheim
11e6a1e6c8 test/ca-fd-leak: fix clang-tidy lints
(cherry picked from commit b050db951b)
2025-04-01 13:38:43 +00:00
Eelco Dolstra
fcddf4afe3 Apply makeNotAllowedError to empty repos 2025-04-01 15:35:01 +02:00
John Ericson
6a1a3fa1cb Cleanup config headers
There are two big changes:

1. Public and private config is now separated. Configuration variables
   that are only used internally do not go in a header which is
   installed.

   (Additionally, libutil has a unix-specific private config header,
   which should only be used in unix-specific code. This keeps things a
   bit more organized, in a purely private implementation-internal way.)

2. Secondly, there is no more `-include`. There are very few config
   items that need to be publically exposed, so now it is feasible to
   just make the headers that need them just including the (public)
   configuration header.

And there are also a few more small cleanups on top of those:

- The configuration files have better names.

- The few CPP variables that remain exposed in the public headers are
  now also renamed to always start with `NIX_`. This ensures they should
  not conflict with variables defined elsewhere.

- We now always use `#if` and not `#ifdef`/`#ifndef` for our
  configuration variables, which helps avoid bugs by requiring that
  variables must be defined in all cases.

(cherry picked from commit c204e307ac)
2025-04-01 15:07:49 +02:00
Eelco Dolstra
b2038f120c Add test for source path display 2025-04-01 14:03:16 +02:00
John Ericson
15658b259f Separate headers from source files
The short answer for why we need to do this is so we can consistently do
`#include "nix/..."`. Without this change, there are ways to still make
that work, but they are hacky, and they have downsides such as making it
harder to make sure headers from the wrong Nix library (e..g.
`libnixexpr` headers in `libnixutil`) aren't being used.

The C API alraedy used `nix_api_*`, so its headers are *not* put in
subdirectories accordingly.

Progress on #7876

We resisted doing this for a while because it would be annoying to not
have the header source file pairs close by / easy to change file
path/name from one to the other. But I am ameliorating that with
symlinks in the next commit.

(cherry picked from commit f3e1c47f47)
2025-03-31 18:04:04 -04:00
mergify[bot]
f7ebe64b47
Merge pull request #12829 from NixOS/mergify/bp/2.28-maintenance/pr-12730
libcmd/repl: Fix missing runNix in repl (backport #12730)
2025-03-31 20:23:01 +00:00
Sergei Zimmerman
20ce98f87b tests/functional: Add regression test for broken :sh in repl
Can't really test `:u` because it needs <nixpkgs>.

(cherry picked from commit d371aadb2b)
2025-03-31 18:40:22 +00:00
Robert Hensing
569631b1d5 Unexpose config headers (low hanging fruit only)
- Some headers were completely redundant and have been removed.
- Other headers have been turned private.
- Unnecessary meson.build code has been removed.
- libutil-tests now has a private config header, where previously
  it had none. This removes the need to expose a package version
  macro publicly.

(cherry picked from commit b86a76044e)
2025-03-31 18:18:08 +00:00
Sergei Trofimovich
cadfed692c tests/functional/check-refs.nix: format newly added test
(cherry picked from commit 4d72e0f73b)
2025-03-25 15:49:31 +00:00
Sergei Trofimovich
c2cffe6249 tests/functional/check-refs.sh: guard test12 against too old nix daemon
Otherwise without the change the test fails on nix-2.26 as:

    error: derivation contains an illegal reference specifier 'dev'

Note: the error message does not match intended change.
(cherry picked from commit 1e7c7244cf)
2025-03-25 15:49:31 +00:00
Robert Hensing
6f54b90f36 test illegal reference specifier error message
(cherry picked from commit f4def47c89)
2025-03-25 15:49:31 +00:00
Eelco Dolstra
dab0ff4f9e Tagging release 2.27.1
-----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCAAxFiEEtUHVUwEnDgvPFcpdgXC0cm1xmN4FAmfheacTHGVkb2xzdHJh
 QGdtYWlsLmNvbQAKCRCBcLRybXGY3kt2B/4tQvs6iDXA12d409ClHbVQjr1d0FLP
 rv8RxZ7Z4+Jaw8r2ra/I+gpr9juI5ULyEJWqfES72hTvbYPjH1Grsrrjak1tx57E
 +STs21oEPojE8LXsFH1oZamGPPIIpyQdxCvTgZs1N6cqUfCRQ3Jx97X6E6SIGJDR
 VqBM4ruSXCY57yT36HqwYydTkxzZHiNP5wwABGfSb7u9pYW5x3r8W7+fQ3udTnCw
 kCRhA5vnfxIQSlxu4j7dJqSCGzOIPnhYB19bXDV4aPhl4sn3pkBCdMZxPBlCWSwx
 it0ngMITf+TeiMpVl2TtvMBOHtlGrbhusbyKcsqzFYULGyGOC9ngTAY3
 =/JzB
 -----END PGP SIGNATURE-----

Merge tag '2.27.1' into detsys-main

Tagging release 2.27.1
2025-03-24 21:28:03 +01:00
Shahar "Dawn" Or
3f56dd9927 stack overflow is EvalBaseError
(cherry picked from commit 23c7a45a05)
2025-03-21 14:13:40 +00:00
Eelco Dolstra
25ba7c55d3 Merge remote-tracking branch 'origin/2.26-maintenance' into sync-with-2.26 2025-03-05 18:01:03 +01:00
John Ericson
f636ced7d2 Revert "Revert "Revert "Adapt scheduler to work with dynamic derivations"""
The bug reappeared after all, and the fix introduced a different bug. We
want to release 2.27 imminently so there is no time to do a proper fix,
which appears to require a larger reworking. Hopefully we will have it
for 2.28, however.

This reverts commit c98525235f.
2025-02-27 13:42:57 -05:00
Eelco Dolstra
1293388039
Merge pull request #12544 from xokdvium/debugger-use-after-free
libexpr: Fix use-after-free of StaticEnv::up
2025-02-27 16:55:49 +01: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
6749d26dbb Merge remote-tracking branch 'origin/2.26-maintenance' into detsys-main 2025-02-24 22:41:22 +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
Eelco Dolstra
14c9755462 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.
2025-02-24 22:10:02 +01: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
Eelco Dolstra
b4dfeafed5 nix flake archive: Skip relative path inputs
Fixes #12438.
2025-02-24 15:30:30 +01:00
Sergei Zimmerman
0d5004508f tests/functional: Add flake-based regression for debugger use-after-free
This is the simplest reproducer I have. It would be great to find
a repro without flakes, but I guess this should be ok for now.
2025-02-21 14:36:39 +00:00
Eelco Dolstra
641733fd26 Add test 2025-02-19 12:47:28 +01: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
Eelco Dolstra
ed4aeb4875 Fix hydraJobs.tests.functional_user 2025-02-19 00:26:06 +01:00
Eelco Dolstra
4055239936 Tagging release 2.26.2
-----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCAAxFiEEtUHVUwEnDgvPFcpdgXC0cm1xmN4FAmetA5oTHGVkb2xzdHJh
 QGdtYWlsLmNvbQAKCRCBcLRybXGY3g2pB/9JAFyjmaXuccbMTO/6x9qwsWuuXNLk
 OQWzfbdUekvsihZZSFZg1r7KqqXHCi64f0nxLPsJ/0oeDWZktJ5KnbV630nuUlDj
 ulLCpKdvhWFa8dVx9LiziGwQw4KLx8PjOfwThtQ4DqCWxWEmu6lKkijag9cE+ai4
 3mw9YtUjBRxlXyhYLzWz3whLbv37c/m+R8iGS8xm8W260pmei6D0beOIPdfXYBQF
 PzPlPORyI08A06uqyA3z7bTxzmSMnzvu0QInCPCKSHzFUnTZPHUYuYStFl28NrZS
 fXKK59L0G7QEfdTRAmqQkdHdtPj2RlYFiMN0kQiNLflvKfGGWdi/kvdx
 =rRix
 -----END PGP SIGNATURE-----

Merge tag '2.26.2' into sync-2.26.2

Tagging release 2.26.2
2025-02-18 19:57:51 +01: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
John Ericson
5facd492ad
Merge pull request #12499 from DeterminateSystems/detect-daemon-crash
startDaemon(): Detect if the daemon crashes before creating the socket
2025-02-18 11:38:16 -05:00
Robert Hensing
2b5365bcf7 tests: Fix installTests 2025-02-18 15:55:19 +01:00
Eelco Dolstra
11c42cb2e1 startDaemon(): Detect if the daemon crashes before creating the socket
This avoids timeouts like those seen in
3735812034.
2025-02-18 11:57:45 +01: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
c5fcb1bd50 Fix a few warnings 2025-02-17 19:29:01 +01:00
Eelco Dolstra
54388893bc dep-built-drv-2.sh: Don't fail with "cannot create symlink" 2025-02-17 11:57:21 +01:00
John Ericson
222a57c9ca More interesting dynamic derivations example
Co-authored-by: Samuel Ainsworth <skainsworth@gmail.com>
2025-02-16 18:00:34 -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
Leandro Reina
b2d352e6a3 Add inputs.self.lfs 2025-02-13 17:59:27 +01:00