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
Ben Burdette
8f81fae116
showTrace flag in loggers
2020-06-29 10:20:51 -06: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
Eelco Dolstra
bc03c6f23d
Move App
2020-06-29 14:14:23 +02:00
Eelco Dolstra
58bc3b6578
Merge pull request #3729 from obsidiansystems/simpler-hased-mirror
...
hashed-mirrors: Use parsed derivation output rather than reconstructing it
2020-06-29 14:04:12 +02:00
Eelco Dolstra
64232f3ea6
Merge pull request #3749 from rodarima/master
...
Fall back to copyPath if link fails with EPERM
2020-06-29 13:31:24 +02:00
Domen Kožar
3fcbe30eea
Merge pull request #3758 from NixOS/dependabot/github_actions/cachix/install-nix-action-v10
...
Bump cachix/install-nix-action from v8 to v10
2020-06-28 08:16:01 +02:00
dependabot[bot]
9937f4ed37
Bump cachix/install-nix-action from v8 to v10
...
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action ) from v8 to v10.
- [Release notes](https://github.com/cachix/install-nix-action/releases )
- [Commits](https://github.com/cachix/install-nix-action/compare/v8...63cf434de4e4292c6960639d56c5dd550e789d77 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-06-28 06:02:57 +00:00
Domen Kožar
b7795a3496
Merge pull request #3757 from Mic92/dependabot
...
dependabot: automatically keep github actions up-to-date
2020-06-28 08:02:24 +02:00
Jörg Thalheim
7af734bac1
dependabot: automatically keep github actions up-to-date
2020-06-27 20:37:05 +01:00
Ben Burdette
ef24a0835d
showtrace as function arg
2020-06-27 12:19:31 -06:00
Carlo Nucera
278a679782
Merge branch 'master' of github.com:NixOS/nix into allow-relative-paths-in-store-option
2020-06-26 10:40:13 -04:00
Eelco Dolstra
adf2fbbdc2
Merge remote-tracking branch 'origin/master' into flakes
2020-06-26 08:46:46 +02:00
John Ericson
d92d4f85a5
Move ValidPathInfo to its own header
2020-06-25 17:48:49 +00:00
Eelco Dolstra
b7ccf7ae2a
build-remote.sh: Test LegacySSHStore
2020-06-25 18:42:55 +02:00
Ben Burdette
bc9e87412c
'string' makes more sense in nix repl
2020-06-25 09:56:32 -06:00
Ben Burdette
9ab808c926
showTrace flag for ErrorInfo; showTrace test.
2020-06-25 09:23:12 -06:00
Eelco Dolstra
de2641ae99
Fix empty std::optional dereference in writeDerivation()
...
https://hydra.nixos.org/build/123017579
2020-06-25 15:50:30 +02:00
Rodrigo
3a642187c3
Fall back to copyPath if link fails with EPERM
...
BeeGFS doesn't allow hard-links and returns EPERM, so we fall back
to copyPath. See https://github.com/NixOS/nix/issues/3748
2020-06-25 12:03:26 +02:00
Ben Burdette
9c0e1fd4f1
add trace test; error formatting refinements
2020-06-24 18:31:28 -06:00
Ben Burdette
6359d71d6b
re-enable --show-trace check
2020-06-24 18:28:20 -06:00
Ben Burdette
023912def3
convenience form of addTrace
2020-06-24 13:46:25 -06:00
Ben Burdette
93e9307329
repl indenting
2020-06-24 13:14:49 -06:00
Ben Burdette
b18ed02b76
repl indenting
2020-06-24 13:10:41 -06:00
regnat
d38f860c3e
Add a way to get all the outputs of a derivation with their label
...
Generalize `queryDerivationOutputNames` and `queryDerivationOutputs` by
adding a `queryDerivationOutputMap` that returns the map
`outputName=>outputPath`
(not that this is not equivalent to merging the results of
`queryDerivationOutputs` and `queryDerivationOutputNames` as sets don't
preserve the order, so we would end up with an incorrect mapping).
squash! Add a way to get all the outputs of a derivation with their label
Rename StorePathMap to OutputPathMap
2020-06-24 20:38:40 +02:00
Ben Burdette
6fe660acf9
re-remove
2020-06-24 12:33:05 -06:00
Matthew Bauer
bcf8582091
Merge remote-tracking branch 'origin/master' into substitute-other-storedir
2020-06-24 12:52:09 -04:00
John Ericson
d9fb9e9f26
Merge remote-tracking branch 'upstream/master' into ca-drv
2020-06-24 15:41:29 +00:00
Ben Burdette
00fe653ea5
nixCode -> LinesOfCode
2020-06-24 08:33:53 -06:00
Domen Kožar
3c50e84387
Merge pull request #3739 from Mic92/curl
...
docs/installer: add correct curl flags
2020-06-24 07:15:41 +02:00
Jörg Thalheim
3685f4eec6
docs/installer: add correct curl flags
...
also see https://nixos.org/download.html
2020-06-23 23:04:10 +01:00
Ben Burdette
1d43a6e123
use plain errPos instead of nixCode; fix tests
2020-06-23 15:30:13 -06:00
Carlo Nucera
8d51d38e4c
Fix test suite
2020-06-23 17:16:20 -04:00
John Ericson
ec3a857307
Fix and clean up hash parser
2020-06-23 18:19:40 +00:00
John Ericson
98e5d1af03
Merge remote-tracking branch 'upstream/master' into hash-always-has-type
2020-06-23 17:03:37 +00:00
Ben Burdette
d0e78fbb03
re-add Pos origin in tests
2020-06-23 10:51:58 -06:00
Ben Burdette
abe0552504
Merge remote-tracking branch 'upstream/master' into add-trace
2020-06-23 09:40:28 -06:00
Ben Burdette
13e87535ff
traces to bottom
2020-06-23 09:36:58 -06:00
Carlo Nucera
e197bc6229
Enable the --store option to take relative paths
...
In nix commands which accept --store options, we can now specify a
relative path, which will be canonicalized.
2020-06-23 11:13:18 -04:00
Eelco Dolstra
09fc06daab
nix flake init: Use git add --force
2020-06-23 16:25:32 +02:00
Eelco Dolstra
015e1c2131
Merge pull request #3724 from bburdette/hintfmt-percent
...
Hintfmt percent test, and fix
2020-06-23 12:26:00 +02:00
John Ericson
55d4bd6e0e
Improve content address parsing
...
- Ensure hash is in form <algo>-<prefix> and not SRI.
- Better errors if something goes wrong
- string_view for no coppying
2020-06-22 18:08:27 +00:00
Ben Burdette
9d1cb0c5e6
with normaltxt, elide yellow color code instead of canceling it; use normaltxt on plain_string hintfmt
2020-06-22 11:32:20 -06:00
Matthew Bauer
66a62b3189
Merge remote-tracking branch 'origin/master' into substitute-other-storedir
2020-06-22 13:08:11 -04:00
Ben Burdette
28b079067f
Update src/libutil/fmt.hh
...
Co-authored-by: John Ericson <git@JohnEricson.me>
2020-06-22 10:00:37 -06:00
John Ericson
f4a5913125
hashed-mirrors: Use parsed derivation output rather than reconstructing it
...
Now the derivation outputs are parsed up front, we can avoid a reparse
by doing it. Also, this just feels a bit better as the `output*` env
vars are more of a `libnixexpr` interface than `libnixstore` interface:
ultimately, it's the derivation outputs that decide whether the
derivation is fixed-output.
Yes, hashed mirrors might go away with #3689 , but this bit of code would
be moved rather than deleted, so it's worth doing a cleanup anyways I
think.
2020-06-22 15:17:20 +00:00
Carlo Nucera
3dc10f7393
Merge branch 'hash-always-has-type' of github.com:obsidiansystems/nix into hash-always-has-type
2020-06-22 10:09:22 -04:00
Carlo Nucera
73ac003b37
More bug fixing
2020-06-22 10:03:19 -04:00