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

18927 commits

Author SHA1 Message Date
Eelco Dolstra
08361f031d EvalState::realiseContext(): Allow access to the entire closure
Fixes #11030.
2024-12-16 16:16:36 +01:00
Robert Hensing
18770c7e18
Merge pull request #12059 from Mic92/installer-test
installer: make sure we can always test the installer in ci and locally
2024-12-16 15:42:56 +01:00
Eelco Dolstra
f8eb2f6445
Merge pull request #12038 from DeterminateSystems/flake-cache
lookupInFlakeCache(): Fix O(n) time lookup
2024-12-16 15:28:09 +01:00
Eelco Dolstra
bdf579d018
Merge pull request #12051 from Mic92/ci-follow-up
Skip tests on systems with restricted usernamespaces
2024-12-16 15:19:17 +01:00
Eelco Dolstra
b167e2c415 Work around clang/libc++ issue 2024-12-16 14:58:39 +01:00
Eelco Dolstra
d2e1d4916a lookupInFlakeCache(): Fix O(n) time lookup 2024-12-16 14:58:39 +01:00
Eelco Dolstra
d1f20e3510 Make FetchedFlake a struct 2024-12-16 14:58:25 +01:00
mergify[bot]
2f32cf6d90
Merge pull request #12068 from Mic92/ignore-local-registries
Ignore local registries for lock file generation
2024-12-16 09:22:10 +00:00
mergify[bot]
2baab6412f
Merge pull request #12028 from DeterminateSystems/fail-on-unlocked
nix flake lock: Fail if there is an unlocked input
2024-12-16 08:55:40 +00:00
Eelco Dolstra
7ddf7300b5 Ignore local registries for lock file generation
When resolving indirect flake references like `nixpkgs` in `flake.nix`
files, Nix will no longer use the system and user flake registries. It
will only use the global flake registry and overrides given on the
command line via `--override-flake`.
2024-12-16 09:43:44 +01:00
mergify[bot]
3663480d1b
Merge pull request #12048 from gcurtis/fix-upgrade-nix
Fix `nix upgrade-nix` profile search
2024-12-15 20:51:12 +00:00
Jörg Thalheim
ccaa4c259a upgrade-nix: don't double quote path on error
the format error already adds quotes.
2024-12-15 21:04:26 +01:00
Jörg Thalheim
df3eb4f3f6 mergify: updated required tests 2024-12-15 18:45:03 +01:00
Jörg Thalheim
6162e1220e installer: make sure we can always test the installer in ci and locally
Just now there is a dependency on cachix, which means we cannot test
the installer in CI if forks do not have the necessary secrets set up.
We replace this with a simple http server that serves the installer and
can be both used in CI and locally.
2024-12-15 18:17:15 +01:00
Jörg Thalheim
da7f7ba810 functional-tests: skip tests if the kernel restricts unprivileged user namespaces
Update tests/functional/common/functions.sh

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-12-15 16:07:27 +01:00
mergify[bot]
6a23803066
Merge pull request #12044 from roberth/c-api-nix-store
C API: nix_store_open doc, add storedir, real_path
2024-12-14 17:48:08 +00:00
Robert Hensing
2a98168942 C API: Add nix_store_real_path 2024-12-14 17:25:41 +00:00
Robert Hensing
472912f7ca C API: Add nix_store_get_storedir 2024-12-14 17:25:41 +00:00
Robert Hensing
80ee736b02 C API: document nix_store_open NULL URI
tl;dr NULL is better than "auto"
2024-12-14 17:25:40 +00:00
Robert Hensing
7d1c41f74c C API: typo 2024-12-14 17:25:40 +00:00
mergify[bot]
bf24092bca
Merge pull request #12020 from elikoga/ssh-opts-split-as-shell-args
Implement shellSplitString for proper handling of NIX_SSHOPTS with spaces and quotes
2024-12-14 16:44:33 +00:00
mergify[bot]
77e391b39d
Merge pull request #12012 from wh0/patch-1
tests: derivation-advanced-attributes unset NIX_STORE
2024-12-14 16:11:16 +00:00
Eli Kogan-Wang
366611391e Implement shellSplitString for proper handling of NIX_SSHOPTS with spaces and quotes 2024-12-14 15:54:16 +00:00
mergify[bot]
44bc4c6365
Merge pull request #12023 from mightyiam/head-called-on-empty-list
Improve `builtins.{head,elemAt}` error messages
2024-12-14 15:46:28 +00:00
Greg Curtis
4f831e2be5 Fix nix upgrade-nix profile search
Commit cfe66dbec updated `nix upgrade-nix` to use
`ExecutablePath::load().find`, which broke the logic for finding the
profile associated with the nix executable. The error looks something
like:

```
$ sudo -i nix upgrade-nix --debug
found Nix in '"/nix/store/46p1z0w9ad605kky62dr53z4h24k2a5r-nix-2.25.2/bin/nix"'
found profile '/nix/store/46p1z0w9ad605kky62dr53z4h24k2a5r-nix-2.25.2/bin'
error: directory '"/nix/store/46p1z0w9ad605kky62dr53z4h24k2a5r-nix-2.25.2/bin/nix"' does not appear to be part of a Nix profile
```

This seems to happen for two reasons:

1. The original PATH search resulted in a directory, but `find` returns
   the path to the executable. Fixed by getting the path's parent.
2. The profile symlink cannot be found because
   `ExecutablePath::load().find` canonicalizes the executable path. I
   updated find to normalize the path instead, which seems more in line
   with how other programs resolve paths. I'm not sure if this affects
   other callers though.

I manually tested this on macOS and Linux, and it seemed to fix
upgrading from 2.25.2 to 2.25.3.
2024-12-14 15:28:34 +00:00
mergify[bot]
9389b27fe4
Merge pull request #12050 from Mic92/ci
speed up ci by splitting off eval and build + fix ci with restricted namespaces
2024-12-14 15:24:39 +00:00
Jörg Thalheim
9f2b9256b6 ci: disable apparmor restrictions
For our tests we need to map the root user for some tests.
However ubuntu no longer allows this by default:
https://ubuntu.com/blog/ubuntu-23-10-restricted-unprivileged-user-namespaces
2024-12-14 12:55:45 +01:00
Jörg Thalheim
31b3a34e5b binary-tarball: create tarball without listing files
This is producing quite a bit of log output in CI.
2024-12-14 12:07:35 +01:00
Jörg Thalheim
691b1ea237 speed up ci by splitting off eval and build
- This speeds up macOS builds from 30 minutes to 11 minutes (3x faster).
- Also improve error reporting e.g. printing out what actually failed to build.
- As a result we also no longer need swap.
2024-12-14 12:07:35 +01:00
mergify[bot]
f1187cb696
Merge pull request #12039 from DeterminateSystems/gitignore
Prune unneeded .gitignore entries
2024-12-12 02:37:50 +00:00
mergify[bot]
9cf1b0cb57
Merge pull request #11761 from abitrolly/alt-sudo
install: Allow to specify alternative `sudo` command
2024-12-12 02:07:56 +00:00
Eelco Dolstra
be04e68b34
Merge pull request #12036 from Mic92/mergify
mergify: don't use rebase merge method
2024-12-11 19:46:11 +01:00
Eelco Dolstra
da2c2547a9
Merge pull request #12033 from Mic92/various-picks
Various packaging improvements
2024-12-11 17:01:39 +01:00
Eelco Dolstra
6d97d57dc7 Prune unneeded .gitignore entries 2024-12-11 16:20:29 +01:00
Eelco Dolstra
50ba85167c
Merge pull request #12024 from NaN-git/null-char
fromJSON/fromTOML: throw if string contains null byte
2024-12-10 12:29:48 +01:00
Jörg Thalheim
7bd8ece4ba
Merge pull request #12009 from DeterminateSystems/401-cache
HttpBinaryCacheStore: Improve error message for unauthorized caches
2024-12-10 05:41:37 +01:00
Jörg Thalheim
8c25eac7a3
Merge pull request #12031 from DeterminateSystems/fixup-mode-typos
Install .nix-channels and nix.conf with 644 instead of 664
2024-12-10 05:39:22 +01:00
Jörg Thalheim
b5cdf2e268 mergify: don't use rebase merge method
The repository configuration doesn't allow rebase merge method.
2024-12-10 05:36:09 +01:00
Jörg Thalheim
41a464c68d tests/libstore.hh: reformat with clang-format after update 2024-12-10 05:28:50 +01:00
John Ericson
747256cbe1
Merge pull request #11921 from NixOS/log-json-tolerant
Make @nix json structured build log parsing warn instead of fail
2024-12-09 16:39:04 -05:00
Philipp Otterbein
3a9d64b8e3 fromJSON/fromTOML: throw if string contains null byte 2024-12-09 22:04:21 +01:00
Jörg Thalheim
9b40618d2e tests/nixos: disable documentation to improve eval speed
we are not testing any nixos modules, so we don't need to generate
documentation. This will give us a bit of speed up.
2024-12-09 21:19:48 +01:00
Jörg Thalheim
35dd19d785 ensure clang-format is using the same version on all platforms 2024-12-09 21:15:58 +01:00
Cole Helbling
8768239517 Install .nix-channels and nix.conf with 644 instead of 664
As far as I can tell, there's no real reason either of these need to
be 664. I'm willing to bet they were just a typo that has lasted for
7 years. While this shouldn't change anything, this is, IMHO, more
correct, so let's stop perpetuating the wrong mode!
2024-12-09 11:15:53 -08:00
Robert Hensing
b6250dc6bd
Merge pull request #12029 from roberth/meson-build-support
rename: build-utils-meson -> nix-meson-build-support
2024-12-09 18:29:39 +01:00
Eelco Dolstra
8ecf848080
Merge pull request #12030 from roberth/rename-nix-daemon-compat-tests
rename: nix-tests -> nix-daemon-compat-tests
2024-12-09 18:17:11 +01:00
Robert Hensing
62d3957268 Remove dead code from nix-daemon-compat-tests packaging
We're not testing against these versions anymore.
If we bring that back (I would support that), we could do so in a clean
way, by making sure that the packaging we test against has a proper version
attribute.
2024-12-09 17:35:57 +01:00
Robert Hensing
6d86839a02 Use version correctly in nix-daemon-compat-tests derivation
Previously, a version would be appended to the pname which already
contained a version.
2024-12-09 17:34:56 +01:00
Robert Hensing
c783cd22ac tests: Make unusual logging test conditional on fixed daemon version 2024-12-09 17:29:45 +01:00
Robert Hensing
f3c722cab2 Remove redundant warning: prefix from structured build log warning 2024-12-09 17:20:27 +01:00