aboutsummaryrefslogtreecommitdiff
path: root/src/nix/installables.hh
AgeCommit message (Collapse)Author
2021-01-26Move command plugin interface to libnixcmdShea Levy
2020-11-11Print built derivations as json for buildMatthew Kenigsberg
Add --json option to nix build to allow machine readable output on stdout with all built derivations Fixes #1930
2020-09-16Make the store plugins more introspectableregnat
Directly register the store classes rather than a function to build an instance of them. This gives the possibility to introspect static members of the class or choose different ways of instantiating them.
2020-08-07Squashed get CA derivations buildingJohn Ericson
2020-08-07Make --no-eval-cache a global settingEelco Dolstra
2020-07-23Make `Buildable` a `std::variant`John Ericson
I think this better captures the intent of what's going on: we either have an opaque store path, or a drv path with some outputs. Having this structure will also help us support CA derivations: we'll have to allow the outpath paths to be optional, so the structure we gain now makes up for the structure we loose then.
2020-06-29nix run: Use packages/legacyPackages as fallback if there is no app definitionEelco Dolstra
'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-04nix flake init: Add a '--template' flagEelco Dolstra
The initial contents of the flake is specified by the 'templates.<name>' or 'defaultTemplate' output of another flake. E.g. outputs = { self }: { templates = { nixos-container = { path = ./nixos-container; description = "An example of a NixOS container"; }; }; }; allows $ nix flake init -t templates#nixos-container Also add a command 'nix flake new', which is identical to 'nix flake init' except that it initializes a specified directory rather than the current directory.
2020-05-16Call lockFlake once and store in _lockedFlakeMatthew Kenigsberg
2020-05-16use flake's nixpkgs to find bashInteractiveMatthew Kenigsberg
2020-05-09Refactor installablesMatthew Kenigsberg
InstallableValue has children InstallableFlake and InstallableAttrPath, but InstallableFlake was overriding toDerivations, and usage was changed so that InstallableFlake didn't need cmd. So these changes were made: InstallableValue::toDerivations() -> InstalllableAttrPath::toDerivations() InstallableValue::cmd -> InstallableAttrPath::cmd InstallableValue uses state instead of cmd toBuildables() and toDerivations() were made abstract
2020-04-20Revive 'nix search'Eelco Dolstra
It uses the evaluation cache now rather than the ad hoc JSON cache.
2020-04-20Get rid of the old eval cacheEelco Dolstra
2020-04-01Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-03-30Backport 'nix dev-shell' from the flakes branchEelco Dolstra
This also adds a '--profile' option to 'nix build' (replacing 'nix-env --set').
2020-02-07nix edit: Support non-derivation attributesEelco Dolstra
E.g. $ nix edit .#nixosConfigurations.bla now works.
2020-01-22resolveFlake -> lockFlakeEelco Dolstra
"resolve" is ambiguous (also used for registry resolution).
2020-01-21Pluggable fetchersEelco Dolstra
Flakes are now fetched using an extensible mechanism. Also lots of other flake cleanups.
2019-12-11Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-12-04Fix macOS buildEelco Dolstra
https://hydra.nixos.org/build/107716759
2019-10-22Add start of 'nix profile' commandEelco Dolstra
2019-10-20Fix InstallableFlake::what()Eelco Dolstra
2019-10-14Move code aroundEelco Dolstra
2017-04-25Move code aroundEelco Dolstra
2017-04-25Restructure installables handling in the "nix" commandEelco Dolstra
2016-11-26Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25Get rid of unicode quotes (#1140)Guillaume Maudoux
2016-08-23nix build: Use Nix search pathEelco Dolstra
That is, unless --file is specified, the Nix search path is synthesized into an attribute set. Thus you can say $ nix build nixpkgs.hello assuming $NIX_PATH contains an entry of the form "nixpkgs=...". This is more verbose than $ nix build hello but is less ambiguous.
2016-02-09Add basic "nix build" commandEelco Dolstra
Currently only builds by attribute from <nixpkgs> or the specified file, e.g. "nix build hello".