aboutsummaryrefslogtreecommitdiff
path: root/src/nix/profile.cc
AgeCommit message (Collapse)Author
2022-05-25Fix warningEelco Dolstra
2022-05-16resolve redundant priority passing, wrap NixInt in eval-cache variantEli Kogan-Wang
2022-05-13Integrate review changesEli Kogan-Wang
2022-05-11Add priority for nix profile installEli Kogan-Wang
2022-05-03nix profile: Support overriding outputsEelco Dolstra
2022-05-03Allow selecting derivation outputs using 'installable!outputs'Eelco Dolstra
E.g. 'nixpkgs#glibc^dev,static' or 'nixpkgs#glibc^*'.
2022-04-26Remove obsolete FIXMEEelco Dolstra
2022-03-30profile!: consistent use of url/uri. create new versionTom Bereknyei
2022-03-28nix profile install: Don't use queryDerivationOutputMap()Eelco Dolstra
Instead get the outputs from Installable::build(). This will also allow 'nix profile install' to support impure derivations. Fixes #6286.
2022-03-24Fix flake profile use of originalUrl vs. originalUriRok Garbas
Fixes #5872
2022-03-02Add EvalState::coerceToStorePath() helperEelco Dolstra
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-02nix profile: Support CA derivationsEelco Dolstra
2022-03-02Move installables-related operationsEelco Dolstra
2022-03-02StyleEelco Dolstra
2022-02-24libfetchers: Rename immutable -> lockedEelco Dolstra
This is more consistent with flake terminology.
2022-02-21Apply suggestions from code reviewMatthew Bauer
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2022-02-20Add verbosity to nix profile upgradeMatthew Bauer
Followup of https://github.com/NixOS/nix/pull/6086. This time adding a warning if no packages are upgraded.
2022-02-14InstallableFlake: Default attr paths cleanupEelco Dolstra
This removes some duplicated logic, and fixes "nix bundle" parsing its installable twice.
2022-02-11profile: add verbosityTom Bereknyei
warn if there are no matches and give notice of removing packages as they are found
2022-01-18Get rid of std::shared_ptr<std::string> and ref<std::string>Eelco Dolstra
These were needed back in the pre-C++11 era because we didn't have move semantics. But now we do.
2021-10-07Refactoring: Add allowPath() methodEelco Dolstra
2021-09-30`std::visit` by referenceJohn Ericson
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-14nix profile history: Show profile dateEelco Dolstra
2021-09-14Add 'nix profile wipe-history' commandEelco Dolstra
2021-09-14Generations -> profile versionsEelco Dolstra
2021-09-14Add "nix profile rollback" commandEelco Dolstra
2021-07-22Use eval-store in more placesEelco Dolstra
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-05-12DerivedPathWithHints -> BuiltPathregnat
Just a renaming for now
2021-05-05Use derivation output name from toDerivationMatthew Bauer
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-04-05Make `DerivedPathWithHints` a newtypeJohn Ericson
This allows us to namespace its constructors under it.
2021-04-05Rename BuildableJohn Ericson
2021-04-05Use `BuildableReq` for `buildPaths` and `ensurePath`John Ericson
This avoids an ambiguity where the `StorePathWithOutputs { drvPath, {} }` could mean "build `brvPath`" or "substitute `drvPath`" depending on context. It also brings the internals closer in line to the new CLI, by generalizing the `Buildable` type is used there and makes that distinction already. In doing so, relegate `StorePathWithOutputs` to being a type just for backwards compatibility (CLI and RPC).
2021-02-17Throw an error if --arg / --argstr is used with a flakeEelco Dolstra
Fixes #3949.
2021-02-02Use derivation output name from toDerivationMatthew Bauer
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-01-18nix profile install: Support installing non-flakesEelco Dolstra
Fixes #4458.
2021-01-12Add 'nix profile history' commandEelco Dolstra
Replaces 'nix-env --list-generations'. Similar to 'nix profile diff-closures' but shows only the changes in top-level packages.
2021-01-12nix profile info -> nix profile listEelco Dolstra
2021-01-08string2Int(): Return std::optionalEelco Dolstra
2020-12-21Add 'nix profile' manpageEelco Dolstra
2020-12-03TypoEelco Dolstra
2020-10-09Merge remote-tracking branch 'upstream/master' into fix-and-ci-static-buildsJohn Ericson
2020-10-06Remove static variable name clashesEelco Dolstra
This was useful for an experiment with building Nix as a single compilation unit. It's not very useful otherwise but also doesn't hurt...
2020-09-25stdout_ -> coutJohn Ericson
Better to get creative than just sprinkle arbitrary underscores.
2020-09-04Merge remote-tracking branch 'upstream/master' into fix-and-ci-static-buildsJohn Ericson
2020-09-01Merge remote-tracking branch 'upstream/master' into single-ca-drv-buildJohn Ericson
2020-08-17Add 'nix dump-args' to dump all commands/flags for manpage generationEelco Dolstra
2020-08-14Merge remote-tracking branch 'upstream/master' into single-ca-drv-buildJohn Ericson
2020-08-07Squashed get CA derivations buildingJohn Ericson
2020-08-06Minimize the usage of `Hash::dummy`John Ericson
2020-08-05Remove optionality in ValidPathInfo::narInfoCarlo Nucera