aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-03-01Merge pull request #7925 from cole-h/fixup-xdg-nix-envEelco Dolstra
Check if NIX_LINK_NEW exists instead of checking that NIX_LINK doesn't exist
2023-03-01Merge pull request #7932 from obsidiansystems/remove-sameMachineThéophane Hufschmitt
Remove dead code `RemoteStore::sameMachine`
2023-03-01Merge pull request #7854 from aameen-tulip/patch-1Valentin Gagarin
2023-03-01Remove dead code `RemoteStore::sameMachine`John Ericson
It has been dead code since 9747ea84b43c75f719d719673b9d0a7cb50d34e5.
2023-03-01Merge pull request #7788 from ↵Valentin Gagarin
bobvanderlinden/pr-improve-nix-profile-install-error Improve error on conflict for nix profile install
2023-03-01nix-profile: add FIXME about using C++20 std::rangesBob van der Linden
2023-02-28WIP: pin cachix actions to 2.13.3 to see if CI will passCole Helbling
2023-02-28Check if NIX_LINK_NEW exists instead of checking that NIX_LINK doesn't existCole Helbling
For brand new installations, neither NIX_LINK_NEW (`$XDG_STATE_HOME/nix/profile` or `~/.local/state/nix/profile`), nor NIX_LINK (`~/.nix-profile`) will exist. This restores functionality to nix-env, which is relied upon by GitHub Actions such as https://github.com/cachix/cachix-action and the Nixpkgs EditorConfig (and other) CI.
2023-02-28Merge pull request #7600 from obsidiansystems/explicit-drv-nessValentin Gagarin
2023-02-28Get rid of `.drv` special-casing for store path installablesJohn Ericson
The release notes document the change in behavior, I don't include it here so there is no risk to it getting out of sync. > Motivation >> Plumbing CLI should be simple Store derivation installations are intended as "plumbing": very simple utilities for advanced users and scripts, and not what regular users interact with. (Similarly, regular Git users will use branch and tag names not explicit hashes for most things.) The plumbing CLI should prize simplicity over convenience; that is its raison d'etre. If the user provides a path, we should treat it the same way not caring what sort of path it is. >> Scripting This is especially important for the scripting use-case. when arbitrary paths are sent to e.g. `nix copy` and the script author wants consistent behavior regardless of what those store paths are. Otherwise the script author needs to be careful to filter out `.drv` ones, and then run `nix copy` again with those paths and `--derivation`. That is not good! >> Surprisingly low impact Only two lines in the tests need changing, showing that the impact of this is pretty light. Many command, like `nix log` will continue to work with just the derivation passed as before. This because we used to: - Special case the drv path and replace it with it's outputs (what this gets rid of). - Turn those output path *back* into the original drv path. Now we just skip that entire round trip! > Context Issue #7261 lays out a broader vision for getting rid of `--derivation`, and has this as one of its dependencies. But we can do this with or without that. `Installable::toDerivations` is changed to handle the case of a `DerivedPath::Opaque` ending in `.drv`, which is new: it simply doesn't need to do any extra work in that case. On this basis, commands like `nix {show-derivation,log} /nix/store/...-foo.drv` still work as before, as described above. When testing older daemons, the post-build-hook will be run against the old CLI, so we need the old version of the post-build-hook to support that use-case. Co-authored-by: Travis A. Everett <travis.a.everett@gmail.com> Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-02-28Merge pull request #7920 from cole-h/fix-profile-XDG_STATE_HOME-unboundEelco Dolstra
nix-profile{,-daemon}.sh.in: Allow XDG_STATE_HOME to be unset
2023-02-28nix-profile{,-daemon}.sh.in: Allow XDG_STATE_HOME to be unsetCole Helbling
One of our CI machines installs Nix via the official script and then sources the nix-profile.sh script to setup the environment. However, it doesn't have XDG_STATE_HOME set, which causes sourcing the script to fail.
2023-02-28Merge pull request #7883 from hercules-ci/json-guidelinesRobert Hensing
cli-guideline: Add JSON guideline
2023-02-28doc/cli-guideline: Improve examples Robert Hensing
Turns out that the settings themselves have a bad data model anyway, so we cut that. They do still occur in the first example, but not in focus.
2023-02-28doc/cli-guideline: Apply suggestions from code reviewRobert Hensing
Thanks Valentin!
2023-02-28doc/cli-guideline: Add JSON guidelineRobert Hensing
2023-02-28Merge pull request #7916 from NixOS/release-notesEelco Dolstra
2.14 release notes
2023-02-28Release notesEelco Dolstra
2023-02-28Merge pull request #7793 from layus/interrupt_downloadsEelco Dolstra
Check interrupts even when download stalled
2023-02-28Merge pull request #7904 from anatol/patch-1Eelco Dolstra
Example uses gitlab.com thus clarify the comment
2023-02-28fixup! tests: nix-profile: test install error message upon conflicting filesBob van der Linden
2023-02-28tests: nix-profile: test install error message upon conflicting filesBob van der Linden
2023-02-28nix-profile-install: show helpful error upon package conflictBob van der Linden
Whenever a file conflict happens during "nix profile install" an error is shown that was previously thrown inside builtins.buildEnv. We catch BuildProfileConflictError here so that we can provide the user with more useful instructions on what to do next. Most notably, we give the user concrete commands to use with all parameters already filled in. This avoids the need for the user to look up these commands in manual pages.
2023-02-28Merge pull request #7911 from edolstra/revert-7689Eelco Dolstra
Revert #7689
2023-02-28Merge pull request #7915 from ↵Eelco Dolstra
NixOS/dependabot/github_actions/zeebe-io/backport-action-1.2.0 Bump zeebe-io/backport-action from 1.1.0 to 1.2.0
2023-02-27Bump zeebe-io/backport-action from 1.1.0 to 1.2.0dependabot[bot]
Bumps [zeebe-io/backport-action](https://github.com/zeebe-io/backport-action) from 1.1.0 to 1.2.0. - [Release notes](https://github.com/zeebe-io/backport-action/releases) - [Commits](https://github.com/zeebe-io/backport-action/compare/v1.1.0...v1.2.0) --- updated-dependencies: - dependency-name: zeebe-io/backport-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27buildenv: throw BuildEnvFileConflictError with more contextBob van der Linden
At the moment an Error is thrown that only holds an error message regarding `nix-env` and `nix profile`. These tools make use of builtins.buildEnv, but buildEnv is also used in other places. These places are unrelated to Nix profiles, so the error shouldn't mention these tools. This generic error is now BuildEnvFileConflictError, which holds more contextual information about the files that were conflicting while building the environment.
2023-02-27Merge pull request #7776 from yorickvP/fix-path-escapes-7707Théophane Hufschmitt
Properly escape local paths into URLs in fetchTree
2023-02-27Merge pull request #7913 from fricklerhandwerk/masterEelco Dolstra
add information on the `build-hook` setting
2023-02-27add information on the `build-hook` settingValentin Gagarin
add a warning that you probably never want to change this.
2023-02-27tests/fetchGit: add regression test for #7707Yorick van Pelt
2023-02-27fetchTree: convert fs path to url via ParsedURL::to_stringYorick van Pelt
2023-02-27url: make percentEncode stricter, expose and unit test itYorick van Pelt
2023-02-27Revert "getDefaultNixPath: actually respect `{restrict,pure}-eval`"Eelco Dolstra
This reverts commit 1cba5984a68a489c4a56691032e4c87991c678f4.
2023-02-27Revert "Document default `nix-path` value"Eelco Dolstra
This reverts commit dba9173a1d8cb1dd40e5922d009cb3a434e081c3.
2023-02-27Merge pull request #7796 from hercules-ci/fix-7263Théophane Hufschmitt
Ensure that `self.outPath == ./.`
2023-02-26rl-next: Describe fixed flake outPath semanticsRobert Hensing
The reference documentation already implies the correct semantics.
2023-02-24Example uses gitlab.com thus clarify the commentAnatol Pomozov
2023-02-24Merge pull request #7412 from edolstra/release-processEelco Dolstra
Document the release process
2023-02-23Merge pull request #5753 from obsidiansystems/init-twice-worksRobert Hensing
Clean up daemon handling in the tests
2023-02-23Clean up daemon handlingJohn Ericson
Split `common.sh` into the vars and functions definitions vs starting the daemon (and possibly other initialization logic). This way, `init.sh` can just `source` the former. Trying to start the daemon before `nix.conf` is written will fail because `nix daemon` requires `--experimental-features 'nix-command'`. `killDaemon` is idempotent, so it's safe to call when no daemon is running. `startDaemon` and `killDaemon` use the PID (which is now exported to subshells) to decide whether there is work to be done, rather than `NIX_REMOTE`, which might conceivably be set differently even if a daemon is running. `startDaemon` and `killDaemon` can save/restore the old `NIX_REMOTE` as `NIX_REMOTE_OLD`. `init.sh` kills daemon before deleting everything (including the daemon socket).
2023-02-23Make init.sh safe to run twiceJohn Ericson
`init.sh` is tested on its own. We used to do that. I deleted it in 4720853129b6866775edd9f90ad6f10701f98a3c but I am not sure why. Better to just restore it; at one point working on this every other test passed, so seems good to check whether `init.sh` can be run twice. We don't *need* to run `init.sh` twice, but I want to try to make our tests as robust as possible so that manual debugging (where tests for better or worse might be run ways that we didn't expect) is less fragile.
2023-02-22Merge pull request #7764 from yorickvP/build-remote-warningThéophane Hufschmitt
build-remote: don't warn when all local build slots are taken
2023-02-22Merge pull request #7884 from edolstra/fix-staticEelco Dolstra
Fix the static build
2023-02-22Merge pull request #7881 from NixOS/thufschmitt-codeowners-shrinkEelco Dolstra
Remove my CODEOWNER-ship to libstore
2023-02-22Fix the static buildEelco Dolstra
It doesn't produce a "debug" output, so the build failed without an error message in Hydra (https://hydra.nixos.org/build/210121811).
2023-02-22Remove my CODEOWNER-ship to libstoreThéophane Hufschmitt
There's only 24 hours in the day, so let's keep things down to a manageable state
2023-02-22flakes: Differentiate `self.outPath` and `self.sourceInfo.outPath`Robert Hensing
It would be incorrect to say that the `sourceInfo` has an `outPath` that isn't the root. `sourceInfo` is about the root, whereas only the flake may not be about the root. Thanks Eelco for pointing that out.
2023-02-22flakes: Ensure that `self.outPath == ./.`Robert Hensing
Users expect `self` to refer to the directory where the `flake.nix` file resides.
2023-02-21Merge pull request #7875 from obsidiansystems/try-fix-aarch64-staticEelco Dolstra
Fix `isStatic` arguments to `commonDeps`