Compare commits

...

7 Commits

Author SHA1 Message Date
Eelco Dolstra
70d01bdec1 Merge pull request #7921 from NixOS/backport-7920-to-2.14-maintenance
[Backport 2.14-maintenance] nix-profile{,-daemon}.sh.in: Allow XDG_STATE_HOME to be unset
2023-03-02 00:24:44 +01:00
Eelco Dolstra
892b699ea6 Merge pull request #7934 from NixOS/backport-7925-to-2.14-maintenance
[Backport 2.14-maintenance] Check if NIX_LINK_NEW exists instead of checking that NIX_LINK doesn't exist
2023-03-01 23:02:48 +01:00
Cole Helbling
ceee213591 WIP: pin cachix actions to 2.13.3 to see if CI will pass
(cherry picked from commit 990fbb8fef)
2023-03-01 22:02:05 +00:00
Cole Helbling
f53b3c8c14 Check if NIX_LINK_NEW exists instead of checking that NIX_LINK doesn't exist
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.

(cherry picked from commit 2b801d6e3c)
2023-03-01 22:02:05 +00:00
Cole Helbling
9ccd835fdf nix-profile{,-daemon}.sh.in: Allow XDG_STATE_HOME to be unset
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.

(cherry picked from commit 24eaa086f0)
2023-02-28 18:49:24 +00:00
Eelco Dolstra
71a619642d Bump version 2023-02-28 18:15:26 +01:00
Eelco Dolstra
4b156ad944 Mark official release 2023-02-28 14:44:19 +01:00
6 changed files with 12 additions and 7 deletions

View File

@@ -20,6 +20,8 @@ jobs:
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v19
with:
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
- run: echo CACHIX_NAME="$(echo $GITHUB_REPOSITORY-install-tests | tr "[A-Z]/" "[a-z]-")" >> $GITHUB_ENV
- uses: cachix/cachix-action@v12
if: needs.check_secrets.outputs.cachix == 'true'
@@ -59,6 +61,8 @@ jobs:
fetch-depth: 0
- run: echo CACHIX_NAME="$(echo $GITHUB_REPOSITORY-install-tests | tr "[A-Z]/" "[a-z]-")" >> $GITHUB_ENV
- uses: cachix/install-nix-action@v19
with:
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
- uses: cachix/cachix-action@v12
with:
name: '${{ env.CACHIX_NAME }}'
@@ -103,6 +107,8 @@ jobs:
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v19
with:
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
- run: echo CACHIX_NAME="$(echo $GITHUB_REPOSITORY-install-tests | tr "[A-Z]/" "[a-z]-")" >> $GITHUB_ENV
- run: echo NIX_VERSION="$(nix --experimental-features 'nix-command flakes' eval .\#default.version | tr -d \")" >> $GITHUB_ENV
- uses: cachix/cachix-action@v12

View File

@@ -1 +1 @@
2.14.0
2.14.1

View File

@@ -66,7 +66,6 @@
- [Hacking](contributing/hacking.md)
- [CLI guideline](contributing/cli-guideline.md)
- [Release Notes](release-notes/release-notes.md)
- [Release X.Y (202?-??-??)](release-notes/rl-next.md)
- [Release 2.14 (2023-02-28)](release-notes/rl-2.14.md)
- [Release 2.13 (2023-01-17)](release-notes/rl-2.13.md)
- [Release 2.12 (2022-12-06)](release-notes/rl-2.12.md)

View File

@@ -10,7 +10,7 @@
let
inherit (nixpkgs) lib;
officialRelease = false;
officialRelease = true;
version = lib.fileContents ./.version + versionSuffix;
versionSuffix =

View File

@@ -3,12 +3,12 @@ if [ -n "${__ETC_PROFILE_NIX_SOURCED:-}" ]; then return; fi
__ETC_PROFILE_NIX_SOURCED=1
NIX_LINK=$HOME/.nix-profile
if [ -n "$XDG_STATE_HOME" ]; then
if [ -n "${XDG_STATE_HOME-}" ]; then
NIX_LINK_NEW="$XDG_STATE_HOME/nix/profile"
else
NIX_LINK_NEW=$HOME/.local/state/nix/profile
fi
if ! [ -e "$NIX_LINK" ]; then
if [ -e "$NIX_LINK_NEW" ]; then
NIX_LINK="$NIX_LINK_NEW"
else
if [ -t 2 ] && [ -e "$NIX_LINK_NEW" ]; then

View File

@@ -3,12 +3,12 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then
# Set up the per-user profile.
NIX_LINK="$HOME/.nix-profile"
if [ -n "$XDG_STATE_HOME" ]; then
if [ -n "${XDG_STATE_HOME-}" ]; then
NIX_LINK_NEW="$XDG_STATE_HOME/nix/profile"
else
NIX_LINK_NEW="$HOME/.local/state/nix/profile"
fi
if ! [ -e "$NIX_LINK" ]; then
if [ -e "$NIX_LINK_NEW" ]; then
NIX_LINK="$NIX_LINK_NEW"
else
if [ -t 2 ] && [ -e "$NIX_LINK_NEW" ]; then