John Ericson
3c220442ff
Merge remote-tracking branch 'upstream/master' into fix-url-format
2022-04-20 16:53:16 +00:00
Artturin
51cfea8bb0
nix build: add --print-out-paths flag
...
has the same functionality as default nix-build
$ nix-build . -A "bash" -A "bash.dev" -A "tinycc"
/nix/store/4nmqxajzaf60yjribkgvj5j54x9yvr1r-bash-5.1-p12
/nix/store/c49i1ggnr5cc8gxmk9xm0cn961z104dn-bash-5.1-p12-dev
/nix/store/dbapb08862ajgaax3621fz8hly9fdah3-tcc-0.9.27+date=2022-01-11
$ nix-build . -A "bash"
/nix/store/4nmqxajzaf60yjribkgvj5j54x9yvr1r-bash-5.1-p12
$ $HOME/nixgits/nix/result/bin/nix build "nixpkgs#bash" "nixpkgs#bash.dev" "nixpkgs#tinycc" --print-out-paths
/nix/store/4nmqxajzaf60yjribkgvj5j54x9yvr1r-bash-5.1-p12
/nix/store/c49i1ggnr5cc8gxmk9xm0cn961z104dn-bash-5.1-p12-dev
/nix/store/dbapb08862ajgaax3621fz8hly9fdah3-tcc-0.9.27+date=2022-01-11
$ $HOME/nixgits/nix/result/bin/nix build "nixpkgs#bash" --print-out-paths
/nix/store/4nmqxajzaf60yjribkgvj5j54x9yvr1r-bash-5.1-p12
2022-04-20 19:35:46 +03:00
Yorick van Pelt
ebf2fd76b1
Add custom to_json and from_json functions for ExperimentalFeature
...
nix show-config --json was serializing experimental features as ints.
nlohmann::json will automatically use these definitions to serialize
and deserialize ExperimentalFeatures.
Strictly, we don't use the from_json instance yet, it's provided for
completeness and hopefully future use.
2022-04-20 15:41:01 +02:00
John Ericson
08b8657978
Merge branch 'path-info' into ca-drv-exotic
2022-04-19 22:39:57 +00:00
John Ericson
55caef36ed
Merge remote-tracking branch 'upstream/master' into path-info
2022-04-19 22:27:21 +00:00
John Ericson
13c669105c
Slight cleanups
2022-04-19 22:25:21 +00:00
John Ericson
8abb627002
Merge branch 'path-info' into ca-drv-exotic
2022-04-19 22:02:33 +00:00
ckie
0e2b01b14e
nix repl: make symlinks with the :bl command
...
Requested by ppepino on the Matrix:
https://matrix.to/#/!KqkRjyTEzAGRiZFBYT:nixos.org/$Tb32BS3rVE2BSULAX4sPm0h6CDewX2hClOTGzTC7gwM?via=nixos.org&via=matrix.org&via=nixos.dev
This adds a new command, :bl, which works like :b but also creates
a GC root symlink to the various derivation outputs.
ckie@cookiemonster ~/git/nix -> ./outputs/out/bin/nix repl
Welcome to Nix 2.6.0. Type :? for help.
nix-repl> :l <nixpkgs>
Added 16118 variables.
nix-repl> :b runCommand "hello" {} "echo hi > $out"
This derivation produced the following outputs:
./repl-result-out -> /nix/store/kidqq2acdpi05c4a9mlbg2baikmzik44-hello
[1 built, 0.0 MiB DL]
ckie@cookiemonster ~/git/nix -> cat ./repl-result-out
hi
2022-04-20 00:20:29 +03:00
John Ericson
6b61d7722d
Merge remote-tracking branch 'upstream/master' into indexed-store-path-outputs
2022-04-19 20:30:12 +00:00
Eelco Dolstra
c9e58aa5ff
Require formatters to be packages
...
Because of 9b41239d8f
, a formatter can
no longer be a package *or* an app. So let's require it to be a
package for now.
2022-04-19 20:48:13 +02:00
Eelco Dolstra
48a467f2b9
Merge branch 'issue-6075' of https://github.com/kamadorueda/nix
2022-04-19 20:21:32 +02:00
John Ericson
41e755bee4
Merge remote-tracking branch 'upstream/master' into indexed-store-path-outputs
2022-04-19 15:14:06 +00:00
Eelco Dolstra
51712bf012
Merge pull request #6128 from ncfavier/fix-completion
...
Shell completion improvements
2022-04-19 13:45:33 +02:00
Eelco Dolstra
2016b7142a
Fix compilation, style fixes
2022-04-19 13:41:32 +02:00
Eelco Dolstra
b529a41814
Merge branch 'make-flake-show-more-lenient-on-apps' of https://github.com/flox/nix
2022-04-19 13:41:24 +02:00
Eelco Dolstra
1b43d64648
Merge pull request #6415 from aakropotkin/doc.connect-timeout.default
...
doc: document nix.conf connect-timeout default
2022-04-19 12:27:30 +02:00
Eelco Dolstra
018db1c420
Merge pull request #6404 from edolstra/unify-flake-attr-eval
...
Make InstallableFlake::toValue() and toDerivation() behave consistently
2022-04-19 11:53:27 +02:00
John Ericson
75b62e5260
Avoid fmt
when constructor already does it
...
There is a correctnes issue here, but #3724 will fix that. This is just
a cleanup for brevity's sake.
2022-04-19 01:44:11 +00:00
Robert Helgesson
8b659eacce
Add .tgz as tarball extension in documentation
...
Support for the `tgz` shorthand was added in
52f5fa948a
.
2022-04-18 17:14:15 +02:00
Alex Ameen
e5c934cd48
doc: rephrase connect-timeout help message
...
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2022-04-17 18:17:37 -05:00
Alex Ameen
25c85f5a0e
doc: document nix.conf connect-timeout default
2022-04-17 17:14:38 -05:00
Ben Burdette
93b8d31508
Merge branch 'master' into debug-exploratory-PR
2022-04-15 14:49:08 -06:00
Eelco Dolstra
b135de2b5f
Merge pull request #6323 from erikarvstedt/eval-read-only
...
`nix eval`: Add option `--read-only`
2022-04-15 10:31:05 +02:00
Tom Bereknyei
9b41239d8f
fix: ensure apps are apps and packages are packages
2022-04-14 23:57:52 -04:00
Eelco Dolstra
d6effddd3b
Merge pull request #6387 from Uthar/fix
...
assert hash types for Git and Mercurial
2022-04-14 14:55:27 +02:00
Eelco Dolstra
d89840b103
Make InstallableFlake::toValue() and toDerivation() behave consistently
...
In particular, this means that 'nix eval` (which uses toValue()) no
longer auto-calls functions or functors (because
AttrCursor::findAlongAttrPath() doesn't).
Fixes #6152 .
Also use ref<> in a few places, and don't return attrpaths from
getCursor() because cursors already have a getAttrPath() method.
2022-04-14 14:07:04 +02:00
Kasper Gałkowski
2769e43f61
assert hash types for Git and Mercurial
2022-04-12 21:13:14 +02:00
Eelco Dolstra
f7276bc948
Merge pull request #6392 from danpls/fix-actualUrl-mercurial
...
libfetchers: Fix assertion (Mercurial)
2022-04-11 11:16:04 +02:00
Eelco Dolstra
092f6d2e7a
Merge pull request #6380 from thufschmitt/fix-double-slahsh-in-uri
...
Allow empty path segments in urls
2022-04-11 11:15:14 +02:00
Eelco Dolstra
2311868aaa
Merge pull request #6391 from danpls/replace-regex
...
libfetchers: Replace regex to clarify intent
2022-04-11 11:14:10 +02:00
Sebastian Blunt
63d9a81819
Log builder args and environment variables
...
Previously it only logged the builder's path, this changes it to log the
arguments at the same log level, and the environment variables at the
vomit level.
This helped me debug https://github.com/svanderburg/node2nix/issues/75
2022-04-10 21:10:37 -07:00
Ben Burdette
8b197c492e
remove comma
2022-04-09 21:54:41 -06:00
Daniel Pauls
d6b7529579
libfetchers: Fix assertion (Mercurial)
...
See commit 1e1cd6e7a
for more information.
2022-04-09 19:10:23 +02:00
Daniel Pauls
770f7371f3
libfetchers: Replace regex to clarify intent
2022-04-09 17:00:14 +02:00
Ben Burdette
a61841ac41
don't use std::map merge
2022-04-09 07:45:23 -06:00
Ben Burdette
f5757a0804
revise command help
2022-04-08 16:34:20 -06:00
Ben Burdette
3aaf02839f
trace stack, not call stack
2022-04-08 16:22:27 -06:00
Ben Burdette
31bcd55626
clean up makefiles
2022-04-08 15:53:24 -06:00
Ben Burdette
27d45f9eb3
minor cleanup
2022-04-08 15:46:12 -06:00
Ben Burdette
a86c2a8481
remove 'debugError', dead code
2022-04-08 13:30:18 -06:00
Ben Burdette
b8b8ec7101
move throw to preverve Error type; turn off debugger for tryEval
2022-04-08 12:34:27 -06:00
Théophane Hufschmitt
646af7325d
Merge pull request #6376 from Uthar/master
...
don't assume that rev is a SHA1 hash
2022-04-08 17:56:27 +02:00
Théophane Hufschmitt
f3d3587ab3
Allow empty path segments in urls
...
Valid per https://datatracker.ietf.org/doc/html/rfc3986#section-3.3 (and
also somewhat frequently happening for local paths)
2022-04-08 16:09:49 +02:00
Eelco Dolstra
c68963eaea
Remove duplicate "error:"
2022-04-08 11:48:30 +02:00
Eelco Dolstra
8bd9ebf52c
Error: Remove unused sname() method
2022-04-08 11:31:51 +02:00
Eelco Dolstra
168ef9f3ab
Remove unused Error.name field
2022-04-08 11:31:51 +02:00
John Ericson
fda2224b59
Add release notes mark experimental
2022-04-07 19:45:38 +00:00
Ben Burdette
1a93ac8133
Merge remote-tracking branch 'upstream/master' into upstream-merge
2022-04-07 13:42:01 -06:00
John Ericson
5c1f2e0fb1
Merge remote-tracking branch 'upstream/master' into indexed-store-path-outputs
2022-04-07 19:20:27 +00:00
Ben Burdette
d2ec9b4e15
in debugger mode, print the current error when another repl returns.
2022-04-07 12:09:47 -06:00