Skip to content

Commit

Permalink
Merge #231026: staging-next 2023-05-10
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed May 13, 2023
2 parents bec9166 + 021f9a2 commit 51c2025
Show file tree
Hide file tree
Showing 76 changed files with 523 additions and 176 deletions.
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2305.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ In addition to numerous new and upgraded packages, this release has the followin

- KDE Plasma has been updated to v5.27, see [the release notes](https://kde.org/announcements/plasma/5/5.27.0/) for what is changed.

- Python implements [PEP 668](https://peps.python.org/pep-0668/), providing better feedback to users that try to run `pip install` system-wide.

- `nixos-rebuild` now supports an extra `--specialisation` option that can be used to change specialisation for `switch` and `test` commands.

- `libxcrypt`, the library providing the `crypt(3)` password hashing function, is now built without support for algorithms not flagged [`strong`](https://github.com/besser82/libxcrypt/blob/v4.4.33/lib/hashes.conf#L48). This affects the availability of password hashing algorithms used for system login (`login(1)`, `passwd(1)`), but also Apache2 Basic-Auth, Samba, OpenLDAP, Dovecot, and [many other packages](https://github.com/search?q=repo%3ANixOS%2Fnixpkgs%20libxcrypt&type=code).
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/config/no-x-libs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ with lib;
networkmanager-vpnc = super.networkmanager-vpnc.override { withGnome = false; };
pango = super.pango.override { x11Support = false; };
pinentry = super.pinentry.override { enabledFlavors = [ "curses" "tty" "emacs" ]; withLibsecret = false; };
pipewire = super.pipewire.override { x11Support = false; };
qemu = super.qemu.override { gtkSupport = false; spiceSupport = false; sdlSupport = false; };
qrencode = super.qrencode.overrideAttrs (_: { doCheck = false; });
qt5 = super.qt5.overrideScope (const (super': {
Expand Down
7 changes: 5 additions & 2 deletions nixos/tests/bpf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ import ./make-test-python.nix ({ pkgs, ... }: {
" printf(\"tgid: %d\", ((struct task_struct*) curtask)->tgid); exit() "
"}'"))
# module BTF (bpftrace >= 0.17)
print(machine.succeed("bpftrace -e 'kfunc:nft_trans_alloc_gfp { "
" printf(\"portid: %d\\n\",args->ctx->portid); "
# test is currently disabled on aarch64 as kfunc does not work there yet
# https://github.com/iovisor/bpftrace/issues/2496
print(machine.succeed("uname -m | grep aarch64 || "
"bpftrace -e 'kfunc:nft_trans_alloc_gfp { "
" printf(\"portid: %d\\n\", args->ctx->portid); "
"} BEGIN { exit() }'"))
'';
})
7 changes: 2 additions & 5 deletions pkgs/applications/version-management/git/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,12 @@ stdenv.mkDerivation (finalAttrs: {
# Fix references to the perl, sed, awk and various coreutil binaries used by
# shell scripts that git calls (e.g. filter-branch)
# and completion scripts
SCRIPT="$(cat <<'EOS'
BEGIN{
@a=(
'${gnugrep}/bin/grep', '${gnused}/bin/sed', '${gawk}/bin/awk',
'${coreutils}/bin/cut', '${coreutils}/bin/basename', '${coreutils}/bin/dirname',
'${coreutils}/bin/wc', '${coreutils}/bin/tr',
'${coreutils}/bin/ls'
'${coreutils}/bin/wc', '${coreutils}/bin/tr'
${lib.optionalString perlSupport ", '${perlPackages.perl}/bin/perl'"}
);
}
Expand All @@ -204,8 +202,7 @@ stdenv.mkDerivation (finalAttrs: {
EOS
)"
perl -0777 -i -pe "$SCRIPT" \
$out/libexec/git-core/git-{sh-setup,filter-branch,merge-octopus,mergetool,quiltimport,request-pull,submodule,subtree,web--browse} \
$out/share/bash-completion/completions/{git,gitk}
$out/libexec/git-core/git-{sh-setup,filter-branch,merge-octopus,mergetool,quiltimport,request-pull,submodule,subtree,web--browse}
# Also put git-http-backend into $PATH, so that we can use smart
Expand Down
18 changes: 18 additions & 0 deletions pkgs/build-support/cc-wrapper/cc-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ cInclude=1
expandResponseParams "$@"
linkType=$(checkLinkType "${params[@]}")

declare -ag positionalArgs=()
declare -i n=0
nParams=${#params[@]}
while (( "$n" < "$nParams" )); do
Expand All @@ -54,6 +55,17 @@ while (( "$n" < "$nParams" )); do
c++*) isCxx=1 ;;
esac
;;
--) # Everything else is positional args!
# See: https://github.com/llvm/llvm-project/commit/ed1d07282cc9d8e4c25d585e03e5c8a1b6f63a74

# Any positional arg (i.e. any argument after `--`) will be
# interpreted as a "non flag" arg:
if [[ -v "params[$n]" ]]; then nonFlagArgs=1; fi

positionalArgs=("${params[@]:$n}")
params=("${params[@]:0:$((n - 1))}")
break;
;;
-?*) ;;
*) nonFlagArgs=1 ;; # Includes a solitary dash (`-`) which signifies standard input; it is not a flag
esac
Expand Down Expand Up @@ -207,6 +219,12 @@ if [ "$cc1" = 1 ]; then
extraBefore=()
fi

# Finally, if we got any positional args, append them to `extraAfter`
# now:
if [[ "${#positionalArgs[@]}" -gt 0 ]]; then
extraAfter+=(-- "${positionalArgs[@]}")
fi

# Optionally print debug info.
if (( "${NIX_DEBUG:-0}" >= 1 )); then
# Old bash workaround, see ld-wrapper for explanation.
Expand Down
4 changes: 2 additions & 2 deletions pkgs/data/misc/cacert/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ let
]));
extraCertificatesBundle = writeText "cacert-extra-certificates-bundle.crt" (lib.concatStringsSep "\n\n" extraCertificateStrings);

srcVersion = "3.86";
srcVersion = "3.89.1";
version = if nssOverride != null then nssOverride.version else srcVersion;
meta = with lib; {
homepage = "https://curl.haxx.se/docs/caextract.html";
Expand All @@ -45,7 +45,7 @@ let

src = if nssOverride != null then nssOverride.src else fetchurl {
url = "mirror://mozilla/security/nss/releases/NSS_${lib.replaceStrings ["."] ["_"] version}_RTM/src/nss-${version}.tar.gz";
sha256 = "sha256-PzhfxoZHa7uoEQNfpoIbVCR11VdHsYwgwiHU1mVzuXU=";
hash = "sha256-OtrtuecMPF9AYDv2CgHjNhkKbb4Bkp05XxawH+hKAVY=";
};

dontBuild = true;
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/gcc/10/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ let majorVersion = "10";
sha256 = "0sd52c898msqg7m316zp0ryyj7l326cjcn2y19dcxqp15r74qj0g";
})
../11/fix-struct-redefinition-on-glibc-2.36.patch
../install-info-files-serially.patch
] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
++ optional noSysDirs ../no-sys-dirs.patch
++ optional (noSysDirs && hostPlatform.isRiscV) ../no-sys-dirs-riscv.patch
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/gcc/11/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ let majorVersion = "11";
sha256 = "0sd52c898msqg7m316zp0ryyj7l326cjcn2y19dcxqp15r74qj0g";
})
./fix-struct-redefinition-on-glibc-2.36.patch
../install-info-files-serially.patch
] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
++ optional noSysDirs ../no-sys-dirs.patch
++ optional (noSysDirs && hostPlatform.isRiscV) ../no-sys-dirs-riscv.patch
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/gcc/12/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ let majorVersion = "12";
../gnat-cflags-11.patch
../gcc-12-gfortran-driving.patch
../ppc-musl.patch
../install-info-files-serially.patch
]
# We only apply this patch when building a native toolchain for aarch64-darwin, as it breaks building
# a foreign one: https://github.com/iains/gcc-12-branch/issues/18
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/gcc/4.8/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ let majorVersion = "4";
../struct-ucontext-4.8.patch
../sigsegv-not-declared.patch
../res_state-not-declared.patch
../install-info-files-serially.patch
# gcc-11 compatibility
(fetchpatch {
name = "gcc4-char-reload.patch";
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/gcc/4.9/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ let majorVersion = "4";
[ ../9/fix-struct-redefinition-on-glibc-2.36.patch ../use-source-date-epoch.patch
../parallel-bconfig.patch ./parallel-strsignal.patch
./libsanitizer.patch
../install-info-files-serially.patch
(fetchpatch {
name = "avoid-ustat-glibc-2.28.patch";
url = "https://gitweb.gentoo.org/proj/gcc-patches.git/plain/4.9.4/gentoo/100_all_avoid-ustat-glibc-2.28.patch?id=55fcb515620a8f7d3bb77eba938aa0fcf0d67c96";
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/gcc/6/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ let majorVersion = "6";
url = "https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=de31f5445b12fd9ab9969dc536d821fe6f0edad0";
sha256 = "0sd52c898msqg7m316zp0ryyj7l326cjcn2y19dcxqp15r74qj0g";
})
../install-info-files-serially.patch
] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
++ optional noSysDirs ../no-sys-dirs.patch
++ optional langAda ../gnat-cflags.patch
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/gcc/7/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ let majorVersion = "7";
})

../9/fix-struct-redefinition-on-glibc-2.36.patch
../install-info-files-serially.patch
]
++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
++ optionals targetPlatform.isNetBSD [
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/gcc/8/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ let majorVersion = "8";
sha256 = "0sd52c898msqg7m316zp0ryyj7l326cjcn2y19dcxqp15r74qj0g";
})
../9/fix-struct-redefinition-on-glibc-2.36.patch
../install-info-files-serially.patch
] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
++ optional targetPlatform.isNetBSD ../libstdc++-netbsd-ctypes.patch
++ optional noSysDirs ../no-sys-dirs.patch
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/gcc/9/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ let majorVersion = "9";
url = "https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=de31f5445b12fd9ab9969dc536d821fe6f0edad0";
sha256 = "0sd52c898msqg7m316zp0ryyj7l326cjcn2y19dcxqp15r74qj0g";
})
../install-info-files-serially.patch
] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
++ optional targetPlatform.isNetBSD ../libstdc++-netbsd-ctypes.patch
++ optional noSysDirs ../no-sys-dirs.patch
Expand Down
15 changes: 15 additions & 0 deletions pkgs/development/compilers/gcc/install-info-files-serially.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff -Naur gcc-12.2.0/gcc/Makefile.in gcc-12.2.0-new/gcc/Makefile.in
--- gcc-12.2.0/gcc/Makefile.in 2022-08-19 10:09:52.280658631 +0200
+++ gcc-12.2.0-new/gcc/Makefile.in 2023-05-04 14:35:44.401420184 +0200
@@ -3781,6 +3781,11 @@
fi; \
fi

+# We don't care about the order in which the info files are built, but
+# install-info doesn't support multiple parallel invocations writing to
+# the same `dir-file`, so we have to disable parallelism for that reason:
+.NOTPARALLEL: install-info
+
# Install the info files.
# $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
# to do the install.
4 changes: 2 additions & 2 deletions pkgs/development/compilers/go/1.20.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ let
in
stdenv.mkDerivation rec {
pname = "go";
version = "1.20.3";
version = "1.20.4";

src = fetchurl {
url = "https://go.dev/dl/go${version}.src.tar.gz";
hash = "sha256-5Ee0mM3lAhXE92GeUSSw/E4l+10W6kcnHEfyeOeqdjo=";
hash = "sha256-nzSs4Sh2S3o6SyOLgFhWzBshhDBN+eVpCCWwcQ9CAtY=";
};

strictDeps = true;
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/compilers/llvm/10/llvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ in stdenv.mkDerivation (rec {
sha256 = "1kckghvsngs51mqm82asy0s9vr19h8aqbw43a0w44mccqw6bzrwf";
stripLen = 1;
})

# Fix musl build.
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
relative = "llvm";
hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
})
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;

postPatch = optionalString stdenv.isDarwin ''
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/compilers/llvm/11/llvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ in stdenv.mkDerivation (rec {
sha256 = "1kckghvsngs51mqm82asy0s9vr19h8aqbw43a0w44mccqw6bzrwf";
stripLen = 1;
})

# Fix musl build.
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
relative = "llvm";
hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
})
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;

postPatch = optionalString stdenv.isDarwin ''
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/compilers/llvm/12/llvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ in stdenv.mkDerivation (rec {
sha256 = "sha256:12s8vr6ibri8b48h2z38f3afhwam10arfiqfy4yg37bmc054p5hi";
stripLen = 1;
})

# Fix musl build.
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
relative = "llvm";
hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
})
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;

postPatch = optionalString stdenv.isDarwin ''
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/compilers/llvm/13/llvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ in stdenv.mkDerivation (rec {
sha256 = "18l6mrvm2vmwm77ckcnbjvh6ybvn72rhrb799d4qzwac4x2ifl7g";
stripLen = 1;
})

# Fix musl build.
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
relative = "llvm";
hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
})
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;

postPatch = optionalString stdenv.isDarwin ''
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/compilers/llvm/14/llvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ in stdenv.mkDerivation (rec {

patches = [
./gnu-install-dirs.patch

# Fix musl build.
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
relative = "llvm";
hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
})
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;

postPatch = optionalString stdenv.isDarwin ''
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/compilers/llvm/15/llvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ in stdenv.mkDerivation (rec {
# It's not clear to me why this isn't an issue for LLVM developers running
# on macOS (nothing about this _seems_ nix specific)..
./lit-shell-script-runner-set-dyld-library-path.patch

# Fix musl build.
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
relative = "llvm";
hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
})
] ++ lib.optionals enablePolly [
./gnu-install-dirs-polly.patch

Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/compilers/llvm/5/llvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ stdenv.mkDerivation (rec {
sha256 = "0zjfjgavqzi2ypqwqnlvy6flyvdz8hi1anwv0ybwnm2zqixg7za3";
stripLen = 1;
})

../../llvm-7-musl.patch
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;

postPatch = optionalString stdenv.isDarwin ''
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/compilers/llvm/6/llvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ stdenv.mkDerivation (rec {
sha256 = "0zjfjgavqzi2ypqwqnlvy6flyvdz8hi1anwv0ybwnm2zqixg7za3";
stripLen = 1;
})

../../llvm-7-musl.patch
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;

postPatch = optionalString stdenv.isDarwin ''
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/compilers/llvm/7/llvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ in stdenv.mkDerivation (rec {
sha256 = "0zjfjgavqzi2ypqwqnlvy6flyvdz8hi1anwv0ybwnm2zqixg7za3";
stripLen = 1;
})

../../llvm-7-musl.patch
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;

postPatch = optionalString stdenv.isDarwin ''
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/compilers/llvm/8/llvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ in stdenv.mkDerivation (rec {
sha256 = "0zjfjgavqzi2ypqwqnlvy6flyvdz8hi1anwv0ybwnm2zqixg7za3";
stripLen = 1;
})

# Fix musl build.
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
relative = "llvm";
hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
})
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;

postPatch = optionalString stdenv.isDarwin ''
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/compilers/llvm/9/llvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ in stdenv.mkDerivation (rec {
sha256 = "0zjfjgavqzi2ypqwqnlvy6flyvdz8hi1anwv0ybwnm2zqixg7za3";
stripLen = 1;
})

# Fix musl build.
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
relative = "llvm";
hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
})
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;

postPatch = optionalString stdenv.isDarwin ''
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/compilers/llvm/git/llvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ in stdenv.mkDerivation (rec {
# It's not clear to me why this isn't an issue for LLVM developers running
# on macOS (nothing about this _seems_ nix specific)..
./lit-shell-script-runner-set-dyld-library-path.patch

# Fix musl build.
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
relative = "llvm";
hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
})
] ++ lib.optionals enablePolly [
./gnu-install-dirs-polly.patch

Expand Down
Loading

0 comments on commit 51c2025

Please sign in to comment.