aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-05-17document `builtins.currentTime`Valentin Gagarin
2023-05-17Merge pull request #8273 from wamserma/fix-6dbce3Théophane Hufschmitt
fix "add an option to include flake-registry..."
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 "add an option to include flake-registry..."Markus S. Wamser
commit 6dbce3215fa2e30e1daafcc70d6926cd97987612 was missing a pair of parentheses
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-15Reword info on XDG base dirs (#8338)Valentin Gagarin
This gives some more context and should clarify why it works that way. Also link it from the section on `NIX_USER_CONF_FILES`. Co-authored-by: John Ericson <git@JohnEricson.me>
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-15Merge pull request #8339 from obsidiansystems/fix-rapid-check-instancesRobert Hensing
Fix some bounds in rapid check instances
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-15Merge pull request #7601 from obsidiansystems/string-installablesRobert Hensing
Make more string values work as installables
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-15test the garbage collection with the old profile dirThéophane Hufschmitt
Regression test for https://github.com/NixOS/nix/issues/8294
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-15Merge pull request #8334 from l0b0/patch-1Valentin Gagarin
2023-05-15refactor: Join commands to remove filesVictor Engmark
2023-05-15docs: Mention more files referenced by the installerVictor Engmark
`/etc/bash.bashrc` is backed up as `/etc/bash.bashrc.backup-before-nix`, but since other changes might have been introduced in the meantime we can't just tell the user to revert.
2023-05-15docs: Remove references to non-existing filesVictor Engmark
At least on Ubuntu 22.04, these files are not created as part of a multi- user installation.
2023-05-15docs: Sort files by nameVictor Engmark
2023-05-15docs: Remove Nix profile content from correct directoryVictor Engmark
At least on Ubuntu 22.04, the Nix installer creates `/etc/profile.d/nix.sh`, not `/etc/profile/nix.sh`.
2023-05-15docs: Remove redundant uninstall commandVictor Engmark
`sudo systemctl disable nix-daemon.socket nix-daemon.service` removes these files already.
2023-05-14Merge pull request #8328 from urbas/max-substitution-jobsValentin Gagarin
2023-05-14`max-substitution-jobs` release note entryMatej Urbas
2023-05-13Merge pull request #8326 from Hoverbear/describe-or-slightly-moreValentin Gagarin
2023-05-12Describe the or operation on attribute sets slightly moreAna Hobden
2023-05-12Update doc/manual/src/SUMMARY.md.inAlexander Bantyev
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-05-12Merge pull request #8319 from fricklerhandwerk/doc-builtins-prefixThéophane Hufschmitt
reword introduction to built-in functions
2023-05-12Merge pull request #8314 from fricklerhandwerk/doc-builtinsThéophane Hufschmitt
reword documentation on `builtins`
2023-05-12Merge pull request #8299 from urbas/max-substitution-jobsEelco Dolstra
`max-substitution-jobs` setting
2023-05-11reword introduction to built-in functionsValentin Gagarin
add anchor to `builtins.derivation` and list some built-in functions that are exposed in the global scope. I decided not to list everything, because we probably don't want to encourage people using them that way.
2023-05-11reword documentation on `builtins`Valentin Gagarin
- add anchor to `builtins` - add type information - reword description of `builtins` to offer more information concisely
2023-05-11do not indent markdown listValentin Gagarin
2023-05-10Merge pull request #8310 from obsidiansystems/fix-8141Théophane Hufschmitt
Fix `nix print-dev-env` & `nix develop` with drv paths
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.