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
806a91f7bf
Merge pull request #11688 from roberth/meson-tidy
...
Clean up the `package.nix` files
2024-10-14 17:40:46 +02: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
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
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
Jörg Thalheim
30655dd146
git-utils: fix x86_64-w64-mingw32 build
2024-10-11 21:04:52 +02:00
Eelco Dolstra
15e5684884
experimental-features.hh: Don't include json-utils.hh
...
This caused nlohmann/json.hpp to leak into a lot of compilation units,
which is slow (when not using precompiled headers).
Cuts build time from 46m24s to 42m5s (real time with -j24: 2m42s to
2m24s).
2024-10-04 15:59:35 +02:00
Jörg Thalheim
12d5b2cfa1
create git caches atomically
...
When working on speeding up the CI,
I triggered a race condition in the creation of the tarball cache.
This code now instead will ensure that half-initialized repositories
are no longer visible to any other nix process.
This is the error message that I got before:
error: opening Git repository '"/Users/runner/.cache/nix/tarball-cache"': could not find repository at '/Users/runner/.cache/nix/tarball-cache'
2024-09-26 17:46:25 +02:00
John Ericson
2b6b03d8df
Ensure error messages don't leak private key
...
Since #8766 , invalid base64 is rendered in errors, but we don't actually
want to show this in the case of an invalid private keys.
Co-Authored-By: Eelco Dolstra <edolstra@gmail.com>
2024-09-23 16:36:48 -04:00
Robert Hensing
799abea0c4
Merge pull request #11330 from NixOS/packfile
...
libgit2, GitRepo: Write (thin) packfiles
2024-09-16 14:42:59 +02:00
Robert Hensing
976f539f7d
Make Repo::flush interruptible
2024-09-16 13:42:46 +02:00
Eelco Dolstra
176334d8be
Merge pull request #10612 from edolstra/no-flake-substitution
...
Input::fetchToStore(): Don't try to substitute
2024-09-16 12:47:50 +02:00
Robert Hensing
bbef37b4a6
Merge pull request #11423 from DeterminateSystems/ignore-stale-submodules
...
Git fetcher: Ignore .gitmodules entries that are not submodules
2024-09-12 18:14:18 +02:00
Eelco Dolstra
1c2508f176
Merge pull request #11466 from DeterminateSystems/git-mtime-warning
...
Git fetcher: Don't update mtime of ref file if fetching by rev
2024-09-11 17:34:46 +02:00
Eelco Dolstra
aa41de7d82
Merge remote-tracking branch 'origin/master' into no-flake-substitution
2024-09-11 17:10:55 +02:00
Noam Yorav-Raphael
38bfbb297c
Use envvars NIX_CACHE_HOME, NIX_CONFIG_HOME, NIX_DATA_HOME, NIX_STATE_HOME if defined ( #11351 )
2024-09-11 10:36:46 +00:00
Eelco Dolstra
b80b091bac
Git fetcher: Don't update mtime of ref file if fetching by rev
...
This fixes the warning
$ nix eval --store /tmp/nix --expr 'builtins.fetchTree { type = "git"; url = "https://github.com/DeterminateSystems/attic "; ref = "fixups-for-magic-nix-cache"; rev = "635753a2069d4b8228e846dc5c09ad361c75cd1a"; }'
warning: could not update mtime for file '/home/eelco/.cache/nix/gitv3/09788h9zgba5lbfkaa6ija2dvi004jwsqjf5ln21i2njs07cz766/refs/heads/fixups-for-magic-nix-cache': error: changing modification time of '"/home/eelco/.cache/nix/gitv3/09788h9zgba5lbfkaa6ija2dvi004jwsqjf5ln21i2njs07cz766/refs/heads/fixups-for-magic-nix-cache"': No such file or directory
When we're fetching by rev, that file doesn't necessarily exist, and we
don't care about it anyway.
2024-09-09 19:52:21 +02:00
Eelco Dolstra
9d24080090
Git fetcher: Ignore .gitmodules entries that are not submodules
...
Fixes #10739 .
2024-09-04 14:46:33 +02:00
Robert Hensing
57c48304bb
fixup: Release odb
2024-08-28 17:49:22 +02:00
Robert Hensing
fb8d3ed150
fixup: sync -> flush
...
The latter is not used for memory synchronization things.
2024-08-28 17:49:22 +02:00
Robert Hensing
97ff2ed455
Sync tarball cache within tarball cache Activity
2024-08-28 17:49:22 +02:00
Robert Hensing
d0f8a92363
Make tarball cache more interruptible
2024-08-28 17:49:22 +02:00
Robert Hensing
5dd6c4f062
libgit2, GitRepo: Write thin packfiles
...
libgit2 didn't write thin ones, hence the patch.
This should improve performance on systems with weak I/O in ~/.cache,
especially in terms of operations per second, or where system calls
are slower. (macOS, VMs?)
2024-08-28 17:49:21 +02:00
Eelco Dolstra
9f6ee93f48
fetchers::downloadTarball(): Return a cacheable accessor
...
downloadTarball() is used by `-I foo=<url>` etc. fetchToStore() needs
the accessor to have a fingerprint to enable caching.
Fixes #11271 .
2024-08-12 15:48:26 +02:00
Eelco Dolstra
0b96c586e0
Merge pull request #11195 from DeterminateSystems/tarball-roots
...
Improve handling of tarballs that don't consist of a single top-level directory
2024-07-29 16:58:59 +02:00
Eelco Dolstra
a3171cec54
Update src/libfetchers/git-utils.hh
...
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-07-29 15:12:01 +02:00
Robert Hensing
6e3bba5e26
Merge pull request #11171 from DeterminateSystems/speed-up-tarball-downloads
...
Increase download buffer size and improve tarball import logging
2024-07-29 15:02:35 +02:00
Eelco Dolstra
7c18b4d060
Don't dereference top-level regular files
...
Since this yielded an empty directory as far back as Nix 2.3, we don't
really need special handling for executables vs non-executables.
2024-07-29 14:34:02 +02:00
Eelco Dolstra
e0012b97ab
Split tarball-specific logic from GitFileSystemObjectSink
2024-07-29 14:26:25 +02:00
Robert Hensing
861bd102a6
Merge pull request #11167 from NixOS/repl-test-rejiggle
...
Fix repl test for `buildReadlineNoMarkdown`
2024-07-27 00:55:57 +02:00
Eelco Dolstra
06b686b62d
Handle tarballs that don't consist of a single top-level directory
...
Fixes #4785 (top-level directories are no longer merged into one).
Fixes #10983 (top-level non-directories are no longer discarded).
2024-07-26 20:24:58 +02:00
Eelco Dolstra
d9ba2a1634
Fix error message
2024-07-26 19:06:49 +02:00
John Ericson
3b49f7a143
Deduplicate our many package.nix
a bit ( #11175 )
...
- They should all be built in parallel
- They should all use strict deps by default
2024-07-25 03:12:39 +00:00
Eelco Dolstra
01839b525c
Show when we're unpacking an archive into the Git cache
...
This happens in parallel with the download (which starts later), so
you only see this message when the download has finished but the
import hasn't.
2024-07-24 20:22:26 +02:00
Robert Hensing
3172e88af5
Make abort() call sites log first
2024-07-24 16:52:04 +02:00
John Ericson
d3cee8160c
Add missing threads deps
2024-07-22 11:46:54 -04:00
John Ericson
bc83b9dc1f
Remove comparator.hh
and switch to <=>
in a bunch of places
...
Known behavior changes:
- `MemorySourceAccessor`'s comparison operators no longer forget to
compare the `SourceAccessor` base class.
Progress on #10832
What remains for that issue is hopefully much easier!
2024-07-12 14:54:18 -04:00
John Ericson
337a5a23b7
Merge pull request #11089 from NixOS/warnings-includes
...
Fix warnings and optimize includes
2024-07-12 10:29:26 -04:00
Robert Hensing
8df041cbc6
Solve unused header warnings reported by clangd
2024-07-12 15:37:54 +02:00
John Ericson
3fc77f281e
No global settings in libnixfetchers
and libnixflake
...
Progress on #5638
There are still a global fetcher and eval settings, but they are pushed
down into `libnixcmd`, which is a lot less bad a place for this sort of
thing.
Continuing process pioneered in
52bfccf8d8
.
2024-07-12 08:50:28 -04:00
Robert Hensing
4fd8f19ecf
Fix build to use CanonPath in new FSO sinks
2024-07-11 12:14:48 +02:00
Robert Hensing
86420753ec
Merge remote-tracking branch 'upstream/master' into support-hardlinks-in-tarballs
2024-07-11 11:43:02 +02:00
Robert Hensing
0729f0a113
packaging: Pass version directly
2024-07-06 17:52:57 +02:00
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
e1b6b3ce27
Merge pull request #11020 from DeterminateSystems/fix-tarball-caching
...
Tarball fetcher: Fix fetchToStore() and eval caching
2024-07-05 16:30:12 +02:00
Eelco Dolstra
5b4102c3b2
Tarball fetcher: Include revCount/lastModified in the fingerprint
...
This can influence the evaluation result so they should be included in
the fingerprint.
2024-07-03 22:05:45 +02:00