Commit graph

11466 commits

Author SHA1 Message Date
Eelco Dolstra bd383d1b6f Make most calls to determinePos() lazy 2022-02-04 00:33:21 +01:00
Eelco Dolstra 4c755c3b3f Merge branch 'issue-3505' of https://github.com/kamadorueda/nix 2022-02-04 00:33:13 +01:00
Eelco Dolstra 1aa5994e6d
Merge pull request #5456 from tomberek/bundler_drv
bundle: pass drv attrset instead of path
2022-02-03 23:40:20 +01:00
tomberek 12ff354d01
Merge branch 'master' into bundler_drv 2022-02-03 02:39:18 -05:00
Eelco Dolstra fcb33440b6
Merge pull request #6036 from tweag/balsoft/and-yet-another-follows-bugfix
Flake follows: resolve all follows to absolute
2022-02-02 22:52:08 +01:00
Alexander Bantyev 169ea0b83f
Flake follows: resolve all follows to absolute
It's not possible in general to know in computeLocks, relative to
which path the follows was intended to be. So, we always resolve
follows to their absolute states when we encounter them (which can
either be in parseFlakeInput or computeLocks' fake input population).

Fixes https://github.com/NixOS/nix/issues/6013
Fixes https://github.com/NixOS/nix/issues/5609
Fixes https://github.com/NixOS/nix/issues/5697 (again)
2022-02-02 21:41:45 +03:00
Eelco Dolstra 17e3f353df Merge branch 'parser-improvements' of https://github.com/pennae/nix 2022-02-02 12:45:44 +01:00
Eelco Dolstra cd35bbbeef Merge branch 'more-stringviews' of https://github.com/pennae/nix 2022-02-02 12:38:37 +01:00
Eelco Dolstra 73d5f38a47 Require lowdown 0.9.0
Fixes #6021.
2022-02-01 10:44:19 +01:00
Eelco Dolstra 59b6afec07
Merge pull request #6022 from thkoch2001/fix-lowdown_libs
use LOWDOWN_LIBS variable
2022-01-31 13:40:54 +01:00
Eelco Dolstra cc730bd46b
Merge pull request #5990 from lincolnauster/flakes-nixconfig-docs
flakes: document nixConfig option
2022-01-31 10:21:15 +01:00
Thomas Koch 43509cc69d use LOWDOWN_LIBS variable
fixes: #5931
2022-01-30 20:59:58 +02:00
Eelco Dolstra 08fc3d6552
Merge pull request #6018 from dtzWill/fix/issue-6017
canonPath: fix missing slash when resolving links
2022-01-30 12:32:02 +01:00
Eelco Dolstra 8915f16aab
Merge pull request #6019 from thkoch2001/fix_spelling_mistakes
fix spelling mistakes reported by Debian's lintian tool
2022-01-30 12:31:16 +01:00
Thomas Koch 85b1427662 fix spelling mistakes reported by Debian's lintian tool 2022-01-30 10:51:39 +02:00
Will Dietz a0357abda7 canonPath: fix missing slash when resolving links
Fixes #6017
2022-01-29 16:32:27 -06:00
Tom Bereknyei 6e5e64fc74 bundler: suggested doc fixes 2022-01-28 10:25:05 -05:00
tomberek 2bf96bd9f2
Merge branch 'master' into bundler_drv 2022-01-28 10:18:29 -05:00
Tom Bereknyei 73e82ae954 bundler: tests various combinations of referring to installables 2022-01-28 10:17:51 -05:00
Tom Bereknyei 4ebc50d92e bundler: revert default behavior to use defaultApp
Bundlers are now responsible for correctly handling their inputs which
are no longer constrained to be (Drv->Drv)->Drv->Drv, but can be of
type (attrset->Drv)->attrset->Drv.
2022-01-28 09:56:58 -05:00
Eelco Dolstra 4bf6af7b55 Remove a repeated std::move in a for loop 2022-01-28 15:10:43 +01:00
pennae d439dceb3b optionally return string_view from coerceToString
we'll retain the old coerceToString interface that returns a string, but callers
that don't need the returned value to outlive the Value it came from can save
copies by using the new interface instead. for values that weren't stringy we'll
pass a new buffer argument that'll be used for storage and shouldn't be
inspected.
2022-01-27 22:15:30 +01:00
Domen Kožar f05fefcd03
Merge pull request #5951 from abathur/install_add_getconf_fallback
install-darwin: dodge bash 3.2 command bug
2022-01-27 20:18:11 +01:00
pennae 41d70a2fc8 return string_views from forceString*
once a string has been forced we already have dynamic storage allocated for it,
so we can easily reuse that storage instead of copying.
2022-01-27 17:15:43 +01:00
pennae 0d7fae6a57 convert a for more utilities to string_view 2022-01-27 17:15:43 +01:00
Eelco Dolstra 558c4ee3e3
Merge pull request #6001 from NixOS/fix-nix-path
Don’t require `NIX_PATH` entries to be valid paths
2022-01-27 17:04:02 +01:00
Eelco Dolstra 27b4056154
Merge pull request #6000 from NixOS/use-flakes-in-ci
Use the `nix` command (and flakes) in the CI
2022-01-27 17:01:45 +01:00
regnat fcdc60ed22 Don’t require NIX_PATH entries to be valid paths
It’s totally valid to have entries in `NIX_PATH` that aren’t valid paths
(they can even be arbitrary urls or `channel:<channel-name>`).

Fix #5998 and #5980
2022-01-27 16:26:39 +01:00
regnat 7bd85a3bf6 Use the nix command (and flakes) in the CI
Apart from a slight simplification and a bit of dogfooding, this also
make the cache behavior more predictable.
For example `nix build .` and `nix build nix/$(git rev-parse HEAD)` will
yield the exact same path, while their “intuitive” non-flake equivalents
(`nix-build` and
`nix-build https://github.com/nixos/nix/archives/$(git rev-parse HEAD).tar.gz`)
don’t.

This was a pain for example in https://github.com/NixOS/nix/pull/5059

Also, the `bar-with-logs` log format is imho nicer (even in an
non-interactive context) because prefixing each log line with the name
of the derivation that produced it makes it much easier to follow what’s
going on.
2022-01-26 16:41:37 +01:00
Eelco Dolstra 1fe3bfdeaf
Merge pull request #5997 from NixOS/test-nix-store-ping
Fix the `store ping` test
2022-01-26 15:22:15 +01:00
Eelco Dolstra b0de24cc89
Merge pull request #5996 from edolstra/remove-nlohmann
Stop vendoring nlohmann_json
2022-01-26 14:49:34 +01:00
regnat 3dc1418216 Fix the store ping test 2022-01-26 14:15:03 +01:00
Eelco Dolstra 9691f86ff7 Stop vendoring nlohmann_json 2022-01-26 11:50:53 +01:00
Eelco Dolstra e9d2ac6d7f
Merge pull request #5995 from NixOS/test-nix-store-ping
Add some tests for `nix store ping`
2022-01-26 11:50:04 +01:00
regnat d139474f48 Add some tests for nix store ping
Always good to have :)
2022-01-26 11:01:25 +01:00
Eelco Dolstra 4f24a33d34
Merge pull request #5991 from edolstra/remote-nix-version
nix store ping: Report Nix daemon version
2022-01-26 09:59:59 +01:00
lincoln auster c746a429db
fix typo
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2022-01-25 14:55:49 -07:00
Eelco Dolstra 35dbdbedd4 nix store ping: Report Nix daemon version
Fixes #5952.
2022-01-25 21:15:58 +01:00
lincoln auster [they/them] 203ef26974 flakes: document nixConfig option
Fixes #5988.
2022-01-25 12:23:52 -07:00
Eelco Dolstra 5fa624f59a
Merge pull request #5987 from edolstra/rust-cleanup
Remove unused Rust stuff
2022-01-25 13:57:22 +01:00
Eelco Dolstra a04a66c196
Merge pull request #5922 from fzakaria/fzakaria/json-ignore-assertion
Add try/catch to queryJSON for assertion and errors
2022-01-25 12:44:20 +01:00
Eelco Dolstra a5bdffaae9
Merge pull request #5966 from SuperSandro2000/patch-2
Remove url literal
2022-01-25 11:59:33 +01:00
Eelco Dolstra fcf3528ad1 Remove unused Rust stuff
In particular we were still compiling rust-ffi.cc even though we're
not using it.
2022-01-25 11:58:00 +01:00
Eelco Dolstra a9a90b3c1f
Merge pull request #5984 from NixOS/5982-correctly-parse-__curPosFoo
Fix parsing of variable names that are a suffix of '__curPos'
2022-01-25 11:54:04 +01:00
regnat f113ea6c73 Fix parsing of variable names that are a suffix of '__curPos'
Follow-up from #5969
Fix #5982
2022-01-25 10:49:27 +01:00
Tom Bereknyei dc85e20684 bundler: notes and doc update to include bundlers repo 2022-01-25 03:48:44 -05:00
Tom Bereknyei 93299efc7c bundler: add tests and change defaults to use a derivation 2022-01-25 03:39:18 -05:00
Farid Zakaria 8ba7a2d3a8 Do not suppress errors in nix-env from feedback by Eelco 2022-01-24 19:12:13 -08:00
Tom Bereknyei c94db0535c Refactor bundler API
Bundlers now expect to be located at bundlers.<system>.<name> and are a
function from derivations to derivations.
2022-01-24 21:43:04 -05:00
Tom Bereknyei 3be810f5db bundler: pass drv attrset instead of path 2022-01-24 21:43:04 -05:00