Commit graph

16716 commits

Author SHA1 Message Date
Robert Hensing
876e70bc9a tests/unit/libexpr/local.mk
A proper build system would catch errors like this.
2024-04-11 17:39:21 +02:00
Robert Hensing
1233bcde37 libstore-c: Add nix_store_path_clone 2024-04-11 17:39:21 +02:00
Robert Hensing
48808a5320 tests/unit/libexpr: Enable nix_store_realise test, and add docs 2024-04-11 17:39:21 +02:00
Robert Hensing
94d9819bdc tests/unit/libexpr/main: Fix realisation 2024-04-11 17:39:19 +02:00
Robert Hensing
ed13cf05a2 build-hook: Allow empty
Like always declining; local builds only, as can be inferred from the
docs. (Not worth spending too many words on this pretty obvious
behavior, I think. Also, plans to remove it? https://github.com/NixOS/nix/issues/1221)
2024-04-11 17:39:16 +02:00
Robert Hensing
c145ce0e1a realiseContext: Remove no-op replacements
A possible use of them might have been to figure out the paths
(which can now be retrieved with maybePathsOut), but I have
not found evidence that it was used this way, and it would have
been broken, because non-CA outputs weren't recorded in the map.
2024-04-05 16:15:43 +02:00
Robert Hensing
02c41aba5b libexpr-c: Add nix_string_realise 2024-04-05 16:08:18 +02:00
Eelco Dolstra
62f8d8c9a9
Merge pull request #10288 from tweag/refine-release-cycle
Update the release cycle
2024-04-05 13:07:31 +02:00
Eelco Dolstra
75fd09b3a1
Merge pull request #10401 from nix-windows/better-signals-interface
Better signals interface
2024-04-05 13:06:16 +02:00
Eelco Dolstra
3d0d9085d5
Merge pull request #10408 from NixOS/fix-make
fix: Remove duplicate imports from Makefile
2024-04-05 13:02:51 +02:00
Robert Hensing
25584e215e fix: Remove duplicate imports from Makefile 2024-04-05 12:03:53 +02:00
John Ericson
50f621b241 Better signals interface
This avoids some CPP and accidentally using Unix stuff in client code.
2024-04-05 01:38:28 -04:00
Théophane Hufschmitt
9d03c2b08b
Merge pull request #10406 from obsidiansystems/fix-c-bindings-portability
Fix some portability issues with the new C bindings
2024-04-05 07:17:14 +02:00
John Ericson
c1e0769355 Fix some portability issues with the new C bindings
Build without GC is unbroken

Fix #10403

Also building tests with Windows (assuming rest of Windows fixes) is
unbroken.
2024-04-05 00:54:47 -04:00
John Ericson
19016c7b52
Merge pull request #10400 from nix-windows/better-env-var
Clean up env var logic in preparation for Windows
2024-04-04 18:49:07 -04:00
John Ericson
ef2d10f7e7 Clean up env var logic in preparation for Windows
It's a little weird we don't check the return status for these, but
changing that would introduce risk so I did not.

Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2024-04-04 18:17:12 -04:00
John Ericson
6b889e0588
Merge pull request #10399 from nix-windows/portable-sleep
Make SQLite busy back-off logic portable
2024-04-04 13:08:42 -04:00
John Ericson
1577b5fa67 Make SQLite busy back-off logic portable
Use C++ standard library not Unix functions for sleeping and randomness.

Suggested by @edolstra in https://github.com/NixOS/nix/pull/8901#discussion_r1550416615
2024-04-04 12:43:33 -04:00
Robert Hensing
12ec3154b8
Merge pull request #8699 from tweag/nix-c-bindings
(Towards) stable C bindings for libutil, libexpr
2024-04-04 17:50:52 +02:00
HaeNoe
50cb14fcf9
Improve checked json casting (#10087)
This introduces new utility functions to get elements from JSON — in an ergonomic way and with nice error messages if the expected type does not match.

Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
2024-04-03 18:04:00 +00:00
Eelco Dolstra
bf86b939f8
Merge pull request #10391 from edolstra/home-symlink
Handle the case where a parent of ~/.nix-defexpr is a symlink
2024-04-03 17:20:35 +02:00
John Ericson
36d92dc80a
Merge pull request #10316 from dottharun/derivation-output-test
test: for derivation output selection with `.`
2024-04-03 10:48:04 -04:00
Eelco Dolstra
09551fabd0 Handle the case where a parent of ~/.nix-defexpr is a symlink
Fixes https://github.com/DeterminateSystems/nix-installer/issues/912 and probably #10247.
2024-04-03 16:46:23 +02:00
Valentin Gagarin
59597628cb
show Nix logo in the manual (#9870)
* show Nix logo in the manual

the location of files is hard-coded by mdBook.
there is also seems to be no way to define custom templates, therefore
all styling has to be done in the CSS override.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-04-03 14:22:47 +00:00
Théophane Hufschmitt
5536788404
Merge pull request #10386 from SkamDart/SkamDart/include-directive-config-test
Add functional tests for include directives in nix config file
2024-04-03 08:55:04 +02:00
Tharun T
8d84de455e outputSpecified doesnt exit in top attr-set 2024-04-03 08:26:42 +05:30
Cameron Dart
ba0bd8fae6 Add functional tests for include directive in nix config file 2024-04-02 18:10:36 -07:00
John Ericson
478c05308c
Merge pull request #10364 from obsidiansystems/split-out-unix
Start factoring out Unix-assuming code
2024-04-02 15:07:36 -04:00
John Ericson
02fa20622f Start factoring out Unix assumptions
This splits files and adds new identifiers in preperation for supporting
windows, but no Windows-specific code is actually added yet.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-04-02 14:43:38 -04:00
John Ericson
852391765d Add unix (and linux) dirs
In the Nix commit, platform-specific sources will go here.
2024-04-02 12:55:23 -04:00
Théophane Hufschmitt
290be6c906
Merge pull request #10345 from edolstra/fix-chroot-flakes
Fix flake evaluation in chroot stores
2024-04-02 17:49:45 +02:00
Théophane Hufschmitt
29c3e4f580
Merge pull request #10340 from edolstra/trust-github
Add trust-tarballs-from-git-forges setting
2024-04-02 16:08:57 +02:00
Eelco Dolstra
bb5764e578
Merge pull request #10301 from a-n-n-a-l-e-e/wal-persist
enable persistent WAL mode for sqlite db
2024-04-02 12:02:12 +02:00
Eelco Dolstra
911febe56c
Merge pull request #10358 from yshui/fix-include
Fix "include" directive in config file
2024-04-02 11:50:12 +02:00
Eelco Dolstra
e473610e7a
Merge pull request #10380 from NixOS/dependabot/github_actions/zeebe-io/backport-action-2.5.0
build(deps): bump zeebe-io/backport-action from 2.4.1 to 2.5.0
2024-04-02 11:41:39 +02:00
Eelco Dolstra
c4f4726dbc
Merge pull request #10381 from NixOS/dependabot/github_actions/actions/checkout-4
build(deps): bump actions/checkout from 3 to 4
2024-04-02 11:41:25 +02:00
dependabot[bot]
29239a2829
build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 22:32:31 +00:00
dependabot[bot]
39c554aad4
build(deps): bump zeebe-io/backport-action from 2.4.1 to 2.5.0
Bumps [zeebe-io/backport-action](https://github.com/zeebe-io/backport-action) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/zeebe-io/backport-action/releases)
- [Commits](https://github.com/zeebe-io/backport-action/compare/v2.4.1...v2.5.0)

---
updated-dependencies:
- dependency-name: zeebe-io/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 22:32:29 +00:00
John Ericson
9b88e52846
Merge pull request #10362 from obsidiansystems/maybeLstat
Factor out `nix::maybeLstat`
2024-03-30 11:23:29 -04:00
John Ericson
3752bbef28
Document maybeLstat
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2024-03-30 10:39:25 -04:00
Théophane Hufschmitt
845b2a9256
Merge pull request #10363 from obsidiansystems/is-root-user
Factor out `isRootUser` function
2024-03-30 07:15:56 +01:00
Théophane Hufschmitt
c864e3b871
Merge pull request #10341 from xokdvium/xokdvium/fix-double-decompression
fix(libutil): apply only the specified filter to decompress archive
2024-03-30 07:13:09 +01:00
Sergei Zimmerman
a66b5a1526
test(nixos): add integration test for doubly-compressed content
Add an integration test with a compressing proxy (nginx is used).
This test verifies that fetched archives do not get decompressed
excessively.
2024-03-30 01:29:34 +03:00
Sergei Zimmerman
500683a949
fix(libutil): apply only the specified filter to decompress archive
This patch makes `makeDecompressionSink` strip only a single layer
of compression specified via method. This fixes erroneous decompression
of doubly-compressed NARs fetched with curl.
2024-03-30 01:29:29 +03:00
Sergei Zimmerman
6d9bafb3b8
nfc(libutil): reformat files
Run clang-format on compression.{cc,hh} and tarfile{cc,hh}.
This way follow-up patches will be formatted properly and have
easier to read diffs.
2024-03-30 01:29:22 +03:00
John Ericson
e4d9b207c2 Factor out isRootUser function 2024-03-29 16:33:01 -04:00
John Ericson
8be347afca Factor out nix::maybeLstat
This function is nice for more than `PosixSourceAccessor`. We can make a
few things simpler with it.

Note that the error logic slightly changes in some of the call sites, in
that we also count `ENOTDIR` and not just `ENOENT` as not having the
file, but that should be fine.
2024-03-29 16:32:53 -04:00
John Ericson
eeecbb9c36
Merge pull request #10361 from obsidiansystems/fix-exception-type
`throwExceptionSelfCheck` throw `Error`
2024-03-29 16:31:39 -04:00
John Ericson
555181c3fd throwExceptionSelfCheck throw Error
`SysError` is not appropriate because there is no (Unix) syscall involved.

The catch block in `initLibUtil` is already for `Error` and still works.
2024-03-29 16:05:05 -04:00
Yuxuan Shui
0be87c023f Fix "include" directive in config files 2024-03-29 16:33:13 +00:00