Eelco Dolstra
8d322f3c94
flake.lock: Update
...
Flake input changes:
* Updated 'nixpkgs': 'github:NixOS/nixpkgs/ad0d20345219790533ebe06571f82ed6b034db31' -> 'github:NixOS/nixpkgs/0e499fde7af3c28d63e9b13636716b86c3162b93'
2021-02-26 16:03:39 +01:00
Eelco Dolstra
453c3a603f
nix flake update: Recreate the lock file
...
This is probably what most people expect it to do. Fixes #3781 .
There is a new command 'nix flake lock' that has the old behaviour of
'nix flake update', i.e. it just adds missing lock file entries unless
overriden using --update-input.
2021-02-26 14:55:54 +01:00
Eelco Dolstra
20ea1de77d
Use std::make_unique
2021-02-26 12:35:29 +01:00
Eelco Dolstra
73daffb81b
Merge remote-tracking branch 'origin/deduplicate-static-hashes-computation'
2021-02-26 12:30:25 +01:00
Eelco Dolstra and GitHub
d2803406b5
Merge pull request #4487 from NixOS/ca/copy-drv-outputs
...
Copy ca derivation outputs
2021-02-26 12:20:42 +01:00
Eelco Dolstra and GitHub
5edab777d1
Merge pull request #4530 from alyssais/kill
...
libutil: EPERM from kill(-1, ...) is fine
2021-02-26 12:19:16 +01:00
Eelco Dolstra and GitHub
c189031e8b
Merge pull request #4549 from NixOS/installer-artifact
...
Test macos/linux installer script for each push
2021-02-25 16:08:43 +01:00
Eelco Dolstra and GitHub
199081ad00
Merge pull request #4486 from shlevy/command-plugins-v2
...
Command plugins
2021-02-24 15:28:19 +01:00
Eelco Dolstra and GitHub
a878c448d8
Merge pull request #4551 from danieldk/system-features-compute-level
...
Add x86_64 compute levels as system features
2021-02-23 14:30:10 +01:00
Eelco Dolstra and GitHub
8043bc6c8d
Merge pull request #4567 from NixOS/make-auto-call-error-eval-error
...
Make missing auto-call arguments throw an eval error
2021-02-22 16:35:52 +01:00
Eelco Dolstra
574eb2be81
Tweak error message
2021-02-22 15:24:14 +01:00
Eelco Dolstra and GitHub
548437c234
Merge pull request #4541 from obsidiansystems/simpler-store-path-command
...
Deeper `Command` hierarchy to remove redundancy
2021-02-19 16:18:53 +01:00
Eelco Dolstra
cd44c0af71
Increase default stack size on Linux
...
Workaround for #4550 .
2021-02-18 19:22:37 +01:00
Eelco Dolstra
1b57825524
Document meta.mainProgram
...
Issue #4498 .
2021-02-17 17:58:47 +01:00
Eelco Dolstra
7bd9898d5c
nix run: Allow program name to be set in meta.mainProgram
...
This is useful when the program name doesn't match the package name
(e.g. ripgrep vs rg).
Fixes #4498 .
2021-02-17 17:55:15 +01:00
Eelco Dolstra
13897afbe6
Throw an error if --arg / --argstr is used with a flake
...
Fixes #3949 .
2021-02-17 17:32:10 +01:00
Eelco Dolstra
f33878b656
Make 'nix --version -vv' work
...
Fixes #3743 .
2021-02-17 17:11:21 +01:00
Eelco Dolstra
cced73496b
nix flake show: Handle 'overlays' output
...
Fixes #4542 .
2021-02-17 16:53:39 +01:00
Eelco Dolstra
063de66909
nix develop: Fix quoted string handling
...
Fixes #4540 .
2021-02-17 16:42:03 +01:00
Eelco Dolstra
6042febfce
Restore warning about 'nix' being experimental
...
Fixes #4552 .
2021-02-17 15:30:49 +01:00
Eelco Dolstra and GitHub
54ab377288
Merge pull request #4553 from mausch/patch-1
...
Fix Haskell example
2021-02-17 10:18:42 +01:00
Eelco Dolstra and GitHub
4e98f0345c
Merge pull request #4535 from NixOS/revert-4464-nar-narhash-addressed
...
Revert "narinfo: Change NAR URLs to be addressed on the NAR hash instead of the compressed hash"
2021-02-10 15:35:03 +01:00
Eelco Dolstra and GitHub
2d4e1025f9
Merge pull request #4526 from NixOS/add-stale-bot
...
Add Stale bot
2021-02-10 11:44:27 +01:00
Eelco Dolstra and GitHub
ee3846b587
Merge pull request #4464 from tweag/nar-narhash-addressed
...
narinfo: Change NAR URLs to be addressed on the NAR hash instead of the compressed hash
2021-02-09 14:47:39 +01:00
Eelco Dolstra and GitHub
fd6eaa1766
Merge pull request #4525 from sternenseemann/lowdown-0.8.0
...
libcmd/markdown: handle allocation errors in lowdown_term_rndr
2021-02-07 21:24:16 +01:00
Eelco Dolstra
37352aa7e1
Support --no-net for backwards compatibility
2021-02-07 20:44:56 +01:00
Eelco Dolstra
480426a364
Add more instrumentation for #4270
2021-02-05 15:57:33 +01:00
Eelco Dolstra and GitHub
d7c27f21ab
Merge pull request #4372 from tweag/ca/drvoutputs-commands
...
Add a new Cmd type working on RealisedPaths
2021-02-05 13:03:50 +01:00
Eelco Dolstra and GitHub
271eedb837
Merge pull request #4495 from Infinisil/perl-bindings-passthru
...
Use passthru for perl-bindings, allows Nix patching for Hydra
2021-02-05 12:22:52 +01:00
Eelco Dolstra and GitHub
c77f4a9012
Merge pull request #4515 from matthewbauer/fix-nix-profile-install-first-output
...
Use derivation output name from toDerivation
2021-02-05 12:19:10 +01:00
Eelco Dolstra
0187838e2e
Add a trace to readLine() failures
...
Hopefully this helps to diagnose 'error: unexpected EOF reading a
line' on macOS.
2021-02-05 12:18:11 +01:00
Eelco Dolstra and GitHub
a487d42101
Merge pull request #4517 from matthewbauer/recurse-first-level-nix-search
...
Always enter first level of attrset in nix search
2021-02-05 09:59:47 +01:00
Eelco Dolstra and GitHub
c8937ba9f3
Merge pull request #4514 from sternenseemann/tryeval-doc
...
Include note about type of catched errors in tryEval documentation
2021-02-03 18:20:24 +01:00
Eelco Dolstra and GitHub
0e05cb6c61
Merge pull request #4501 from dschrempf/master
...
Remove newline in operator table.
2021-02-01 17:48:28 +01:00
Eelco Dolstra and GitHub
d0a04d1abb
Merge pull request #4500 from domenkozar/offline
...
--no-net -> --offline
2021-02-01 14:55:21 +01:00
Eelco Dolstra and GitHub
b19aec7eeb
Merge pull request #4461 from NixOS/ca/error-logging-fixes
...
Fix some logging with ca derivations
2021-01-29 16:12:50 +01:00
Eelco Dolstra and GitHub
b8f345b29a
Merge pull request #4483 from shlevy/libcmd
...
Move command plugin interface to libnixcmd
2021-01-27 17:17:58 +01:00
Eelco Dolstra
12de0466fe
Add trace to build errors during import-from-derivation
...
Example:
error: builder for '/nix/store/9ysqfidhipyzfiy54mh77iqn29j6cpsb-failing.drv' failed with exit code 1;
last 1 log lines:
> FAIL
For full logs, run 'nix log /nix/store/9ysqfidhipyzfiy54mh77iqn29j6cpsb-failing.drv'.
… while importing '/nix/store/pfp4a4bjh642ylxyipncqs03z6kkgfvy-failing'
at /nix/store/25wgzr2qrqqiqfbdb1chpiry221cjglc-source/flake.nix:58:15:
57|
58| ifd = import self.hydraJobs.broken;
| ^
59|
2021-01-27 14:46:10 +01:00
Eelco Dolstra
965dc6070a
Drop trailing whitespace
2021-01-27 14:04:49 +01:00
Eelco Dolstra
c03f41055d
Add traces to errors while updating flake lock file
...
Example:
$ nix build --show-trace
error: unable to download 'https://api.github.com/repos/NixOS/nixpkgs/commits/no-such-branch ': HTTP error 422 ('')
response body:
{
"message": "No commit found for SHA: no-such-branch",
"documentation_url": "https://docs.github.com/rest/reference/repos#get-a-commit "
}
… while fetching the input 'github:NixOS/nixpkgs/no-such-branch'
… while updating the flake input 'nixpkgs'
… while updating the lock file of flake 'git+file:///home/eelco/Dev/nix'
2021-01-27 14:02:54 +01:00
Eelco Dolstra
8e758d402b
Remove mkFlag()
2021-01-27 12:06:03 +01:00
Eelco Dolstra
f15f0b8e83
Update to lowdown 0.7.9
2021-01-26 10:47:40 +01:00
Eelco Dolstra
36c4d6f592
Group common options
2021-01-25 19:03:13 +01:00
Eelco Dolstra
807d963ee8
Group subcommands by category
2021-01-25 18:19:32 +01:00
Eelco Dolstra
3ba98ba8f0
Tell user to run 'nix log' to get full build logs
2021-01-25 17:15:38 +01:00
Eelco Dolstra
a32073e7e8
Add FIXME
2021-01-25 14:43:16 +01:00
Eelco Dolstra
b159d23800
Make '--help' do the same as 'help' (i.e. show a manpage)
2021-01-25 14:38:15 +01:00
Eelco Dolstra and GitHub
488a826842
Merge pull request #4467 from edolstra/error-formatting
...
Improve error formatting
2021-01-25 12:50:57 +01:00
Eelco Dolstra and GitHub
c5b42c5a42
Merge pull request #4470 from matthewbauer/fix-4469
...
Handle missing etag in 304 Not Modified response
2021-01-25 12:50:13 +01:00
Eelco Dolstra and GitHub
680d8a5b86
Merge pull request #4387 from obsidiansystems/non-local-store-build
...
Make `nix-build --store whatever` work
2021-01-25 12:24:23 +01:00
Eelco Dolstra and GitHub
29edbfe2d2
Merge pull request #4468 from Ma27/installer-no-progress-opt
...
scripts/install-nix-from-closure: only show progress if a terminal is used
2021-01-25 12:22:33 +01:00
Eelco Dolstra
b7bfc7ee52
Add FIXME
2021-01-22 12:36:50 +01:00
Eelco Dolstra
0eb22db311
Fix macOS build
2021-01-21 12:46:22 +01:00
Eelco Dolstra
55849e153e
Change error position formatting
...
It's now
at /home/eelco/Dev/nixpkgs/pkgs/applications/misc/hello/default.nix:7:7:
instead of
at: (7:7) in file: /home/eelco/Dev/nixpkgs/pkgs/applications/misc/hello/default.nix
The new format is more standard and clickable.
2021-01-21 11:02:09 +01:00
Eelco Dolstra
40608342cb
Remove trailing whitespace
2021-01-21 11:02:09 +01:00
Eelco Dolstra
8d4268d190
Improve error formatting
...
Changes:
* The divider lines are gone. These were in practice a bit confusing,
in particular with --show-trace or --keep-going, since then there
were multiple lines, suggesting a start/end which wasn't the case.
* Instead, multi-line error messages are now indented to align with
the prefix (e.g. "error: ").
* The 'description' field is gone since we weren't really using it.
* 'hint' is renamed to 'msg' since it really wasn't a hint.
* The error is now printed *before* the location info.
* The 'name' field is no longer printed since most of the time it
wasn't very useful since it was just the name of the exception (like
EvalError). Ideally in the future this would be a unique, easily
googleable error ID (like rustc).
* "trace:" is now just "…". This assumes error contexts start with
something like "while doing X".
Example before:
error: --- AssertionError ---------------------------------------------------------------------------------------- nix
at: (7:7) in file: /home/eelco/Dev/nixpkgs/pkgs/applications/misc/hello/default.nix
6|
7| x = assert false; 1;
| ^
8|
assertion 'false' failed
----------------------------------------------------- show-trace -----------------------------------------------------
trace: while evaluating the attribute 'x' of the derivation 'hello-2.10'
at: (192:11) in file: /home/eelco/Dev/nixpkgs/pkgs/stdenv/generic/make-derivation.nix
191| // (lib.optionalAttrs (!(attrs ? name) && attrs ? pname && attrs ? version)) {
192| name = "${attrs.pname}-${attrs.version}";
| ^
193| } // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix && (attrs ? name || (attrs ? pname && attrs ? version)))) {
Example after:
error: assertion 'false' failed
at: (7:7) in file: /home/eelco/Dev/nixpkgs/pkgs/applications/misc/hello/default.nix
6|
7| x = assert false; 1;
| ^
8|
… while evaluating the attribute 'x' of the derivation 'hello-2.10'
at: (192:11) in file: /home/eelco/Dev/nixpkgs/pkgs/stdenv/generic/make-derivation.nix
191| // (lib.optionalAttrs (!(attrs ? name) && attrs ? pname && attrs ? version)) {
192| name = "${attrs.pname}-${attrs.version}";
| ^
193| } // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix && (attrs ? name || (attrs ? pname && attrs ? version)))) {
2021-01-21 11:02:09 +01:00
Eelco Dolstra
259100332f
Fix clang build
2021-01-21 10:29:51 +01:00
Eelco Dolstra and GitHub
d04d8463fa
Merge pull request #4281 from lilyball/shebang
...
Escape filename given to nix-shell in shebang mode
2021-01-20 10:00:10 +01:00
Eelco Dolstra
bc90252cec
nix profile install: Support installing non-flakes
...
Fixes #4458 .
2021-01-18 23:08:58 +01:00
Eelco Dolstra
555940f065
Use enumerate()
2021-01-18 22:50:39 +01:00
Eelco Dolstra
ea756b3654
--refresh: Imply setting .narinfo disk cache TTL to 0
2021-01-18 14:38:31 +01:00
Eelco Dolstra
1bbc66f865
Merge branch 'slashes-in-github-branches' of https://github.com/Ma27/nix
2021-01-18 12:55:06 +01:00
Eelco Dolstra and GitHub
f0b9a3c974
Merge pull request #4460 from NixOS/ca/fix-ca-flake-outputs
...
Fix content-addressed flake outputs
2021-01-18 12:43:38 +01:00
Eelco Dolstra and GitHub
00eef55993
Merge pull request #4459 from NixOS/ca/fix-outputmap-for-no-ca
...
Fix the drv output map for non ca derivations
2021-01-18 11:23:23 +01:00
Eelco Dolstra
1acbb61696
Tweak
2021-01-17 19:49:28 +01:00
Eelco Dolstra
7a472a76d4
Add 'nix daemon' command
2021-01-14 00:05:04 +01:00
Eelco Dolstra
28ef6ebf91
Typo
2021-01-13 23:51:27 +01:00
Eelco Dolstra
d33eca8539
Rename 'nix store sign-paths' to 'nix store sign'
2021-01-13 23:32:37 +01:00
Eelco Dolstra
61216d32e1
Add 'nix store repair' command
2021-01-13 23:27:39 +01:00
Eelco Dolstra
3da9a9241c
Convert option descriptions to Markdown
2021-01-13 14:18:04 +01:00
Eelco Dolstra and GitHub
4e9cec79bf
Merge pull request #4444 from matthewbauer/unset-curproc-arch-affinity
...
Set kern.curproc_arch_affinity=0 to escape Rosetta
2021-01-13 12:16:53 +01:00
Eelco Dolstra and GitHub
fbfa70dc02
Merge pull request #4443 from rickynils/prefer-local-build-respect-zero-max-jobs
...
Don't let 'preferLocalBuild' override 'max-jobs=0'
2021-01-13 12:15:54 +01:00
Eelco Dolstra
2f463e90ed
Add 'nix profile history' command
...
Replaces 'nix-env --list-generations'. Similar to 'nix profile
diff-closures' but shows only the changes in top-level packages.
2021-01-12 23:53:53 +01:00
Eelco Dolstra
29007f8bc6
nix profile info -> nix profile list
2021-01-12 19:57:05 +01:00
Eelco Dolstra
6254b1f5d2
Add 'nix store delete' command
2021-01-11 19:46:59 +01:00
Eelco Dolstra
77c9ceda4b
Tweak
2021-01-11 19:42:24 +01:00
Eelco Dolstra
93ad6430ed
nix store prefetch-tarball -> nix flake prefetch
2021-01-11 12:36:39 +01:00
Eelco Dolstra and GitHub
7480f2bf20
Merge pull request #4435 from DanilaFe/flake-input-types
...
Allow Flake inputs to accept boolean and integer attributes
2021-01-11 11:38:53 +01:00
Eelco Dolstra
fdcd62eec5
Add 'nix store gc' command
2021-01-10 23:29:14 +01:00
Eelco Dolstra
e21aee58f6
Fix tests
2021-01-08 14:17:06 +01:00
Eelco Dolstra
17beae299d
Support binary unit prefixes in command line arguments
2021-01-08 12:51:19 +01:00
Eelco Dolstra
6548b89cc4
string2Int(): Return std::optional
2021-01-08 12:22:21 +01:00
Eelco Dolstra
29a445840a
Remove unused mkFlag1
2021-01-08 11:42:44 +01:00
Eelco Dolstra
1d4954e73e
Remove mkFlag integer specialisation
2021-01-08 11:40:36 +01:00
Eelco Dolstra
48a9be2aab
Remove mkIntFlag
2021-01-08 10:44:55 +01:00
Eelco Dolstra and GitHub
920e6a6920
Merge pull request #4434 from NixOS/nix-prefetch
...
Add 'nix store prefetch-{file,tarball}'
2021-01-07 22:22:30 +01:00
Eelco Dolstra
0813350349
Add 'nix store prefetch-{file,tarball}'
...
These replace nix-prefetch-url and nix-prefetch-url --unpack,
respectively.
2021-01-07 21:51:46 +01:00
Eelco Dolstra
0df69d96e0
Make sodium a required dependency
2021-01-06 17:56:53 +01:00
Eelco Dolstra
9374c2baea
Add commands for generating secret/public keys
2021-01-06 17:49:31 +01:00
Eelco Dolstra
555152ffe8
crypto.cc: API cleanup and add generate() / to_string() methods
2021-01-06 17:04:46 +01:00
Eelco Dolstra
146af4ee9b
Move sodium_init() call
2021-01-06 16:43:09 +01:00
Eelco Dolstra and GitHub
3edcb198e5
Merge pull request #4310 from matthewbauer/rosetta2-extra-platforms
...
Add x86_64-darwin and aarch64 to "extra-platforms" automatically when Rosetta2 is detected
2021-01-06 11:31:13 +01:00
Eelco Dolstra
8af4f886e2
Fix deadlock in LocalStore::addSignatures()
...
Fixes #4367 .
2021-01-05 11:47:29 +01:00
Eelco Dolstra and GitHub
c51ee5c033
Merge pull request #4424 from DanilaFe/fix-attr-from-json
...
Fix conversion from JSON to fetch attributes
2021-01-05 11:14:22 +01:00
Eelco Dolstra and GitHub
8a2ce0f455
Merge pull request #4412 from acx0/fix-intro-doc
...
Fix `configure` error in introduction doc
2021-01-01 18:06:56 +01:00
Eelco Dolstra and GitHub
368a972a38
Merge pull request #4411 from corngood/env-assert-fix
...
Fix insufficent attribute capacity in user profile
2020-12-30 21:47:21 +01:00
Eelco Dolstra and GitHub
bff706e27c
Merge pull request #4397 from matthewbauer/support-libcxx10
...
Cast variants fully for libc++10
2020-12-30 21:07:09 +01:00
Eelco Dolstra and GitHub
abbf9df7b1
Merge pull request #4407 from cole-h/fix-hacking-link
...
README: fix link to hacking guide
2020-12-28 20:43:49 +01:00
Eelco Dolstra
6262a70363
scanForReferences: Remove misleading comment
...
References have always been determined only by the hash part, not the
name or the store prefix.
Fixes #4396 .
2020-12-28 17:21:19 +01:00
Eelco Dolstra and GitHub
5ef7e63ac6
Merge pull request #4399 from sevan/patch-1
...
Update URL where bzip2 can be obtained in docs
2020-12-28 13:15:23 +01:00