Merge staging-next into staging

Changed files
+111 -58
nixos
doc
manual
installation
release-notes
lib
modules
services
continuous-integration
pkgs
applications
graphics
ImageMagick
development
compilers
tools
shells
zsh
zsh-completions
tools
networking
top-level
+8 -8
nixos/doc/manual/installation/upgrading.xml
···
<para>
<emphasis>Stable channels</emphasis>, such as
<literal
-
xlink:href="https://nixos.org/channels/nixos-20.09">nixos-20.09</literal>.
+
xlink:href="https://nixos.org/channels/nixos-21.05">nixos-21.05</literal>.
These only get conservative bug fixes and package upgrades. For instance,
a channel update may cause the Linux kernel on your system to be upgraded
from 4.19.34 to 4.19.38 (a minor bug fix), but not from
···
<para>
<emphasis>Small channels</emphasis>, such as
<literal
-
xlink:href="https://nixos.org/channels/nixos-20.09-small">nixos-20.09-small</literal>
+
xlink:href="https://nixos.org/channels/nixos-21.05-small">nixos-21.05-small</literal>
or
<literal
xlink:href="https://nixos.org/channels/nixos-unstable-small">nixos-unstable-small</literal>.
···
<para>
When you first install NixOS, you’re automatically subscribed to the NixOS
channel that corresponds to your installation source. For instance, if you
-
installed from a 20.09 ISO, you will be subscribed to the
-
<literal>nixos-20.09</literal> channel. To see which NixOS channel you’re
+
installed from a 21.05 ISO, you will be subscribed to the
+
<literal>nixos-21.05</literal> channel. To see which NixOS channel you’re
subscribed to, run the following as root:
<screen>
<prompt># </prompt>nix-channel --list | grep nixos
···
<prompt># </prompt>nix-channel --add https://nixos.org/channels/<replaceable>channel-name</replaceable> nixos
</screen>
(Be sure to include the <literal>nixos</literal> parameter at the end.) For
-
instance, to use the NixOS 20.09 stable channel:
+
instance, to use the NixOS 21.05 stable channel:
<screen>
-
<prompt># </prompt>nix-channel --add https://nixos.org/channels/nixos-20.09 nixos
+
<prompt># </prompt>nix-channel --add https://nixos.org/channels/nixos-21.05 nixos
</screen>
If you have a server, you may want to use the “small” channel instead:
<screen>
-
<prompt># </prompt>nix-channel --add https://nixos.org/channels/nixos-20.09-small nixos
+
<prompt># </prompt>nix-channel --add https://nixos.org/channels/nixos-21.05-small nixos
</screen>
And if you want to live on the bleeding edge:
<screen>
···
kernel, initrd or kernel modules.
You can also specify a channel explicitly, e.g.
<programlisting>
-
<xref linkend="opt-system.autoUpgrade.channel"/> = https://nixos.org/channels/nixos-20.09;
+
<xref linkend="opt-system.autoUpgrade.channel"/> = https://nixos.org/channels/nixos-21.05;
</programlisting>
</para>
</section>
+1 -1
nixos/doc/manual/release-notes/rl-2105.xml
···
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="sec-release-21.05">
-
<title>Release 21.05 (“Okapi”, 2021.05/??)</title>
+
<title>Release 21.05 (“Okapi”, 2021.05/31)</title>
<para>
Support is planned until the end of December 2021, handing over to 21.11.
+3 -5
nixos/lib/make-ext4-fs.nix
···
return 1
fi
-
echo "Resizing to minimum allowed size"
-
resize2fs -M $img
-
-
# And a final fsck, because of the previous truncating.
-
fsck.ext4 -n -f $img
+
# We may want to shrink the file system and resize the image to
+
# get rid of the unnecessary slack here--but see
+
# https://github.com/NixOS/nixpkgs/issues/125121 for caveats.
if [ ${builtins.toString compressImage} ]; then
echo "Compressing image"
+1 -2
nixos/modules/services/continuous-integration/buildkite-agents.nix
···
in
optionalString (cfg.privateSshKeyPath != null) ''
mkdir -m 0700 -p "${sshDir}"
-
cp -f "${toString cfg.privateSshKeyPath}" "${sshDir}/id_rsa"
-
chmod 600 "${sshDir}"/id_rsa
+
install -m600 "${toString cfg.privateSshKeyPath}" "${sshDir}/id_rsa"
'' + ''
cat > "${cfg.dataDir}/buildkite-agent.cfg" <<EOF
token="$(cat ${toString cfg.tokenPath})"
+2 -2
pkgs/applications/graphics/ImageMagick/6.x.nix
···
else if stdenv.hostPlatform.system == "armv7l-linux" then "armv7l"
else if stdenv.hostPlatform.system == "aarch64-linux" || stdenv.hostPlatform.system == "aarch64-darwin" then "aarch64"
else if stdenv.hostPlatform.system == "powerpc64le-linux" then "ppc64le"
-
else throw "ImageMagick is not supported on this platform.";
+
else null;
in
stdenv.mkDerivation rec {
···
configureFlags =
[ "--with-frozenpaths" ]
-
++ [ "--with-gcc-arch=${arch}" ]
+
++ (if arch != null then [ "--with-gcc-arch=${arch}" ] else [ "--without-gcc-arch" ])
++ lib.optional (librsvg != null) "--with-rsvg"
++ lib.optionals (ghostscript != null)
[ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts"
+2 -2
pkgs/applications/graphics/ImageMagick/7.0.nix
···
else if stdenv.hostPlatform.system == "armv7l-linux" then "armv7l"
else if stdenv.hostPlatform.system == "aarch64-linux" || stdenv.hostPlatform.system == "aarch64-darwin" then "aarch64"
else if stdenv.hostPlatform.system == "powerpc64le-linux" then "ppc64le"
-
else throw "ImageMagick is not supported on this platform.";
+
else null;
in
stdenv.mkDerivation rec {
···
configureFlags =
[ "--with-frozenpaths" ]
-
++ [ "--with-gcc-arch=${arch}" ]
+
++ (if arch != null then [ "--with-gcc-arch=${arch}" ] else [ "--without-gcc-arch" ])
++ lib.optional (librsvg != null) "--with-rsvg"
++ lib.optionals (ghostscript != null)
[ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts"
+1 -1
pkgs/development/compilers/llvm/11/llvm/default.nix
···
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
'';
-
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl);
+
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl) && (!stdenv.hostPlatform.isRiscV);
checkTarget = "check-all";
+1 -1
pkgs/development/compilers/llvm/9/llvm/default.nix
···
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
'';
-
doCheck = stdenv.isLinux && (!stdenv.isx86_32);
+
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isRiscV);
checkTarget = "check-all";
+1
pkgs/development/compilers/rust/1_52.nix
···
x86_64-apple-darwin = "765212098a415996b767d1e372ce266caf94027402b269fec33291fffc085ca4";
aarch64-apple-darwin = "95d0410bbd20b05f8b7d5adf70e8737873995bc86611a90e643d7081ca35147f";
powerpc64le-unknown-linux-gnu = "7362f561104d7be4836507d3a53cd39444efcdf065813d559beb1f54ce9f7680";
+
riscv64gc-unknown-linux-gnu = "9d0c2c4ab2397e78758de8b6b57051482bcf20b6748e0e16d9d5bd23ce73d72a";
};
selectRustPackage = pkgs: pkgs.rust_1_52;
+1
pkgs/development/compilers/rust/default.nix
···
"armv7l" = "armv7";
"armv6l" = "arm";
"armv5tel" = "armv5te";
+
"riscv64" = "riscv64gc";
}.${cpu.name} or cpu.name;
in platform.rustc.config
or "${cpu_}-${vendor.name}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
+1
pkgs/development/compilers/rust/print-hashes.sh
···
x86_64-apple-darwin
aarch64-apple-darwin
powerpc64le-unknown-linux-gnu
+
riscv64gc-unknown-linux-gnu
)
BASEURL=https://static.rust-lang.org/dist
VERSION=${1:-}
+2 -16
pkgs/development/tools/analysis/radare2/default.nix
···
, ruby
, lua
, capstone
-
, fetchpatch
, useX11 ? false
, rubyBindings ? false
, pythonBindings ? false
···
stdenv.mkDerivation rec {
pname = "radare2";
-
version = "5.2.1";
+
version = "5.3.0";
src = fetchFromGitHub {
owner = "radare";
repo = "radare2";
rev = version;
-
sha256 = "0n3k190qjhdlj10fjqijx6ismz0g7fk28i83j0480cxdqgmmlbxc";
+
sha256 = "sha256-xndnRVlqTB/NH1ROo7xkftLP7DufsJu4CCA9MCOEeng=";
};
-
-
patches = [
-
# fix for CVE-2021-32613
-
(fetchpatch {
-
url = "https://github.com/radareorg/radare2/commit/5e16e2d1c9fe245e4c17005d779fde91ec0b9c05.patch";
-
sha256 = "sha256-zCFNn968buLuSqfUT5E+72qz0l1tA3fEUQIxJl2nd3I=";
-
})
-
(fetchpatch {
-
name = "CVE-2021-32613.patch";
-
url = "https://github.com/radareorg/radare2/commit/049de62730f4954ef9a642f2eeebbca30a8eccdc.patch";
-
sha256 = "sha256-s8SWGuSQ6fxDCybtjO2ZW8w7H6mr+AuzVLL6dw+XKDw=";
-
})
-
];
postInstall = ''
install -D -m755 $src/binr/r2pm/r2pm $out/bin/r2pm
+38 -4
pkgs/development/tools/build-managers/bmake/default.nix
···
-
{ lib, stdenv, fetchurl
-
, getopt
+
{ lib, stdenv, fetchurl, fetchpatch
+
, getopt, tzdata
}:
stdenv.mkDerivation rec {
pname = "bmake";
-
version = "20200902";
+
version = "20210420";
src = fetchurl {
url = "http://www.crufty.net/ftp/pub/sjg/${pname}-${version}.tar.gz";
-
sha256 = "1v1v81llsiy8qbpy38nml1x08dhrihwh040pqgwbwb9zy1108b08";
+
sha256 = "1ajq8v5rq3pl5y9h1hlscs83007fsyk3lhcp87z09ma370lm3ra7";
};
+
# Make tests work with musl
+
# * Disable deptgt-delete_on_error test (alpine does this too)
+
# * Fix test failing due to different strerror(3) output for musl and glibc
+
postPatch = lib.optionalString (stdenv.hostPlatform.libc == "musl") ''
+
sed -i unit-tests/Makefile -e '/deptgt-delete_on_error/d'
+
substituteInPlace unit-tests/opt-chdir.exp --replace "File name" "Filename"
+
'';
+
nativeBuildInputs = [ getopt ];
patches = [
+
# make bootstrap script aware of the prefix in /nix/store
./bootstrap-fix.patch
+
# preserve PATH from build env in unit tests
./fix-unexport-env-test.patch
+
# Fix localtime tests without global /etc/zoneinfo directory
+
./fix-localtime-test.patch
+
# decouple tests from build phase
+
(fetchpatch {
+
name = "separate-tests.patch";
+
url = "https://raw.githubusercontent.com/alpinelinux/aports/2a36f7b79df44136c4d2b8e9512f908af65adfee/community/bmake/separate-tests.patch";
+
sha256 = "00s76jwyr83c6rkvq67b1lxs8jhm0gj2rjgy77xazqr5400slj9a";
+
})
+
# add a shebang to bmake's install(1) replacement
+
(fetchpatch {
+
name = "install-sh.patch";
+
url = "https://raw.githubusercontent.com/alpinelinux/aports/34cd8c45397c63c041cf3cbe1ba5232fd9331196/community/bmake/install-sh.patch";
+
sha256 = "0z8icd6akb96r4cksqnhynkn591vbxlmrrs4w6wil3r6ggk6mwa6";
+
})
];
# The generated makefile is a small wrapper for calling ./boot-strap
···
./boot-strap --prefix=$out -o . op=install
runHook postInstall
+
'';
+
+
doCheck = true;
+
checkInputs = [ tzdata ];
+
checkPhase = ''
+
runHook preCheck
+
+
./boot-strap -o . op=test
+
+
runHook postCheck
'';
setupHook = ./setup-hook.sh;
+23
pkgs/development/tools/build-managers/bmake/fix-localtime-test.patch
···
+
--- bmake/unit-tests/Makefile.orig 2021-05-30 14:24:38.822484317 +0200
+
+++ bmake/unit-tests/Makefile 2021-05-31 13:25:21.645751428 +0200
+
@@ -455,7 +455,8 @@
+
ENV.varmisc= FROM_ENV=env
+
ENV.varmisc+= FROM_ENV_BEFORE=env
+
ENV.varmisc+= FROM_ENV_AFTER=env
+
-ENV.varmod-localtime+= TZ=Europe/Berlin
+
+# Set absolute path to tz file since musl doesn't support TZDIR
+
+ENV.varmod-localtime+= TZDIR=${TZDIR} TZ=:${TZDIR}/Europe/Berlin
+
ENV.varname-vpath+= VPATH=varname-vpath.dir:varname-vpath.dir2
+
+
# Override make flags for some of the tests; default is -k.
+
--- bmake/unit-tests/varmod-localtime.mk.orig 2021-05-30 14:30:34.397986246 +0200
+
+++ bmake/unit-tests/varmod-localtime.mk 2021-05-31 13:24:41.430906606 +0200
+
@@ -3,7 +3,7 @@
+
# Tests for the :localtime variable modifier, which formats a timestamp
+
# using strftime(3) in local time.
+
+
-.if ${TZ} != "Europe/Berlin" # see unit-tests/Makefile
+
+.if ${TZ} != ":${TZDIR}/Europe/Berlin" # see unit-tests/Makefile
+
. error
+
.endif
+
+7 -7
pkgs/development/tools/build-managers/bmake/fix-unexport-env-test.patch
···
-
--- bmake/unit-tests/unexport-env.mk.orig 2019-02-19 10:24:14.356713136 -0800
-
+++ bmake/unit-tests/unexport-env.mk 2019-02-19 10:25:43.838775388 -0800
-
@@ -3,8 +3,8 @@
-
# pick up a bunch of exported vars
+
--- bmake/unit-tests/unexport-env.mk.orig 2021-05-27 14:44:45.263392298 +0200
+
+++ bmake/unit-tests/unexport-env.mk 2021-05-27 14:46:46.188881996 +0200
+
@@ -4,8 +4,8 @@
+
FILTER_CMD= grep ^UT_
.include "export.mk"
-# an example of setting up a minimal environment.
-
-PATH = /bin:/usr/bin:/sbin:/usr/sbin
+
-PATH= /bin:/usr/bin:/sbin:/usr/sbin
+# preserve PATH so commands used in the "all" target are still available
-
+PATH := ${PATH}
+
+PATH := ${PATH}
# now clobber the environment to just PATH and UT_TEST
-
UT_TEST = unexport-env
+
UT_TEST= unexport-env
+11 -1
pkgs/development/tools/delve/default.nix
···
-
{ lib, buildGoPackage, fetchFromGitHub }:
+
{ lib, buildGoPackage, fetchFromGitHub, makeWrapper }:
buildGoPackage rec {
pname = "delve";
···
rev = "v${version}";
sha256 = "sha256-bTVCasemE8Vyjcs8wZBiiXEsW3UBndjpPQ5bi+4vQkw=";
};
+
+
subPackages = [ "cmd/dlv" ];
+
+
nativeBuildInputs = [ makeWrapper ];
+
+
postInstall = ''
+
# fortify source breaks build since delve compiles with -O0
+
wrapProgram $out/bin/dlv \
+
--prefix disableHardening " " fortify
+
'';
meta = with lib; {
description = "debugger for the Go programming language";
+2 -2
pkgs/shells/zsh/zsh-completions/default.nix
···
stdenv.mkDerivation rec {
pname = "zsh-completions";
-
version = "0.32.0";
+
version = "0.33.0";
src = fetchFromGitHub {
owner = "zsh-users";
repo = pname;
rev = version;
-
sha256 = "12l9wrx0aysyj62kgp5limglz0nq73w8c415wcshxnxmhyk6sw6d";
+
sha256 = "0vs14n29wvkai84fvz3dz2kqznwsq2i5fzbwpv8nsfk1126ql13i";
};
installPhase= ''
+2 -2
pkgs/tools/networking/kea/default.nix
···
stdenv.mkDerivation rec {
pname = "kea";
-
version = "1.9.7";
+
version = "1.9.8";
src = fetchurl {
url = "https://ftp.isc.org/isc/${pname}/${version}/${pname}-${version}.tar.gz";
-
sha256 = "sha256-3/A0cG9AiyiWMk0GUjeUAHm0uRw5Q9PsEA2S6WZ8clo=";
+
sha256 = "sha256-EAi1Ic3YEF0or37At48saKwmAczTwf5GtbEsQNopbl0=";
};
patches = [ ./dont-create-var.patch ];
+4 -4
pkgs/top-level/all-packages.nix
···
/**/ if platform.isDarwin then (if platform.isAarch64 then 11 else 7)
else if platform.isFreeBSD then 7
else if platform.isAndroid then 12
-
else if platform.isLinux then 7
+
else if platform.isLinux then (if platform.isRiscV then 9 else 7)
else if platform.isWasm then 8
else 11; # latest
# We take the "max of the mins". Why? Since those are lower bounds of the
···
zlib = zlib-ng.override { withZlibCompat = true; };
withPerl = false;
# We don't use `with` statement here on purpose!
-
# See https://github.com/NixOS/nixpkgs/pull/10474/files#r42369334
+
# See https://github.com/NixOS/nixpkgs/pull/10474#discussion_r42369334
modules = [ nginxModules.rtmp nginxModules.dav nginxModules.moreheaders ];
# Use latest boringssl to allow http3 support
openssl = boringssl;
···
zlib = zlib-ng.override { withZlibCompat = true; };
withPerl = false;
# We don't use `with` statement here on purpose!
-
# See https://github.com/NixOS/nixpkgs/pull/10474/files#r42369334
+
# See https://github.com/NixOS/nixpkgs/pull/10474#discussion_r42369334
modules = [ nginxModules.rtmp nginxModules.dav nginxModules.moreheaders ];
···
zlib = zlib-ng.override { withZlibCompat = true; };
withPerl = false;
# We don't use `with` statement here on purpose!
-
# See https://github.com/NixOS/nixpkgs/pull/10474/files#r42369334
+
# See https://github.com/NixOS/nixpkgs/pull/10474#discussion_r42369334
modules = [ nginxModules.dav nginxModules.moreheaders ];