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

11813 commits

Author SHA1 Message Date
John Ericson
29ae14114e Remove stray assignment side affect in lambda
This was almost a bug! It wasn't simply because another assignment would
clobber it later.

(cherry picked from commit 32409dd7d7)
2025-04-15 14:25:16 -04:00
John Ericson
30d900b313 Derivation "advanced attrs" test: Ensure fields are set to distinct values
We had fields set to the same values before in our test data. This is
not a problem per-se, but does mean we wouldn't catch certain mixups.
Now, the fields are set to distinct values (where possible), which makes
the test more robust.

(cherry picked from commit a0b2b75f59)
2025-04-15 14:25:13 -04:00
John Ericson
f19184191e Test derivation options with content-addressing too
Now, both the unit and functional tests relating to derivation options
are tested both ways -- with input addressing and content-addressing
derivations.

(cherry picked from commit 307dbe9914)
2025-04-15 11:25:07 -04:00
Eelco Dolstra
5ecbf6b9dc
Merge pull request #13029 from NixOS/mergify/bp/2.28-maintenance/pr-13026
Fix issue #13018, `sourceInfo` strict in `outputs` (backport #13026)
2025-04-15 14:24:59 +02:00
Robert Hensing
818fc68db6 fix: Evaluate flake parent source without evaluating its outputs
This requires that we refer to the `sourceInfo` instead of the
`result`. However, `sourceInfo` does not create a chain of basedir
resolution, so we add that back with `flakeDir`.

(cherry picked from commit 2109a5a206)
2025-04-15 11:52:46 +00:00
Robert Hensing
671364748c call-flake.nix: allNodes.${key} -> allNodes.${key}.result
(cherry picked from commit 9de9410f29)
2025-04-15 11:52:45 +00:00
Robert Hensing
9a969e29cf call-flake.nix: refactor: Bring mapAttrs into scope
(cherry picked from commit 674375b021)
2025-04-15 11:52:45 +00:00
Philipp Otterbein
a603401cdd libstore: curl retry: reset content-encoding and don't use string after move
(cherry picked from commit b129fc8237)
2025-04-15 11:22:25 +00:00
Philipp Otterbein
61bb405839 add isInterrupted() call and replace some checkInterrupt() occurrences
(cherry picked from commit 49f757c24a)
2025-04-11 22:15:12 +00:00
Philipp Otterbein
c53bd8905b libstore: same progress bar behavior for PUT and POST requests
- no differentiation between uploads and downloads in CLI

(cherry picked from commit db297d3dda)
2025-04-11 22:15:12 +00:00
Philipp Otterbein
beab9eb978 libstore S3: fix progress bar and make file transfers interruptible
(cherry picked from commit 9da01e69f9)
2025-04-11 22:15:11 +00:00
John Ericson
f9c262c3d5 Fix another machine config parsing bug
We were ignorning the result of `trim`, and after my last change we were
also trimmming too early.

(cherry picked from commit b74b0f4e1c)
2025-04-09 20:13:30 +00:00
John Ericson
2892b758b3 Fix ; and # bug in machine file parsing
Comments go to the end of the line, not merely the next ; *or* \n. Fix
by splitting on `;` *within* lines, and test.

(cherry picked from commit f8b13cce19)
2025-04-09 18:27:16 +00:00
Eelco Dolstra
a08477975d Actually ignore system/user registries during locking
Something went wrong in #12068 so this didn't work. Also added a test.

(cherry picked from commit 77d4316353)
2025-04-09 16:33:47 +00:00
Eelco Dolstra
c548e92860
Merge pull request #12966 from NixOS/mergify/bp/2.28-maintenance/pr-12958
Fix some unlinked tests (backport #12958)
2025-04-08 13:55:54 +02:00
Graham Christensen
cd7e01526e format as required
(cherry picked from commit 9b47b2b217)
2025-04-07 23:16:28 +00:00
Graham Christensen
16a2cddfb9 Add trailing commas on addFlag incantations
(cherry picked from commit 06acbd37bd)
2025-04-07 23:16:27 +00:00
Eelco Dolstra
3a4dc47c22 Remove unused tracing-file-system-object-sink.{hh,cc}
(cherry picked from commit 611fd806cb)
2025-04-07 20:42:08 +00:00
Eelco Dolstra
f0ed61bb4e Fix/run monitorfdhup test
(cherry picked from commit 340fa00d52)
2025-04-07 20:42:08 +00:00
Eelco Dolstra
85902fad58 Fix some clang-tidy warnings
(cherry picked from commit c0ad5d36c4)
2025-04-07 20:38:07 +00:00
Eelco Dolstra
aa1c690ebf Keep fchmodat2-compat.hh private
Since it references store-config-private.hh.

(cherry picked from commit 04e9dc27ac)
2025-04-07 19:18:46 +00:00
Eelco Dolstra
17de9dd275 Make lexer-helpers.hh internal to fix a clang-tidy error
(cherry picked from commit 8be24f58f2)
2025-04-07 18:29:08 +00:00
Sandro
5b21c94fab Fix meson warnings on minimum version
nix> meson.build:216: WARNING: Project targets '>= 1.1' but uses feature introduced in '1.4.0': fs.name with build_tgt, custom_tgt, and custom_idx.
nix> meson.build:222: WARNING: Project targets '>= 1.1' but uses feature introduced in '1.4.0': fs.name with build_tgt, custom_tgt, and custom_idx.
nix> meson.build:235: WARNING: Project targets '>= 1.1' but uses feature introduced in '1.4.0': fs.name with build_tgt, custom_tgt, and custom_idx.
nix> meson.build:236: WARNING: Project targets '>= 1.1' but uses feature introduced in '1.4.0': fs.name with build_tgt, custom_tgt, and custom_idx.
nix> meson.build:242: WARNING: Project targets '>= 1.1' but uses feature introduced in '1.4.0': fs.name with build_tgt, custom_tgt, and custom_idx.

(cherry picked from commit 14a829acbb)
2025-04-07 17:51:44 +00:00
Eelco Dolstra
e3a8e43600
Merge pull request #12942 from NixOS/mergify/bp/2.28-maintenance/pr-12936
libflake: add lock file path to invalid json error (backport #12936)
2025-04-07 09:57:33 +02:00
John Ericson
efb0feb22b Get rid of raw -D defines, always use private config files
Now that we have the private vs public distinction, we can do this
without leaking information downstream.

(cherry picked from commit 7a7fe350d5)
2025-04-07 00:10:38 +00:00
John Ericson
7e96f31753 Clean some header related things.
Revert most of "Hack together a fix for the public headers"

- The `libmain` change is kept, and one more libmain change is made.
  (Need to update Meson and Nix per the package alike).

- The S3 situation is fixed in a different way: the variable is public
  now, used in the header, and fixed accordingly.

- Fix TODO for `HAVE_EMBEDDED_SANDBOX_SHELL`

This reverts commit 2b51250534.

(cherry picked from commit 3294b22a68)
2025-04-07 00:10:37 +00:00
Alexander Romanov
49b6766332 libflake: add lock file path to invalid json error
Previously, when lock file contained invalid JSON nix reported a parser
error without specifying the file it came from.

This change adds flake.lock file path to the error message to avoid
confusion.

(cherry picked from commit e3873aa1a0)
2025-04-06 23:33:35 +00:00
Robert Hensing
3bb46b73a8 Fix undefined macro errors
(cherry picked from commit 77b4bb74d5)
2025-04-06 16:25:51 +00:00
Robert Hensing
615344fdf0 Fix more -Wundef, in darwin context 2025-04-05 13:46:04 +02:00
Robert Hensing
bd2d5b7335 Hack together a fix for the public headers
Please fix this.
2025-04-05 13:44:58 +02:00
Robert Hensing
5c90b41715 Add -Wundef to make #if FOO an error if not defined
This commit has all the straightforward stuff.
2025-04-05 13:44:58 +02:00
mergify[bot]
0a66906e55
Merge pull request #12924 from NixOS/mergify/bp/2.28-maintenance/pr-12911
create cache entry for paths already in the nix store (backport #12911)
2025-04-04 12:50:55 +00:00
John Ericson
0b4fea7872 Fix windows build
(cherry picked from commit 652a628d1c)
2025-04-04 13:45:38 +02:00
Jörg Thalheim
651df50996 create cache entry for paths already in the nix store
This allows path:/nix/store/* paths to not be copied twice to the nix
store.

(cherry picked from commit 61c6210dbf)
2025-04-04 11:43:08 +00:00
Eelco Dolstra
994c8b6a7a Set path display for substituted inputs
(cherry picked from commit 4a397cfb80)
2025-04-03 12:50:25 +00: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
Jörg Thalheim
ddfb268ff5
Merge pull request #12906 from NixOS/mergify/bp/2.28-maintenance/pr-12886
symlink_exists: wrap exceptions into nix exception (backport #12886)
2025-04-03 10:28:22 +02: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
Jörg Thalheim
d73ed6f310 symlink_exists: wrap exceptions into nix exception
(cherry picked from commit 779687854f)
2025-04-03 09:49:40 +02:00
Eelco Dolstra
a47ea7ed04 Merge remote-tracking branch 'origin/2.28-maintenance' into mergify/bp/2.28-maintenance/pr-12869 2025-04-03 09:31:09 +02:00
Eelco Dolstra
c45f97b9f4 Make Git error messages more consistent
(cherry picked from commit f15681df26)
2025-04-02 19:15:16 +00:00
Eelco Dolstra
b4813a1b55 Tweak error message
(cherry picked from commit 277c29a64b)
2025-04-02 19:15:16 +00:00
Graham Christensen
8703e9d89e Improve and fix the error message when a file is not tracked by Git
(cherry picked from commit 62e2304891)
2025-04-02 19:15:16 +00: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
64fb6ab435 AttrCursor::Parent: shared_ptr -> ref
(cherry picked from commit 5a35745949)
2025-04-02 13:23:39 +02:00
Eelco Dolstra
8b448c841e Throw CachedEvalError if a cached value exists but has type "failed"
Otherwise you get unhelpful errors like

  error: 'apps' is not an attribute set

Fixes #12762.

(cherry picked from commit 8b438fccb4)
2025-04-02 13:23:29 +02:00
Robert Hensing
c908eef782 packaging: finalAttrs.doCheck -> finalAttrs.finalPackage.doCheck
This includes the logic that disables checks on cross appropriately.

Co-authored-by: Peder Bergebakken Sundt <pbsds@hotmail.com>
(cherry picked from commit 27d71b21fc)
2025-04-01 17:50:34 +00:00
Robert Hensing
36f23279bf Format
clang-format: 18.1.8 -> 19.1.7
(cherry picked from commit 55297f865c)
2025-04-01 16:50:36 +00: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