Robert Hensing
14d09e0b55
local-derivation-goal: Print sandbox error detail on darwin
...
Co-Authored-By: Théophane Hufschmitt <theophane.hufschmitt@tweag.io>
2024-10-22 15:30:03 +02:00
Robert Hensing
f733553061
packaging: Add darwin -lsandbox in meson
2024-10-22 15:30:03 +02:00
Puck Meerburg
d2c880b03f
fix: Run all derivation builders inside the sandbox on macOS
2024-10-22 15:30:03 +02:00
Eelco Dolstra
eaae19403d
Merge pull request #11706 from ivan-tkatchev/fix-11704
...
nix shell/run: Use overlayfs
2024-10-22 14:17:28 +02:00
Marian Hammer
85b0cd320a
nix/tests: run test help.sh only if nix is built with documentation
...
tests/functional/help.sh calls nix-* commands with option --help
if nix is built without documentation the option --help throws an error
because the man page it wants to display is missing
2024-10-22 14:15:56 +02:00
Eelco Dolstra
c2cf01a21e
Merge pull request #11713 from Mic92/env-vars
...
fix env-vars beeing written to `/tmp`
2024-10-22 14:12:36 +02:00
Robert Hensing
0941a3a8ac
Merge pull request #11727 from Mic92/doxygen
...
make doxygen build more silent
2024-10-22 12:56:32 +02:00
Jörg Thalheim
2105574702
fix env-vars beeing written to /tmp
...
This overall seems like insecure tmp file handling to me. Because other
users could replace files in /tmp with a symlink and make the nix-shell
override other files.
fixes https://github.com/NixOS/nix/issues/11470
2024-10-22 08:21:18 +00:00
Jörg Thalheim
48a7ac23bc
make doxygen build more silent
...
The buildoutput of doxygen often hides important build warnings and
errors behind a wall of text.
2024-10-22 09:53:49 +02:00
tomberek
1ed166315c
Merge pull request #11717 from llakala/patch-1
...
docs: clarify syntax for escaping dollar curlies
2024-10-21 08:34:39 -04:00
tomberek
63e6672251
Merge pull request #11723 from roberth/doc-tryEval
...
doc: Explain why tryEval does not return the message
2024-10-21 08:33:07 -04:00
Jörg Thalheim
b93b910fec
Merge pull request #11718 from xokdvium/dev/move-create-directory-out-of-assert
...
fix(nix/eval.cc): move call to `fs::create_directory` out of `assert`
2024-10-21 14:22:40 +02:00
Robert Hensing
90d257b771
doc: Explain why tryEval does not return the message
2024-10-20 19:31:16 +02:00
Sergei Zimmerman
8277b50b6f
fix(nix/eval.cc): move call to fs::create_directory
out of assert
...
If the call is inside the assertion, then in non-assert builds
the call would be stripped out. This is highly unexpected.
2024-10-19 00:40:14 +03:00
Eman Resu
defff01a51
docs: clarify syntax for escaping dollar curlies
2024-10-18 13:26:38 -04:00
John Ericson
694c378d14
Merge pull request #11708 from obsidiansystems/move-tests
...
Move unit tests to the location Meson expects them to be
2024-10-17 16:15:34 -04:00
John Ericson
e65510da56
Move unit tests to the location Meson expects them to be
...
Everything that is a separate subproject should live in the subprojects
directory.
Progress on #2503
This reverts commit 451f8a8c19
.
2024-10-17 15:42:16 -04:00
Eelco Dolstra
7d1f7f8d59
Tarball fetcher: Handle lock files that *do* contain lastModified
...
Fixes flake-regressions/tests/DeterminateSystems/eva/0.1.0:
error: 'lastModified' attribute mismatch in input 'https://api.flakehub.com/f/pinned/ipetkov/crane/0.14.1/018ac45c-ff5e-7076-b956-d478a0336516/source.tar.gz?narHash=sha256-mnE14re43v3/Jc50Jv0BKPMtEk7FEtDSligP6B5HwlI%3D ', expected 1695511445
2024-10-17 16:20:08 +02:00
Eelco Dolstra
78b5b4c105
Tarball fetcher: Fix compat with old lock files that didn't include lastModified
...
Fixes flake-regressions/tests/DeterminateSystems/fh/0.1.10:
error: fetching final input '{"final":true,"narHash":"sha256-0dZpggYjjmWEk+rGixiBHOHuQfLzEzNfrtjSig04s6Q=","rev":"9ccae1754eec0341b640d5705302ac0923d22875","revCount":1618,"type":"tarball","url":"https://api.flakehub.com/f/pinned/nix-community/fenix/0.1.1618%2Brev-9ccae1754eec0341b640d5705302ac0923d22875/018aea4c-03c9-7734-95d5-b84cc8881e3d/source.tar.gz "}' resulted in different input '{"final":true,"lastModified":1696141234,"narHash":"sha256-0dZpggYjjmWEk+rGixiBHOHuQfLzEzNfrtjSig04s6Q=","rev":"9ccae1754eec0341b640d5705302ac0923d22875","revCount":1618,"type":"tarball","url":"https://api.flakehub.com/f/pinned/nix-community/fenix/0.1.1618%2Brev-9ccae1754eec0341b640d5705302ac0923d22875/018aea4c-03c9-7734-95d5-b84cc8881e3d/source.tar.gz "}'
2024-10-17 14:12:39 +02:00
Eelco Dolstra
1cd48008f0
Merge pull request #11710 from NixOS/doc-onboarding
...
maintainers/onboarding: Start documenting
2024-10-17 11:06:23 +02:00
Eelco Dolstra
2e2c7f3b14
Merge pull request #11709 from DeterminateSystems/remove-team-list
...
maintainers/README.md: Remove the list of team members
2024-10-17 11:05:55 +02:00
Robert Hensing
c196011d23
maintainers/onboarding: Start documenting
2024-10-16 22:06:28 +02:00
Eelco Dolstra
7bd0c70b37
maintainers/README.md: Remove the list of team members
...
Let's have one canonical location for the team membership.
2024-10-16 22:03:44 +02:00
Robert Hensing
f51974d698
Merge pull request #11665 from roberth/fix-Interrupted-falling-out-of-thread
...
Fix `Interrupted` falling out of thread crash
2024-10-16 20:09:29 +02:00
Robert Hensing
ed184f0b61
Typo
...
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2024-10-16 19:40:45 +02:00
Eelco Dolstra
facc502bc8
Merge pull request #11695 from DeterminateSystems/override-lastModified
...
path fetcher: Allow the lastModified attribute to be overriden again
2024-10-16 18:03:29 +02:00
Robert Hensing
fd8a4a86d9
ThreadPool: don't silently ignore non-std exceptions
...
Introduced in 8f6b347abd
without explanation.
Throwing anything that's not that is a programming mistake that we don't want
to ignore silently. A crash would be ok, because that means we/they can fix
the offending throw.
2024-10-16 17:56:08 +02:00
Robert Hensing
16320f6d24
Handle ThreadPoolShutdown with normal catch
2024-10-16 17:56:08 +02:00
Robert Hensing
3f9ff10786
ThreadPool: catch Interrupted
2024-10-16 17:56:08 +02:00
Robert Hensing
de41e46175
Document recursive-nix startDaemon/stopDaemon
2024-10-16 17:56:08 +02:00
Robert Hensing
0e5a5303ad
fix: Ignore Interrupted in recursive-nix daemon worker
...
Otherwise, if checkInterrupt() in any of the supported store operations
would catch onto a user interrupt, the exception would bubble to the thread
start and be handled by std::terminate(): a crash.
2024-10-16 17:56:08 +02:00
Eelco Dolstra
de1289229f
Merge pull request #11669 from obsidiansystems/doc-source-rename
...
Make the subproject dir `src` again
2024-10-16 17:30:40 +02:00
Eelco Dolstra
781ff7672e
Add test
2024-10-16 17:18:07 +02:00
Eelco Dolstra
ed1f9dd13f
Don't mark inputs as final in getAccessorUnchecked()
...
We haven't added the narHash attribute yet at that point. And if the
caller uses getAccesor() instead of fetchToStore() (e.g. in `nix
registry pin`), the narHash attribute will never be added. This could
lead to a mismatch.
2024-10-16 15:18:23 +02:00
Eelco Dolstra
fc09815eda
Typo
...
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2024-10-16 15:17:38 +02:00
Ivan Tkachev
e33d6f24e3
#11704
2024-10-16 15:27:22 +03:00
Eelco Dolstra
188d97e1f1
Restore input substitution
...
The ability to substitute inputs was removed in #10612 because it was
broken: with user-specified inputs containing a `narHash` attribute,
substitution resulted in an input that lacked the attributes returned
by the real fetcher (such as `lastModified`).
To fix this, we introduce a new input attribute `final`. If `final =
true`, fetching the input cannot add or change any attributes.
We only attempt to substitute inputs that have `final = true`. This is
implied by lock file entries; we only write a lock file if all its
entries are "final".
The user can specified `final = true` in `fetchTree`, in which case it
is their responsibility to ensure that all attributes returned by the
fetcher are included in the `fetchTree` call. For example,
nix eval --impure --expr 'builtins.fetchTree { type = "github"; owner = "NixOS"; repo = "patchelf"; final = true; narHash = "sha256-FSoxTcRZMGHNJh8dNtKOkcUtjhmhU6yQXcZZfUPLhQM="; }'
succeeds in a store path with the specified NAR hash exists or is
substitutable, but fails with
error: fetching final input '{"final":true,"narHash":"sha256-FSoxTcRZMGHNJh8dNtKOkcUtjhmhU6yQXcZZfUPLhQM=","owner":"NixOS","repo":"patchelf","type":"github"}' resulted in different input '{"final":true,"lastModified":1718457448,"narHash":"sha256-FSoxTcRZMGHNJh8dNtKOkcUtjhmhU6yQXcZZfUPLhQM=","owner":"NixOS","repo":"patchelf","rev":"a0f54334df36770b335c051e540ba40afcbf8378","type":"github"}'
2024-10-15 20:55:05 +02:00
Robert Hensing
806a91f7bf
Merge pull request #11688 from roberth/meson-tidy
...
Clean up the `package.nix` files
2024-10-14 17:40:46 +02:00
John Ericson
379ada42bc
Make the subproject dir src
again
...
We got rid of this in c7ec33605e
because
of bug https://github.com/mesonbuild/meson/issues/13774 , but in the
previous commit we renamed the manual source directory, which avoids it.
Now we can change it back.
2024-10-14 11:21:24 -04:00
John Ericson
eb7d7780b1
Rename doc/manual{src -> source}
...
This is needed to avoid this
https://github.com/mesonbuild/meson/issues/13774 when we go back to
making our subproject directory `src`.
2024-10-14 11:21:24 -04:00
Eelco Dolstra
5d35424445
path fetcher: Allow the lastModified attribute to be overriden again
...
Fixes #11660 .
2024-10-14 16:17:18 +02:00
Eelco Dolstra
d5c45952ac
Merge pull request #11690 from DeterminateSystems/non-contiguous-tarballs
...
Handle tarballs where directory entries are not contiguous
2024-10-14 14:50:31 +02:00
Eelco Dolstra
b11c331c53
Merge pull request #11684 from geofft/real-root-mode-0500
...
libstore: Make our sandbox pivot_root directory accessible to ourself
2024-10-14 14:35:37 +02:00
Eelco Dolstra
a7b9877da9
Add a test
2024-10-14 14:10:36 +02:00
Eelco Dolstra
71c2d82302
Merge pull request #11677 from DeterminateSystems/fix-s3-crash
...
builtins.fetchurl: Fix segfault on s3:// URLs
2024-10-14 13:55:49 +02:00
Eelco Dolstra
4012954b59
Handle tarballs where directory entries are not contiguous
...
I.e. when not all entries underneath a directory X follow eachother,
but there is some entry Y that isn't a child of X in between.
Fixes #11656 .
2024-10-14 13:53:54 +02:00
Eelco Dolstra
d2f4d07619
Add assert
2024-10-14 13:15:55 +02:00
Robert Hensing
15e3e1543b
packaging: Add mkMeson{Library,Executable}
...
and:
- move pkg-config out of mkMesonDerivation, for components that don't
produce any executable code
2024-10-13 23:17:54 +02:00
Robert Hensing
e10ff893e5
packaging: Factor out mkPackageBuilder
2024-10-13 22:43:06 +02:00
Robert Hensing
0aef34b790
packaging: Add mesonLayer
...
... and remove a few unused arguments.
This adds pkg-config to a two or three packages that don't use it,
but we shouldn't let that bother us. It's like our personal stdenv.
2024-10-13 22:39:53 +02:00