1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 04:56:01 +01:00
Commit graph

21090 commits

Author SHA1 Message Date
Sergei Zimmerman
c4c92c4c61
libstore: Make writable dummy store thread-safe
Tested by building with b_sanitize=thread and running:

nix flake prefetch-inputs --store "dummy://?read-only=false"

It might make sense to move this utility class out of dummy-store.cc,
but it seems fine for now.
2025-09-22 20:22:16 +03:00
Robert Hensing
43ec36cddf pre-commit: Remove exclude that passes 2025-09-22 19:21:06 +02:00
Robert Hensing
033f13fb1a pre-commit: Remove exclude that passes 2025-09-22 19:19:39 +02:00
Robert Hensing
34e9caaf9b pre-commit: Move zsh exclude 2025-09-22 19:18:52 +02:00
Robert Hensing
6195dfff3a pre-commit: Move fish exclude 2025-09-22 19:17:58 +02:00
Sergei Zimmerman
c71f80b6eb
libstore: Implement boost::hash for StorePath 2025-09-22 20:16:11 +03:00
Robert Hensing
1878e788ce misc/bash/completion.sh: Fix shellcheck 2025-09-22 19:15:44 +02:00
Robert Hensing
c12187b15a pre-commit: Drop exclude config/install-sh
This file was part of the make-based build, which has been removed.
2025-09-22 19:12:33 +02:00
Robert Hensing
df23f2b3c1 packaging/dev-shell: Add shellcheck
It was already in the closure for the pre-commit hook installation
script.
2025-09-22 19:09:35 +02:00
John Ericson
91593a237f Convert Realisation JSON logic to standard style
No behavior is changed, just:

- Declare a canonical `nlohmnan::json::adl_serializer`

- Use `json-utils.hh` to shorten code without getting worse error
  messages.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2025-09-22 12:59:37 -04:00
John Ericson
6389f65d63 Rework derivation format release note slightly 2025-09-22 12:59:37 -04:00
Robert Hensing
169a368459
Merge pull request #14040 from NixOS/import-thunk
Ensure that files are parsed/evaluated only once (2nd attempt)
2025-09-22 18:33:00 +02:00
Eelco Dolstra
a0103fc302
Merge pull request #13852 from lovesegfault/warn-no-kvm
feat(libstore): warn when kvm is enabled but /dev/kvm isn't available
2025-09-22 18:31:57 +02:00
Jörg Thalheim
dcaf001d52
Merge pull request #14021 from jfroche/fix/installer-shell-path
installer: prepend nix paths to shell config files instead of appending
2025-09-22 18:27:03 +02:00
John Ericson
74b31d10db
Merge pull request #14042 from corngood/cygwin-cross
fix cross build for cygwin
2025-09-22 11:55:40 -04:00
David McFarland
32d4ea8140 fix cross-build for cygwin 2025-09-22 12:27:04 -03:00
Eelco Dolstra
d32d77f4d4 Allocate ExprParseFile on the heap for now
https://github.com/NixOS/nix/pull/14013#issuecomment-3308085755
2025-09-22 12:06:51 +02:00
Robert Hensing
28c0089268
Merge pull request #14039 from NixOS/document-expr-methods
libexpr: Document {eval,maybeThunk} methods
2025-09-22 11:59:55 +02:00
Eelco Dolstra
5f60602875 Reapply "Merge pull request #13938 from NixOS/import-thunk"
This reverts commit fd034814dc.
2025-09-22 11:48:58 +02:00
Robert Hensing
71b27774f0
libexpr: Document {eval,maybeThunk} methods 2025-09-22 01:41:02 +03:00
Robert Hensing
ab7feb3898
Merge pull request #14023 from NixOS/dummy-store-path-info
Make dummy store also store path info
2025-09-21 16:58:18 +02:00
Sergei Zimmerman
a453a49043
tests: Tests for writeable dummy in-memory store 2025-09-21 13:36:31 +03:00
Sergei Zimmerman
b66c357b58
libstore: Implement DummyStore::narFromPath 2025-09-21 13:19:50 +03:00
Sergei Zimmerman
3a4c618483
libstore: Fix typo in description of dummy store 2025-09-21 13:19:49 +03:00
Sergei Zimmerman
ed9b377928
libstore: Disable path info cache for dummy store 2025-09-21 13:19:48 +03:00
Sergei Zimmerman
341878ce0f
libstore: Make dummy store also store path info 2025-09-21 13:19:47 +03:00
Sergei Zimmerman
02c9ac445f
libutil: Improve handling of non-directory root in MemorySourceAccessor 2025-09-21 13:19:45 +03:00
John Ericson
4df60e639b
Use shared pointers in the memory source accessor
This allows aliasing, like hard links.
2025-09-21 13:19:44 +03:00
John Ericson
f66b56ad3f
Merge pull request #14035 from NixOS/github-fetcher-accessor
libfetchers/github: Use getFSAccessor for downloadFile result
2025-09-20 21:42:54 -04:00
Sergei Zimmerman
e04381edbd
libfetchers/github: Use getFSAccessor for downloadFile result
We should use proper abstractions for reading files from the store.
E.g. this caused errors when trying to download github flakes into
an in-memory store in #14023.
2025-09-21 01:12:42 +03:00
Robert Hensing
d8d1fb0e34
Merge pull request #14029 from roberth/enable-libexpr-tests
libexpr-tests: Enable when test setup for building succeeds
2025-09-20 00:57:15 +02:00
Robert Hensing
2d1b412e5b libexpr-tests: Enable when test setup for building succeeds
Accidentally disabled by 9bc218ca3f
2025-09-19 23:39:00 +02:00
John Ericson
773dd61d1c
Merge pull request #14026 from lovesegfault/s3-url-tests
test(libstore): additional ParsedS3Url tests
2025-09-19 17:08:36 -04:00
Bernardo Meurer Costa
b63d9fbc87
test(libstore): additional ParsedS3Url tests
Extracted from the work in #13752
2025-09-19 20:52:44 +00:00
Jean-François Roche
a408bc3e30 installer: prepend nix paths to shell config files instead of appending
Some distribution will stop evaluating the shell config file if
they are not running in an interactive shell. As we append the nix
paths to the end of the file, they will not be evaluated.

We better prepend the nix paths to the shell config files to be sure
that once nix is installed, nix path will be available in any shell.

Note that this is already the case for the detsys installer script for
a while: https://github.com/DeterminateSystems/nix-installer/pull/148

Possibly related errors:

https://github.com/NixOS/nix/issues/8061
https://github.com/NixOS/nix/pull/6628
https://github.com/NixOS/nix/issues/2587
2025-09-19 14:06:06 +02:00
Jörg Thalheim
07b96c1d14
Merge pull request #14018 from NixOS/fix-soname-for-real
meson: Fix SONAME for unstable versions
2025-09-19 13:01:04 +02:00
John Ericson
936334638d
Merge pull request #14020 from xokdvium/dummy-store-fixes
libstore: Set display prefix for dummy store
2025-09-19 00:00:00 -04:00
John Ericson
8719c2e6b7
Merge pull request #14016 from xokdvium/asan
treewide: Support builds with ASAN, enable in CI
2025-09-18 23:48:23 -04:00
Sergei Zimmerman
72e2b0efea
libstore: Set display prefix for dummy store
Otherwise the prefix is «unknown».
2025-09-19 02:28:59 +03:00
Sergei Zimmerman
d5e84383d1
doc: Document building with sanitizers 2025-09-19 01:37:15 +03:00
Sergei Zimmerman
94d37e62fc
treewide: Support builds with ASAN, enable in CI
Enables builds with ASAN to catch memory corruption
bugs faster and in CI. This is an incredibly valuable
instrument that must be used as much as possible.

Somewhat based on jade's work from Lix, though there's a lot that
we have to do differently:

19ae87e5ce

Co-authored-by: Jade Lovelace <lix@jade.fyi>
2025-09-19 01:33:57 +03:00
Sergei Zimmerman
7dbfe9f576
meson: Fix SONAME for unstable versions
Replacing the string is not enough [^] for e.g. nixpkgs precise versions:

`2.31pre20250712_b1245123`

[^]: https://github.com/NixOS/nixpkgs/pull/444089
2025-09-18 23:34:27 +03:00
Jörg Thalheim
3a687eeb4f
Merge pull request #14015 from eclairevoyant/doc-global-builtins
doc: document global builtins
2025-09-18 08:11:18 +02:00
Jörg Thalheim
4808b0e24f
Merge pull request #14014 from xokdvium/fish delete
libexpr-c: Fix mismatched new/delete
2025-09-18 08:08:39 +02:00
éclairevoyant
40b47b9395
doc: document global builtins 2025-09-18 00:04:31 -04:00
Sergei Zimmerman
309d55807c
libexpr-c: Fix mismatched new/delete
This leads to ASAN errors:

==1137785==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x523000001d00 in thread T0:
  object passed to delete has wrong type:
  size of the allocated type:   5968 bytes;
  size of the deallocated type: 5968 bytes.
  alignment of the allocated type:   8 bytes;
  alignment of the deallocated type: default-aligned.
2025-09-18 02:58:32 +03:00
Jörg Thalheim
9d8c6a6646
Merge pull request #14013 from xokdvium/revert-13938
Revert "Merge pull request #13938 from NixOS/import-thunk"
2025-09-18 01:23:14 +02:00
Sergei Zimmerman
fd034814dc
Revert "Merge pull request #13938 from NixOS/import-thunk"
This has multiple dangling pointer issues that lead to segfaults in e.g.:

nix eval --expr '(builtins.getFlake "github:nixos/nixpkgs/25.05")' --impure

This reverts commit ad175727e4, reversing
changes made to d314750174.
2025-09-18 01:52:46 +03:00
Robert Hensing
b4fcb64276
Merge pull request #13980 from obsidiansystems/drv-json-issue-13570
Make the JSON format for derivation use basename store paths
2025-09-17 23:31:41 +02:00
Robert Hensing
82315c3807
Merge pull request #13987 from xokdvium/bindings-bananza
libexpr: Structural sharing of attrsets
2025-09-17 23:15:05 +02:00