Commit graph

8587 commits

Author SHA1 Message Date
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 7d554f295c Support building flakes from a shallow Git repo
Fixes #3756.
2020-07-01 14:57:59 +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
Eelco Dolstra bc03c6f23d Move App 2020-06-29 14:14:23 +02:00
Eelco Dolstra adf2fbbdc2 Merge remote-tracking branch 'origin/master' into flakes 2020-06-26 08:46:46 +02:00
Eelco Dolstra b7ccf7ae2a build-remote.sh: Test LegacySSHStore 2020-06-25 18:42:55 +02: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
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
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
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
Ben Burdette 28b079067f
Update src/libutil/fmt.hh
Co-authored-by: John Ericson <git@JohnEricson.me>
2020-06-22 10:00:37 -06:00
Eelco Dolstra 965b80347e
Merge pull request #3649 from obsidiansystems/validPathInfo-ca-proper-datatype
ValidPathInfo: make ca field a proper datatype
2020-06-22 14:34:00 +02:00
Eelco Dolstra 334e26bfc2 nix flake check: Don't build apps
This was inconsistent since we're not building 'packages' or
'defaultPackage' either.

Closes #3726.
2020-06-22 11:31:07 +02:00
Ben Burdette be4f444175 tidying up 2020-06-19 16:58:12 -06:00
Ben Burdette 0309488a66 fmt -> hintfmt test 2020-06-19 16:46:49 -06:00
Ben Burdette 397dbe114e remove formathelper 2020-06-19 15:57:19 -06:00
Ben Burdette b193aca4ae escape percents 2020-06-19 15:29:19 -06:00
Ben Burdette db475f9e7e too few, too many args 2020-06-19 15:28:13 -06:00
Ben Burdette cdddf24f25 add hintfmt test 2020-06-19 14:54:41 -06:00
John Ericson e288c0987a Merge remote-tracking branch 'upstream/master' into validPathInfo-ca-proper-datatype 2020-06-19 18:44:24 +00:00
Eelco Dolstra 984e521392
Merge pull request #3650 from obsidiansystems/no-hash-type-unknown
Remove `HashType::htUnknown`
2020-06-19 20:22:36 +02:00
John Ericson 29691edb2f Merge remote-tracking branch 'upstream/master' into validPathInfo-ca-proper-datatype 2020-06-19 17:54:50 +00:00
John Ericson 68294746ae Merge remote-tracking branch 'upstream/master' into no-hash-type-unknown 2020-06-19 17:53:34 +00:00
John Ericson c98081d270 Merge remote-tracking branch 'upstream/master' into no-hash-type-unknown 2020-06-19 17:50:05 +00:00
John Ericson c1892a5316 tabs -> spaces 2020-06-19 17:49:57 +00:00
Eelco Dolstra 424bb5819f
Merge pull request #3439 from Ericson2314/no-stringly-typed-derivation-output
Store parsed hashes in `DerivationOutput`
2020-06-19 19:47:43 +02:00
John Ericson 911fc88bcb More designated initializers 2020-06-19 17:42:56 +00:00
John Ericson 2f0e395c99 Merge remote-tracking branch 'me/no-stringly-typed-derivation-output' into validPathInfo-ca-proper-datatype 2020-06-19 15:26:59 +00:00
John Ericson fb39a5e00c Remove unneeded constructor for DerivationOutputHash 2020-06-19 15:11:11 +00:00
John Ericson b90cac3bad Remove uneeded = default for Hash 2020-06-19 15:00:38 +00:00
John Ericson 01dc8b0bab Merge remote-tracking branch 'upstream/master' into no-stringly-typed-derivation-output 2020-06-19 14:59:05 +00:00
John Ericson 145d88cb2a Use designated initializers for DerivationOutputHash 2020-06-19 14:58:30 +00:00
John Ericson 237d88c97e FileSystemHash -> DerivationOutputHash 2020-06-19 14:47:10 +00:00
Eelco Dolstra 2886c92aef
Merge pull request #3669 from gilligan/add-compression-tests
Add compression unit tests
2020-06-19 13:59:04 +02:00
John Ericson 3fc58a9638 Remove some Base:: that crept in 2020-06-19 00:24:47 +00:00
John Ericson 3f8dcfe3fd Merge branch 'validPathInfo-temp' into validPathInfo-ca-proper-datatype 2020-06-18 23:01:58 +00:00
John Ericson 669c3992e8 Merge branch 'no-hash-type-unknown' into validPathInfo-temp 2020-06-18 22:33:07 +00:00
John Ericson 15abb2aa2b Revert the enum struct change
Not a regular git revert as there have been many merges and things.
2020-06-18 22:11:26 +00:00
John Ericson bbbf3602a3 Merge branch 'enum-class' into no-hash-type-unknown 2020-06-18 22:11:19 +00:00
John Ericson 40526fbea5 Merge remote-tracking branch 'upstream/master' into enum-class 2020-06-18 21:38:15 +00:00
Eelco Dolstra 6c000eed80
Merge pull request #3709 from expipiplus1/master
Mention number of derivations to be build/fetched in output
2020-06-18 19:03:05 +02:00
Eelco Dolstra 5771c8bbf2 Don't provide 'getFlake' if the 'flakes' feature is not enabled
(cherry picked from commit 0a1d3c1dd3)
2020-06-18 14:03:00 +02:00
Eelco Dolstra 2a61bbf77f Some backports from the flakes branch 2020-06-18 14:03:00 +02:00
Eelco Dolstra 377345e26f Remove unneeded #include 2020-06-18 13:47:05 +02:00
Eelco Dolstra 7083d33efe Make constant primops lazy
(cherry picked from commit aa0e2a2e70)
2020-06-18 13:42:47 +02:00