John Ericson
d12f57c2c0
Merge remote-tracking branch 'upstream/master' into path-info
2023-02-28 11:34:34 -05:00
John Ericson
fa4733fce5
Split out InstallableFlake
and InstallableAttrPath
2023-02-20 09:09:11 -05:00
John Ericson
ee9eb83a84
Remove some designated initializers
...
With the switch to C++20, the rules became more strict, and we can no
longer initialize base classes. Make them comments instead.
(BTW
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2287r1.html
this offers some new syntax for this use-case. Hopefully this will be
adopted and we can eventually use it.)
2023-02-01 11:25:56 -05:00
John Ericson
4540e7b940
Don't add StorePathDescriptor
for now
...
We don't need it yet, we can add it back later.
2023-01-23 12:58:27 -05:00
John Ericson
056cc1c1b9
Merge remote-tracking branch 'upstream/master' into path-info
2023-01-14 14:27:28 -05:00
John Ericson
a7c0cff07f
Rename OutputPath
-> ExtendedOutputPath
...
Do this prior to making a new more limitted `OutputPath` we will use in
more places.
2023-01-11 18:55:29 -05:00
John Ericson
a8f45b5e5a
Improve OutputsSpec
slightly
...
A few little changes preparing for the rest.
2023-01-11 18:54:50 -05:00
Eelco Dolstra
59cc920cc0
Add a FIXME
2023-01-10 15:20:30 +01:00
Eelco Dolstra
b80e4b57da
ExtraInfo -> ExtraPathInfo
2023-01-10 14:52:49 +01:00
John Ericson
46e942ff9e
Do big rename to clean up code
...
- `PathReferences` -> `References`
- `PathReferences<StorePath>` -> `StoreReference`
- `references` -> `others`
- `hasSelfReference` -> `self`
And get rid of silly subclassing
2023-01-06 15:36:05 -05:00
John Ericson
6a168254ce
Use named field initialization for references
2023-01-06 12:24:20 -05:00
John Ericson
e9fc1e4fdb
Merge remote-tracking branch 'upstream/master' into path-info
2023-01-06 10:35:20 -05:00
Eelco Dolstra
845fc3f605
Merge toDerivations() into toDerivedPaths()
...
toDerivedPaths() now returns DerivedPathWithInfo, which is DerivedPath
with some attributes needed by 'nix profile' etc.
Preparation for #7417 .
2022-12-20 14:24:14 +01:00
Eelco Dolstra
f0baa5c128
nix build --json: Include build statistics
...
Example:
# nix build -L --extra-experimental-features cgroups --impure --expr 'with import <nixpkgs> {}; runCommand "foo" {} "dd if=/dev/urandom bs=1M count=1024 | md5sum; mkdir $out"' --json
[
{
"cpuSystem": 1.911431,
"cpuUser": 1.214249,
"drvPath": "/nix/store/xzdqz67xba18hljhycp0hwfigzrs2z69-foo.drv",
"outputs": {
"out": "/nix/store/rh9mc9l2gkpq8kn2sgzndr6ll7ffjh6l-foo"
},
"startTime": 1669024076,
"stopTime": 1669024079
}
]
2022-11-21 12:06:01 +01:00
Eelco Dolstra
2f8a34cddc
Fix warning
2022-05-25 15:05:39 +02:00
Eli Kogan-Wang
27d0f6747d
resolve redundant priority passing, wrap NixInt in eval-cache variant
2022-05-16 15:17:35 +02:00
Eli Kogan-Wang
be2b19041e
Integrate review changes
2022-05-13 22:02:28 +02:00
Eli Kogan-Wang
aefc6c4f41
Add priority for nix profile install
2022-05-11 12:16:35 +02:00
Eelco Dolstra
a3c6c5b1c7
nix profile: Support overriding outputs
2022-05-03 15:00:34 +02:00
Eelco Dolstra
4a79cba511
Allow selecting derivation outputs using 'installable!outputs'
...
E.g. 'nixpkgs#glibc^dev,static' or 'nixpkgs#glibc^*'.
2022-05-03 13:43:52 +02:00
Eelco Dolstra
13d8400ac5
Remove obsolete FIXME
2022-04-26 17:17:27 +02:00
John Ericson
55caef36ed
Merge remote-tracking branch 'upstream/master' into path-info
2022-04-19 22:27:21 +00:00
Tom Bereknyei
50f9f335c9
profile!: consistent use of url/uri. create new version
2022-03-30 16:35:26 -04:00
Eelco Dolstra
057f9ee190
nix profile install: Don't use queryDerivationOutputMap()
...
Instead get the outputs from Installable::build(). This will also
allow 'nix profile install' to support impure derivations.
Fixes #6286 .
2022-03-28 14:23:39 +02:00
John Ericson
0dc2974930
Merge remote-tracking branch 'upstream/master' into path-info
2022-03-25 19:25:08 +00:00
Rok Garbas
4546a007a4
Fix flake profile use of originalUrl vs. originalUri
...
Fixes #5872
2022-03-24 12:28:38 +01:00
John Ericson
8ba089597f
Merge remote-tracking branch 'upstream/master' into path-info
2022-03-10 15:48:14 +00:00
Eelco Dolstra
b55d79728c
Add EvalState::coerceToStorePath() helper
...
This is useful whenever we want to evaluate something to a store path
(e.g. in get-drvs.cc).
Extracted from the lazy-trees branch (where we can require that a
store path must come from a store source tree accessor).
2022-03-02 23:58:58 +01:00
Eelco Dolstra
161f798aa1
nix profile: Support CA derivations
2022-03-02 20:38:51 +01:00
Eelco Dolstra
54888b92de
Move installables-related operations
2022-03-02 19:19:51 +01:00
Eelco Dolstra
b39ef07414
Style
2022-03-02 11:46:15 +01:00
Eelco Dolstra
8518cebfce
libfetchers: Rename immutable -> locked
...
This is more consistent with flake terminology.
2022-02-24 18:09:00 +01:00
Matthew Bauer
3cd958849b
Apply suggestions from code review
...
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2022-02-21 10:04:04 -06:00
Matthew Bauer
61295b910f
Add verbosity to nix profile upgrade
...
Followup of https://github.com/NixOS/nix/pull/6086 . This time adding a
warning if no packages are upgraded.
2022-02-20 23:46:11 -06:00
Eelco Dolstra
023e459777
InstallableFlake: Default attr paths cleanup
...
This removes some duplicated logic, and fixes "nix bundle" parsing its
installable twice.
2022-02-14 21:06:11 +01:00
Tom Bereknyei
270fb5f192
profile: add verbosity
...
warn if there are no matches and give notice of removing packages as
they are found
2022-02-11 10:44:33 -05:00
Eelco Dolstra
d62a9390fc
Get rid of std::shared_ptr<std::string> and ref<std::string>
...
These were needed back in the pre-C++11 era because we didn't have
move semantics. But now we do.
2022-01-18 11:12:30 +01:00
Eelco Dolstra
cfaad7168e
Refactoring: Add allowPath() method
2021-10-07 12:11:00 +02:00
John Ericson
13b6b64589
Merge remote-tracking branch 'upstream/master' into path-info
2021-10-01 17:12:54 +00:00
John Ericson
f4f3203aa7
Merge remote-tracking branch 'upstream/master' into path-info
2021-09-30 22:41:53 +00:00
John Ericson
242f9bf3dc
std::visit
by reference
...
I had started the trend of doing `std::visit` by value (because a type
error once mislead me into thinking that was the only form that
existed). While the optomizer in principle should be able to deal with
extra coppying or extra indirection once the lambdas inlined, sticking
with by reference is the conventional default. I hope this might even
improve performance.
2021-09-30 21:35:09 +00:00
Eelco Dolstra
b41968f15a
nix profile history: Show profile date
2021-09-14 20:47:33 +02:00
Eelco Dolstra
4b738fc7a9
Add 'nix profile wipe-history' command
2021-09-14 20:35:41 +02:00
Eelco Dolstra
f359b9981b
Generations -> profile versions
2021-09-14 19:57:45 +02:00
Eelco Dolstra
817562e694
Add "nix profile rollback" command
2021-09-14 19:32:33 +02:00
Eelco Dolstra
8d9f7048cd
Use eval-store in more places
...
In particular, this now works:
$ nix path-info --eval-store auto --store https://cache.nixos.org nixpkgs#hello
Previously this would fail as it would try to upload the hello .drv to
cache.nixos.org. Now the .drv is instantiated in the local store, and
then we check for the existence of the outputs in cache.nixos.org.
2021-07-22 09:59:51 +02:00
regnat
ec613603ba
DerivedPathWithHints -> BuiltPath
...
Just a renaming for now
2021-05-12 16:19:51 +02:00
Matthew Bauer
1e3a9033b7
Use derivation output name from toDerivation
...
This was previously done in https://github.com/NixOS/nix/pull/4515 but
got clobbered away in https://github.com/NixOS/nix/pull/4594 .
--------------------------------------------------------------------------------
This fixes an issue where derivations with a primary output that is
not "out" would fail with:
$ nix profile install nixpkgs#sqlite
error: opening directory '/nix/store/2a2ydlgyydly5czcc8lg12n6qqkfz863-sqlite-3.34.1-bin': No such file or directory
This happens because while derivations produce every output when
built, you might not have them if you didn't build the derivation
yourself (for instance, the store path was fetch from a binary cache).
This uses outputName provided from DerivationInfo which appears to
match the first output of the derivation.
2021-05-05 16:33:05 -05:00
John Ericson
1b6cf0d5f5
Merge remote-tracking branch 'upstream/master' into path-info
2021-04-05 18:47:33 -04:00
John Ericson
d5cef6c33a
Merge commit '9dfb97c987d8b9d6a3d15f016e40f22f91deb764' into path-info
2021-04-05 18:40:30 -04:00