Robert Hensing
ddff76f667
Merge pull request #10973 from NixOS/meson-libexpr
...
Meson build for libexpr libflake, external C API, unit tests
2024-07-05 20:27:12 +02:00
Eelco Dolstra
8f280d72ff
Merge pull request #11019 from DeterminateSystems/fix-failed-to-open-archive
...
Tarball fetcher: Fix handling of cached tarballs
2024-07-05 17:10:02 +02:00
Eelco Dolstra
e7e070d36b
Document
2024-07-05 16:29:16 +02:00
Valentin Gagarin
c66079f1e8
use self-descriptive name for config file parser, document
...
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-07-04 10:36:48 +02:00
siddhantCodes
976c05879f
factor duplicate code into util function append
2024-07-04 11:09:23 +05:30
John Ericson
30de61f16d
Merge pull request #11018 from siddhantk232/canonpath-fs-sink
...
Use `CanonPath` in `fs-sink.hh`
2024-07-03 10:36:18 -04:00
Eelco Dolstra
79ed3df8f8
Tarball fetcher: Fix handling of cached tarballs
...
Fixes a regression introduced in
5a9e1c0d20
where downloading a cached
file causes the error "Failed to open archive (Unrecognized archive
format)".
2024-07-03 14:14:20 +02:00
siddhantCodes
2cf24a2df0
fix tests and minor changes
...
- use the iterator in `CanonPath` to count `level`
- use the `CanonPath::basename` method
- use `CanonPath::root` instead of `CanonPath{""}`
- remove `Path` and `PathView`, use `std::filesystem::path` directly
2024-07-03 17:43:55 +05:30
John Ericson
4d6bc61b8d
Fix things
2024-07-02 09:26:22 -04:00
John Ericson
513f6b9718
meson: Prelink links to avoid missing C++ initializers
...
This is the same as what the old build system did in
7eca8a16ea
, done for the same reasons.
2024-07-02 09:26:22 -04:00
John Ericson
479befa76d
More fixes
2024-07-02 09:26:22 -04:00
John Ericson
6a0582d9fd
Rename file to avoid reserved name
2024-07-02 09:26:22 -04:00
John Ericson
0b539dea4a
Improve boost hacks
2024-07-02 09:26:22 -04:00
John Ericson
8399bd6b8f
Dedup
2024-07-02 09:26:21 -04:00
John Ericson
8198888bc4
More dedup
2024-07-02 09:23:25 -04:00
John Ericson
d6f57f3260
More dedup
2024-07-02 09:23:25 -04:00
John Ericson
c88f83b471
More dedup
2024-07-02 09:23:25 -04:00
John Ericson
d902481a36
Better org
2024-07-02 09:23:25 -04:00
John Ericson
a81e319528
Deduplicating
2024-07-02 09:23:24 -04:00
John Ericson
4fa8068b78
Mesonify other external API
2024-07-02 09:23:24 -04:00
Jörg Thalheim
101915c9b7
enable -Werror=unused-result
...
Inspired by
010ff57ebb
From the original PR:
> We do not have any of these warnings appearing at the moment, but
> it seems like a good idea to enable [[nodiscard]] checking anyway.
> Once we start introducing more functions with must-use conditions we will
> need such checking, and the rust stdlib has proven them very useful.
2024-07-02 08:46:06 +02:00
Robert Hensing
992912f3b4
test-support: Add TracingFileSystemObjectSink
2024-07-01 17:29:07 +02:00
Robert Hensing
93b50857ed
packaging: Restore .version value altering behavior
2024-06-30 19:44:36 +02:00
Robert Hensing
7dd938b228
libutil/package.nix: Remove .version symlink replacement solution
2024-06-30 19:44:04 +02:00
siddhantCodes
72bb530141
use CanonPath
in fs-sink
and its derivatives
2024-06-30 19:03:15 +05:30
John Ericson
8a420162ab
Merge branch 'master' into fix-sandbox-escape
2024-06-26 18:11:39 -04:00
Robert Hensing
85de5a60c7
Use lib instead of explicit fileset passing
2024-06-26 04:11:20 +02:00
Robert Hensing
7df9d6da65
Improve error messages for invalid derivation names
2024-06-25 19:41:29 +02:00
John Ericson
5f4f789144
Merge pull request #10954 from NixOS/ci-meson
...
ci.yml: Add meson_build
2024-06-25 09:02:33 -04:00
Robert Hensing
0674be8d49
nix-util: Fix build
2024-06-25 10:26:57 +02:00
Brian McKenna
5be44d235a
Guard uses of lutimes, for portability
2024-06-24 17:35:34 -04:00
John Ericson
fda4c78921
Merge pull request #10951 from obsidiansystems/load-just-one-config
...
Small global config refactors
2024-06-24 12:38:04 -04:00
John Ericson
b46e13840b
Format config-global.{cc,hh}
...
Since the code is factored out, it is no longer avoding the formatter.
2024-06-24 12:07:56 -04:00
John Ericson
1620ad4587
Split out GlobalConfig
into its own header
...
This makes it easier to understand the reach of global variables /
global state in the config system.
2024-06-24 11:36:21 -04:00
John Ericson
b51e161af5
Cleanup ContentAddressMethod
to match docs
...
The old `std::variant` is bad because we aren't adding a new case to
`FileIngestionMethod` so much as we are defining a separate concept ---
store object content addressing rather than file system object content
addressing. As such, it is more correct to just create a fresh
enumeration.
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-06-24 10:24:06 -04:00
John Ericson
64e599ebe1
Rename Recursive
-> NixArchive
...
For enums:
- `FileIngestionMethod`
- `FileSerialisationMethod`
2024-06-24 10:24:06 -04:00
Eelco Dolstra
903acc7c0f
Merge pull request #10873 from siddhantk232/rm-createdirs
...
use `std::filesystem::create_directories` for createDirs
2024-06-24 14:54:37 +02:00
John Ericson
df068734ac
Merge pull request #10769 from poweredbypie/mingw-spawn
...
Implement runProgram for Windows
2024-06-23 14:12:36 -04:00
Eelco Dolstra
58b7b3fd15
Formatting
2024-06-21 17:06:19 +02:00
Théophane Hufschmitt
1d3696f0fb
Run the builds in a daemon-controled directory
...
Instead of running the builds under
`$TMPDIR/{unique-build-directory-owned-by-the-build-user}`, run them
under `$TMPDIR/{unique-build-directory-owned-by-the-daemon}/{subdir-owned-by-the-build-user}`
where the build directory is only readable and traversable by the daemon user.
This achieves two things:
1. It prevents builders from making their build directory world-readable
(or even writeable), which would allow the outside world to interact
with them.
2. It prevents external processes running as the build user (either
because that somehow leaked, maybe as a consequence of 1., or because
`build-users` isn't in use) from gaining access to the build
directory.
2024-06-21 17:06:19 +02:00
siddhantCodes
85b7989764
fix: handle errors in nix::createDirs
...
the `std::filesystem::create_directories` can fail due to insufficient
permissions. We convert this error into a `SysError` and catch it
wherever required.
2024-06-20 19:53:25 +05:30
PoweredByPie
8b81d083a7
Remove lookupPathForProgram and implement initial runProgram test
...
Apparently, CreateProcessW already searches path, so manual path search
isn't really necessary.
2024-06-18 01:01:52 -07:00
PoweredByPie
fcb92b4fa4
Fix DWORD vs. int comparison warning
2024-06-17 22:14:38 -07:00
PoweredByPie
4f6e3b9402
Implement tests for lookupPathForProgram and fix bugs caught by tests
2024-06-17 18:46:08 -07:00
PoweredByPie
4662e7d856
Implement windowsEscape
2024-06-17 14:57:57 -07:00
Tom Bereknyei
706edf26eb
build: meson for libfetchers
2024-06-17 17:25:56 -04:00
PoweredByPie
b11cf8166f
Format runProgram declaration
2024-06-17 13:12:28 -07:00
PoweredByPie
a58ca342ca
Initial runProgram implementation for Windows
...
This is incomplete; proper shell escaping needs to be done
2024-06-17 11:13:22 -07:00
John Ericson
a1bb668ccb
Merge remote-tracking branch 'upstream/master' into rm-createdirs
2024-06-17 12:57:54 -04:00
Eelco Dolstra
48d38b32d2
Merge pull request #10918 from andir/restrict-tarfile-formats
...
Restrict supported tarball formats to actual Tarballs
2024-06-17 13:20:23 +02:00