Eelco Dolstra
f63839bfa4
Cleanup
2020-07-29 18:04:51 +02:00
Eelco Dolstra and GitHub
39311e7009
Merge pull request #3549 from Ma27/fetchgit-hash
...
Merge legacy `fetchGit`-builtin with the generic `fetchTree`-function
2020-07-29 11:33:27 +02:00
Eelco Dolstra and GitHub
7c097275c4
Merge pull request #3877 from matthewbauer/develop-continuous-regex
...
Set regex_constants::match_continuous for quicker search in nix develop
2020-07-29 10:07:52 +02:00
Eelco Dolstra and GitHub
428e716193
Merge pull request #3876 from NixOS/nix-copy-latency
...
Fix RemoteStore::addToStore() latency
2020-07-29 10:04:26 +02:00
Eelco Dolstra
4c0077a07d
Fix RemoteStore::addToStore() latency
...
Since 6185d25e52 , this was very
latency-bound since it required a round-trip for every 32 KiB. So for
example copying a 514 MiB closure over a virtual ethernet device with
a articial delay of just 1 ms took 343s. Now it takes 2.7s.
Fixes #3372 .
2020-07-29 00:48:39 +02:00
Eelco Dolstra
c159f48a39
Cleanup
2020-07-29 00:24:55 +02:00
Eelco Dolstra
b8eea7e81a
Remove putBytes
...
istream->tellg() returns -1 so we can't get the number of bytes
written.
Fixes 'uploaded 's3://nix-cache/nar/00819r9lp5kajr6baxfw5dhhc0cx8ndxaz43qmd2f0gn1hk1ynlp.nar.xz' (-1 bytes) in 11620 ms' messages.
2020-07-28 13:27:56 +02:00
Eelco Dolstra
189e6f5e1d
Bump version to 3.0
...
Since there are some incompatible changes, it's better to bump the
major version number.
2020-07-28 13:18:27 +02:00
Eelco Dolstra and GitHub
86805a2c0a
Merge pull request #3738 from obsidiansystems/hash-always-has-type
...
Hash always has a valid type
2020-07-27 18:40:57 +02:00
Eelco Dolstra and GitHub
a5f7d310dd
Merge pull request #3795 from obsidiansystems/optional-derivation-output-storepath
...
Only store hash in DerivationOutput for fixed output derivations
2020-07-27 16:48:41 +02:00
Eelco Dolstra and GitHub
d7c0f094cb
Merge pull request #3860 from matthewbauer/precompile-headers-cross
...
Allow PRECOMPILE_HEADERS in cross-compilation
2020-07-26 13:09:36 +02:00
Eelco Dolstra
2292814049
createUnixDomainSocket(): Fix off-by-one error in copying the socket path
...
Reported by Kane York.
2020-07-24 11:19:17 +02:00
Eelco Dolstra
26fcab53e0
Remove unused file
2020-07-23 18:25:09 +02:00
Eelco Dolstra and GitHub
a7b8f79938
Merge pull request #3855 from obsidiansystems/delete-find-output
...
Get rid of `basicDerivation::findOutput`
2020-07-23 16:56:58 +02:00
Eelco Dolstra and GitHub
4bfba1305e
Merge pull request #3854 from B4dM4n/registry-pin-write
...
Save changes made by "nix registry pin" to user registry
2020-07-23 16:13:05 +02:00
Eelco Dolstra and GitHub
d58ab591d4
Merge pull request #3850 from obsidiansystems/references-scan-cleanup
...
Separate concerns in `scanForReferences` with TeeSink
2020-07-23 12:51:01 +02:00
Eelco Dolstra and GitHub
090960b725
Merge pull request #3848 from knedlsepp/patch-1
...
README: Fix link to hacking guide
2020-07-22 14:31:40 +02:00
Eelco Dolstra and GitHub
ff314f186e
Merge pull request #3736 from obsidiansystems/allow-relative-paths-in-store-option
...
Allow relative paths in --store option
2020-07-21 19:43:07 +02:00
Eelco Dolstra and GitHub
0951330680
Merge pull request #3714 from obsidiansystems/add-body-to-network-errors
...
Add response body to network errors
2020-07-21 18:09:42 +02:00
Eelco Dolstra and GitHub
1346da4669
Merge pull request #3844 from obsidiansystems/update-chunksize-to-suggested-value
...
Update chunkSize to the suggested value
2020-07-21 16:39:31 +02:00
Eelco Dolstra and GitHub
0835447eaa
Merge pull request #3801 from obsidiansystems/from-dump-stream
...
Constant space `addToStoreFromDump` and deduplicate code
2020-07-21 15:11:52 +02:00
Eelco Dolstra and GitHub
7e91cdd9ee
Merge pull request #3840 from Mic92/docs
...
README: improve development docs
2020-07-21 13:20:13 +02:00
Eelco Dolstra and GitHub
51ee506693
Merge pull request #3842 from obsidiansystems/fix-and-document-addToStoreSlow
...
Correct bug, thoroughly document addToStoreSlow
2020-07-21 10:01:34 +02:00
Eelco Dolstra and GitHub
1c5f8bbfb5
Merge pull request #3822 from obsidiansystems/dump-thrice-fixme
...
Optimize `addToStoreSlow` and remove `TeeParseSink`
2020-07-20 18:55:05 +02:00
Eelco Dolstra and GitHub
a79b6ddaa5
Merge pull request #3834 from ajkovar/source-line-3393
...
Add newline to profile sourcing line #3393
2020-07-19 14:01:56 +02:00
Eelco Dolstra and GitHub
31826c60e1
Merge pull request #3832 from Mic92/shell-impurity
...
fix make's impurity on /bin/sh
2020-07-18 09:39:43 +02:00
Eelco Dolstra and GitHub
0e9fb4a869
Merge pull request #3828 from BurNiinTRee/restore-signals-before-edit
...
nix edit: call restoreSignals() before `execvp`-ing the $EDITOR
2020-07-18 09:39:11 +02:00
Eelco Dolstra and GitHub
3f01fa1c9c
Merge pull request #3827 from obsidiansystems/add-back-compat-shell.nix
...
Add back flake-compat shell.nix
2020-07-17 17:05:00 +02:00
Eelco Dolstra
17f75f9cc4
parseFlakeRef(): Only search for the top-level directory for CLI flakerefs
2020-07-17 14:54:21 +02:00
Eelco Dolstra
52c8be38e0
nix profile diff-closures: Don't inherit EvalCommand
2020-07-17 12:36:12 +02:00
Eelco Dolstra
16c9f6762d
Add command 'nix profile diff-closure'
...
This shows all changes between generations of a profile. E.g.
$ nix profile diff-closures --profile /nix/var/nix/profiles/system
Generation 654 -> 655:
nix: 2.4pre20200617_5d69bbf → 2.4pre20200701_6ff9aa8, +42.2 KiB
Generation 655 -> 656:
blender-bin: 2.83.0 → 2.83.1, -294.2 KiB
Generation 656 -> 657:
curl: 7.68.0 → 7.70.0, +19.1 KiB
firmware-linux-nonfree: 2020-01-22 → 2020-05-19, +30827.7 KiB
ibus: -21.8 KiB
initrd-linux: 5.4.46 → 5.4.49
...
2020-07-16 17:00:42 +02:00
Eelco Dolstra
5517eee17e
Generations API cleanup
2020-07-16 15:18:21 +02:00
Eelco Dolstra
8807ff902e
nix diff-closures: Fix build
2020-07-16 14:25:51 +02:00
Eelco Dolstra
716eafaca4
Merge branch 'diff-closures'
2020-07-16 14:19:35 +02:00
Eelco Dolstra
3f264916db
Merge remote-tracking branch 'origin/flakes'
2020-07-16 14:07:32 +02:00
Eelco Dolstra
36a1242603
nix why-depends: Fix shortest path calculation
...
This was completely broken since d8972317fc .
2020-07-15 21:11:07 +02:00
Eelco Dolstra
2d6d53bc87
nix: Fix examples
2020-07-15 20:28:16 +02:00
Eelco Dolstra
3624c042ac
nix: Add --derivation flag to operate on .drv paths
...
For instance, 'nix why-depends --use-derivation nixpkgs#hello
nixpkgs#glibc' shows why hello's .drv depends on glibc's .drv.
2020-07-15 20:25:10 +02:00
Eelco Dolstra
dfe8f3ebc6
nix why-depends: Fix misleading message
2020-07-15 20:09:50 +02:00
Eelco Dolstra
94eb5fad76
Clean up RealiseMode
2020-07-15 20:05:42 +02:00
Eelco Dolstra
e3c2b00237
Make InstallableStorePath behave consistently with InstallableValue
...
That is, the commands 'nix path-info nixpkgs#hello' and 'nix path-info
/nix/store/00ls0qi49qkqpqblmvz5s1ajl3gc63lr-hello-2.10.drv' now do the
same thing (i.e. build the derivation and operate on the output store
path, rather than the .drv path).
2020-07-15 19:50:32 +02:00
Eelco Dolstra
0356f14459
Add 'nix diff-closures' command
...
This command makes it easier to see what changed between two closures,
i.e. what packages/versions got added or removed, and whether there
were any notable changes in path size.
For example:
$ nix diff-closures /nix/var/nix/profiles/system-655-link /nix/var/nix/profiles/system-658-link
blender-bin: 2.83.0 → 2.83.2, -294.2 KiB
curl: 7.68.0 → 7.70.0, +19.1 KiB
firmware-linux-nonfree: 2020-01-22 → 2020-05-19, +30827.7 KiB
ibus: -21.8 KiB
initrd-linux: 5.4.46 → 5.4.51, +16.9 KiB
libexif: 0.6.21 → 0.6.22, +497.6 KiB
linux: 5.4.46 → 5.4.51, +13.2 KiB
mesa: 19.3.3 → 19.3.5, -183.9 KiB
nix: 2.4pre20200701_6ff9aa8 → 2.4pre20200708_9223603, +9.7 KiB
nix-bash-completions: 0.6.8 → ∅, -57.6 KiB
nixos-system-hagbard: 20.03.20200615.a84b797 → 20.03.20200713.add5529
nvidia-persistenced: 440.82 → 440.100
nvidia-settings: 440.82 → 440.100
nvidia-x11: 440.82-5.4.46 → 440.100-5.4.51, +664.7 KiB
pcre: 8.43 → 8.44
php: 7.3.16 → 7.3.20, -26.2 KiB
python3.7-youtube-dl: 2020.06.06 → 2020.06.16.1, +8.4 KiB
samba: 4.11.5 → 4.11.9, +30.1 KiB
sane-backends: 1.0.28 → 1.0.30, +680.5 KiB
source: -182.0 KiB
zfs-kernel: 0.8.3-5.4.46 → 0.8.4-5.4.51, +9.9 KiB
zfs-user: 0.8.3 → 0.8.4, +20.1 KiB
2020-07-15 16:24:25 +02:00
Eelco Dolstra
cff2157185
Revert "LocalStore::addToStore(srcPath): Handle the flat case"
...
This reverts commit a2c27022e9 . See
addToStoreSlow(), we don't need to handle this case efficiently
anymore. In fact, we can almost remove the method/hashAlgo arguments
since the non-recursive and/or non-SHA256 are almost not used anymore.
2020-07-15 12:49:03 +02:00
Eelco Dolstra and GitHub
298ff6af8f
Merge pull request #3809 from Ma27/gitlab-refs
...
Fix gitlab-fetcher to obtain tags and branches
2020-07-14 15:22:52 +02:00
Eelco Dolstra
da3aea291d
EvalCache: Ignore SQLite errors
...
Fixes #3794 .
2020-07-14 15:17:38 +02:00
Eelco Dolstra
832e111494
Merge remote-tracking branch 'origin/master' into flakes
2020-07-14 13:56:18 +02:00
Eelco Dolstra
926c3a6664
Doh
2020-07-14 11:55:54 +02:00
Eelco Dolstra
43b8e96d30
Fix 'nix verify --all' on a binary cache (cached case)
2020-07-13 20:17:00 +02:00
Eelco Dolstra
9502c0e2eb
nix verify: Show correct path when using --all on a binary cache
2020-07-13 20:12:44 +02:00
Eelco Dolstra
7c2fef0a81
Make 'nix copy' to s3:// binary caches run in constant memory
2020-07-13 20:07:19 +02:00
Eelco Dolstra
493961b689
Remove istringstream_nocopy
2020-07-13 18:31:19 +02:00
Eelco Dolstra
545bb2ed03
Remove 'accessor' from addToStore()
...
This is only used by hydra-queue-runner and it's better to implement
it there.
2020-07-13 18:31:19 +02:00
Eelco Dolstra
0a9da00a10
NarAccessor: Run in constant memory
2020-07-13 17:30:42 +02:00
Eelco Dolstra
fc84c358d9
Make 'nix copy' to file:// binary caches run in constant memory
2020-07-13 16:28:45 +02:00
Eelco Dolstra
400f1a9b59
Store::pathInfoToJSON(): Use consistent format for downloadHash
2020-07-13 16:26:09 +02:00
Eelco Dolstra
c0dd05131e
toStorePath(): Return a StorePath and the suffix
2020-07-13 16:25:48 +02:00
Eelco Dolstra
143a5f32ed
Add a test for local NAR caching
2020-07-13 16:25:48 +02:00
Eelco Dolstra
1d01ae816b
Fix 'nix verify --all' on a binary cache and add a test
2020-07-13 14:35:01 +02:00
Eelco Dolstra
2900a441f5
Add a test for DWARF debug info index generation
2020-07-13 13:38:01 +02:00
Eelco Dolstra
41bdf429ec
Add a test for NAR listing generation
2020-07-13 13:32:33 +02:00
Eelco Dolstra and GitHub
d7026cc571
Merge pull request #3805 from Ma27/ansi-color-fix
...
Fix ANSI color constants
2020-07-13 10:10:22 +02:00
Eelco Dolstra
8efa23bb99
Avoid a redundant hash
2020-07-10 15:56:24 +02:00
Eelco Dolstra
5dff49f661
Factor out commonality between nix-prefetch-url and nix-store --add-fixed
2020-07-10 13:21:37 +02:00
Eelco Dolstra
7f1a86d57c
nix-store --add-fixed: Run in constant memory
2020-07-10 12:51:56 +02:00
Eelco Dolstra
06e3dd9005
nix-prefetch-url: Run in constant memory when using RemoteStore
...
Fixes #3684 .
2020-07-10 11:22:48 +02:00
Eelco Dolstra
062a584f12
.dir-locals.el: Set c-block-comment-prefix
2020-07-10 11:21:06 +02:00
Eelco Dolstra
a2c27022e9
LocalStore::addToStore(srcPath): Handle the flat case
...
This helps nix-prefetch-url when using a local store.
2020-07-09 15:54:32 +02:00
Eelco Dolstra and GitHub
2dd8443e30
Merge pull request #3797 from nix-macos-perf-test/macos-perf-test
...
add temp CI job to test syspolicy impact
2020-07-09 11:59:22 +02:00
Eelco Dolstra
b981e5aacf
Cleanup
2020-07-08 22:07:21 +02:00
Eelco Dolstra
34f25124ba
Make LocalStore::addToStore(srcPath) run in constant memory
...
This reduces memory consumption of
nix-instantiate \
-E 'with import <nixpkgs> {}; runCommand "foo" { src = ./blender; } "echo foo"' \
--option nar-buffer-size 10000
(where ./blender is a 1.1 GiB tree) from 1716 to 36 MiB, while still
ensuring that we don't do any write I/O for small source paths (up to
'nar-buffer-size' bytes). The downside is that large paths are now
always written to a temporary location in the store, even if they
produce an already valid store path. Thus, adding large paths might be
slower and run out of disk space. ¯\_(ツ)_/¯ Of course, you can always
restore the old behaviour by setting 'nar-buffer-size' to a very high
value.
2020-07-08 22:07:21 +02:00
Eelco Dolstra
7d8d78f06a
upload-release.pl: Update latest-release branch
2020-07-08 17:01:20 +02:00
Eelco Dolstra
9223603908
Merge remote-tracking branch 'origin/master' into flakes
2020-07-08 15:55:19 +02:00
Eelco Dolstra
16ec7785ca
Fix 'got unknown message type 1 from Nix daemon'
...
Example:
$ nix-build -E 'with import <nixpkgs> {}; runCommand "foo" { x = runCommand "bar" {} "exit 1"; } "echo foo; exit 1"'
warning: unknown setting 'auto-allocate-uids'
these 2 derivations will be built:
/nix/store/v4fbdbhcdi949929a67g8farwf72zgam-bar.drv
/nix/store/k4fsvrjl7cp2xpz7927iv7g0dqj1zyhs-foo.drv
warning: unknown setting 'auto-allocate-uids'
building '/nix/store/v4fbdbhcdi949929a67g8farwf72zgam-bar.drv'...
error: --- Error ----------------------------------------------------------------------------------------------------------------------------------------------------------------- nix-daemon
builder for '/nix/store/v4fbdbhcdi949929a67g8farwf72zgam-bar.drv' failed with exit code 1
error: --- Error ------------------------------------------------------------------------------------------------------------------------------------------------------------------ nix-build
got unknown message type 1 from Nix daemon
2020-07-08 15:53:14 +02:00
Eelco Dolstra
1ab9da9154
Merge remote-tracking branch 'origin/master' into flakes
2020-07-07 14:38:57 +02:00
Eelco Dolstra
4055cfee36
Fix coverage build
2020-07-07 14:37:47 +02:00
Eelco Dolstra
7c9ece5dca
exportReferencesGraph: Fix support for non-top-level store paths
...
Fixes #3471 .
2020-07-07 14:25:43 +02:00
Eelco Dolstra and GitHub
c385535c18
Merge pull request #3783 from bburdette/macos-test
...
address failing addTrace test
2020-07-06 22:37:44 +02:00
Eelco Dolstra
68f524d717
nix develop: Support derivations with multiple outputs
2020-07-06 18:34:58 +02:00
Eelco Dolstra
cd8eb8a7d1
nix develop: Fall back to "bash" if nixpkgs#bashInteractive is unavailable
2020-07-06 17:08:54 +02:00
Eelco Dolstra
54712aaf8a
Merge remote-tracking branch 'origin/master' into flakes
2020-07-06 16:40:10 +02:00
Eelco Dolstra
14227aeb32
Merge branch 'add-trace' of https://github.com/bburdette/nix
2020-07-03 16:27:39 +02:00
Eelco Dolstra
c3c7aedbb5
nix develop: Fix bad regex
...
This was accepted by libstdc++ but not libc++.
https://hydra.nixos.org/build/123569154
2020-07-03 14:58:58 +02:00
Eelco Dolstra
6f8fd3a3f2
Shut up a clang warning
2020-07-03 14:50:07 +02:00
Eelco Dolstra and GitHub
dfaad374ff
Merge pull request #3778 from tweag/parallel-tests
...
Parallel tests fixes
2020-07-03 13:17:10 +02:00
Eelco Dolstra
017efae01f
Hopefully fix macOS test failure
2020-07-03 13:16:22 +02:00
Eelco Dolstra
5596f879b4
Add test for nix develop
2020-07-02 18:32:45 +02:00
Eelco Dolstra
b5e4253697
Fix abort in 'nix develop'
2020-07-02 18:24:11 +02:00
Eelco Dolstra
a5b6e870fe
Set gc-reserved-space to 0 in tests
...
This reduces the amount of disk space needed to run the tests from
half a gigabyte to 10 megabytes.
2020-07-02 16:38:42 +02:00
Eelco Dolstra
ec5d7cb8e2
Merge branch 'parallel-tests' of https://github.com/tweag/nix
2020-07-02 16:38:38 +02:00
Eelco Dolstra
6ff9aa8df7
Don't process an option if any of its arguments need completion
2020-07-01 20:31:39 +02:00
Eelco Dolstra
d746503e5c
Add --inputs-from to use flake inputs as registry entries
...
This allows you to refer to an input from another flake. For example,
$ nix run --inputs-from /path/to/hydra nixpkgs#hello
runs 'hello' from the 'nixpkgs' inputs of the 'hydra' flake.
Fixes #3769 .
2020-07-01 20:25:13 +02:00
Eelco Dolstra
38ccf2e241
Cleanup
2020-07-01 15:31:34 +02:00
Eelco Dolstra
86a4aba6c4
Merge branch 'remote-query-outputs' of https://github.com/tweag/nix
2020-07-01 15:10:29 +02:00
Eelco Dolstra
7d554f295c
Support building flakes from a shallow Git repo
...
Fixes #3756 .
2020-07-01 14:57:59 +02:00
Eelco Dolstra and GitHub
ee1582494e
Merge pull request #3767 from bburdette/pos-null-check
...
Pos null check
2020-06-30 19:52:22 +02:00
Eelco Dolstra
2b834d48aa
NAR parser: Fix missing name field check
...
Discovered by @Kloenk.
2020-06-29 22:45:41 +02:00
Eelco Dolstra
26cf0c674f
nix run: Use packages/legacyPackages as fallback if there is no app definition
...
'nix run' will try to run $out/bin/<name>, where <name> is the
derivation name (excluding the version). This often works well:
$ nix run nixpkgs#hello
Hello, world!
$ nix run nix -- --version
nix (Nix) 2.4pre20200626_adf2fbb
$ nix run patchelf -- --version
patchelf 0.11.20200623.e61654b
$ nix run nixpkgs#firefox -- --version
Mozilla Firefox 77.0.1
$ nix run nixpkgs#gimp -- --version
GNU Image Manipulation Program version 2.10.14
though not always:
$ nix run nixpkgs#git
error: unable to execute '/nix/store/kp7wp760l4gryq9s36x481b2x4rfklcy-git-2.25.4/bin/git-minimal': No such file or directory
2020-06-29 19:08:50 +02:00
Eelco Dolstra
50f13b06fb
EvalCache: Store string contexts
2020-06-29 19:08:37 +02:00
Eelco Dolstra
b681408879
Factor out EvalCache::forceDerivation()
2020-06-29 16:39:41 +02:00
Eelco Dolstra
ca946860ce
Fix bash completion
2020-06-29 14:37:22 +02:00