aboutsummaryrefslogtreecommitdiff
path: root/src/nix/flake.cc
AgeCommit message (Collapse)Author
2021-09-14ANSI_YELLOW -> ANSI_WARNINGEelco Dolstra
2021-08-17Enable JSON option to show flakesTom Bereknyei
`nix-flake show --json`
2021-07-22copyPaths: Pass store by referenceEelco Dolstra
2021-07-13Make `nix flake check` aware of `devShells`regnat
2021-07-13Make `nix flake show` display the `devShells`regnat
2021-07-01fixup! flake.nixConfig: fix flake-registry config settingsAlexander Bantyev
2021-06-02throw_ -> reportErrorregnat
This function might or might not throw depending on the value of `keepGoing`, so naming it `throw_` was a bit confusing
2021-06-02Let `nix flake check` keep going when keep-going is setregnat
When the `keep-going` option is set to `true`, make `nix flake check` continue as much as it can before failing. The UI isn’t perfect as-it-is as all the lines currently start with a mostly useless `error (ignored): error:` prefix, but I’m not sure what the best output would be, so I’ll leave it as-it-is for the time being (This is a bit hijacking the `keep-going` flag as it’s supposed to be a build-time only thing. But I think it’s faire to reuse it here). Fix https://github.com/NixOS/nix/issues/4450
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-03-19Restore 'nix flake info' as a deprecated aliasEelco Dolstra
2021-03-16Merge 'nix flake {info,list-inputs}' into 'nix flake metadata'Eelco Dolstra
Fixes #4613.
2021-03-16--override-input: Imply --no-write-lock-fileEelco Dolstra
Fixes #3779.
2021-02-26nix flake update: Recreate the lock fileEelco Dolstra
This is probably what most people expect it to do. Fixes #3781. There is a new command 'nix flake lock' that has the old behaviour of 'nix flake update', i.e. it just adds missing lock file entries unless overriden using --update-input.
2021-02-17Throw an error if --arg / --argstr is used with a flakeEelco Dolstra
Fixes #3949.
2021-02-17nix flake show: Handle 'overlays' outputEelco Dolstra
Fixes #4542.
2021-01-13Convert option descriptions to MarkdownEelco Dolstra
2021-01-11nix store prefetch-tarball -> nix flake prefetchEelco Dolstra
2020-12-23Add 'nix flake' manpagesEelco Dolstra
2020-12-17Rename Value::normalType() -> Value::type()Silvan Mosberger
2020-12-12Add ValueType checking functions for types that have the same NormalTypeSilvan Mosberger
2020-12-12Use Value::normalType on all forced values instead of Value::typeSilvan Mosberger
2020-10-28Capitalize JSON for consistencyMatthew Kenigsberg
2020-10-26Move ExplicitEelco 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-08-17Add 'nix dump-args' to dump all commands/flags for manpage generationEelco Dolstra
2020-08-07Merge remote-tracking branch 'upstream/master' into fix-and-ci-static-buildsJohn Ericson
2020-08-07Make --no-eval-cache a global settingEelco Dolstra
2020-07-30Pass system to bundlerMatthew Bauer
2020-07-30exporter -> bundlerMatthew Bauer
2020-07-30Merge remote-tracking branch 'origin/master' into fix-and-ci-static-buildsMatthew Bauer
2020-07-30Handle exporters checking correctlyMatthew Bauer
2020-07-30Add "export" to NixMatthew Bauer
This adds a ‘nix export’ command which hooks into nix-bundle. It can be used in a similar way as nix-bundle, with the benefit of hooking into the new “app” functionality. For instance, $ nix export nixpkgs#jq $ ./jq --help jq - commandline JSON processor [version 1.6] ... $ scp jq machine-without-nix: $ ssh machine-without-nix ./jq jq - commandline JSON processor [version 1.6] ... Note that nix-bundle currently requires Linux to run. Other exporters might not have that requirement. “exporters” are meant to be reusable, so that, other repos can implement their own bundling. Fixes #3705
2020-07-06Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
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-23nix flake init: Use git add --forceEelco Dolstra
2020-06-22nix flake check: Don't build appsEelco Dolstra
This was inconsistent since we're not building 'packages' or 'defaultPackage' either. Closes #3726.
2020-06-17Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-11Represent 'follows' inputs explicitly in the lock fileEelco Dolstra
This fixes an issue where lockfile generation was not idempotent: after updating a lockfile, a "follows" node would end up pointing to a new copy of the node, rather than to the original node.
2020-06-08nix flake: Require 'flakes' featureEelco Dolstra
2020-06-08Add completion for --update-inputEelco Dolstra
2020-06-05Fix completion of --templateEelco Dolstra
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-30Remove TreeInfoEelco Dolstra
The attributes previously stored in TreeInfo (narHash, revCount, lastModified) are now stored in Input. This makes it less arbitrary what attributes are stored where. As a result, the lock file format has changed. An entry like "info": { "lastModified": 1585405475, "narHash": "sha256-bESW0n4KgPmZ0luxvwJ+UyATrC6iIltVCsGdLiphVeE=" }, "locked": { "owner": "NixOS", "repo": "nixpkgs", "rev": "b88ff468e9850410070d4e0ccd68c7011f15b2be", "type": "github" }, is now stored as "locked": { "owner": "NixOS", "repo": "nixpkgs", "rev": "b88ff468e9850410070d4e0ccd68c7011f15b2be", "type": "github", "lastModified": 1585405475, "narHash": "sha256-bESW0n4KgPmZ0luxvwJ+UyATrC6iIltVCsGdLiphVeE=" }, The 'Input' class is now a dumb set of attributes. All the fetcher implementations subclass InputScheme, not Input. This simplifies the API. Also, fix substitution of flake inputs. This was broken since lazy flake fetching started using fetchTree internally.
2020-05-21handle circular flake dependencies in list-inputsMatthew Kenigsberg
2020-05-15Move registry-related commands from 'nix flake' to 'nix registry'Eelco Dolstra
This makes 'nix flake' less cluttered and more consistent (it's only subcommands that operator on a flake). Also, the registry is not inherently flake-related (e.g. fetchTree could also use it to remap inputs).
2020-05-11nix flake: Add completion supportEelco Dolstra