aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-05-16Merge pull request #8346 from tweag/fix-nix-profile-install-conflict-segfaultJohn Ericson
Fix the segfault on `nix profile install` with conflict
2023-05-16Merge pull request #8154 from tweag/delete-old-on-all-profiles-dirJohn Ericson
undefined
2023-05-16Fix the printing of the installables on `nix profile install` conflictThéophane Hufschmitt
- If the element comes from a flake, print the full flakeref (with the fragment part) and not just the reference to the flake itself - If the element doesn't come from a flake, print its store path(s) This is a bit too verbose, but has the advantages of being correct (and not crashing), so it's strictly better than the previous situation Fix https://github.com/NixOS/nix/issues/8284
2023-05-16Rename `ProfileElement.describe()` to `.identifier`Théophane Hufschmitt
This method isn't used to describe what the element is, but to return a unique identifier for it whithin the current profile
2023-05-15Merge pull request #8341 from obsidiansystems/dedup-gen-hhJohn Ericson
Dedup some markdown -> C++ big literal stuff in build system
2023-05-15Merge pull request #8340 from NixOS/delete-commited-build-artifactsRobert Hensing
Delete commited build artifacts
2023-05-15Delete commited build artifactsJohn Ericson
They were improperly added in 8a93b5a55184d9d34effdd94d58429c9ad1a3d14. They were not `.gitignore`d because they were stale in that commit -- build artifacts no longer used that name by then and so `.gitignore` was updated accordingly.
2023-05-15Fix some bounds in rapid check instancesJohn Ericson
`inRange` is exclusive not inclusive: https://github.com/emil-e/rapidcheck/blob/master/doc/generators.md#usage Furthermore, use `std::variant_size_v` so we use the right number automatically. Finally, make the `switch` assert the discriminant is in bounds as expected.
2023-05-15Dedup some markdown -> C++ big literal stuff in build systemJohn Ericson
This pattern rule was unwisely hidden in `src/libstore/local.mk`. Now it is properly in `mk/` and we reuse it for the profile docs too.
2023-05-15Make more string values work as installablesJohn Ericson
As discussed in #7417, it would be good to make more string values work as installables. That is to say, if an installable refers to a value, and the value is a string, it used to not work at all, since #7484, it works somewhat, and this PR make it work some more. The new cases that are added for `BuiltPath` contexts: - Fixed input- or content-addressed derivation: ``` nix-repl> hello.out.outPath "/nix/store/jppfl2bp1zhx8sgs2mgifmsx6dv16mv2-hello-2.12" nix-repl> :p builtins.getContext hello.out.outPath { "/nix/store/c7jrxqjhdda93lhbkanqfs07x2bzazbm-hello-2.12.drv" = { outputs = [ "out" ]; }; } The string matches the specified single output of that derivation, so it should also be valid. - Floating content-addressed derivation: ``` nix-repl> (hello.overrideAttrs (_: { __contentAddressed = true; })).out.outPath "/1a08j26xqc0zm8agps8anxpjji410yvsx4pcgyn4bfan1ddkx2g0" nix-repl> :p builtins.getContext (hello.overrideAttrs (_: { __contentAddressed = true; })).out.outPath { "/nix/store/qc645pyf9wl37c6qvqzaqkwsm1gp48al-hello-2.12.drv" = { outputs = [ "out" ]; }; } ``` The string is not a path but a placeholder, however it also matches the context, and because it is a CA derivation we have no better option. This should also be valid. We may also want to think about richer attrset based values (also discussed in that issue and #6507), but this change "completes" our string-based building blocks, from which the others can be desugared into or at least described/document/taught in terms of. Progress towards #7417 Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-05-15Create `EvalState::coerceToDerivedPath`John Ericson
This gives us some round trips to test. `EvalState::coerceToDerivedPathUnchecked` is a factored out helper just for unit testing.
2023-05-15Expose `mkOutputString` as method of `EvalState`John Ericson
2023-05-15Split `mkOutputString` in twoJohn Ericson
This well help us with some unit testing
2023-05-15Remove unneeded argument for `mkOutputString`John Ericson
2023-05-15Merge pull request #8141 from tweag/user-files-docJohn Ericson
Document user files of nix
2023-05-15Make `nix-collect-garbage -d` look into more placesThéophane Hufschmitt
Make it look into the new-style profiles dir, the old-style one, and the target of `~/.nix-profile` to be sure that we don't miss anything
2023-05-14`max-substitution-jobs` release note entryMatej Urbas
2023-05-12Merge pull request #8299 from urbas/max-substitution-jobsEelco Dolstra
`max-substitution-jobs` setting
2023-05-10Fix `nix print-dev-env` & `nix develop` with drv pathsJohn Ericson
Fixes #8309 This regression was because both `CmdDevelop` and `CmdPrintDevEnv` were switched to be `InstallableValueCommand` subclasses, but actually neither should have been. The `nixpkgsFlakeRef` method should indeed not be on the base installable class, because "flake refs" and "nixpkgs" are not installable-wide notions, but that doesn't mean these commands should only accept installable values.
2023-05-10Merge pull request #3959 from obsidiansystems/ca-drv-exoticJohn Ericson
Derivations can output "text-hashed" data
2023-05-10Merge pull request #7721 from yorickvP/post-build-hookThéophane Hufschmitt
Also pass unwanted outputs to post-build-hook
2023-05-09Improve error message for self reference with text hashingJohn Ericson
The `ContentAddressWithReferences` method is made total, with error handling now squarely the caller's job. This is better.
2023-05-09Add name to some error messagesJohn Ericson
2023-05-09Cleanups to content address typesJohn Ericson
2023-05-09Apply suggestions from code review John Ericson
Thanks! Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-05-09Fix bug, `newInfo` -> `newInfo0`John Ericson
It appears we were checking a variable in the process of definining it.
2023-05-09Fix spurious changeJohn Ericson
Didn't mean to use the private name that shouldn't be exposed.
2023-05-09prevent double quotationAlex Ameen
2023-05-09libexpr: quote reserved keys when printingAlex Ameen
This fixes a bug in commands like `nix eval' which would emit invalid attribute sets if they contained reserved keywords such as "assert", "let", etc. These keywords will not be quoted when printed, making them valid expressions. All keywords recognized by the lexer are quoted except "or", which does not require quotation.
2023-05-08introduces `Goal::jobCategory`Matej Urbas
2023-05-08removes MaxSubstitutionJobsSettingMatej Urbas
2023-05-08Merge pull request #3921 from obsidiansystems/trustless-remote-builder-simpleJohn Ericson
Trustless remote building for input-addressed drvs
2023-05-08Split comment, match with each variableJohn Ericson
2023-05-08Apply suggestions from code reviewJohn Ericson
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-05-08Rename a few things in new testsJohn Ericson
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-05-08CA: rewrite hashes for all outputs, not just the wanted onesYorick van Pelt
2023-05-08libstore: also pass unwanted outputs to the post-build-hookYorick van Pelt
2023-05-08Merge pull request #8263 from frederictobiasc/improve-doc-genericclosureRobert Hensing
Documentation: Improve builtins.genericClosure
2023-05-07`max-substitution-jobs` settingMatej Urbas
2023-05-03Fix hostRegex to accept hosts with a `-`figsoda
2023-04-28nix: Support the --repair flagEelco Dolstra
2023-04-28display documentation on manifest files separatelyValentin Gagarin
it's probably better not to show the manifest file documentation in the command-specific pages, because these are implementation details that are not really practically useful. this means no additional hassle for building the manual, but clutters the table of contents a bit.
2023-04-26move compatibility info to `nix profile` docsValentin Gagarin
2023-04-26Include user-profiles.md into nix profile --helpAlexander Bantyev
2023-04-26Document user files of nixAlexander Bantyev
2023-04-26Doc: Improve builtins.genericClosureFrédéric Christ
2023-04-25FormattingEelco Dolstra
2023-04-25nix build --json: Only show non-zero startTime / stopTimeEelco Dolstra
2023-04-25TarArchive: Remove a duplicate constant and increase the buffer sizeEelco Dolstra
2023-04-24Add some more SourcePath docsEelco Dolstra