From 89864413b28a787ee61e46a7ff510587eb041e32 Mon Sep 17 00:00:00 2001 From: "Berk D. Demir" Date: Sun, 1 May 2022 23:15:08 +0000 Subject: [PATCH 01/86] go-modules/packages: Run unit tests under subdirs Bug: Due to the way `buildGoDir` function was repurposed to also run `go test`, if `checkFlags` was defined, `go test` was ran only at the top level directory. Only the first element of `checkFlags` array would get passed to the `go test` command as arguments. Fix: Now the first parameter to `buildGoDir` is handled as the command. If the command is "test" `checkFlags` get passed as arguments along with other build flags like ldflags, tags, etc. Readability: - Iteratively build a flag array in `buildGoDir` instead of single long variable expansion command line. - Bash style: Single line local assignment of positional parameters. --- .../go-modules/generic/default.nix | 20 ++++++++++++++----- .../go-packages/generic/default.nix | 20 ++++++++++++++----- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index 4dff2d82848d6..d0dc55376faa0 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -180,12 +180,22 @@ let exclude+='\)' buildGoDir() { - local d; local cmd; - cmd="$1" - d="$2" + local cmd="$1" dir="$2" + . $TMPDIR/buildFlagsArray + + declare -a flags + flags+=($buildFlags "''${buildFlagsArray[@]}") + flags+=(''${tags:+-tags=${lib.concatStringsSep "," tags}}) + flags+=(''${ldflags:+-ldflags="$ldflags"}) + flags+=("-v" "-p" "$NIX_BUILD_CORES") + + if [ "$cmd" = "test" ]; then + flags+=($checkFlags) + fi + local OUT - if ! OUT="$(go $cmd $buildFlags "''${buildFlagsArray[@]}" ''${tags:+-tags=${lib.concatStringsSep "," tags}} ''${ldflags:+-ldflags="$ldflags"} -v -p $NIX_BUILD_CORES $d 2>&1)"; then + if ! OUT="$(go $cmd "''${flags[@]}" $dir 2>&1)"; then if ! echo "$OUT" | grep -qE '(no( buildable| non-test)?|build constraints exclude all) Go (source )?files'; then echo "$OUT" >&2 return 1 @@ -243,7 +253,7 @@ let runHook preCheck for pkg in $(getGoDirs test); do - buildGoDir test $checkFlags "$pkg" + buildGoDir test "$pkg" done runHook postCheck diff --git a/pkgs/development/go-packages/generic/default.nix b/pkgs/development/go-packages/generic/default.nix index 0559f7f07a7c1..643c1955d2b0b 100644 --- a/pkgs/development/go-packages/generic/default.nix +++ b/pkgs/development/go-packages/generic/default.nix @@ -160,12 +160,22 @@ let exclude+='\)' buildGoDir() { - local d; local cmd; - cmd="$1" - d="$2" + local cmd="$1" dir="$2" + . $TMPDIR/buildFlagsArray + + declare -a flags + flags+=($buildFlags "''${buildFlagsArray[@]}") + flags+=(''${tags:+-tags=${lib.concatStringsSep "," tags}}) + flags+=(''${ldflags:+-ldflags="$ldflags"}) + flags+=("-v" "-p" "$NIX_BUILD_CORES") + + if [ "$cmd" = "test" ]; then + flags+=($checkFlags) + fi + local OUT - if ! OUT="$(go $cmd $buildFlags "''${buildFlagsArray[@]}" ''${tags:+-tags=${lib.concatStringsSep "," tags}} ''${ldflags:+-ldflags="$ldflags"} -v -p $NIX_BUILD_CORES $d 2>&1)"; then + if ! OUT="$(go $cmd "''${flags[@]}" $dir 2>&1)"; then if ! echo "$OUT" | grep -qE '(no( buildable| non-test)?|build constraints exclude all) Go (source )?files'; then echo "$OUT" >&2 return 1 @@ -225,7 +235,7 @@ let runHook preCheck for pkg in $(getGoDirs test); do - buildGoDir test $checkFlags "$pkg" + buildGoDir test "$pkg" done runHook postCheck From 17672c8de18503137817b66fe9cd640d652f7f8a Mon Sep 17 00:00:00 2001 From: "Berk D. Demir" Date: Sun, 1 May 2022 23:15:08 +0000 Subject: [PATCH 02/86] gucci: Disable integration tests. The version of Ginkgo it relies on might be the problem. Bug fixed by #173702 runs the previously skipped tests for this package. --- pkgs/tools/text/gucci/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/tools/text/gucci/default.nix b/pkgs/tools/text/gucci/default.nix index 3e87b7cb79c11..8d9bd5279af0c 100644 --- a/pkgs/tools/text/gucci/default.nix +++ b/pkgs/tools/text/gucci/default.nix @@ -21,6 +21,14 @@ buildGoModule rec { checkFlags = [ "-short" ]; + # Integration tests rely on Ginkgo but fail. + # Related: https://github.com/onsi/ginkgo/issues/602 + # + # Disable integration tests. + preCheck = '' + buildFlagsArray+=("-run" "[^(TestIntegration)]") + ''; + meta = with lib; { description = "A simple CLI templating tool written in golang"; homepage = "https://github.com/noqcks/gucci"; From 1b748f081ad7ef034ce6c7438305d9957e771aec Mon Sep 17 00:00:00 2001 From: "Berk D. Demir" Date: Sun, 1 May 2022 23:15:08 +0000 Subject: [PATCH 03/86] skeema: Disable tests requiring network & fix deps - Disable the tests requiring access to gitlab.com. - Add coreutils to `nativeBuildInputs` for printf and echo binaries. - Fix hard coded paths to coreutils binaries. Bug fixed by #173702 runs the previously skipped tests for this package. --- pkgs/tools/system/skeema/default.nix | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/system/skeema/default.nix b/pkgs/tools/system/skeema/default.nix index bf1bacede8d07..4d39e47da5912 100644 --- a/pkgs/tools/system/skeema/default.nix +++ b/pkgs/tools/system/skeema/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, coreutils }: buildGoModule rec { pname = "skeema"; @@ -17,6 +17,29 @@ buildGoModule rec { ldflags = [ "-s" "-w" ]; + preCheck = '' + # Disable tests requiring network access to gitlab.com + buildFlagsArray+=("-run" "[^(Test(ParseDir(Symlinks|))|DirRelPath)]") + + # Fix tests expecting /usr/bin/printf and /bin/echo + substituteInPlace skeema_cmd_test.go \ + --replace /usr/bin/printf "${coreutils}/bin/printf" + + substituteInPlace internal/fs/dir_test.go \ + --replace /bin/echo "${coreutils}/bin/echo" \ + --replace /usr/bin/printf "${coreutils}/bin/printf" + + substituteInPlace internal/applier/ddlstatement_test.go \ + --replace /bin/echo "${coreutils}/bin/echo" + + substituteInPlace internal/util/shellout_unix_test.go \ + --replace /bin/echo "${coreutils}/bin/echo" \ + --replace /usr/bin/printf "${coreutils}/bin/printf" + + substituteInPlace internal/util/shellout_unix_test.go \ + --replace /bin/echo "${coreutils}/bin/echo" + ''; + checkFlags = [ "-short" ]; meta = with lib; { From 7f2ef311e2e3eb04f127cf0059aa1f2720904c69 Mon Sep 17 00:00:00 2001 From: "Berk D. Demir" Date: Sun, 1 May 2022 23:15:08 +0000 Subject: [PATCH 04/86] mmake: Disable non-localhost network access tests Bug fixed by #173702 runs the previously skipped tests for this package. --- pkgs/tools/misc/mmake/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/mmake/default.nix b/pkgs/tools/misc/mmake/default.nix index 2172b8b958c63..b95033bea24b5 100644 --- a/pkgs/tools/misc/mmake/default.nix +++ b/pkgs/tools/misc/mmake/default.nix @@ -15,7 +15,8 @@ buildGoModule rec { ldflags = [ "-s" "-w" ]; - checkFlags = [ "-short" ]; + # Almost all tests require non-local networking, trying to resolve githubusercontent.com. + doCheck = false; meta = with lib; { homepage = "https://github.com/tj/mmake"; From 032f261fae00459598a7aac3c4893c668c9d41cc Mon Sep 17 00:00:00 2001 From: "Berk D. Demir" Date: Sun, 1 May 2022 23:15:08 +0000 Subject: [PATCH 05/86] delve: Fix tests on Linux, disable tests on Darwin Bug fixed by #173702 runs the previously skipped tests for this package. --- pkgs/development/tools/delve/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/delve/default.nix b/pkgs/development/tools/delve/default.nix index 635a8aa880641..83ac8ad8198fd 100644 --- a/pkgs/development/tools/delve/default.nix +++ b/pkgs/development/tools/delve/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, makeWrapper }: +{ lib, buildGoModule, fetchFromGitHub, makeWrapper, stdenv }: buildGoModule rec { pname = "delve"; @@ -17,7 +17,19 @@ buildGoModule rec { nativeBuildInputs = [ makeWrapper ]; - checkFlags = [ "-short" ]; + hardeningDisable = [ "fortify" ]; + + preCheck = '' + XDG_CONFIG_HOME=$(mktemp -d) + ''; + + # Disable tests on Darwin as they require various workarounds. + # + # - Tests requiring local networking fail with or without sandbox, + # even with __darwinAllowLocalNetworking allowed. + # - CGO_FLAGS warnings break tests' expected stdout/stderr outputs. + # - DAP test binaries exit prematurely. + doCheck = !stdenv.isDarwin; postInstall = '' # fortify source breaks build since delve compiles with -O0 From aee4df7eeb9c250f5f03cbb46fb408d56cadf3a2 Mon Sep 17 00:00:00 2001 From: "Berk D. Demir" Date: Sun, 1 May 2022 23:15:08 +0000 Subject: [PATCH 06/86] go-mtpfs: Disable tests req'ing USB attached devs These test are written in a way that they don't skip themselves if they cannot find an Android device attached over USB to the running host. Bug fixed by #173702 runs the previously skipped tests for this package. --- pkgs/tools/filesystems/go-mtpfs/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/filesystems/go-mtpfs/default.nix b/pkgs/tools/filesystems/go-mtpfs/default.nix index 4bb2a3c24d5fe..260e6891f956e 100644 --- a/pkgs/tools/filesystems/go-mtpfs/default.nix +++ b/pkgs/tools/filesystems/go-mtpfs/default.nix @@ -18,7 +18,11 @@ buildGoModule rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libusb1 ]; - checkFlags = [ "-short" ]; + preCheck = '' + # Only run tests under mtp/encoding_test.go + # Other tests require an Android deviced attached over USB. + buildFlagsArray+=("-run" "Test(Encode|Decode|Variant).*") + ''; meta = with lib; { description = "A simple FUSE filesystem for mounting Android devices as a MTP device"; From a3205db0c5a056bbd9dc8c33f81fa5f921354ea9 Mon Sep 17 00:00:00 2001 From: "Berk D. Demir" Date: Sun, 1 May 2022 23:15:08 +0000 Subject: [PATCH 07/86] gitbatch: Fix tests requiring .git & writable HOME Disable the tests requiring access to gitlab.com Bug fixed by #173702 runs the previously skipped tests for this package. --- .../git-and-tools/gitbatch/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/gitbatch/default.nix b/pkgs/applications/version-management/git-and-tools/gitbatch/default.nix index 75fea7bf871fc..0eb20db1462ab 100644 --- a/pkgs/applications/version-management/git-and-tools/gitbatch/default.nix +++ b/pkgs/applications/version-management/git-and-tools/gitbatch/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, git }: buildGoModule rec { pname = "gitbatch"; @@ -15,7 +15,15 @@ buildGoModule rec { ldflags = [ "-s" "-w" ]; - checkFlags = [ "-short" ]; + nativeBuildInputs = [ + git # required by unit tests + ]; + + preCheck = '' + HOME=$(mktemp -d) + # Disable tests requiring network access to gitlab.com + buildFlagsArray+=("-run" "[^(Test(Run|Start|(Fetch|Pull)With(Go|)Git))]") + ''; meta = with lib; { description = "Running git UI commands"; From 9d09650cef6cf183500d3e4c8ae0356fa0e878e4 Mon Sep 17 00:00:00 2001 From: "Berk D. Demir" Date: Sun, 1 May 2022 23:15:08 +0000 Subject: [PATCH 08/86] kompose: Fix test dependencies Bug fixed by #173702 runs the previously skipped tests for this package. --- pkgs/applications/networking/cluster/kompose/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/kompose/default.nix b/pkgs/applications/networking/cluster/kompose/default.nix index 2b80dfc6815a3..a4081408871ac 100644 --- a/pkgs/applications/networking/cluster/kompose/default.nix +++ b/pkgs/applications/networking/cluster/kompose/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, kompose }: +{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, kompose, git }: buildGoModule rec { pname = "kompose"; @@ -13,7 +13,7 @@ buildGoModule rec { vendorSha256 = "sha256-OR5U2PnebO0a+lwU09Dveh0Yxk91cmSRorTxQIO5lHc="; - nativeBuildInputs = [ installShellFiles ]; + nativeBuildInputs = [ installShellFiles git ]; ldflags = [ "-s" "-w" ]; From 7fd749009f63569a6e862527dcea661495277e90 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 19 Apr 2022 17:00:36 -0700 Subject: [PATCH 09/86] stdenv: force gmp to rebuild in stage4 of the bootstrap As explained in the comment, this ensures that stage4-coreutils does not leak a reference to the bootstrap-files by way of libgmp. This will allow the next patch in this series to build stage4-coreutils using a dynamically-linked (rather than statically-linked) libgmp. --- pkgs/stdenv/linux/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index d625ab5b30132..e10393dd655c4 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -336,7 +336,7 @@ in # because gcc (since JAR support) already depends on zlib, and # then if we already have a zlib we want to use that for the # other purposes (binutils and top-level pkgs) too. - inherit (prevStage) gettext gnum4 bison gmp perl texinfo zlib linuxHeaders libidn2 libunistring; + inherit (prevStage) gettext gnum4 bison perl texinfo zlib linuxHeaders libidn2 libunistring; ${localSystem.libc} = getLibc prevStage; binutils = super.binutils.override { # Don't use stdenv's shell but our own @@ -347,6 +347,11 @@ in }; }; + # force gmp to rebuild so we have the option of dynamically linking + # libgmp without creating a reference path from: + # stage5.gcc -> stage4.coreutils -> stage3.glibc -> bootstrap + gmp = super.gmp.override { stdenv = self.stdenv; }; + gcc = lib.makeOverridable (import ../../build-support/cc-wrapper) { nativeTools = false; nativeLibc = false; @@ -417,7 +422,7 @@ in # Simple executable tools concatMap (p: [ (getBin p) (getLib p) ]) [ gzip bzip2 xz bash binutils.bintools coreutils diffutils findutils - gawk gnumake gnused gnutar gnugrep gnupatch patchelf ed file + gawk gmp gnumake gnused gnutar gnugrep gnupatch patchelf ed file ] # Library dependencies ++ map getLib ( From 122b6930b0b5b8aa9911c6025ed12a7e5a8b9fab Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 19 Apr 2022 16:07:01 -0700 Subject: [PATCH 10/86] stdenv: cause makeStaticLibraries usage to agree with usage spec The usage of `makeStaticLibraries` in stdenv/linux/default.nix is prefaced by this comment: # Link GCC statically against GMP etc. This makes sense because # these builds of the libraries are only used by GCC, so it # reduces the size of the stdenv closure. However "these builds of the libraries are only used by GCC" is not actually true. As currently written, the stage4 coreutils links against these customized, static-ified libraries. Beside the fact that the code doesn't actually do what it says, this causes other problems as well. One example is #168983, which arises because have a dynamically-linked binary (coreutils) which is built from statically-linked libraries (libgmp.a); doing this causes mayhem on platforms where `-fstack-protector` needs an auxiliary `libssp.{so,a}` library; we end up with link failures because some parts of the resulting binary want `libssp.so` and other parts want `libssp_nonshared.a`. Let's make the code actually do what the comment says, by moving these definitions into the `gcc-unwrapped` override. This will cause the stage4-coreutils to link against libgmp dynamically, rather than statically. For this reason this commit depends on the previous commit, which allows that to be done without creating a forbidden reference from stdenv-final to the bootstrap-files. --- pkgs/stdenv/linux/default.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index e10393dd655c4..490840f254cba 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -304,15 +304,14 @@ in binutils coreutils gnugrep perl patchelf linuxHeaders gnum4 bison libidn2 libunistring; ${localSystem.libc} = getLibc prevStage; - # Link GCC statically against GMP etc. This makes sense because - # these builds of the libraries are only used by GCC, so it - # reduces the size of the stdenv closure. - gmp = super.gmp.override { stdenv = self.makeStaticLibraries self.stdenv; }; - mpfr = super.mpfr.override { stdenv = self.makeStaticLibraries self.stdenv; }; - libmpc = super.libmpc.override { stdenv = self.makeStaticLibraries self.stdenv; }; - isl_0_20 = super.isl_0_20.override { stdenv = self.makeStaticLibraries self.stdenv; }; gcc-unwrapped = super.gcc-unwrapped.override { - isl = isl_0_20; + # Link GCC statically against GMP etc. This makes sense because + # these builds of the libraries are only used by GCC, so it + # reduces the size of the stdenv closure. + gmp = super.gmp.override { stdenv = self.makeStaticLibraries self.stdenv; }; + mpfr = super.mpfr.override { stdenv = self.makeStaticLibraries self.stdenv; }; + libmpc = super.libmpc.override { stdenv = self.makeStaticLibraries self.stdenv; }; + isl = super.isl_0_20.override { stdenv = self.makeStaticLibraries self.stdenv; }; # Use a deterministically built compiler # see https://github.com/NixOS/nixpkgs/issues/108475 for context reproducibleBuild = true; From 23ea8b35dacd9152c9e0e21577d5afe3e39b6255 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 19 Apr 2022 17:04:58 -0700 Subject: [PATCH 11/86] stdenv: label the ephemeral coreutils-stage4 package During stdenv bootstrapping, coreutils is built twice. This makes troubleshooting very difficult, because both packages have name="coreutils", so it is a hassle to figure out "which coreutils am I using / is not building"? The first of these builds is used only in stage4, and is not part of the final stdenv. Let's label that one with a different `name` attribute to make it obvious which is which. --- pkgs/stdenv/linux/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 490840f254cba..ad5a91f9340ee 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -351,6 +351,9 @@ in # stage5.gcc -> stage4.coreutils -> stage3.glibc -> bootstrap gmp = super.gmp.override { stdenv = self.stdenv; }; + # coreutils gets rebuilt both here and also in the final stage; we rename this one to avoid confusion + coreutils = super.coreutils.overrideAttrs (a: a // { name = "coreutils-stage4"; }); + gcc = lib.makeOverridable (import ../../build-support/cc-wrapper) { nativeTools = false; nativeLibc = false; From a9e0d864119c0313ece2cbb836c71821818e38c1 Mon Sep 17 00:00:00 2001 From: Adam Joseph <54836058+a-m-joseph@users.noreply.github.com> Date: Wed, 20 Apr 2022 22:45:14 +0000 Subject: [PATCH 12/86] Update pkgs/stdenv/linux/default.nix Co-authored-by: sternenseemann --- pkgs/stdenv/linux/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index ad5a91f9340ee..4983c819216a7 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -352,7 +352,7 @@ in gmp = super.gmp.override { stdenv = self.stdenv; }; # coreutils gets rebuilt both here and also in the final stage; we rename this one to avoid confusion - coreutils = super.coreutils.overrideAttrs (a: a // { name = "coreutils-stage4"; }); + coreutils = super.coreutils.overrideAttrs (_: { pname = "coreutils-stage4"; }); gcc = lib.makeOverridable (import ../../build-support/cc-wrapper) { nativeTools = false; From 02630180fad510ee877fa51112b7c7b230ef2f13 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 27 Apr 2022 00:27:19 -0700 Subject: [PATCH 13/86] stdenv: add -stageX markers to gmp, mpfr, libmpc, and isl --- pkgs/stdenv/linux/default.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 4983c819216a7..4e68b8c9a50b0 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -304,14 +304,18 @@ in binutils coreutils gnugrep perl patchelf linuxHeaders gnum4 bison libidn2 libunistring; ${localSystem.libc} = getLibc prevStage; - gcc-unwrapped = super.gcc-unwrapped.override { + gcc-unwrapped = + let makeStaticLibrariesAndMark = pkg: + lib.makeOverridable (pkg.override { stdenv = self.makeStaticLibraries self.stdenv; }) + .overrideAttrs (a: { pname = "${a.pname}-stage3"; }); + in super.gcc-unwrapped.override { # Link GCC statically against GMP etc. This makes sense because # these builds of the libraries are only used by GCC, so it # reduces the size of the stdenv closure. - gmp = super.gmp.override { stdenv = self.makeStaticLibraries self.stdenv; }; - mpfr = super.mpfr.override { stdenv = self.makeStaticLibraries self.stdenv; }; - libmpc = super.libmpc.override { stdenv = self.makeStaticLibraries self.stdenv; }; - isl = super.isl_0_20.override { stdenv = self.makeStaticLibraries self.stdenv; }; + gmp = makeStaticLibrariesAndMark super.gmp; + mpfr = makeStaticLibrariesAndMark super.mpfr; + libmpc = makeStaticLibrariesAndMark super.libmpc; + isl = makeStaticLibrariesAndMark super.isl_0_20; # Use a deterministically built compiler # see https://github.com/NixOS/nixpkgs/issues/108475 for context reproducibleBuild = true; @@ -349,10 +353,10 @@ in # force gmp to rebuild so we have the option of dynamically linking # libgmp without creating a reference path from: # stage5.gcc -> stage4.coreutils -> stage3.glibc -> bootstrap - gmp = super.gmp.override { stdenv = self.stdenv; }; + gmp = lib.makeOverridable (super.gmp.override { stdenv = self.stdenv; }).overrideAttrs (a: { pname = "${a.pname}-stage4"; }); # coreutils gets rebuilt both here and also in the final stage; we rename this one to avoid confusion - coreutils = super.coreutils.overrideAttrs (_: { pname = "coreutils-stage4"; }); + coreutils = super.coreutils.overrideAttrs (a: { pname = "${a.pname}-stage4"; }); gcc = lib.makeOverridable (import ../../build-support/cc-wrapper) { nativeTools = false; From 1b2929cd91ad76a9b46555d01beb8a0f84ccb418 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Mon, 6 Jun 2022 20:13:07 +0200 Subject: [PATCH 14/86] gnupg: 2.3.4 -> 2.3.6 --- pkgs/tools/security/gnupg/23.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/gnupg/23.nix b/pkgs/tools/security/gnupg/23.nix index d9ad2d0a276fc..3687a1e9582e5 100644 --- a/pkgs/tools/security/gnupg/23.nix +++ b/pkgs/tools/security/gnupg/23.nix @@ -15,11 +15,11 @@ assert guiSupport -> pinentry != null && enableMinimal == false; stdenv.mkDerivation rec { pname = "gnupg"; - version = "2.3.4"; + version = "2.3.6"; src = fetchurl { url = "mirror://gnupg/gnupg/${pname}-${version}.tar.bz2"; - sha256 = "sha256-80aOyvsdf5rXtR/R23rr8XzridLvqKBc8vObTUBUAq4="; + sha256 = "sha256-Iff+L8XC8hQYSrBQl37HqOME5Yv64qsJj+xp+Pq9qcE="; }; depsBuildBuild = [ buildPackages.stdenv.cc ]; From 61beb33b83c16339fdcd96680d2942040730679e Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Tue, 7 Jun 2022 10:21:40 -0700 Subject: [PATCH 15/86] Revert "perlPackages: add default meta.mainProgram (#176398)" This reverts commit ff7b216dcf3b3396b24ebd73204f6841839bdd2a. --- pkgs/development/perl-modules/generic/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/perl-modules/generic/default.nix b/pkgs/development/perl-modules/generic/default.nix index aa8d66f037adf..9ff63c14e5188 100644 --- a/pkgs/development/perl-modules/generic/default.nix +++ b/pkgs/development/perl-modules/generic/default.nix @@ -35,7 +35,6 @@ lib.warnIf (attrs ? name) "builtPerlPackage: `name' (\"${attrs.name}\") is depre (let defaultMeta = { homepage = "https://metacpan.org/release/${lib.getName attrs}"; # TODO: phase-out `attrs.name` - mainProgram = attrs.pname or (builtins.parseDrvName attrs.name).name; platforms = perl.meta.platforms; }; From 399732b449262e8e3183fd239274b284901c8d08 Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Tue, 7 Jun 2022 11:03:48 -0700 Subject: [PATCH 16/86] buildPerlPackage: don't mess with `pname` and phase out use of `name` Currently `buildPerlPackage` prefixes the Perl version to the package's `pname`, which results in `nix run` not being able to work for any packages build with it out of the box. This commit corrects that and phases out the ability to set `name` directly, as well as refactors the code to not require `cleanedAttrs`. --- doc/languages-frameworks/perl.section.md | 26 +++++++++++-------- .../perl-modules/generic/default.nix | 22 +++++----------- 2 files changed, 21 insertions(+), 27 deletions(-) diff --git a/doc/languages-frameworks/perl.section.md b/doc/languages-frameworks/perl.section.md index 9bfd209fec5a4..28a78cc234410 100644 --- a/doc/languages-frameworks/perl.section.md +++ b/doc/languages-frameworks/perl.section.md @@ -1,6 +1,6 @@ # Perl {#sec-language-perl} -## Running perl programs on the shell {#ssec-perl-running} +## Running Perl programs on the shell {#ssec-perl-running} When executing a Perl script, it is possible you get an error such as `./myscript.pl: bad interpreter: /usr/bin/perl: no such file or directory`. This happens when the script expects Perl to be installed at `/usr/bin/perl`, which is not the case when using Perl from nixpkgs. You can fix the script by changing the first line to: @@ -35,15 +35,16 @@ Perl packages from CPAN are defined in [pkgs/top-level/perl-packages.nix](https: ```nix ClassC3 = buildPerlPackage rec { - name = "Class-C3-0.21"; + pname = "Class-C3"; + version = "0.21"; src = fetchurl { - url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz"; + url = "mirror://cpan/authors/id/F/FL/FLORA/${pname}-${version}.tar.gz"; sha256 = "1bl8z095y4js66pwxnm7s853pi9czala4sqc743fdlnk27kq94gz"; }; }; ``` -Note the use of `mirror://cpan/`, and the `${name}` in the URL definition to ensure that the name attribute is consistent with the source that we’re actually downloading. Perl packages are made available in `all-packages.nix` through the variable `perlPackages`. For instance, if you have a package that needs `ClassC3`, you would typically write +Note the use of `mirror://cpan/`, and the `pname` and `version` in the URL definition to ensure that the `pname` attribute is consistent with the source that we’re actually downloading. Perl packages are made available in `all-packages.nix` through the variable `perlPackages`. For instance, if you have a package that needs `ClassC3`, you would typically write ```nix foo = import ../path/to/foo.nix { @@ -72,10 +73,11 @@ So what does `buildPerlPackage` do? It does the following: { buildPerlPackage, fetchurl, db }: buildPerlPackage rec { - name = "BerkeleyDB-0.36"; + pname = "BerkeleyDB"; + version = "0.36"; src = fetchurl { - url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz"; + url = "mirror://cpan/authors/id/P/PM/PMQS/${pname}-${version}.tar.gz"; sha256 = "07xf50riarb60l1h6m2dqmql8q5dij619712fsgw7ach04d8g3z1"; }; @@ -90,9 +92,10 @@ Dependencies on other Perl packages can be specified in the `buildInputs` and `p ```nix ClassC3Componentised = buildPerlPackage rec { - name = "Class-C3-Componentised-1.0004"; + pname = "Class-C3-Componentised"; + version = "1.0004"; src = fetchurl { - url = "mirror://cpan/authors/id/A/AS/ASH/${name}.tar.gz"; + url = "mirror://cpan/authors/id/A/AS/ASH/${pname}-${version}.tar.gz"; sha256 = "0xql73jkcdbq4q9m0b0rnca6nrlvf5hyzy8is0crdk65bynvs8q1"; }; propagatedBuildInputs = [ @@ -111,7 +114,7 @@ ImageExifTool = buildPerlPackage { version = "11.50"; src = fetchurl { - url = "https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-11.50.tar.gz"; + url = "https://www.sno.phy.queensu.ca/~phil/exiftool/${pname}-${version}.tar.gz"; sha256 = "0d8v48y94z8maxkmw1rv7v9m0jg2dc8xbp581njb6yhr7abwqdv3"; }; @@ -139,9 +142,10 @@ This program takes a Perl module name, looks it up on CPAN, fetches and unpacks ```ShellSession $ nix-generate-from-cpan XML::Simple XMLSimple = buildPerlPackage rec { - name = "XML-Simple-2.22"; + pname = "XML-Simple"; + version = "2.22"; src = fetchurl { - url = "mirror://cpan/authors/id/G/GR/GRANTM/${name}.tar.gz"; + url = "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-2.22.tar.gz"; sha256 = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49"; }; propagatedBuildInputs = [ XMLNamespaceSupport XMLSAX XMLSAXExpat ]; diff --git a/pkgs/development/perl-modules/generic/default.nix b/pkgs/development/perl-modules/generic/default.nix index 9ff63c14e5188..2d1c550d3168c 100644 --- a/pkgs/development/perl-modules/generic/default.nix +++ b/pkgs/development/perl-modules/generic/default.nix @@ -27,26 +27,16 @@ , ... }@attrs: -assert attrs?pname -> attrs?version; -assert attrs?pname -> !(attrs?name); - -lib.warnIf (attrs ? name) "builtPerlPackage: `name' (\"${attrs.name}\") is deprecated, use `pname' and `version' instead" +lib.throwIf (attrs ? name) "buildPerlPackage: `name` (\"${attrs.name}\") is deprecated, use `pname` and `version` instead" (let defaultMeta = { - homepage = "https://metacpan.org/release/${lib.getName attrs}"; # TODO: phase-out `attrs.name` - platforms = perl.meta.platforms; + homepage = "https://metacpan.org/dist/${attrs.pname}"; + inherit (perl.meta) platforms; }; - cleanedAttrs = builtins.removeAttrs attrs [ - "meta" "builder" "version" "pname" "fullperl" - "buildInputs" "nativeBuildInputs" "buildInputs" - "PERL_AUTOINSTALL" "AUTOMATED_TESTING" "PERL_USE_UNSAFE_INC" - ]; - - package = stdenv.mkDerivation ({ - pname = "perl${perl.version}-${lib.getName attrs}"; # TODO: phase-out `attrs.name` - version = lib.getVersion attrs; # TODO: phase-out `attrs.name` + package = stdenv.mkDerivation (attrs // { + name = "perl${perl.version}-${attrs.pname}-${attrs.version}"; builder = ./builder.sh; @@ -59,6 +49,6 @@ lib.warnIf (attrs ? name) "builtPerlPackage: `name' (\"${attrs.name}\") is depre inherit PERL_AUTOINSTALL AUTOMATED_TESTING PERL_USE_UNSAFE_INC; meta = defaultMeta // (attrs.meta or { }); - } // cleanedAttrs); + }); in toPerlModule package) From d276229d7c868c3a58bbe7b1cfd39ab8849cf632 Mon Sep 17 00:00:00 2001 From: Maxine Aubrey Date: Fri, 17 Jun 2022 10:24:31 +0200 Subject: [PATCH 17/86] ell: 0.50 -> 0.51 https://git.kernel.org/pub/scm/libs/ell/ell.git/tree/ChangeLog?h=0.51 --- pkgs/os-specific/linux/ell/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/ell/default.nix b/pkgs/os-specific/linux/ell/default.nix index 43b65f5ae7be6..da2488bd75da7 100644 --- a/pkgs/os-specific/linux/ell/default.nix +++ b/pkgs/os-specific/linux/ell/default.nix @@ -7,14 +7,14 @@ stdenv.mkDerivation rec { pname = "ell"; - version = "0.50"; + version = "0.51"; outputs = [ "out" "dev" ]; src = fetchgit { url = "https://git.kernel.org/pub/scm/libs/ell/ell.git"; rev = version; - sha256 = "sha256-LQAbE/pAKjVFsn9FjIbvY6sTBcVBdi4LCOnDVZ/WGV0="; + sha256 = "sha256-UGc6msj+V3U7IzquD4+KDLWt1vUxdV2Qm9Y0FOmsqtc="; }; nativeBuildInputs = [ From 518f3eab1754f305101200f57fd00f254250256f Mon Sep 17 00:00:00 2001 From: Maxine Aubrey Date: Fri, 17 Jun 2022 10:24:45 +0200 Subject: [PATCH 18/86] iwd: 1.27 -> 1.28 https://git.kernel.org/pub/scm/network/wireless/iwd.git/tree/ChangeLog?h=1.28 --- pkgs/os-specific/linux/iwd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/iwd/default.nix b/pkgs/os-specific/linux/iwd/default.nix index 424a1d1a50e5b..f83d96d787cf7 100644 --- a/pkgs/os-specific/linux/iwd/default.nix +++ b/pkgs/os-specific/linux/iwd/default.nix @@ -12,12 +12,12 @@ stdenv.mkDerivation rec { pname = "iwd"; - version = "1.27"; + version = "1.28"; src = fetchgit { url = "https://git.kernel.org/pub/scm/network/wireless/iwd.git"; rev = version; - sha256 = "sha256-gN9+9Cc6zjZBXDhcHBH5wyucO5/vL7bKSLWM5laFqaA="; + sha256 = "sha256-UAhgmXTbCgxja8nniexr6+jkzHIOMn9k1Cp8oMuskk0="; }; outputs = [ "out" "man" "doc" ] From 98d99554a8acf95a8d7fceaa74e9f8d6af66c918 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 19 Jun 2022 08:55:48 +0100 Subject: [PATCH 19/86] iproute: 5.17.0 -> 5.18.0 changes: https://lore.kernel.org/lkml/20220526165004.69f0dfba@hermes.local/T/ --- pkgs/os-specific/linux/iproute/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/iproute/default.nix b/pkgs/os-specific/linux/iproute/default.nix index 64c54306333a3..4d06e82fcaef1 100644 --- a/pkgs/os-specific/linux/iproute/default.nix +++ b/pkgs/os-specific/linux/iproute/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { pname = "iproute2"; - version = "5.17.0"; + version = "5.18.0"; src = fetchurl { url = "mirror://kernel/linux/utils/net/${pname}/${pname}-${version}.tar.xz"; - sha256 = "bjhPG0LHXhqdqsV4Zto33P+QkJC6huslpudk2niTZg4="; + sha256 = "W6PUZNUcjCg1UNUH/6w9EPeuxYe3xmsMy2lQZDZGOJ4="; }; patches = [ From 148eea3390a0eaad6d15c64ddf1faed4c11bab17 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 19 Jun 2022 09:15:44 +0100 Subject: [PATCH 20/86] re2: 2022-04-01 -> 2022-06-01 --- pkgs/development/libraries/re2/default.nix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/re2/default.nix b/pkgs/development/libraries/re2/default.nix index 6ad8e06b1456c..38a5194b1b3f8 100644 --- a/pkgs/development/libraries/re2/default.nix +++ b/pkgs/development/libraries/re2/default.nix @@ -15,13 +15,13 @@ stdenv.mkDerivation rec { pname = "re2"; - version = "2022-04-01"; + version = "2022-06-01"; src = fetchFromGitHub { owner = "google"; repo = "re2"; rev = version; - sha256 = "sha256-ywmXIAyVWYMKBOsAndcq7dFYpn9ZgNz5YWTPjylXxsk="; + sha256 = "sha256-UontAjOXpnPcOgoFHjf+1WSbCR7h58/U7nn4meT200Y="; }; preConfigure = '' @@ -33,11 +33,6 @@ stdenv.mkDerivation rec { buildFlags = lib.optionals stdenv.hostPlatform.isStatic [ "static" ]; enableParallelBuilding = true; - # Broken when shared/static are tested in parallel: - # cp: cannot create regular file 'obj/testinstall.cc': File exists - # make: *** [Makefile:334: static-testinstall] Error 1 - # Will be fixed by https://code-review.googlesource.com/c/re2/+/59830 - enableParallelChecking = false; preCheck = "patchShebangs runtests"; doCheck = true; From 30bfac609563c402d7fdb58cf5b0cbfb992e22b9 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Mon, 20 Jun 2022 13:09:32 -0400 Subject: [PATCH 21/86] texinfo: fix build references when cross-compiling The XS modules were being built for the build platform, and the perl scripts had build platform shebangs. It is possible to build the XS modules by passing PERL_EXT_CC=${stdenv.cc.targetPrefix}cc and --enable-perl-xs=yes, but they fail to load due to a handshake key mismatch. Instead, I just decided to disable the XS modules and use the pure Perl fallbacks when cross-compiling. The shebangs were fixed manually using substituteInPlace. --- pkgs/development/tools/misc/texinfo/common.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/texinfo/common.nix b/pkgs/development/tools/misc/texinfo/common.nix index e5814e9bda4c2..df3b12ea5b688 100644 --- a/pkgs/development/tools/misc/texinfo/common.nix +++ b/pkgs/development/tools/misc/texinfo/common.nix @@ -36,8 +36,7 @@ stdenv.mkDerivation { strictDeps = true; enableParallelBuilding = true; - # We need a native compiler to build perl XS extensions - # when cross-compiling. + # A native compiler is needed to build tools needed at build time depsBuildBuild = [ buildPackages.stdenv.cc perl ]; buildInputs = [ xz.bin bash libintl ] @@ -45,6 +44,9 @@ stdenv.mkDerivation { ++ optional interactive ncurses; configureFlags = [ "PERL=${buildPackages.perl}/bin/perl" ] + # Perl XS modules are difficult to cross-compile and texinfo has pure Perl + # fallbacks. + ++ optional crossBuildTools "--enable-perl-xs=no" ++ lib.optional stdenv.isSunOS "AWK=${gawk}/bin/awk"; installFlags = [ "TEXMF=$(out)/texmf-dist" ]; @@ -62,6 +64,13 @@ stdenv.mkDerivation { "XFAIL_TESTS=test_scripts/layout_formatting_fr_icons.sh" ]; + postFixup = optionalString crossBuildTools '' + for f in "$out"/bin/{pod2texi,texi2any}; do + substituteInPlace "$f" \ + --replace ${buildPackages.perl}/bin/perl ${perl}/bin/perl + done + ''; + meta = { homepage = "https://www.gnu.org/software/texinfo/"; description = "The GNU documentation system"; From 350e8ad0e4fc7723e327c53bd5580e41c8c8a4f8 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Mon, 20 Jun 2022 13:42:57 -0400 Subject: [PATCH 22/86] gpm: fix texinfo dependency platform when cross-compiling texinfo is a nativeBuildInput, but it is overridden in all-packages.nix, which breaks splicing. Therefore, buildPackages.texinfo needs to be used explicitly in the override. This wasn't actually causing any problems because texinfo's scripts were using build platform Perl shebangs. Once texinfo was fixed, gpm started failing to cross-compile. --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 61f2b45b2dfdf..a49ab8311282b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23224,7 +23224,7 @@ with pkgs; # latest 6.8 mysteriously fails to parse '@headings single': # https://lists.gnu.org/archive/html/bug-texinfo/2021-09/msg00011.html - texinfo = texinfo6_7; + texinfo = buildPackages.texinfo6_7; }; gpm-ncurses = gpm.override { inherit ncurses; }; From 033cfacaf25a640404103904922d3532a037445e Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 21 Jun 2022 02:03:11 -0300 Subject: [PATCH 23/86] cmake: reformat expression --- .../tools/build-managers/cmake/default.nix | 89 ++++++++++++------- 1 file changed, 59 insertions(+), 30 deletions(-) diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index f7fab1c01765a..a63e79464752c 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -1,15 +1,30 @@ -{ stdenv, lib, fetchurl, pkg-config -, bzip2, curlMinimal, expat, libarchive, xz, zlib, libuv, rhash +{ lib +, stdenv , buildPackages -# darwin attributes +, bzip2 +, curlMinimal +, expat +, fetchurl +, libarchive +, libuv +, ncurses +, openssl +, pkg-config +, qtbase +, rhash +, sphinx +, texinfo +, wrapQtAppsHook +, xz +, zlib , SystemConfiguration , ps , isBootstrap ? false +, useNcurses ? false +, useOpenSSL ? !isBootstrap , useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin) -, useOpenSSL ? !isBootstrap, openssl -, useNcurses ? false, ncurses -, withQt5 ? false, qtbase, wrapQtAppsHook -, buildDocs ? (!isBootstrap && (useNcurses || withQt5)), sphinx, texinfo +, withQt5 ? false +, buildDocs ? (!isBootstrap && (useNcurses || withQt5)) }: stdenv.mkDerivation rec { @@ -40,23 +55,34 @@ stdenv.mkDerivation rec { # On Darwin, always set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG. ++ lib.optional stdenv.isDarwin ./darwin-always-set-runtime-c-flag.patch; - outputs = [ "out" ] - ++ lib.optionals buildDocs [ "man" "info" ]; + outputs = [ "out" ] ++ lib.optionals buildDocs [ "man" "info" ]; setOutputFlags = false; setupHook = ./setup-hook.sh; depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ setupHook pkg-config ] - ++ lib.optionals buildDocs [ texinfo ] - ++ lib.optionals withQt5 [ wrapQtAppsHook ]; - - buildInputs = lib.optionals useSharedLibraries [ bzip2 curlMinimal expat libarchive xz zlib libuv rhash ] - ++ lib.optional useOpenSSL openssl - ++ lib.optional useNcurses ncurses - ++ lib.optional withQt5 qtbase - ++ lib.optional (stdenv.isDarwin && !isBootstrap) SystemConfiguration; + nativeBuildInputs = [ + pkg-config + setupHook + ] + ++ lib.optionals buildDocs [ texinfo ] + ++ lib.optionals withQt5 [ wrapQtAppsHook ]; + + buildInputs = lib.optionals useSharedLibraries [ + bzip2 + curlMinimal + expat + libarchive + xz + zlib + libuv + rhash + ] + ++ lib.optional useOpenSSL openssl + ++ lib.optional useNcurses ncurses + ++ lib.optional withQt5 qtbase + ++ lib.optional (stdenv.isDarwin && !isBootstrap) SystemConfiguration; propagatedBuildInputs = lib.optional stdenv.isDarwin ps; @@ -73,18 +99,21 @@ stdenv.mkDerivation rec { configureFlags = [ "CXXFLAGS=-Wno-elaborated-enum-base" "--docdir=share/doc/${pname}${version}" - ] ++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup + ] ++ (if useSharedLibraries + then [ "--no-system-jsoncpp" "--system-libs" ] + else [ "--no-system-libs" ]) # FIXME: cleanup ++ lib.optional withQt5 "--qt-gui" ++ lib.optionals buildDocs [ "--sphinx-build=${sphinx}/bin/sphinx-build" - "--sphinx-man" "--sphinx-info" + "--sphinx-man" ] # Workaround https://gitlab.kitware.com/cmake/cmake/-/issues/20568 ++ lib.optionals stdenv.hostPlatform.is32bit [ "CFLAGS=-D_FILE_OFFSET_BITS=64" "CXXFLAGS=-D_FILE_OFFSET_BITS=64" - ] ++ [ + ] + ++ [ "--" # We should set the proper `CMAKE_SYSTEM_NAME`. # http://www.cmake.org/Wiki/CMake_Cross_Compiling @@ -118,19 +147,19 @@ stdenv.mkDerivation rec { doCheck = false; # fails meta = with lib; { - broken = (withQt5 && stdenv.isDarwin); homepage = "https://cmake.org/"; - changelog = "https://cmake.org/cmake/help/v${lib.versions.majorMinor version}/release/${lib.versions.majorMinor version}.html"; - description = "Cross-Platform Makefile Generator"; + description = "Cross-platform, open-source build system generator"; longDescription = '' - CMake is an open-source, cross-platform family of tools designed to - build, test and package software. CMake is used to control the software + CMake is an open-source, cross-platform family of tools designed to build, + test and package software. CMake is used to control the software compilation process using simple platform and compiler independent - configuration files, and generate native makefiles and workspaces that - can be used in the compiler environment of your choice. + configuration files, and generate native makefiles and workspaces that can + be used in the compiler environment of your choice. ''; - platforms = platforms.all; - maintainers = with maintainers; [ ttuegel lnl7 ]; + changelog = "https://cmake.org/cmake/help/v${lib.versions.majorMinor version}/release/${lib.versions.majorMinor version}.html"; license = licenses.bsd3; + maintainers = with maintainers; [ ttuegel lnl7 ]; + platforms = platforms.all; + broken = (withQt5 && stdenv.isDarwin); }; } From 131a97e8c8790621fde729335339668463a4604f Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 22 Jun 2022 23:08:05 +0100 Subject: [PATCH 24/86] gnu-efi: pull fix pending upstream inclusion for parallel build failures Without the change parallel build fails as: gcc -I/build/gnu-efi-code//lib ... -c lib/runtime/rtstr.c -o runtime/rtstr.o Assembler messages: Fatal error: can't create runtime/rtstr.o: No such file or directory --- pkgs/development/libraries/gnu-efi/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/libraries/gnu-efi/default.nix b/pkgs/development/libraries/gnu-efi/default.nix index f331a8f753b9f..a49e0fad215c6 100644 --- a/pkgs/development/libraries/gnu-efi/default.nix +++ b/pkgs/development/libraries/gnu-efi/default.nix @@ -12,6 +12,16 @@ stdenv.mkDerivation rec { sha256 = "tztkOg1Wl9HzltdDFEjoht2AVmh4lXjj4aKCd8lShDU="; }; + patches = [ + # Pull fix pending upstream inclusion for parallel builds + # https://sourceforge.net/p/gnu-efi/patches/84/ + (fetchurl { + name = "parallel-build.patch"; + url = "https://sourceforge.net/p/gnu-efi/patches/84/attachment/0001-lib-Makefile-add-.o-file-dependency-on-libsubdirs-ta.patch"; + sha256 = "sha256-+2UwV2lopdB/tazib1BLzO1E3GgB1L8dZsSQKWVoLwA="; + }) + ]; + buildInputs = [ pciutils ]; hardeningDisable = [ "stackprotector" ]; From d6f12ab2f64aa8b1523e9d02d4b1e92bfde8432f Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 21 Jun 2022 02:10:08 -0300 Subject: [PATCH 25/86] cmake: use a list of suitable uiToolkits instead of Boolean values Also, aborts when the list contains anything besides the acceptable options. --- .../tools/build-managers/cmake/default.nix | 27 +++++++++++-------- pkgs/top-level/all-packages.nix | 8 ++++-- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index a63e79464752c..4ed7006d77b83 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -20,18 +20,23 @@ , SystemConfiguration , ps , isBootstrap ? false -, useNcurses ? false , useOpenSSL ? !isBootstrap , useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin) -, withQt5 ? false -, buildDocs ? (!isBootstrap && (useNcurses || withQt5)) +, uiToolkits ? [] # can contain "ncurses" and/or "qt5" +, buildDocs ? !(isBootstrap || (uiToolkits == [])) }: +let + cursesUI = lib.elem "ncurses" uiToolkits; + qt5UI = lib.elem "qt5" uiToolkits; +in +# Accepts only "ncurses" and "qt5" as possible uiToolkits +assert lib.subtractLists [ "ncurses" "qt5" ] uiToolkits == []; stdenv.mkDerivation rec { pname = "cmake" + lib.optionalString isBootstrap "-boot" - + lib.optionalString useNcurses "-cursesUI" - + lib.optionalString withQt5 "-qt5UI"; + + lib.optionalString cursesUI "-cursesUI" + + lib.optionalString qt5UI "-qt5UI"; version = "3.22.3"; src = fetchurl { @@ -67,7 +72,7 @@ stdenv.mkDerivation rec { setupHook ] ++ lib.optionals buildDocs [ texinfo ] - ++ lib.optionals withQt5 [ wrapQtAppsHook ]; + ++ lib.optionals qt5UI [ wrapQtAppsHook ]; buildInputs = lib.optionals useSharedLibraries [ bzip2 @@ -80,8 +85,8 @@ stdenv.mkDerivation rec { rhash ] ++ lib.optional useOpenSSL openssl - ++ lib.optional useNcurses ncurses - ++ lib.optional withQt5 qtbase + ++ lib.optional cursesUI ncurses + ++ lib.optional qt5UI qtbase ++ lib.optional (stdenv.isDarwin && !isBootstrap) SystemConfiguration; propagatedBuildInputs = lib.optional stdenv.isDarwin ps; @@ -102,7 +107,7 @@ stdenv.mkDerivation rec { ] ++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup - ++ lib.optional withQt5 "--qt-gui" + ++ lib.optional qt5UI "--qt-gui" ++ lib.optionals buildDocs [ "--sphinx-build=${sphinx}/bin/sphinx-build" "--sphinx-info" @@ -129,7 +134,7 @@ stdenv.mkDerivation rec { "-DCMAKE_USE_OPENSSL=${if useOpenSSL then "ON" else "OFF"}" # Avoid depending on frameworks. - "-DBUILD_CursesDialog=${if useNcurses then "ON" else "OFF"}" + "-DBUILD_CursesDialog=${if cursesUI then "ON" else "OFF"}" ]; # make install attempts to use the just-built cmake @@ -160,6 +165,6 @@ stdenv.mkDerivation rec { license = licenses.bsd3; maintainers = with maintainers; [ ttuegel lnl7 ]; platforms = platforms.all; - broken = (withQt5 && stdenv.isDarwin); + broken = (qt5UI && stdenv.isDarwin); }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 26a59d4cbdd6e..2147f7c0a9228 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15388,9 +15388,13 @@ with pkgs; SystemConfiguration = null; }; - cmakeCurses = cmake.override { useNcurses = true; }; + cmakeCurses = cmake.override { + uiToolkits = [ "ncurses" ]; + }; - cmakeWithGui = cmakeCurses.override { withQt5 = true; }; + cmakeWithGui = cmake.override { + uiToolkits = [ "ncurses" "qt5" ]; + }; cmake-format = python3Packages.callPackage ../development/tools/cmake-format { }; From 02155ca9164e4649f5633f6466840dd685e876de Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Wed, 22 Jun 2022 22:11:09 -0300 Subject: [PATCH 26/86] cmake: rename patches Because it is easier to look at them as a block, not polluting the directory listing so much. --- .../{search-path.patch => 001-search-path.diff} | 0 ...vices.patch => 002-application-services.diff} | 0 ...patch => 003-libuv-application-services.diff} | 0 .../{3.2.2-cygwin.patch => 004-cygwin.diff} | 0 ...h => 005-remove-systemconfiguration-dep.diff} | 0 ...=> 006-darwin-always-set-runtime-c-flag.diff} | 0 .../tools/build-managers/cmake/default.nix | 16 +++++++--------- 7 files changed, 7 insertions(+), 9 deletions(-) rename pkgs/development/tools/build-managers/cmake/{search-path.patch => 001-search-path.diff} (100%) rename pkgs/development/tools/build-managers/cmake/{application-services.patch => 002-application-services.diff} (100%) rename pkgs/development/tools/build-managers/cmake/{libuv-application-services.patch => 003-libuv-application-services.diff} (100%) rename pkgs/development/tools/build-managers/cmake/{3.2.2-cygwin.patch => 004-cygwin.diff} (100%) rename pkgs/development/tools/build-managers/cmake/{remove-systemconfiguration-dep.patch => 005-remove-systemconfiguration-dep.diff} (100%) rename pkgs/development/tools/build-managers/cmake/{darwin-always-set-runtime-c-flag.patch => 006-darwin-always-set-runtime-c-flag.diff} (100%) diff --git a/pkgs/development/tools/build-managers/cmake/search-path.patch b/pkgs/development/tools/build-managers/cmake/001-search-path.diff similarity index 100% rename from pkgs/development/tools/build-managers/cmake/search-path.patch rename to pkgs/development/tools/build-managers/cmake/001-search-path.diff diff --git a/pkgs/development/tools/build-managers/cmake/application-services.patch b/pkgs/development/tools/build-managers/cmake/002-application-services.diff similarity index 100% rename from pkgs/development/tools/build-managers/cmake/application-services.patch rename to pkgs/development/tools/build-managers/cmake/002-application-services.diff diff --git a/pkgs/development/tools/build-managers/cmake/libuv-application-services.patch b/pkgs/development/tools/build-managers/cmake/003-libuv-application-services.diff similarity index 100% rename from pkgs/development/tools/build-managers/cmake/libuv-application-services.patch rename to pkgs/development/tools/build-managers/cmake/003-libuv-application-services.diff diff --git a/pkgs/development/tools/build-managers/cmake/3.2.2-cygwin.patch b/pkgs/development/tools/build-managers/cmake/004-cygwin.diff similarity index 100% rename from pkgs/development/tools/build-managers/cmake/3.2.2-cygwin.patch rename to pkgs/development/tools/build-managers/cmake/004-cygwin.diff diff --git a/pkgs/development/tools/build-managers/cmake/remove-systemconfiguration-dep.patch b/pkgs/development/tools/build-managers/cmake/005-remove-systemconfiguration-dep.diff similarity index 100% rename from pkgs/development/tools/build-managers/cmake/remove-systemconfiguration-dep.patch rename to pkgs/development/tools/build-managers/cmake/005-remove-systemconfiguration-dep.diff diff --git a/pkgs/development/tools/build-managers/cmake/darwin-always-set-runtime-c-flag.patch b/pkgs/development/tools/build-managers/cmake/006-darwin-always-set-runtime-c-flag.diff similarity index 100% rename from pkgs/development/tools/build-managers/cmake/darwin-always-set-runtime-c-flag.patch rename to pkgs/development/tools/build-managers/cmake/006-darwin-always-set-runtime-c-flag.diff diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 4ed7006d77b83..84264fda47051 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -46,19 +46,17 @@ stdenv.mkDerivation rec { patches = [ # Don't search in non-Nix locations such as /usr, but do search in our libc. - ./search-path.patch - + ./001-search-path.diff # Don't depend on frameworks. - ./application-services.patch - + ./002-application-services.diff # Derived from https://github.com/libuv/libuv/commit/1a5d4f08238dd532c3718e210078de1186a5920d - ./libuv-application-services.patch - - ] ++ lib.optional stdenv.isCygwin ./3.2.2-cygwin.patch + ./003-libuv-application-services.diff + ] + ++ lib.optional stdenv.isCygwin ./004-cygwin.diff # Derived from https://github.com/curl/curl/commit/31f631a142d855f069242f3e0c643beec25d1b51 - ++ lib.optional (stdenv.isDarwin && isBootstrap) ./remove-systemconfiguration-dep.patch + ++ lib.optional (stdenv.isDarwin && isBootstrap) ./005-remove-systemconfiguration-dep.diff # On Darwin, always set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG. - ++ lib.optional stdenv.isDarwin ./darwin-always-set-runtime-c-flag.patch; + ++ lib.optional stdenv.isDarwin ./006-darwin-always-set-runtime-c-flag.diff; outputs = [ "out" ] ++ lib.optionals buildDocs [ "man" "info" ]; setOutputFlags = false; From cd39674dc035c5c46208e4a058e650d349069aff Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 21 Jun 2022 02:20:12 -0300 Subject: [PATCH 27/86] cmake: add myself as maintainer --- pkgs/development/tools/build-managers/cmake/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 84264fda47051..5c0ef260c786e 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -161,7 +161,7 @@ stdenv.mkDerivation rec { ''; changelog = "https://cmake.org/cmake/help/v${lib.versions.majorMinor version}/release/${lib.versions.majorMinor version}.html"; license = licenses.bsd3; - maintainers = with maintainers; [ ttuegel lnl7 ]; + maintainers = with maintainers; [ ttuegel lnl7 AndersonTorres ]; platforms = platforms.all; broken = (qt5UI && stdenv.isDarwin); }; From d867d91690208c8dbe4fb8c98100c18a1f64ac16 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 21 Jun 2022 02:40:22 -0300 Subject: [PATCH 28/86] cmake: use callPackage instead of libsForQt5.callPackage Following the trend of enhanced composability, and further because it is unusual a build tool using libsForQt5 as scope. --- pkgs/top-level/all-packages.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2147f7c0a9228..5abb737cc4f17 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15377,12 +15377,15 @@ with pkgs; ctmg = callPackage ../tools/security/ctmg { }; - cmake = libsForQt5.callPackage ../development/tools/build-managers/cmake { + cmake = callPackage ../development/tools/build-managers/cmake { inherit (darwin.apple_sdk.frameworks) SystemConfiguration; + inherit (libsForQt5) qtbase wrapQtAppsHook; }; - cmakeMinimal = libsForQt5.callPackage ../development/tools/build-managers/cmake { + cmakeMinimal = callPackage ../development/tools/build-managers/cmake { isBootstrap = true; + qtbase = null; + wrapQtAppsHook = null; # There is no SystemConfiguration in bootstrapTools, so this version gets # patched to remove that dependency. SystemConfiguration = null; From fc881d3a4b269c89415ade8ce8ef4041f0813395 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 21 Jun 2022 02:18:54 -0300 Subject: [PATCH 29/86] cmake: 3.22.3 -> 3.23.2 --- pkgs/development/tools/build-managers/cmake/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 5c0ef260c786e..7752db352fd34 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -37,11 +37,11 @@ stdenv.mkDerivation rec { + lib.optionalString isBootstrap "-boot" + lib.optionalString cursesUI "-cursesUI" + lib.optionalString qt5UI "-qt5UI"; - version = "3.22.3"; + version = "3.23.2"; src = fetchurl { url = "https://cmake.org/files/v${lib.versions.majorMinor version}/cmake-${version}.tar.gz"; - sha256 = "sha256-n4RpFm+UVTtpeKFu4pIn7Emi61zrYIJ13sQNiuDRtaA="; + sha256 = "sha256-8xa0AFNGb5pBat+YHv2kGxYMqFnpf2pIS0R+opn/Jqo="; }; patches = [ From f59fcefd8d18f6471c75ae03cd6e776d4511b09e Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 23 Jun 2022 09:02:19 +0100 Subject: [PATCH 30/86] luarocks: explicitly set 'configurePlatforms = [ ];' Without the change build with `config.configurePlatformsByDefault = true` fails as: Error: Unknown flag: --build=x86_64-unknown-linux-gnu --- pkgs/development/tools/misc/luarocks/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/tools/misc/luarocks/default.nix b/pkgs/development/tools/misc/luarocks/default.nix index 1b05f88a091f3..70df08af2de03 100644 --- a/pkgs/development/tools/misc/luarocks/default.nix +++ b/pkgs/development/tools/misc/luarocks/default.nix @@ -26,6 +26,10 @@ stdenv.mkDerivation rec { substituteInPlace src/luarocks/core/cfg.lua --subst-var-by 'darwinMinVersion' '${stdenv.targetPlatform.darwinMinVersion}' ''; + # Manually written ./configure does not support --build= or --host=: + # Error: Unknown flag: --build=x86_64-unknown-linux-gnu + configurePlatforms = [ ]; + preConfigure = '' lua -e "" || { luajit -e "" && { From f8d1cada7dbb7358614316e00e552e1a4cc9b441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 23 Jun 2022 11:25:56 +0200 Subject: [PATCH 31/86] python310Packages.urllib3: correct propagatedBuildInputs see https://github.com/NixOS/nixpkgs/pull/175422#issuecomment-1163856136 --- pkgs/development/python-modules/urllib3/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/urllib3/default.nix b/pkgs/development/python-modules/urllib3/default.nix index 8a79241eebca3..be16615d14836 100644 --- a/pkgs/development/python-modules/urllib3/default.nix +++ b/pkgs/development/python-modules/urllib3/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { # FIXME: remove backwards compatbility hack propagatedBuildInputs = passthru.optional-dependencies.brotli - ++ passthru.optional-dependencies.secure; + ++ passthru.optional-dependencies.socks; checkInputs = [ python-dateutil From b6a3ccfaf72e486444903fab3f89730210395f19 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 23 Jun 2022 21:04:58 +0200 Subject: [PATCH 32/86] python3Packages.sqlalchemy: 1.4.37 -> 1.4.38 https://github.com/sqlalchemy/sqlalchemy/releases/tag/rel_1_4_38 --- pkgs/development/python-modules/sqlalchemy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sqlalchemy/default.nix b/pkgs/development/python-modules/sqlalchemy/default.nix index 544bdccd2cbbe..374ffad5ca31a 100644 --- a/pkgs/development/python-modules/sqlalchemy/default.nix +++ b/pkgs/development/python-modules/sqlalchemy/default.nix @@ -13,11 +13,11 @@ buildPythonPackage rec { pname = "SQLAlchemy"; - version = "1.4.37"; + version = "1.4.38"; src = fetchPypi { inherit pname version; - hash = "sha256-Noj5LGLbbF3yaOImSJEHjxfsuR4xQbQA8uKND3V5beo="; + hash = "sha256-k64dLvQvvw8LPUSzUiW9oSMxDfSzPJv2Yue1CmjEipg="; }; propagatedBuildInputs = [ From 2999d0186fe8cbbca282ee1964fbcbbf2073c59d Mon Sep 17 00:00:00 2001 From: ajs124 Date: Fri, 24 Jun 2022 00:38:57 +0200 Subject: [PATCH 33/86] nss_latest: 3.79 -> 3.80 https://github.com/nss-dev/nss/blob/master/doc/rst/releases/nss_3_80.rst --- pkgs/development/libraries/nss/latest.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/nss/latest.nix b/pkgs/development/libraries/nss/latest.nix index fa99543eb37aa..40f88afed29fc 100644 --- a/pkgs/development/libraries/nss/latest.nix +++ b/pkgs/development/libraries/nss/latest.nix @@ -5,6 +5,6 @@ # Example: nix-shell ./maintainers/scripts/update.nix --argstr package cacert import ./generic.nix { - version = "3.79"; - hash = "sha256-698tapZhO2/nCtV56fmD4OlOARAXHPspmdtjPTOUpRQ="; + version = "3.80"; + hash = "sha256-wL8f0sfimmsCswliK6r8RD7skMiTS7FV2ku5iYh4S2o="; } From 4e03320ec514e3150ea56df543035c8879604490 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Fri, 24 Jun 2022 04:20:00 +0000 Subject: [PATCH 34/86] grpc: 1.46.3 -> 1.47.0 https://github.com/grpc/grpc/releases/tag/v1.47.0 --- pkgs/development/libraries/grpc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index 0144cec39e934..bb98ca6eea158 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { pname = "grpc"; - version = "1.46.3"; # N.B: if you change this, please update: + version = "1.47.0"; # N.B: if you change this, please update: # pythonPackages.grpcio-tools # pythonPackages.grpcio-status @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { owner = "grpc"; repo = "grpc"; rev = "v${version}"; - sha256 = "sha256-RiXtKlRtlbqwrSxI904dgSu3da0A6Fwk+/hWHIG7A5E="; + sha256 = "sha256-fMYAos0gQelFMPkpR0DdKr4wPX+nhZSSqeaU4URqgto="; fetchSubmodules = true; }; From 53898d0d2c4d55c16113e3858f32a1ddf65f6bf4 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Fri, 24 Jun 2022 04:20:00 +0000 Subject: [PATCH 35/86] python310Packages.grpcio-tools: 1.46.3 -> 1.47.0 --- pkgs/development/python-modules/grpcio-tools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/grpcio-tools/default.nix b/pkgs/development/python-modules/grpcio-tools/default.nix index c80bc6f9bf6a8..73a98008739bb 100644 --- a/pkgs/development/python-modules/grpcio-tools/default.nix +++ b/pkgs/development/python-modules/grpcio-tools/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "grpcio-tools"; - version = "1.46.3"; + version = "1.47.0"; src = fetchPypi { inherit pname version; - sha256 = "31fee436ace5b3bd950cc3a8e68d6b84de1d6dc755959db7badc3470cdf22f70"; + sha256 = "f64b5378484be1d6ce59311f86174be29c8ff98d8d90f589e1c56d5acae67d3c"; }; outputs = [ "out" "dev" ]; From 04bc892e808429080a23839196781c49c088fe3d Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Fri, 24 Jun 2022 04:20:00 +0000 Subject: [PATCH 36/86] python310Packages.grpcio-status: 1.46.3 -> 1.47.0 --- pkgs/development/python-modules/grpcio-status/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/grpcio-status/default.nix b/pkgs/development/python-modules/grpcio-status/default.nix index 794d504337e23..52a95fd8b65ff 100644 --- a/pkgs/development/python-modules/grpcio-status/default.nix +++ b/pkgs/development/python-modules/grpcio-status/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "grpcio-status"; - version = "1.46.3"; + version = "1.47.0"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "78442ac7d2813c56f9cc04f713efd7088596b10f88a4ddd09279211cc48402d5"; + sha256 = "c9ce3213e84c6fd8801c31aca3ea4a6b3453eaa40b93a6c0a23ea8999808fa00"; }; propagatedBuildInputs = [ From badbca891cbe10c4ab52531b4b0210bf326715c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 23 Jun 2022 20:14:06 +0200 Subject: [PATCH 37/86] python310Packages.babel: 2.10.1 -> 2.10.3 --- pkgs/development/python-modules/babel/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/babel/default.nix b/pkgs/development/python-modules/babel/default.nix index 14633062f36d6..5273069d019c6 100644 --- a/pkgs/development/python-modules/babel/default.nix +++ b/pkgs/development/python-modules/babel/default.nix @@ -2,12 +2,12 @@ buildPythonPackage rec { pname = "babel"; - version = "2.10.1"; + version = "2.10.3"; src = fetchPypi { pname = "Babel"; inherit version; - sha256 = "sha256-mK6soIYTPvs+HiqtA5aYdJDIQlkp3bz+BVAYT9xUzRM="; + sha256 = "sha256-dhRVNxHul0kPcyEm3Ad/jQrghOvGqW4j2xSCr6vbLFE="; }; propagatedBuildInputs = [ pytz ]; From f93234530f930393a50bf8341b2e0b5184982937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 23 Jun 2022 20:13:09 +0200 Subject: [PATCH 38/86] python310Packages.certifi: 2022.05.18.1 -> 2022.06.15 --- pkgs/development/python-modules/certifi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/certifi/default.nix b/pkgs/development/python-modules/certifi/default.nix index bef7c64ea1321..674fc1183d8ef 100644 --- a/pkgs/development/python-modules/certifi/default.nix +++ b/pkgs/development/python-modules/certifi/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "certifi"; - version = "2022.05.18.1"; + version = "2022.06.15"; disabled = pythonOlder "3.5"; @@ -15,7 +15,7 @@ buildPythonPackage rec { owner = pname; repo = "python-certifi"; rev = version; - sha256 = "sha256-uDNVzKcT45mz0zXBwPkttKV21fEcgbRamE3+QutNLjA="; + sha256 = "sha256-CKO8wF5FMGLIZbTd7YrKE9OWV9MbfQ2+BMc5IPk1FFU="; }; checkInputs = [ From 04be37dead641c3d08cc179428e106e01352c907 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Fri, 24 Jun 2022 15:09:56 +0200 Subject: [PATCH 39/86] cacert: 3.77 -> 3.80 --- pkgs/data/misc/cacert/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/misc/cacert/default.nix b/pkgs/data/misc/cacert/default.nix index ecd8a1c3dfd39..0ed4f95f8cf0b 100644 --- a/pkgs/data/misc/cacert/default.nix +++ b/pkgs/data/misc/cacert/default.nix @@ -20,7 +20,7 @@ let blocklist = writeText "cacert-blocklist.txt" (lib.concatStringsSep "\n" blacklist); extraCertificatesBundle = writeText "cacert-extra-certificates-bundle.crt" (lib.concatStringsSep "\n\n" extraCertificateStrings); - srcVersion = "3.77"; + srcVersion = "3.80"; version = if nssOverride != null then nssOverride.version else srcVersion; meta = with lib; { homepage = "https://curl.haxx.se/docs/caextract.html"; @@ -35,7 +35,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 = "1pfy33b51914sivqyaxdwfd930hzb77gm07z4f57hnyk5xddypl2"; + sha256 = "sha256-wL8f0sfimmsCswliK6r8RD7skMiTS7FV2ku5iYh4S2o="; }; dontBuild = true; From beff393cc732ecdfe76b3377e23a19a3cf13cecb Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 24 Jun 2022 21:30:28 +0200 Subject: [PATCH 40/86] python3Packages.sqlalchemy: 1.4.38 -> 1.4.39 https://github.com/sqlalchemy/sqlalchemy/releases/tag/rel_1_4_39 --- pkgs/development/python-modules/sqlalchemy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sqlalchemy/default.nix b/pkgs/development/python-modules/sqlalchemy/default.nix index 374ffad5ca31a..5c467e2f905ba 100644 --- a/pkgs/development/python-modules/sqlalchemy/default.nix +++ b/pkgs/development/python-modules/sqlalchemy/default.nix @@ -13,11 +13,11 @@ buildPythonPackage rec { pname = "SQLAlchemy"; - version = "1.4.38"; + version = "1.4.39"; src = fetchPypi { inherit pname version; - hash = "sha256-k64dLvQvvw8LPUSzUiW9oSMxDfSzPJv2Yue1CmjEipg="; + hash = "sha256-gZSJYDh1O0awigsK6JpdgMiX+2Ad1R4kPtVyDx8VXSc="; }; propagatedBuildInputs = [ From 20f3160f41f423485ddf34cac582d64144292405 Mon Sep 17 00:00:00 2001 From: milahu Date: Sat, 25 Jun 2022 16:37:31 +0200 Subject: [PATCH 41/86] ninja: disable line-clearing with TERM=dumb --- pkgs/development/tools/build-managers/ninja/setup-hook.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/build-managers/ninja/setup-hook.sh b/pkgs/development/tools/build-managers/ninja/setup-hook.sh index 015759c9d4852..63fa7d8f16f72 100644 --- a/pkgs/development/tools/build-managers/ninja/setup-hook.sh +++ b/pkgs/development/tools/build-managers/ninja/setup-hook.sh @@ -14,7 +14,7 @@ ninjaBuildPhase() { ) echoCmd 'build flags' "${flagsArray[@]}" - ninja "${flagsArray[@]}" | cat + TERM=dumb ninja "${flagsArray[@]}" runHook postBuild } @@ -33,7 +33,7 @@ ninjaInstallPhase() { ) echoCmd 'install flags' "${flagsArray[@]}" - ninja "${flagsArray[@]}" | cat + TERM=dumb ninja "${flagsArray[@]}" runHook postInstall } @@ -67,7 +67,7 @@ ninjaCheckPhase() { ) echoCmd 'check flags' "${flagsArray[@]}" - ninja "${flagsArray[@]}" | cat + TERM=dumb ninja "${flagsArray[@]}" fi runHook postCheck From 0eac24a1475c6829b4dcecbac27ab7b51d0dc1f2 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Mon, 9 May 2022 09:32:44 -0400 Subject: [PATCH 42/86] m4: build offline documentation --- pkgs/development/tools/misc/gnum4/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/gnum4/default.nix b/pkgs/development/tools/misc/gnum4/default.nix index 34df06ad0f4cd..f9f7709e69ade 100644 --- a/pkgs/development/tools/misc/gnum4/default.nix +++ b/pkgs/development/tools/misc/gnum4/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl }: +{ lib, stdenv, fetchurl, texinfo4 }: # Note: this package is used for bootstrapping fetchurl, and thus # cannot use fetchpatch! All mutable patches (generated by GitHub or @@ -8,6 +8,9 @@ stdenv.mkDerivation rec { pname = "gnum4"; version = "1.4.19"; + outputs = [ "out" "doc" ]; + + nativeBuildInputs = [ texinfo4 ]; src = fetchurl { url = "mirror://gnu/m4/m4-${version}.tar.bz2"; @@ -22,6 +25,15 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ] ++ lib.optional stdenv.hostPlatform.isMinGW "CFLAGS=-fno-stack-protector"; + postBuild = '' + makeinfo --html --no-split doc/m4.texi + ''; + + postInstall = '' + mkdir -p $doc/share/doc/m4 + cp ./m4.html $doc/share/doc/m4 + ''; + meta = { description = "GNU M4, a macro processor"; longDescription = '' From e9d95b52236204d6742c510f20e664b7064f63d8 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Fri, 17 Jun 2022 17:00:42 -0400 Subject: [PATCH 43/86] texinfo4: use recent config.guess script --- pkgs/development/tools/misc/texinfo/4.13a.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/texinfo/4.13a.nix b/pkgs/development/tools/misc/texinfo/4.13a.nix index b8da38ace6fb4..2f753e5113ed8 100644 --- a/pkgs/development/tools/misc/texinfo/4.13a.nix +++ b/pkgs/development/tools/misc/texinfo/4.13a.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, texinfo, ncurses, xz }: +{ stdenv, fetchurl, texinfo, ncurses, xz, autoconf }: stdenv.mkDerivation rec { pname = "texinfo"; @@ -9,6 +9,18 @@ stdenv.mkDerivation rec { sha256 = "1rf9ckpqwixj65bw469i634897xwlgkm5i9g2hv3avl6mv7b0a3d"; }; + autoconfSrc = autoconf.src; + + # We need texinfo4 to build documentation of GNU m4, and version of + # config.guess bundled in texinfo4 is too old to recognize some CI + # platforms (see #172225). + # + # Using autoreconfHook results in infinity recursion. + postPatch = '' + tar xf $autoconfSrc + cp -v ./autoconf-*/build-aux/config.guess ./build-aux/config.guess + ''; + buildInputs = [ ncurses ]; nativeBuildInputs = [ xz ]; From fb3951c8aff3014ab9b244279fe61b611107c2f5 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Fri, 17 Jun 2022 19:50:28 -0400 Subject: [PATCH 44/86] Revert "texinfo4: use recent config.guess script" This reverts commit 767d31165ad7442518e761521e2f1f17d8336abd. --- pkgs/development/tools/misc/texinfo/4.13a.nix | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/pkgs/development/tools/misc/texinfo/4.13a.nix b/pkgs/development/tools/misc/texinfo/4.13a.nix index 2f753e5113ed8..b8da38ace6fb4 100644 --- a/pkgs/development/tools/misc/texinfo/4.13a.nix +++ b/pkgs/development/tools/misc/texinfo/4.13a.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, texinfo, ncurses, xz, autoconf }: +{ stdenv, fetchurl, texinfo, ncurses, xz }: stdenv.mkDerivation rec { pname = "texinfo"; @@ -9,18 +9,6 @@ stdenv.mkDerivation rec { sha256 = "1rf9ckpqwixj65bw469i634897xwlgkm5i9g2hv3avl6mv7b0a3d"; }; - autoconfSrc = autoconf.src; - - # We need texinfo4 to build documentation of GNU m4, and version of - # config.guess bundled in texinfo4 is too old to recognize some CI - # platforms (see #172225). - # - # Using autoreconfHook results in infinity recursion. - postPatch = '' - tar xf $autoconfSrc - cp -v ./autoconf-*/build-aux/config.guess ./build-aux/config.guess - ''; - buildInputs = [ ncurses ]; nativeBuildInputs = [ xz ]; From 6cc6b907d55665b04cb23046c74f952e55e594c0 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Fri, 17 Jun 2022 19:50:44 -0400 Subject: [PATCH 45/86] Revert "m4: build offline documentation" This reverts commit bde8c13bb2bb1d156093b6128670dfbd0e5fe534. --- pkgs/development/tools/misc/gnum4/default.nix | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/pkgs/development/tools/misc/gnum4/default.nix b/pkgs/development/tools/misc/gnum4/default.nix index f9f7709e69ade..34df06ad0f4cd 100644 --- a/pkgs/development/tools/misc/gnum4/default.nix +++ b/pkgs/development/tools/misc/gnum4/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, texinfo4 }: +{ lib, stdenv, fetchurl }: # Note: this package is used for bootstrapping fetchurl, and thus # cannot use fetchpatch! All mutable patches (generated by GitHub or @@ -8,9 +8,6 @@ stdenv.mkDerivation rec { pname = "gnum4"; version = "1.4.19"; - outputs = [ "out" "doc" ]; - - nativeBuildInputs = [ texinfo4 ]; src = fetchurl { url = "mirror://gnu/m4/m4-${version}.tar.bz2"; @@ -25,15 +22,6 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ] ++ lib.optional stdenv.hostPlatform.isMinGW "CFLAGS=-fno-stack-protector"; - postBuild = '' - makeinfo --html --no-split doc/m4.texi - ''; - - postInstall = '' - mkdir -p $doc/share/doc/m4 - cp ./m4.html $doc/share/doc/m4 - ''; - meta = { description = "GNU M4, a macro processor"; longDescription = '' From 7d5108c5dc6bf1f3479c0f859922ba1b09fa6dc3 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Sun, 26 Jun 2022 07:43:21 +1000 Subject: [PATCH 46/86] sqlite: 3.38.5 -> 3.39.0 https://sqlite.org/releaselog/3_39_0.html --- pkgs/development/libraries/sqlite/default.nix | 4 ++-- pkgs/development/libraries/sqlite/tools.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix index 7677406874a52..b0333a0940745 100644 --- a/pkgs/development/libraries/sqlite/default.nix +++ b/pkgs/development/libraries/sqlite/default.nix @@ -12,13 +12,13 @@ in stdenv.mkDerivation rec { pname = "sqlite${optionalString interactive "-interactive"}"; - version = "3.38.5"; + version = "3.39.0"; # nixpkgs-update: no auto update # NB! Make sure to update ./tools.nix src (in the same directory). src = fetchurl { url = "https://sqlite.org/2022/sqlite-autoconf-${archiveVersion version}.tar.gz"; - sha256 = "sha256-WvB96YK6ZY/ZGgMXDJRfmclx9pVbx53zJmVENz45hpw="; + sha256 = "sha256-6QvK723VgT/N7k6Gf2tl88m/0K7A8QF/nzu84eTtCeI="; }; outputs = [ "bin" "dev" "out" ]; diff --git a/pkgs/development/libraries/sqlite/tools.nix b/pkgs/development/libraries/sqlite/tools.nix index b804fcbfd6589..e3aaf44995348 100644 --- a/pkgs/development/libraries/sqlite/tools.nix +++ b/pkgs/development/libraries/sqlite/tools.nix @@ -4,12 +4,12 @@ let archiveVersion = import ./archive-version.nix lib; mkTool = { pname, makeTarget, description, homepage, mainProgram }: stdenv.mkDerivation rec { inherit pname; - version = "3.38.5"; + version = "3.39.0"; # nixpkgs-update: no auto update src = assert version == sqlite.version; fetchurl { url = "https://sqlite.org/2022/sqlite-src-${archiveVersion version}.zip"; - sha256 = "sha256-ZQO7WeOeyGYwg2lpQOyBjNVVUZbmylQ9QClEDMp7ANk="; + sha256 = "sha256-s1hfN90Qbbs9RsjBei0nX5pLh9+MRQm9LWpbQAMkJuY="; }; nativeBuildInputs = [ unzip ]; From c9afe80ba58ec9ea31e154572633b084fdbcbcd7 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 25 Jun 2022 17:27:46 +0100 Subject: [PATCH 47/86] coreutils: reintroduce patch disabling SEEK_HOLE in cp for darwin x86_64 partial revert of a891659902512a66d7faf4c424c8c360de304720 --- pkgs/tools/misc/coreutils/default.nix | 5 +++ .../misc/coreutils/disable-seek-hole.patch | 43 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 pkgs/tools/misc/coreutils/disable-seek-hole.patch diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index f6d2591716e17..5b8c1c38c5058 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -39,6 +39,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-YaH0ENeLp+fzelpPUObRMgrKMzdUhKMlXt3xejhYBCM="; }; + patches = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + # Workaround for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51433 + ./disable-seek-hole.patch + ]; + postPatch = '' # The test tends to fail on btrfs, f2fs and maybe other unusual filesystems. sed '2i echo Skipping dd sparse test && exit 77' -i ./tests/dd/sparse.sh diff --git a/pkgs/tools/misc/coreutils/disable-seek-hole.patch b/pkgs/tools/misc/coreutils/disable-seek-hole.patch new file mode 100644 index 0000000000000..89503287980d4 --- /dev/null +++ b/pkgs/tools/misc/coreutils/disable-seek-hole.patch @@ -0,0 +1,43 @@ +diff --git a/src/copy.c b/src/copy.c +index cb9018f93..2a4ccc061 100644 +--- a/src/copy.c ++++ b/src/copy.c +@@ -502,7 +502,7 @@ write_zeros (int fd, off_t n_bytes) + return true; + } + +-#ifdef SEEK_HOLE ++#if 0 + /* Perform an efficient extent copy, if possible. This avoids + the overhead of detecting holes in hole-introducing/preserving + copy, and thus makes copying sparse files much more efficient. +@@ -1095,7 +1095,7 @@ infer_scantype (int fd, struct stat const *sb, + && ST_NBLOCKS (*sb) < sb->st_size / ST_NBLOCKSIZE)) + return PLAIN_SCANTYPE; + +-#ifdef SEEK_HOLE ++#if 0 + scan_inference->ext_start = lseek (fd, 0, SEEK_DATA); + if (0 <= scan_inference->ext_start) + return LSEEK_SCANTYPE; +@@ -1377,7 +1377,7 @@ copy_reg (char const *src_name, char const *dst_name, + off_t n_read; + bool wrote_hole_at_eof = false; + if (! ( +-#ifdef SEEK_HOLE ++#if 0 + scantype == LSEEK_SCANTYPE + ? lseek_copy (source_desc, dest_desc, buf, buf_size, hole_size, + scan_inference.ext_start, src_open_sb.st_size, +diff --git a/tests/seek-data-capable b/tests/seek-data-capable +index cc6372214..6e7a9ec1e 100644 +--- a/tests/seek-data-capable ++++ b/tests/seek-data-capable +@@ -1,5 +1,7 @@ + import sys, os, errno, platform + ++sys.exit(1) ++ + # Pass an _empty_ file + if len(sys.argv) != 2: + sys.exit(1) From e838f7e117c5b448a6983d07535c8107c5b35bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 26 Jun 2022 06:41:44 +0000 Subject: [PATCH 48/86] python310Packages.pytest-mock: 3.7.0 -> 3.8.1 https://github.com/pytest-dev/pytest-mock/blob/v3.8.1/CHANGELOG.rst --- .../python-modules/pytest-mock/default.nix | 31 +++++++------------ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/pkgs/development/python-modules/pytest-mock/default.nix b/pkgs/development/python-modules/pytest-mock/default.nix index 837dec7c96d6d..8992694dca151 100644 --- a/pkgs/development/python-modules/pytest-mock/default.nix +++ b/pkgs/development/python-modules/pytest-mock/default.nix @@ -1,6 +1,6 @@ { lib , buildPythonPackage -, fetchpatch +, pythonOlder , fetchPypi , pytest , pytest-asyncio @@ -10,24 +10,20 @@ buildPythonPackage rec { pname = "pytest-mock"; - version = "3.7.0"; + version = "3.8.1"; + + disabled = pythonOlder "3.7"; + + format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-URK9ksyfGG7pbhqS78hJaepJSTnDrq05xQ9CHEzGlTQ="; + hash = "sha256-LG11bV07+Y4ugHl6lZyn+B9Hnn0fX1cWEbD91tF0UkA="; }; - patches = [ - (fetchpatch { - # pytest7 compatbilitya - url = "https://github.com/pytest-dev/pytest-mock/commit/0577f1ad051fb8d0da94ea22dcb02346d74064b2.patch"; - hash = "sha256-eim4v7U8Mjigr462bXI0pKH/M0ANBzSRc0lT4RpbZ0w="; - }) - ]; - nativeBuildInputs = [ setuptools-scm ]; - propagatedBuildInputs = [ + buildInputs = [ pytest ]; @@ -36,18 +32,13 @@ buildPythonPackage rec { pytestCheckHook ]; - disabledTests = [ - # output of pytest has changed - "test_used_with_" - "test_plain_stopall" - ]; - pythonImportsCheck = [ "pytest_mock" ]; meta = with lib; { - description = "Thin-wrapper around the mock package for easier use with pytest"; + description = "Thin wrapper around the mock package for easier use with pytest"; homepage = "https://github.com/pytest-dev/pytest-mock"; - license = with licenses; [ mit ]; + changelog = "https://github.com/pytest-dev/pytest-mock/blob/v${version}/CHANGELOG.rst"; + license = licenses.mit; maintainers = with maintainers; [ dotlambda ]; }; } From fe5d77ff39bd4fecde619ed598c7a9c5fc7e6eb8 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Sat, 25 Jun 2022 16:11:40 -0500 Subject: [PATCH 49/86] liburing: 2.1 -> 2.2 Signed-off-by: Austin Seipp --- pkgs/development/libraries/liburing/default.nix | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/liburing/default.nix b/pkgs/development/libraries/liburing/default.nix index 678fd0b3f7348..c95ea31b3bfb8 100644 --- a/pkgs/development/libraries/liburing/default.nix +++ b/pkgs/development/libraries/liburing/default.nix @@ -4,12 +4,12 @@ stdenv.mkDerivation rec { pname = "liburing"; - version = "2.1"; # remove patch when updating + version = "2.2"; src = fetchgit { url = "http://git.kernel.dk/${pname}"; rev = "liburing-${version}"; - sha256 = "sha256-7wSpKqjIdQeOdsQu4xN3kFHV49n6qQ3xVbjUcY1tmas="; + sha256 = "sha256-M/jfxZ+5DmFvlAt8sbXrjBTPf2gLd9UyTNymtjD+55g"; }; separateDebugInfo = true; @@ -43,15 +43,6 @@ stdenv.mkDerivation rec { cp ./examples/ucontext-cp $bin/bin/io_uring-ucontext-cp ''; - # fix for compilation on 32-bit ARM, merged by upstream but not released; remove when - # upstream releases an update - patches = lib.optional stdenv.isAarch32 [ - (fetchpatch { - url = "https://github.com/axboe/liburing/commit/e75a6cfa085fc9b5dbf5140fc1efb5a07b6b829e.diff"; - sha256 = "sha256-qQEQXYm5mkws2klLxwuuoPSPRkpP1s6tuylAAEp7+9E="; - }) - ]; - meta = with lib; { description = "Userspace library for the Linux io_uring API"; homepage = "https://git.kernel.dk/cgit/liburing/"; From daa5698a8c2bd3c2ac150c01ea36d5b5da4eb365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 26 Jun 2022 18:54:04 +0200 Subject: [PATCH 50/86] python310Packages.pycares: 4.1.2 -> 4.2.0 --- pkgs/development/python-modules/pycares/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pycares/default.nix b/pkgs/development/python-modules/pycares/default.nix index 868dbeca6c6c4..e0f145ca689ad 100644 --- a/pkgs/development/python-modules/pycares/default.nix +++ b/pkgs/development/python-modules/pycares/default.nix @@ -8,11 +8,11 @@ buildPythonPackage rec { pname = "pycares"; - version = "4.1.2"; + version = "4.2.0"; src = fetchPypi { inherit pname version; - sha256 = "sha256-A0kL4Oe1GgyAc/h3vsNH7/MQA/ZPV9lRjUGdk2lFKDc="; + sha256 = "sha256-soZklZd5HNUwcrLzODzDj8FKirAWt4ywS9yqbszjuM4="; }; buildInputs = [ From 31b1f3716ab5a66b65297ec277f7ac52e0ccefd8 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 15 Feb 2022 19:47:05 +0000 Subject: [PATCH 51/86] autoconf-archive: 2021.02.19 -> 2022.02.11 --- pkgs/development/tools/misc/autoconf-archive/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/autoconf-archive/default.nix b/pkgs/development/tools/misc/autoconf-archive/default.nix index bde9db89434c1..318daf9e599dd 100644 --- a/pkgs/development/tools/misc/autoconf-archive/default.nix +++ b/pkgs/development/tools/misc/autoconf-archive/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "autoconf-archive"; - version = "2021.02.19"; + version = "2022.02.11"; src = fetchurl { url = "mirror://gnu/autoconf-archive/autoconf-archive-${version}.tar.xz"; - sha256 = "sha256-6KbrnSjdy6j/7z+iEWUyOem/I5q6agGmt8/Hzq7GnL0="; + sha256 = "sha256-eKYbYR4u61WongOY4M44e8r1f+LdU8b+QnEw93etHow="; }; strictDeps = true; From b6141fb75d16e812209e01e1f8ad73e13503457b Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Sun, 19 Jun 2022 16:10:25 +0200 Subject: [PATCH 52/86] libaom: 3.3.0 -> 3.4.0 --- pkgs/development/libraries/libaom/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libaom/default.nix b/pkgs/development/libraries/libaom/default.nix index f6921091bea86..575c2613e5b1b 100644 --- a/pkgs/development/libraries/libaom/default.nix +++ b/pkgs/development/libraries/libaom/default.nix @@ -1,15 +1,15 @@ { lib, stdenv, fetchzip, yasm, perl, cmake, pkg-config, python3 -, enableButteraugli ? false, libjxl # Broken +, enableButteraugli ? true, libjxl , enableVmaf ? true, libvmaf }: stdenv.mkDerivation rec { pname = "libaom"; - version = "3.3.0"; + version = "3.4.0"; src = fetchzip { url = "https://aomedia.googlesource.com/aom/+archive/v${version}.tar.gz"; - sha256 = "sha256-g6QkKLrk+SH1s5fRmseAQMmM6y4QwmKmVDPxdbqGmwg="; + sha256 = "sha256-NgzpVxQmsgOPzKkGpJIJrLiNQcruhpEoCi/CYJx5b3A="; stripRoot = false; }; From 54a65b5cd5b14f989056d210518ebba0e47cd3af Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 27 Jun 2022 23:33:23 +0800 Subject: [PATCH 53/86] cmake: Fix darwin-specific remove-systemconfiguration-dep patch Unbreaks cmakeMinimal on darwin. Co-authored-by: Ryan Burns --- .../005-remove-systemconfiguration-dep.diff | 30 ++++++++----------- .../tools/build-managers/cmake/default.nix | 6 ++-- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/pkgs/development/tools/build-managers/cmake/005-remove-systemconfiguration-dep.diff b/pkgs/development/tools/build-managers/cmake/005-remove-systemconfiguration-dep.diff index 2329ae3f83559..76aa91cff92c4 100644 --- a/pkgs/development/tools/build-managers/cmake/005-remove-systemconfiguration-dep.diff +++ b/pkgs/development/tools/build-managers/cmake/005-remove-systemconfiguration-dep.diff @@ -1,23 +1,19 @@ -diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt -index 9eef01aaf0..d141d4086c 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt -@@ -537,12 +537,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - message(FATAL_ERROR "CoreFoundation framework not found") - endif() +@@ -391,13 +391,6 @@ if(ENABLE_IPV6 AND NOT WIN32) -- find_library(SYSTEMCONFIGURATION_FRAMEWORK "SystemConfiguration") -- if(NOT SYSTEMCONFIGURATION_FRAMEWORK) -- message(FATAL_ERROR "SystemConfiguration framework not found") -- endif() + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT ENABLE_ARES) + set(use_core_foundation ON) +- +- find_library(SYSTEMCONFIGURATION_FRAMEWORK "SystemConfiguration") +- if(NOT SYSTEMCONFIGURATION_FRAMEWORK) +- message(FATAL_ERROR "SystemConfiguration framework not found") +- endif() - -- list(APPEND CURL_LIBS "-framework CoreFoundation" "-framework SystemConfiguration") -+ list(APPEND CURL_LIBS "-framework CoreFoundation") +- list(APPEND CURL_LIBS "-framework SystemConfiguration") + endif() + endif() - if(CMAKE_USE_SECTRANSP) - find_library(SECURITY_FRAMEWORK "Security") -diff --git a/Utilities/cmcurl/lib/curl_setup.h b/Utilities/cmcurl/lib/curl_setup.h -index 554dcc1e67..059f14e632 100644 --- a/Utilities/cmcurl/lib/curl_setup.h +++ b/Utilities/cmcurl/lib/curl_setup.h @@ -257,11 +257,7 @@ @@ -32,8 +28,6 @@ index 554dcc1e67..059f14e632 100644 #endif #ifdef USE_LWIPSOCK -diff --git a/Utilities/cmcurl/lib/hostip.c b/Utilities/cmcurl/lib/hostip.c -index 117caa2957..9f7c709e44 100644 --- a/Utilities/cmcurl/lib/hostip.c +++ b/Utilities/cmcurl/lib/hostip.c @@ -68,10 +68,6 @@ @@ -47,7 +41,7 @@ index 117caa2957..9f7c709e44 100644 #if defined(CURLRES_SYNCH) && \ defined(HAVE_ALARM) && defined(SIGALRM) && defined(HAVE_SIGSETJMP) /* alarm-based timeouts can only be used with all the dependencies satisfied */ -@@ -653,23 +649,6 @@ enum resolve_t Curl_resolv(struct Curl_easy *data, +@@ -661,23 +657,6 @@ enum resolve_t Curl_resolv(struct Curl_easy *data, return CURLRESOLV_ERROR; } diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 7752db352fd34..008ed5b3c7876 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -51,12 +51,12 @@ stdenv.mkDerivation rec { ./002-application-services.diff # Derived from https://github.com/libuv/libuv/commit/1a5d4f08238dd532c3718e210078de1186a5920d ./003-libuv-application-services.diff + # On Darwin, always set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG. + ./006-darwin-always-set-runtime-c-flag.diff ] ++ lib.optional stdenv.isCygwin ./004-cygwin.diff # Derived from https://github.com/curl/curl/commit/31f631a142d855f069242f3e0c643beec25d1b51 - ++ lib.optional (stdenv.isDarwin && isBootstrap) ./005-remove-systemconfiguration-dep.diff - # On Darwin, always set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG. - ++ lib.optional stdenv.isDarwin ./006-darwin-always-set-runtime-c-flag.diff; + ++ lib.optional isBootstrap ./005-remove-systemconfiguration-dep.diff; outputs = [ "out" ] ++ lib.optionals buildDocs [ "man" "info" ]; setOutputFlags = false; From fb76309157844cd573ebb47c81d7583f8b5ac619 Mon Sep 17 00:00:00 2001 From: David Barroso Date: Mon, 27 Jun 2022 17:58:31 +0200 Subject: [PATCH 54/86] python310Packages.urllib3: remove pyopenssl as it is no longer recommended --- pkgs/development/python-modules/selenium/default.nix | 3 +-- pkgs/development/python-modules/urllib3/default.nix | 8 +++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/selenium/default.nix b/pkgs/development/python-modules/selenium/default.nix index a1db98deeb755..bafff76be5793 100644 --- a/pkgs/development/python-modules/selenium/default.nix +++ b/pkgs/development/python-modules/selenium/default.nix @@ -35,8 +35,7 @@ buildPythonPackage rec { trio trio-websocket urllib3 - ] ++ urllib3.optional-dependencies.secure - ++ urllib3.optional-dependencies.socks; + ] ++ urllib3.optional-dependencies.socks; checkInputs = [ pytestCheckHook diff --git a/pkgs/development/python-modules/urllib3/default.nix b/pkgs/development/python-modules/urllib3/default.nix index be16615d14836..dbcf05c9c52a0 100644 --- a/pkgs/development/python-modules/urllib3/default.nix +++ b/pkgs/development/python-modules/urllib3/default.nix @@ -2,14 +2,10 @@ , brotli , brotlicffi , buildPythonPackage -, certifi -, cryptography , python-dateutil , fetchPypi , isPyPy -, idna , mock -, pyopenssl , pysocks , pytest-freezegun , pytest-timeout @@ -65,7 +61,9 @@ buildPythonPackage rec { passthru.optional-dependencies = { brotli = if isPyPy then [ brotlicffi ] else [ brotli ]; - secure = [ certifi cryptography idna pyopenssl ]; + # we are removing secure dependencies as they are no longer relevant with py3: + # https://urllib3.readthedocs.io/en/stable/reference/contrib/pyopenssl.html + # secure = [ certifi cryptography idna pyopenssl ]; socks = [ pysocks ]; }; From 71260be594f49b03c66fd054dd6040993d8ac208 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 25 May 2022 15:46:29 +0000 Subject: [PATCH 55/86] doxygen: 1.9.3 -> 1.9.4 --- pkgs/development/tools/documentation/doxygen/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/documentation/doxygen/default.nix b/pkgs/development/tools/documentation/doxygen/default.nix index 5a0807974edec..eb2e1f6055b22 100644 --- a/pkgs/development/tools/documentation/doxygen/default.nix +++ b/pkgs/development/tools/documentation/doxygen/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "doxygen"; - version = "1.9.3"; + version = "1.9.4"; src = fetchFromGitHub { owner = "doxygen"; repo = "doxygen"; rev = "Release_${lib.replaceStrings [ "." ] [ "_" ] version}"; - sha256 = "1xfsv31ffrv03qhxlscav0r5mdi3qz4654ib9cq35rvmxfj999bw"; + sha256 = "sha256-Dnr8d+ngSBkgL/BITvsvoERAHQyEXCoQDltbnQ2nXKM="; }; nativeBuildInputs = [ From 5abffc8c5eabe78f19583d05149f65d9dfa8f4d8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 27 Jun 2022 15:50:51 +0200 Subject: [PATCH 56/86] python310Packages.pycryptodome: 3.14.1 -> 3.15.0 --- pkgs/development/python-modules/pycryptodome/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pycryptodome/default.nix b/pkgs/development/python-modules/pycryptodome/default.nix index ef7b571170f3e..29ef48bde1651 100644 --- a/pkgs/development/python-modules/pycryptodome/default.nix +++ b/pkgs/development/python-modules/pycryptodome/default.nix @@ -11,14 +11,14 @@ let in buildPythonPackage rec { pname = "pycryptodome"; - version = "3.14.1"; + version = "3.15.0"; format = "setuptools"; src = fetchFromGitHub { owner = "Legrandin"; repo = "pycryptodome"; rev = "v${version}"; - hash = "sha256-0GjpKNyALe2Q1R3dEjeAEn6E8hxYDic/vbN1YkVaUfs="; + hash = "sha256-SPRoAfwP1MFlVzZsVWmXDWUY5Yje7eg7d+9zJhZNXrw="; }; postPatch = '' From 9a40b19bedee45a583cb7dce92b8cf20e6e14d44 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Sun, 5 Jun 2022 11:30:44 -0500 Subject: [PATCH 57/86] python3Packages.cython: 0.29.28 -> 0.29.30 --- pkgs/development/python-modules/Cython/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/Cython/default.nix b/pkgs/development/python-modules/Cython/default.nix index 5ceabe766b867..15ddfbe9f7a5e 100644 --- a/pkgs/development/python-modules/Cython/default.nix +++ b/pkgs/development/python-modules/Cython/default.nix @@ -4,7 +4,6 @@ , fetchPypi , fetchpatch , python -, glibcLocales , pkg-config , gdb , numpy @@ -24,12 +23,13 @@ let ; in buildPythonPackage rec { - pname = "Cython"; - version = "0.29.28"; + pname = "cython"; + version = "0.29.30"; src = fetchPypi { - inherit pname version; - sha256 = "sha256-1vrCNCgCww5RQmgo/ghP9N6xszhzZ8+Yl2uy5ktvjkU="; + pname = "Cython"; + inherit version; + sha256 = "sha256-IjW2Laj+b6i5lCLI5YPy+5XhQ4Z9M3tcdeS5oahl+eM="; }; nativeBuildInputs = [ @@ -40,7 +40,6 @@ in buildPythonPackage rec { gdb numpy ncurses ]; - buildInputs = [ glibcLocales ]; LC_ALL = "en_US.UTF-8"; patches = [ From 365831bb446c67be2b26793eab40e6f58a672500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 28 Jun 2022 15:11:21 +0200 Subject: [PATCH 58/86] pcre2: fix gitea websearch crashing when searching for a plain string The nixos gitea module sets MemoryDenyWriteExecute=true which requires pcre2 to be compiled with --enable-jit-sealloc otherwise it fails with "-48". See https://github.com/go-gitea/gitea/issues/10840 and https://github.com/archlinux/svntogit-packages/commit/920838a6a4ca3ff466b8751d8dc4c24c5383767f --- pkgs/development/libraries/pcre2/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/pcre2/default.nix b/pkgs/development/libraries/pcre2/default.nix index 221272a45bc50..ea0ca3e4030c0 100644 --- a/pkgs/development/libraries/pcre2/default.nix +++ b/pkgs/development/libraries/pcre2/default.nix @@ -6,16 +6,20 @@ stdenv.mkDerivation rec { pname = "pcre2"; version = "10.40"; + src = fetchurl { url = "https://github.com/PhilipHazel/pcre2/releases/download/pcre2-${version}/pcre2-${version}.tar.bz2"; hash = "sha256-FOS4PEeDkz3BfpZDGOYyT3yuG8ddjzx5vGlp8AwVnWg="; }; - # Disable jit on Apple Silicon, https://github.com/zherczeg/sljit/issues/51 configureFlags = [ "--enable-pcre2-16" "--enable-pcre2-32" - ] ++ lib.optional (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) "--enable-jit=auto"; + # only enable jit on supported platforms which excludes Apple Silicon, see https://github.com/zherczeg/sljit/issues/51 + "--enable-jit=auto" + # fix pcre jit in systemd units that set MemoryDenyWriteExecute=true like gitea + "--enable-jit-sealloc" + ]; outputs = [ "bin" "dev" "out" "doc" "man" "devdoc" ]; @@ -24,7 +28,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - homepage = "http://www.pcre.org/"; + homepage = "https://www.pcre.org/"; description = "Perl Compatible Regular Expressions"; license = licenses.bsd3; maintainers = with maintainers; [ ttuegel ]; From 261055164319f5327eee2eb6511a9a28f8dae9b2 Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 28 Jun 2022 10:18:09 +0300 Subject: [PATCH 59/86] python3Packages.pythran: 0.9.12 -> 0.11.0, clean up a bit Unbreaks latest scipy. Refreshed patch, removed line noise, removed/updated some old test stuff. --- .../0001-hardcode-path-to-libgomp.patch | 117 ++++++++++-------- .../python-modules/pythran/default.nix | 21 +--- 2 files changed, 69 insertions(+), 69 deletions(-) diff --git a/pkgs/development/python-modules/pythran/0001-hardcode-path-to-libgomp.patch b/pkgs/development/python-modules/pythran/0001-hardcode-path-to-libgomp.patch index 14d2c2fbfd290..0f5a7ae404b0e 100644 --- a/pkgs/development/python-modules/pythran/0001-hardcode-path-to-libgomp.patch +++ b/pkgs/development/python-modules/pythran/0001-hardcode-path-to-libgomp.patch @@ -1,64 +1,79 @@ -From 208fe98f10c580a5a2fb6a8cfdd56de109073925 Mon Sep 17 00:00:00 2001 -From: Frederik Rietdijk -Date: Sat, 17 Jul 2021 18:36:27 +0200 -Subject: [PATCH] hardcode path to libgomp - ---- - omp/__init__.py | 40 ++++------------------------------------ - 1 file changed, 4 insertions(+), 36 deletions(-) - diff --git a/omp/__init__.py b/omp/__init__.py -index bddae3063..9ba3678d8 100644 +index 3801d1c8c..a93a74d6f 100644 --- a/omp/__init__.py +++ b/omp/__init__.py -@@ -69,43 +69,11 @@ class OpenMP(object): +@@ -48,72 +48,8 @@ class OpenMP(object): + return ['omp', 'gomp', 'iomp5'] def init_not_msvc(self): - """ Find OpenMP library and try to load if using ctype interface. """ -- # find_library() does not search automatically LD_LIBRARY_PATH -- paths = os.environ.get('LD_LIBRARY_PATH', '').split(':') -+ libgomp_path = "@gomp@" - -- for libomp_name in self.get_libomp_names(): -- if cxx is None or sys.platform == 'win32': -- # Note: Clang supports -print-file-name, but not yet for -- # clang-cl as of v12.0.0 (April '21) -- continue +- """ Find OpenMP library and try to load if using ctype interface. """ +- # find_library() does not automatically search LD_LIBRARY_PATH +- # until Python 3.6+, so we explicitly add it. +- # LD_LIBRARY_PATH is used on Linux, while macOS uses DYLD_LIBRARY_PATH +- # and DYLD_FALLBACK_LIBRARY_PATH. +- env_vars = [] +- if sys.platform == 'darwin': +- env_vars = ['DYLD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH'] +- else: +- env_vars = ['LD_LIBRARY_PATH'] - -- cmd = [cxx, '-print-file-name=' + libomp_name] -- # the subprocess can fail in various ways in that case just give up -- try: -- path = os.path.dirname(check_output(cmd).decode().strip()) -- if path: -- paths.append(path) -- except (OSError, CalledProcessError): -- pass +- paths = [] +- for env_var in env_vars: +- env_paths = os.environ.get(env_var, '') +- if env_paths: +- paths.extend(env_paths.split(os.pathsep)) - -- # Try to load find libgomp shared library using loader search dirs -- libgomp_path = find_library("gomp") - -- # Try to use custom paths if lookup failed -- for path in paths: -- if libgomp_path: -- break -- path = path.strip() -- if os.path.isdir(path): -- libgomp_path = find_library(os.path.join(str(path), "libgomp")) +- libomp_names = self.get_libomp_names() - -- if not libgomp_path: -- raise ImportError("I can't find a shared library for libgomp," -- " you may need to install it or adjust the " -- "LD_LIBRARY_PATH environment variable.") -- else: -- # Load the library (shouldn't fail with an absolute path right?) -- self.libomp = ctypes.CDLL(libgomp_path) -- self.version = 45 -+ # Load the library (shouldn't fail with an absolute path right?) -+ self.libomp = ctypes.CDLL(libgomp_path) +- if cxx is not None: +- for libomp_name in libomp_names: +- cmd = [cxx, +- '-print-file-name=lib{}{}'.format( +- libomp_name, +- get_shared_lib_extension())] +- # The subprocess can fail in various ways, including because it +- # doesn't support '-print-file-name'. In that case just give up. +- try: +- output = check_output(cmd, +- stderr=DEVNULL) +- path = os.path.dirname(output.decode().strip()) +- if path: +- paths.append(path) +- except (OSError, CalledProcessError): +- pass +- +- +- for libomp_name in libomp_names: +- # Try to load find libomp shared library using loader search dirs +- libomp_path = find_library(libomp_name) +- +- # Try to use custom paths if lookup failed +- if not libomp_path: +- for path in paths: +- candidate_path = os.path.join( +- path, +- 'lib{}{}'.format(libomp_name, +- get_shared_lib_extension())) +- if os.path.isfile(candidate_path): +- libomp_path = candidate_path +- break +- +- # Load the library +- if libomp_path: +- try: +- self.libomp = ctypes.CDLL(libomp_path) +- except OSError: +- raise ImportError("found openMP library '{}' but couldn't load it. " +- "This may happen if you are cross-compiling.".format(libomp_path)) +- self.version = 45 +- return +- +- raise ImportError("I can't find a shared library for libomp, you may need to install it " +- "or adjust the {} environment variable.".format(env_vars[0])) +- ++ self.libomp = ctypes.CDLL("@gomp@") + self.version = 45 def __getattr__(self, name): """ --- -2.32.0 - diff --git a/pkgs/development/python-modules/pythran/default.nix b/pkgs/development/python-modules/pythran/default.nix index 382a01e7b870f..0e09a198ab701 100644 --- a/pkgs/development/python-modules/pythran/default.nix +++ b/pkgs/development/python-modules/pythran/default.nix @@ -3,7 +3,6 @@ , buildPythonPackage , fetchFromGitHub , openmp -, pytest-runner , ply , networkx , decorator @@ -11,8 +10,6 @@ , six , numpy , beniget -, pytestCheckHook -, scipy , isPy3k , substituteAll }: @@ -22,13 +19,13 @@ let in buildPythonPackage rec { pname = "pythran"; - version = "0.9.12"; + version = "0.11.0"; src = fetchFromGitHub { owner = "serge-sans-paille"; repo = "pythran"; rev = version; - sha256 = "sha256-lQbVq4K/Q8RzlFhE+l3HPCmUGmauXawcKe31kfbUHsI="; + sha256 = "sha256-F9gUZOTSuiqvfGoN4yQqwUg9mnCeBntw5eHO7ZnjpzI="; }; patches = [ @@ -39,10 +36,6 @@ in buildPythonPackage rec { }) ]; - nativeBuildInputs = [ - pytest-runner - ]; - propagatedBuildInputs = [ ply networkx @@ -62,14 +55,7 @@ in buildPythonPackage rec { "pythran.spec" ]; - checkInputs = [ - pytestCheckHook - numpy - scipy - ]; - - # Test suite is huge. - # Also, in the future scipy will rely on it resulting in a circular test dependency + # Test suite is huge and has a circular dependency on scipy. doCheck = false; disabled = !isPy3k; @@ -79,5 +65,4 @@ in buildPythonPackage rec { homepage = "https://github.com/serge-sans-paille/pythran"; license = lib.licenses.bsd3; }; - } From 611edec7fd2fdedb0f4ef28b7db8535d8728a155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 28 Jun 2022 21:24:51 +0200 Subject: [PATCH 60/86] python310Packages.jsonschema: 4.6.0 -> 4.6.1 --- pkgs/development/python-modules/jsonschema/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/jsonschema/default.nix b/pkgs/development/python-modules/jsonschema/default.nix index e90ea39132f67..176334a0ed7ed 100644 --- a/pkgs/development/python-modules/jsonschema/default.nix +++ b/pkgs/development/python-modules/jsonschema/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "jsonschema"; - version = "4.6.0"; + version = "4.6.1"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-nWOXukpsC/AwBzYFf2SePhLsvAfT6BoNrLct5OmAGVc="; + sha256 = "sha256-7CgC5qN1F/CdR9m6EHlHWJrh0l/1V7kl2DoyH8KqXTs="; }; postPatch = '' From d97e911074994432b24edfd166178ac4efbdc32d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 28 Jun 2022 21:45:49 +0200 Subject: [PATCH 61/86] python310Packages.pycares: 4.2.0 -> 4.2.1 --- pkgs/development/python-modules/pycares/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pycares/default.nix b/pkgs/development/python-modules/pycares/default.nix index e0f145ca689ad..c8e8fdb7b3d92 100644 --- a/pkgs/development/python-modules/pycares/default.nix +++ b/pkgs/development/python-modules/pycares/default.nix @@ -8,11 +8,11 @@ buildPythonPackage rec { pname = "pycares"; - version = "4.2.0"; + version = "4.2.1"; src = fetchPypi { inherit pname version; - sha256 = "sha256-soZklZd5HNUwcrLzODzDj8FKirAWt4ywS9yqbszjuM4="; + sha256 = "sha256-c1tPdf0PWVxOkYTaGM2Hc39GvIGmTqQfTtzitraNRtI="; }; buildInputs = [ From 33ca33b0edaef43fd7b821c347691b4aee13148f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 29 Jun 2022 02:48:07 +0200 Subject: [PATCH 62/86] Revert "sphinx_offline: init" This reverts commit b75a20420b72fa7bb433c3722377c7212dbb9b2e. --- pkgs/top-level/all-packages.nix | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 15eb8b69dfaf5..47af97509c00d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20967,23 +20967,6 @@ with pkgs; sphinx = with python3Packages; toPythonApplication sphinx; - # A variation of sphinx that is only suitable for offline use as it excludes - # pyopenssl, which is broken on aarch64-darwin. - # https://github.com/NixOS/nixpkgs/issues/175875 - sphinx_offline = - if !(stdenv.buildPlatform.isDarwin && stdenv.buildPlatform.isAarch64) - then sphinx - else - sphinx.override (o: { - requests = pkgsBuildTarget.python3Packages.requests.override (o: { - urllib3 = pkgsBuildTarget.python3Packages.urllib3.overrideAttrs (o: { - # urllib3 adds the optional pyopenssl to propagatedBuildInputs - # pkgs/development/python-modules/urllib3/default.nix - propagatedBuildInputs = []; - }); - }); - }); - sphinx-autobuild = with python3Packages; toPythonApplication sphinx-autobuild; sphinx-serve = with python3Packages; toPythonApplication sphinx-serve; From 4650f24496ca779167540ed2fa5518700c70ce40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 29 Jun 2022 02:48:12 +0200 Subject: [PATCH 63/86] Revert "ghc: Work around broken pyopenssl on aarch64-darwin" This reverts commit 7898af7d3a134e9741458c335da523f42944d92b. --- pkgs/top-level/haskell-packages.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 54a050be73f8c..68a3230995694 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -49,8 +49,6 @@ let # Use this rather than `rec { ... }` below for sake of overlays. inherit (pkgs.haskell) compiler packages; - sphinx = buildPackages.sphinx_offline; - in { lib = haskellLibUncomposable; @@ -99,7 +97,7 @@ in { packages.ghc8102Binary else packages.ghc865Binary; - inherit sphinx; + inherit (buildPackages.python3Packages) sphinx; buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_7; llvmPackages = pkgs.llvmPackages_7; }; @@ -112,7 +110,7 @@ in { packages.ghc8107BinaryMinimal else packages.ghc8107Binary; - inherit sphinx; + inherit (buildPackages.python3Packages) sphinx; # Need to use apple's patched xattr until # https://github.com/xattr/xattr/issues/44 and # https://github.com/xattr/xattr/issues/55 are solved. @@ -128,7 +126,7 @@ in { packages.ghc8107BinaryMinimal else packages.ghc8107Binary; - inherit sphinx; + inherit (buildPackages.python3Packages) sphinx; inherit (buildPackages.darwin) autoSignDarwinBinariesHook xattr; buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12; llvmPackages = pkgs.llvmPackages_12; @@ -140,7 +138,7 @@ in { packages.ghc8107BinaryMinimal else packages.ghc8107Binary; - inherit sphinx; + inherit (buildPackages.python3Packages) sphinx; # Need to use apple's patched xattr until # https://github.com/xattr/xattr/issues/44 and # https://github.com/xattr/xattr/issues/55 are solved. @@ -150,7 +148,7 @@ in { }; ghcHEAD = callPackage ../development/compilers/ghc/head.nix { bootPkgs = packages.ghc8107Binary; - inherit sphinx; + inherit (buildPackages.python3Packages) sphinx; # Need to use apple's patched xattr until # https://github.com/xattr/xattr/issues/44 and # https://github.com/xattr/xattr/issues/55 are solved. From 919e04f5d75773bfd8c1b8f76ce1cf030bcd8d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 26 Jun 2022 19:54:24 +0000 Subject: [PATCH 64/86] asciidoc: 9.1.0 -> 10.2.0 https://github.com/asciidoc-py/asciidoc-py/blob/10.2.0/CHANGELOG.adoc --- pkgs/tools/typesetting/asciidoc/default.nix | 102 +++++++++----------- 1 file changed, 45 insertions(+), 57 deletions(-) diff --git a/pkgs/tools/typesetting/asciidoc/default.nix b/pkgs/tools/typesetting/asciidoc/default.nix index ed07c5588fec4..4c3fe29183137 100644 --- a/pkgs/tools/typesetting/asciidoc/default.nix +++ b/pkgs/tools/typesetting/asciidoc/default.nix @@ -1,5 +1,6 @@ { fetchurl, lib, stdenv, python3 , fetchFromGitHub, autoreconfHook +, installShellFiles , enableStandardFeatures ? false , sourceHighlight ? null , highlight ? null @@ -17,8 +18,7 @@ , docbook_xsl_ns ? null , docbook_xsl ? null , fop ? null -# TODO: Package this: -#, epubcheck ? null +, epubcheck ? null , gnused ? null , coreutils ? null @@ -61,8 +61,7 @@ assert enableStandardFeatures -> docbook_xsl_ns != null && docbook_xsl != null && (fop != null || !enableJava) && -# TODO: Package this: -# epubcheck != null && + epubcheck != null && gnused != null && coreutils != null; @@ -144,26 +143,24 @@ let sha256 = "08ya4bskygzqkfqwjllpg31qc5k08xp2k78z9b2480g8y57bfy10"; }; -in - -stdenv.mkDerivation rec { +in python3.pkgs.buildPythonApplication rec { pname = "asciidoc" + lib.optionalString enableStandardFeatures "-full" + lib.optionalString enableExtraPlugins "-with-plugins"; - version = "9.1.0"; + version = "10.2.0"; - # Note: a substitution to improve reproducibility should be updated once 10.0.0 is - # released. See the comment in `patchPhase` for more information. src = fetchFromGitHub { - owner = "asciidoc"; - repo = "asciidoc-py3"; + owner = "asciidoc-py"; + repo = "asciidoc-py"; rev = version; - sha256 = "1clf1axkns23wfmh48xfspzsnw04pjh4mq1pshpzvj0cwxhz0yaq"; + hash = "sha256-TqC0x9xB6e2d6Wc9bgnlqgZVOmYHmUUKfE/CKAiEtag="; }; - strictDeps = true; - nativeBuildInputs = [ python3 unzip autoreconfHook ]; - buildInputs = [ python3 ]; + nativeBuildInputs = [ + autoreconfHook + installShellFiles + unzip + ]; # install filters early, so their shebangs are patched too postPatch = with lib; '' @@ -230,22 +227,22 @@ stdenv.mkDerivation rec { -e "s|twopi|${graphviz}/bin/twopi|g" \ -e "s|circo|${graphviz}/bin/circo|g" \ -e "s|fdp|${graphviz}/bin/fdp|g" \ - -i "filters/graphviz/graphviz2png.py" + -i "asciidoc/resources/filters/graphviz/graphviz2png.py" sed -e "s|run('latex|run('${texlive}/bin/latex|g" \ -e "s|cmd = 'dvipng'|cmd = '${texlive}/bin/dvipng'|g" \ -e "s|cmd = 'dvisvgm'|cmd = '${texlive}/bin/dvisvgm'|g" \ - -i "filters/latex/latex2img.py" + -i "asciidoc/resources/filters/latex/latex2img.py" sed -e "s|run('abc2ly|run('${lilypond}/bin/abc2ly|g" \ -e "s|run('lilypond|run('${lilypond}/bin/lilypond|g" \ -e "s|run('convert|run('${imagemagick.out}/bin/convert|g" \ - -i "filters/music/music2png.py" + -i "asciidoc/resources/filters/music/music2png.py" sed -e 's|filter="source-highlight|filter="${sourceHighlight}/bin/source-highlight|' \ -e 's|filter="highlight|filter="${highlight}/bin/highlight|' \ -e 's|filter="pygmentize|filter="${pygments}/bin/pygmentize|' \ - -i "filters/source/source-highlight-filter.conf" + -i "asciidoc/resources/filters/source/source-highlight-filter.conf" # ENV is custom environment passed to programs that a2x invokes. Here we # use it to work around an impurity in the tetex package; tetex tools @@ -260,55 +257,45 @@ stdenv.mkDerivation rec { -e "s|^W3M =.*|W3M = '${w3m}/bin/w3m'|" \ -e "s|^LYNX =.*|LYNX = '${lynx}/bin/lynx'|" \ -e "s|^XMLLINT =.*|XMLLINT = '${libxml2.bin}/bin/xmllint'|" \ - -e "s|^EPUBCHECK =.*|EPUBCHECK = 'nixpkgs_is_missing_epubcheck'|" \ - -i a2x.py + -e "s|^EPUBCHECK =.*|EPUBCHECK = '${epubcheck}/bin/epubcheck'|" \ + -i asciidoc/a2x.py '' else '' sed -e "s|^ENV =.*|ENV = dict(XML_CATALOG_FILES='${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml ${docbook_xsl_ns}/xml/xsl/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml')|" \ -e "s|^XSLTPROC =.*|XSLTPROC = '${libxslt.bin}/bin/xsltproc'|" \ -e "s|^XMLLINT =.*|XMLLINT = '${libxml2.bin}/bin/xmllint'|" \ - -i a2x.py + -i asciidoc/a2x.py '') + '' - patchShebangs --host \ - asciidoc.py \ - a2x.py \ - tests/testasciidoc.py \ - filters/code/code-filter.py \ - filters/latex/latex2img.py \ - filters/music/music2png.py \ - filters/unwraplatex.py \ - filters/graphviz/graphviz2png.py - - # Hardcode the path to its own asciidoc. - # This helps with cross-compilation. - substituteInPlace a2x.py \ - --replace "find_executable(ASCIIDOC)" "'${placeholder "out"}/bin/asciidoc'" - - # Note: this substitution will not work in the planned 10.0.0 release: - # - # https://github.com/asciidoc/asciidoc-py3/commit/dfffda23381014481cd13e8e9d8f131e1f93f08a - # - # Update this substitution to: - # - # --replace "python3 -m asciidoc.a2x" "python3 -m asciidoc.a2x -a revdate=01/01/1980" - substituteInPlace Makefile.in \ - --replace "python3 a2x.py" "python3 a2x.py -a revdate=01/01/1980" - # Fix tests for f in $(grep -R --files-with-matches "2002-11-25") ; do - substituteInPlace $f --replace "2002-11-25" "1970-01-01" - substituteInPlace $f --replace "00:37:42" "00:00:01" + substituteInPlace $f --replace "2002-11-25" "1980-01-02" + substituteInPlace $f --replace "00:37:42" "00:00:00" done '' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' # We want to use asciidoc from the build platform to build the documentation. substituteInPlace Makefile.in \ - --replace "python3 a2x.py" "python3 ${buildPackages.asciidoc}/bin/a2x.py" + --replace "python3 -m asciidoc.a2x" "${buildPackages.asciidoc}/bin/a2x" + ''; + + postBuild = '' + make manpages ''; - preInstall = "mkdir -p $out/etc/vim"; - makeFlags = lib.optional stdenv.isCygwin "DESTDIR=/."; + postInstall = '' + installManPage doc/asciidoc.1 doc/a2x.1 doc/testasciidoc.1 + ''; + + checkInputs = with python3.pkgs; [ + pytest + pytest-mock + ]; + + checkPhase = '' + runHook preCheck - checkInputs = [ sourceHighlight ]; - doCheck = true; + make test + + runHook postCheck + ''; meta = with lib; { description = "Text-based document generation system"; @@ -325,9 +312,10 @@ stdenv.mkDerivation rec { sourceProvenance = with sourceTypes; [ fromSource ] ++ lib.optional _enableDitaaFilter binaryBytecode; - homepage = "http://www.methods.co.nz/asciidoc/"; + homepage = "https://asciidoc-py.github.io/"; + changelog = "https://github.com/asciidoc-py/asciidoc-py/blob/${src.rev}/CHANGELOG.adoc"; license = licenses.gpl2Plus; platforms = platforms.unix; - maintainers = [ maintainers.bjornfor ]; + maintainers = with maintainers; [ bjornfor dotlambda ]; }; } From 601d9db27f32df51461627b0fc8099ea80c98e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 27 Jun 2022 19:57:01 +0000 Subject: [PATCH 65/86] asciidoc: get rid of `? null` --- pkgs/tools/typesetting/asciidoc/default.nix | 83 +++++++-------------- pkgs/top-level/all-packages.nix | 10 +-- 2 files changed, 29 insertions(+), 64 deletions(-) diff --git a/pkgs/tools/typesetting/asciidoc/default.nix b/pkgs/tools/typesetting/asciidoc/default.nix index 4c3fe29183137..64061c84183a9 100644 --- a/pkgs/tools/typesetting/asciidoc/default.nix +++ b/pkgs/tools/typesetting/asciidoc/default.nix @@ -2,38 +2,38 @@ , fetchFromGitHub, autoreconfHook , installShellFiles , enableStandardFeatures ? false -, sourceHighlight ? null -, highlight ? null -, pygments ? null -, graphviz ? null -, texlive ? null -, dblatexFull ? null -, libxslt ? null -, w3m ? null -, lynx ? null -, imagemagick ? null -, lilypond ? null -, libxml2 ? null -, docbook_xml_dtd_45 ? null -, docbook_xsl_ns ? null -, docbook_xsl ? null -, fop ? null -, epubcheck ? null -, gnused ? null -, coreutils ? null +, sourceHighlight +, highlight +, pygments +, graphviz +, texlive +, dblatexFull +, libxslt +, w3m +, lynx +, imagemagick +, lilypond +, libxml2 +, docbook_xml_dtd_45 +, docbook_xsl_ns +, docbook_xsl +, fop +, epubcheck +, gnused +, coreutils # if true, enable all the below filters and backends , enableExtraPlugins ? false # unzip is needed to extract filter and backend plugins -, unzip ? null +, unzip # filters -, enableDitaaFilter ? false, jre ? null -, enableMscgenFilter ? false, mscgen ? null -, enableDiagFilter ? false, blockdiag ? null, seqdiag ? null, actdiag ? null, nwdiag ? null -, enableQrcodeFilter ? false, qrencode ? null -, enableMatplotlibFilter ? false, matplotlib ? null, numpy ? null -, enableAafigureFilter ? false, aafigure ? null, recursivePthLoader ? null +, enableDitaaFilter ? false, jre +, enableMscgenFilter ? false, mscgen +, enableDiagFilter ? false, blockdiag, seqdiag, actdiag, nwdiag +, enableQrcodeFilter ? false, qrencode +, enableMatplotlibFilter ? false, matplotlib, numpy +, enableAafigureFilter ? false, aafigure, recursivePthLoader # backends , enableDeckjsBackend ? false , enableOdfBackend ? false @@ -44,37 +44,6 @@ , buildPackages }: -assert enableStandardFeatures -> - sourceHighlight != null && - highlight != null && - pygments != null && - graphviz != null && - texlive != null && - dblatexFull != null && - libxslt != null && - w3m != null && - lynx != null && - imagemagick != null && - lilypond != null && - libxml2 != null && - docbook_xml_dtd_45 != null && - docbook_xsl_ns != null && - docbook_xsl != null && - (fop != null || !enableJava) && - epubcheck != null && - gnused != null && - coreutils != null; - -# filters -assert enableExtraPlugins || enableDitaaFilter || enableMscgenFilter || enableDiagFilter || enableQrcodeFilter || enableAafigureFilter -> unzip != null; -assert (enableExtraPlugins && enableJava) || enableDitaaFilter -> jre != null; -assert enableExtraPlugins || enableMscgenFilter -> mscgen != null; -assert enableExtraPlugins || enableDiagFilter -> blockdiag != null && seqdiag != null && actdiag != null && nwdiag != null; -assert enableExtraPlugins || enableMatplotlibFilter -> matplotlib != null && numpy != null; -assert enableExtraPlugins || enableAafigureFilter -> aafigure != null && recursivePthLoader != null; -# backends -assert enableExtraPlugins || enableDeckjsBackend || enableOdfBackend -> unzip != null; - let _enableDitaaFilter = (enableExtraPlugins && enableJava) || enableDitaaFilter; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 94027a050a888..9617aa4bac508 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4470,21 +4470,17 @@ with pkgs; arpoison = callPackage ../tools/networking/arpoison { }; asciidoc = callPackage ../tools/typesetting/asciidoc { - inherit (python3.pkgs) matplotlib numpy aafigure recursivePthLoader; + inherit (python3.pkgs) pygments matplotlib numpy aafigure recursivePthLoader; + texlive = texlive.combine { inherit (texlive) scheme-minimal dvipng; }; + w3m = w3m-batch; enableStandardFeatures = false; }; asciidoc-full = asciidoc.override { - inherit (python3.pkgs) pygments; - texlive = texlive.combine { inherit (texlive) scheme-minimal dvipng; }; - w3m = w3m-batch; enableStandardFeatures = true; }; asciidoc-full-with-plugins = asciidoc.override { - inherit (python3.pkgs) pygments; - texlive = texlive.combine { inherit (texlive) scheme-minimal dvipng; }; - w3m = w3m-batch; enableStandardFeatures = true; enableExtraPlugins = true; }; From 3f88d51e025bcbdb03119352c436ef0c922f6e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 29 Jun 2022 10:07:32 +0200 Subject: [PATCH 66/86] gcc10: 10.3.0 -> 10.4.0 Patches: the two seemed included in the release; I also checked that the conditional patches still all apply. --- pkgs/development/compilers/gcc/10/default.nix | 8 +-- .../gcc/10/gcc10-asan-glibc-2.34.patch | 70 ------------------- 2 files changed, 3 insertions(+), 75 deletions(-) delete mode 100644 pkgs/development/compilers/gcc/10/gcc10-asan-glibc-2.34.patch diff --git a/pkgs/development/compilers/gcc/10/default.nix b/pkgs/development/compilers/gcc/10/default.nix index 82269a395fee2..1b9f542894e07 100644 --- a/pkgs/development/compilers/gcc/10/default.nix +++ b/pkgs/development/compilers/gcc/10/default.nix @@ -53,11 +53,11 @@ with lib; with builtins; let majorVersion = "10"; - version = "${majorVersion}.3.0"; + version = "${majorVersion}.4.0"; inherit (stdenv) buildPlatform hostPlatform targetPlatform; - patches = [ ./gcc10-asan-glibc-2.34.patch ] + patches = [ ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch ++ optional noSysDirs ../no-sys-dirs.patch ++ optional (noSysDirs && hostPlatform.isRiscV) ../no-sys-dirs-riscv.patch @@ -73,8 +73,6 @@ let majorVersion = "10"; # Obtain latest patch with ../update-mcfgthread-patches.sh ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch - ++ [ ../libsanitizer-no-cyclades.patch ] - ++ optional (buildPlatform.system == "aarch64-darwin" && targetPlatform != buildPlatform) (fetchpatch { url = "https://raw.githubusercontent.com/richard-vd/musl-cross-make/5e9e87f06fc3220e102c29d3413fbbffa456fcd6/patches/gcc-${version}/0008-darwin-aarch64-self-host-driver.patch"; sha256 = "sha256-XtykrPd5h/tsnjY1wGjzSOJ+AyyNLsfnjuOZ5Ryq9vA="; @@ -95,7 +93,7 @@ stdenv.mkDerivation ({ src = fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz"; - sha256 = "0i6378ig6h397zkhd7m4ccwjx5alvzrf2hm27p1pzwjhlv0h9x34"; + sha256 = "1wg4xdizkksmwi66mvv2v4pk3ja8x64m7v9gzhykzd3wrmdpsaf9"; }; inherit patches; diff --git a/pkgs/development/compilers/gcc/10/gcc10-asan-glibc-2.34.patch b/pkgs/development/compilers/gcc/10/gcc10-asan-glibc-2.34.patch deleted file mode 100644 index d6d4f41ffdf87..0000000000000 --- a/pkgs/development/compilers/gcc/10/gcc10-asan-glibc-2.34.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 950bac27d63c1c2ac3a6ed867692d6a13f21feb3 Mon Sep 17 00:00:00 2001 -From: Jakub Jelinek -Date: Sat, 17 Apr 2021 11:27:14 +0200 -Subject: [PATCH] sanitizer: Fix asan against glibc 2.34 [PR100114] - -As mentioned in the PR, SIGSTKSZ is no longer a compile time constant in -glibc 2.34 and later, so -static const uptr kAltStackSize = SIGSTKSZ * 4; -needs dynamic initialization, but is used by a function called indirectly -from .preinit_array and therefore before the variable is constructed. -This results in using 0 size instead and all asan instrumented programs -die with: -==91==ERROR: AddressSanitizer failed to allocate 0x0 (0) bytes of SetAlternateSignalStack (error code: 22) - -Here is a cherry-pick from upstream to fix this. - -2021-04-17 Jakub Jelinek - - PR sanitizer/100114 - * sanitizer_common/sanitizer_posix_libcdep.cpp: Cherry-pick - llvm-project revisions 82150606fb11d28813ae6da1101f5bda638165fe - and b93629dd335ffee2fc4b9b619bf86c3f9e6b0023. - -(cherry picked from commit d9f462fb372fb02da032cefd6b091d7582c425ae) ---- - .../sanitizer_common/sanitizer_posix_libcdep.cpp | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp b/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp -index 304b3a01a08..ac88fbe074e 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp -+++ b/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp -@@ -169,7 +169,11 @@ bool SupportsColoredOutput(fd_t fd) { - - #if !SANITIZER_GO - // TODO(glider): different tools may require different altstack size. --static const uptr kAltStackSize = SIGSTKSZ * 4; // SIGSTKSZ is not enough. -+static uptr GetAltStackSize() { -+ // SIGSTKSZ is not enough. -+ static const uptr kAltStackSize = SIGSTKSZ * 4; -+ return kAltStackSize; -+} - - void SetAlternateSignalStack() { - stack_t altstack, oldstack; -@@ -180,10 +184,9 @@ void SetAlternateSignalStack() { - // TODO(glider): the mapped stack should have the MAP_STACK flag in the - // future. It is not required by man 2 sigaltstack now (they're using - // malloc()). -- void* base = MmapOrDie(kAltStackSize, __func__); -- altstack.ss_sp = (char*) base; -+ altstack.ss_size = GetAltStackSize(); -+ altstack.ss_sp = (char *)MmapOrDie(altstack.ss_size, __func__); - altstack.ss_flags = 0; -- altstack.ss_size = kAltStackSize; - CHECK_EQ(0, sigaltstack(&altstack, nullptr)); - } - -@@ -191,7 +194,7 @@ void UnsetAlternateSignalStack() { - stack_t altstack, oldstack; - altstack.ss_sp = nullptr; - altstack.ss_flags = SS_DISABLE; -- altstack.ss_size = kAltStackSize; // Some sane value required on Darwin. -+ altstack.ss_size = GetAltStackSize(); // Some sane value required on Darwin. - CHECK_EQ(0, sigaltstack(&altstack, &oldstack)); - UnmapOrDie(oldstack.ss_sp, oldstack.ss_size); - } --- -2.27.0 - From e1919b24c94ee6f7c37f2ebe8b71ad79722f71b8 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 29 Jun 2022 12:38:02 +0000 Subject: [PATCH 67/86] pkgsMusl.iptables: fix build with upstream patch Fix is applied upstream but there hasn't been a release yet. Fixes: 131fce41a3b ("iptables: 1.8.7 -> 1.8.8") --- pkgs/os-specific/linux/iptables/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/os-specific/linux/iptables/default.nix b/pkgs/os-specific/linux/iptables/default.nix index d76bba1c37de8..0704860c961fd 100644 --- a/pkgs/os-specific/linux/iptables/default.nix +++ b/pkgs/os-specific/linux/iptables/default.nix @@ -24,6 +24,11 @@ stdenv.mkDerivation rec { url = "https://git.netfilter.org/iptables/patch/?id=f319389525b066b7dc6d389c88f16a0df3b8f189"; sha256 = "sha256-rOxCEWZoI8Ac5fQDp286YHAwvreUAoDVAbomboKrGyM="; }) + # fix Musl build + (fetchpatch { + url = "https://git.netfilter.org/iptables/patch/?id=0e7cf0ad306cdf95dc3c28d15a254532206a888e"; + sha256 = "18mnvqfxzd7ifq3zjb4vyifcyadpxdi8iqcj8wsjgw23n49lgrbj"; + }) ]; outputs = [ "out" "dev" "man" ]; From c51b11bef5b35605243f12a658b7f49b6d5e0bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 29 Jun 2022 19:29:34 +0200 Subject: [PATCH 68/86] python310Packages.requests: 2.28.0 -> 2.28.1 --- pkgs/development/python-modules/requests/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/requests/default.nix b/pkgs/development/python-modules/requests/default.nix index b87be59bad863..9b19c7b9c2568 100644 --- a/pkgs/development/python-modules/requests/default.nix +++ b/pkgs/development/python-modules/requests/default.nix @@ -17,12 +17,12 @@ buildPythonPackage rec { pname = "requests"; - version = "2.28.0"; + version = "2.28.1"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-1WhyOn69JYddjR6vXfoGjNL8gZSy5IPXsffIGRjb7Gs="; + hash = "sha256-fFWZsQL+3apmHIJsVqtP7ii/0X9avKHrvj5/GdfJeYM="; }; patches = [ From 51619a501fc9736283932fe020388ff876946a05 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Wed, 29 Jun 2022 15:28:53 +0200 Subject: [PATCH 69/86] libwebp: 1.2.1 -> 1.2.2 also clean up and take up maintainership --- .../development/libraries/libwebp/default.nix | 49 ++++++++----------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/pkgs/development/libraries/libwebp/default.nix b/pkgs/development/libraries/libwebp/default.nix index da75d3a915045..f90de7fc6effe 100644 --- a/pkgs/development/libraries/libwebp/default.nix +++ b/pkgs/development/libraries/libwebp/default.nix @@ -5,7 +5,6 @@ , jpegSupport ? true, libjpeg # JPEG image format , tiffSupport ? true, libtiff # TIFF image format , gifSupport ? true, giflib # GIF image format -#, wicSupport ? true # Windows Imaging Component , alignedSupport ? false # Force aligned memory operations , swap16bitcspSupport ? false # Byte swap for 16bit color spaces , experimentalSupport ? false # Experimental code @@ -14,55 +13,49 @@ , libwebpdecoderSupport ? true # Build libwebpdecoder }: -let - mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}"; -in - -with lib; stdenv.mkDerivation rec { pname = "libwebp"; - version = "1.2.1"; + version = "1.2.2"; src = fetchFromGitHub { owner = "webmproject"; repo = pname; rev = "v${version}"; - hash = "sha256-KrvB5d3KNmujbfekWaevz2JZrWtK3PjEG9NEzRBYIDw="; + hash = "sha256-WF2HZPS7mbotk+d1oLM/JC5l/FWfkrk+T3Z6EW9oYEI="; }; prePatch = "patchShebangs ."; configureFlags = [ - (mkFlag threadingSupport "threading") - (mkFlag openglSupport "gl") - (mkFlag pngSupport "png") - (mkFlag jpegSupport "jpeg") - (mkFlag tiffSupport "tiff") - (mkFlag gifSupport "gif") - #(mkFlag (wicSupport && stdenv.isCygwin) "wic") - (mkFlag alignedSupport "aligned") - (mkFlag swap16bitcspSupport "swap-16bit-csp") - (mkFlag experimentalSupport "experimental") - (mkFlag libwebpmuxSupport "libwebpmux") - (mkFlag libwebpdemuxSupport "libwebpdemux") - (mkFlag libwebpdecoderSupport "libwebpdecoder") + (lib.enableFeature threadingSupport "threading") + (lib.enableFeature openglSupport "gl") + (lib.enableFeature pngSupport "png") + (lib.enableFeature jpegSupport "jpeg") + (lib.enableFeature tiffSupport "tiff") + (lib.enableFeature gifSupport "gif") + (lib.enableFeature alignedSupport "aligned") + (lib.enableFeature swap16bitcspSupport "swap-16bit-csp") + (lib.enableFeature experimentalSupport "experimental") + (lib.enableFeature libwebpmuxSupport "libwebpmux") + (lib.enableFeature libwebpdemuxSupport "libwebpdemux") + (lib.enableFeature libwebpdecoderSupport "libwebpdecoder") ]; nativeBuildInputs = [ autoreconfHook libtool ]; buildInputs = [ ] - ++ optionals openglSupport [ freeglut libGL libGLU ] - ++ optional pngSupport libpng - ++ optional jpegSupport libjpeg - ++ optional tiffSupport libtiff - ++ optional gifSupport giflib; + ++ lib.optionals openglSupport [ freeglut libGL libGLU ] + ++ lib.optionals pngSupport [ libpng ] + ++ lib.optionals jpegSupport [ libjpeg ] + ++ lib.optionals tiffSupport [ libtiff ] + ++ lib.optionals gifSupport [ giflib ]; enableParallelBuilding = true; - meta = { + meta = with lib; { description = "Tools and library for the WebP image format"; homepage = "https://developers.google.com/speed/webp/"; license = licenses.bsd3; platforms = platforms.all; - maintainers = with maintainers; [ codyopel ]; + maintainers = with maintainers; [ ajs124 ]; }; } From 77454bd32bcf84ba38c4b6e0f460a3e83ffbcfdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 28 Jun 2022 18:15:01 +0000 Subject: [PATCH 70/86] libjxl: fix build with asciidoc wrapped in shell script --- pkgs/development/libraries/libjxl/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/libraries/libjxl/default.nix b/pkgs/development/libraries/libjxl/default.nix index 049d79c7025eb..89cab8740900e 100644 --- a/pkgs/development/libraries/libjxl/default.nix +++ b/pkgs/development/libraries/libjxl/default.nix @@ -47,6 +47,17 @@ stdenv.mkDerivation rec { url = "https://github.com/libjxl/libjxl/commit/204f87a5e4d684544b13900109abf040dc0b402b.patch"; sha256 = "sha256-DoAaYWLmQ+R9GZbHMTYGe0gBL9ZesgtB+2WhmbARna8="; }) + + # fix build with asciidoc wrapped in shell script + (fetchpatch { + url = "https://github.com/libjxl/libjxl/commit/b8ec58c58c6281987f42ebec892f513824c0cc0e.patch"; + hash = "sha256-g8U+YVhLfgSHJ+PWJgvVOI66+FElJSC8IgSRodNnsMw="; + }) + (fetchpatch { + url = "https://github.com/libjxl/libjxl/commit/ca8e276aacf63a752346a6a44ba673b0af993237.patch"; + excludes = [ "AUTHORS" ]; + hash = "sha256-9VXy1LdJ0JhYbCGPNMySpnGLBxUrr8BYzE+oU3LnUGw="; + }) ]; nativeBuildInputs = [ From f031dafcc83f08a137e50569d77a51873ebf28ac Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 29 Jun 2022 09:48:29 +0000 Subject: [PATCH 71/86] libv4l: fix build for non-glibc platforms argp is a Glibc-specific feature. --- pkgs/os-specific/linux/v4l-utils/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/v4l-utils/default.nix b/pkgs/os-specific/linux/v4l-utils/default.nix index 3fdd9e791bd5f..f8d0c9be0d90d 100644 --- a/pkgs/os-specific/linux/v4l-utils/default.nix +++ b/pkgs/os-specific/linux/v4l-utils/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, pkg-config, perl -, libjpeg, udev +, argp-standalone, libjpeg, udev , withUtils ? true , withGUI ? true, alsa-lib, libX11, qtbase, libGLU, wrapQtAppsHook }: @@ -35,7 +35,9 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config perl ] ++ lib.optional withQt wrapQtAppsHook; - buildInputs = [ udev ] ++ lib.optionals withQt [ alsa-lib libX11 qtbase libGLU ]; + buildInputs = [ udev ] + ++ lib.optional (!stdenv.hostPlatform.isGnu) argp-standalone + ++ lib.optionals withQt [ alsa-lib libX11 qtbase libGLU ]; propagatedBuildInputs = [ libjpeg ]; From 77e6eda9b237561d8e3da020e20c84d17d4aaf27 Mon Sep 17 00:00:00 2001 From: squalus Date: Thu, 30 Jun 2022 09:24:58 -0700 Subject: [PATCH 72/86] python310Packages.setuptools-scm: fix cross compile of dependents Packages depending on setuptools-scm need the setuptools module at build time. Add setuptools to the propagatedBuildInputs so this is guaranteed. This fixes cross compile of the dependent packages. --- pkgs/development/python-modules/setuptools-scm/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/setuptools-scm/default.nix b/pkgs/development/python-modules/setuptools-scm/default.nix index c175cfb4c609b..5fa082d82210c 100644 --- a/pkgs/development/python-modules/setuptools-scm/default.nix +++ b/pkgs/development/python-modules/setuptools-scm/default.nix @@ -3,6 +3,7 @@ , fetchPypi , packaging , tomli +, setuptools , lib }: @@ -19,6 +20,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ packaging tomli + setuptools ]; pythonImportsCheck = [ From a1edc2fe67a6efd0c4fd0febb8008091daa5c2ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 26 Jun 2022 19:34:58 +0000 Subject: [PATCH 73/86] alsa-lib: 1.2.6.1 -> 1.2.7.1 --- pkgs/os-specific/linux/alsa-project/alsa-lib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/alsa-project/alsa-lib/default.nix b/pkgs/os-specific/linux/alsa-project/alsa-lib/default.nix index 58e5990ae0a6c..4928f114a88dc 100644 --- a/pkgs/os-specific/linux/alsa-project/alsa-lib/default.nix +++ b/pkgs/os-specific/linux/alsa-project/alsa-lib/default.nix @@ -7,11 +7,11 @@ stdenv.mkDerivation rec { pname = "alsa-lib"; - version = "1.2.6.1"; + version = "1.2.7.1"; src = fetchurl { url = "mirror://alsa/lib/${pname}-${version}.tar.bz2"; - hash = "sha256-rVgpk9Us21+xWaC+q2CmrFfqsMwb34XcTbbWGX8CMz8="; + hash = "sha256-BG3ELfz60mkhe+BZVGhhN+XnOX8wQTcvjG3NfXlGHmE="; }; patches = [ From 6e621eac20e17e5a113f35f44267ec47e4ee97dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 26 Jun 2022 19:37:06 +0000 Subject: [PATCH 74/86] alsa-plugins: 1.2.6 -> 1.2.7.1 --- pkgs/os-specific/linux/alsa-project/alsa-plugins/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/alsa-project/alsa-plugins/default.nix b/pkgs/os-specific/linux/alsa-project/alsa-plugins/default.nix index 86ff7ff5d2197..ababb767955bb 100644 --- a/pkgs/os-specific/linux/alsa-project/alsa-plugins/default.nix +++ b/pkgs/os-specific/linux/alsa-project/alsa-plugins/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "alsa-plugins"; - version = "1.2.6"; + version = "1.2.7.1"; src = fetchurl { url = "mirror://alsa/plugins/${pname}-${version}.tar.bz2"; - sha256 = "sha256-BogYpLVdjAKdqgABXYU9RRE/VrIkt8ZOHhF5iMglsqA="; + hash = "sha256-jDN4FJVLt8FnRWczpgRhQqKTHxLsy6PsKkrmGKNDJRE="; }; nativeBuildInputs = [ pkg-config ]; From 92370d9feab8b38ddbc83a2fddeac22ca8069d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 26 Jun 2022 19:39:46 +0000 Subject: [PATCH 75/86] alsa-ucm-conf: 1.2.6.3 -> 1.2.7.1 --- pkgs/os-specific/linux/alsa-project/alsa-ucm-conf/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/alsa-project/alsa-ucm-conf/default.nix b/pkgs/os-specific/linux/alsa-project/alsa-ucm-conf/default.nix index e1474e02ed5b5..512fe605b6e51 100644 --- a/pkgs/os-specific/linux/alsa-project/alsa-ucm-conf/default.nix +++ b/pkgs/os-specific/linux/alsa-project/alsa-ucm-conf/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "alsa-ucm-conf"; - version = "1.2.6.3"; + version = "1.2.7.1"; src = fetchurl { url = "mirror://alsa/lib/${pname}-${version}.tar.bz2"; - sha256 = "sha256-uKA6o4emJKL2XtwgG/d3QhGQtgUpqSCHZGgjr72Wxc0="; + hash = "sha256-rFsqEnV4Pv8H4cs0w2xsWYd0JnmjQAN1B8BKncHSLKw="; }; dontBuild = true; From 1a96397c081e0056abb0236ec29ca6422e333d01 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 28 Jun 2022 17:57:31 +0000 Subject: [PATCH 76/86] libsepol: enable parallel building Tested at -j48. --- pkgs/os-specific/linux/libsepol/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/os-specific/linux/libsepol/default.nix b/pkgs/os-specific/linux/libsepol/default.nix index 5fa51ac22382c..108e65072314c 100644 --- a/pkgs/os-specific/linux/libsepol/default.nix +++ b/pkgs/os-specific/linux/libsepol/default.nix @@ -31,6 +31,8 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "-Wno-error"; + enableParallelBuilding = true; + passthru = { inherit se_url; }; meta = with lib; { From 86c7c0917face6c771e4244a90d22c0ec04ce68c Mon Sep 17 00:00:00 2001 From: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com> Date: Fri, 1 Jul 2022 11:05:30 +0000 Subject: [PATCH 77/86] haskell.compiler.ghc865Binary: add powerpc64le bootstrap --- pkgs/development/compilers/ghc/8.6.5-binary.nix | 9 +++++++-- pkgs/top-level/haskell-packages.nix | 13 ++++++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.6.5-binary.nix b/pkgs/development/compilers/ghc/8.6.5-binary.nix index 22bfae79c0ce9..d7d2578cdc494 100644 --- a/pkgs/development/compilers/ghc/8.6.5-binary.nix +++ b/pkgs/development/compilers/ghc/8.6.5-binary.nix @@ -12,7 +12,8 @@ assert stdenv.targetPlatform == stdenv.hostPlatform; let useLLVM = !stdenv.targetPlatform.isx86; - useNcurses6 = stdenv.hostPlatform.system == "x86_64-linux"; + useNcurses6 = stdenv.hostPlatform.system == "x86_64-linux" + || (with stdenv.hostPlatform; isPower64 && isLittleEndian); ourNcurses = if useNcurses6 then ncurses6 else ncurses5; @@ -73,6 +74,10 @@ stdenv.mkDerivation rec { url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz"; sha256 = "0s9188vhhgf23q3rjarwhbr524z6h2qga5xaaa2pma03sfqvvhfz"; }; + powerpc64le-linux = { + url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-powerpc64le-fedora29-linux.tar.xz"; + sha256 = "sha256-tWSsJdPVrCiqDyIKzpBt5DaXb3b6j951tCya584kWs4="; + }; }.${stdenv.hostPlatform.system} or (throw "cannot bootstrap GHC on this platform")); @@ -211,7 +216,7 @@ stdenv.mkDerivation rec { meta = rec { license = lib.licenses.bsd3; - platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"]; + platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin" "powerpc64le-linux" ]; # build segfaults, use ghc8102Binary which has proper musl support instead broken = stdenv.hostPlatform.isMusl; maintainers = with lib.maintainers; [ diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 68a3230995694..b0d4a7325ced9 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -108,6 +108,9 @@ in { # Musl bindists do not exist for ghc 8.6.5, so we use 8.10.* for them if stdenv.isAarch64 || stdenv.isAarch32 then packages.ghc8107BinaryMinimal + else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then + # to my (@a-m-joseph) knowledge there are no newer official binaries for this platform + packages.ghc865Binary else packages.ghc8107Binary; inherit (buildPackages.python3Packages) sphinx; @@ -124,6 +127,8 @@ in { # the oldest ghc with aarch64-darwin support is 8.10.5 if stdenv.isAarch64 || stdenv.isAarch32 then packages.ghc8107BinaryMinimal + else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then + packages.ghc8107 else packages.ghc8107Binary; inherit (buildPackages.python3Packages) sphinx; @@ -136,6 +141,8 @@ in { # aarch64 ghc8107Binary exceeds max output size on hydra if stdenv.isAarch64 || stdenv.isAarch32 then packages.ghc8107BinaryMinimal + else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then + packages.ghc8107 else packages.ghc8107Binary; inherit (buildPackages.python3Packages) sphinx; @@ -147,7 +154,11 @@ in { llvmPackages = pkgs.llvmPackages_12; }; ghcHEAD = callPackage ../development/compilers/ghc/head.nix { - bootPkgs = packages.ghc8107Binary; + bootPkgs = + if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then + packages.ghc8107 + else + packages.ghc8107Binary; inherit (buildPackages.python3Packages) sphinx; # Need to use apple's patched xattr until # https://github.com/xattr/xattr/issues/44 and From 88738c79df4d09f4ec62cc5b5f25e0686f5885d9 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 1 Jul 2022 05:51:44 +0000 Subject: [PATCH 78/86] libsoup_3: 3.0.6 -> 3.0.7 --- pkgs/development/libraries/libsoup/3.x.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libsoup/3.x.nix b/pkgs/development/libraries/libsoup/3.x.nix index c4ab1094cced6..2b1c6e68795f9 100644 --- a/pkgs/development/libraries/libsoup/3.x.nix +++ b/pkgs/development/libraries/libsoup/3.x.nix @@ -21,13 +21,13 @@ stdenv.mkDerivation rec { pname = "libsoup"; - version = "3.0.6"; + version = "3.0.7"; outputs = [ "out" "dev" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-tF1Z+EC5rPm7Rf1FhU4+9nL1fjq5V0AcOtjXUCrCPaY="; + sha256 = "sha256-69+QzzWZwRrLtoGKnZ4/ydLGjlbrgpuTlilyaD4b98g="; }; nativeBuildInputs = [ From c99ba0c467261c483fb9b06d177f44082921f8ce Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 1 Jul 2022 03:10:57 +0000 Subject: [PATCH 79/86] glib: 2.72.2 -> 2.72.3 --- pkgs/development/libraries/glib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 29a1f642089dd..8fb12fc0203a1 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -45,11 +45,11 @@ in stdenv.mkDerivation rec { pname = "glib"; - version = "2.72.2"; + version = "2.72.3"; src = fetchurl { url = "mirror://gnome/sources/glib/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "eNWZoTPbp/4gNt+o24+2Exq5ZCeD/JV4sHogmVJS0t4="; + sha256 = "Sjmi9iS4US1QDVhAFz7af6hfUcEJBS6ugGrOzoXTRfA="; }; patches = optionals stdenv.isDarwin [ From 0e9dd6bd57d1fa6d58ddcfa28547ee2037a1a808 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 13 Jun 2022 06:12:53 +0000 Subject: [PATCH 80/86] libopenmpt: 0.6.3 -> 0.6.4 --- pkgs/development/libraries/audio/libopenmpt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/audio/libopenmpt/default.nix b/pkgs/development/libraries/audio/libopenmpt/default.nix index 2cca0078aff2d..bd383ffe39c40 100644 --- a/pkgs/development/libraries/audio/libopenmpt/default.nix +++ b/pkgs/development/libraries/audio/libopenmpt/default.nix @@ -16,13 +16,13 @@ stdenv.mkDerivation rec { pname = "libopenmpt"; - version = "0.6.3"; + version = "0.6.4"; outputs = [ "out" "dev" "bin" ]; src = fetchurl { url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz"; - sha256 = "pBCv63zVlwsWuabOfazPSVsaXpEhqdZELeDAKP1Uols="; + sha256 = "4J+4RcMpJwCnrBPDsx1mns072+vL/hMo66I3bOvkAWI="; }; enableParallelBuilding = true; From a720bc44c23c80a49dab05c7907c2e58681b425d Mon Sep 17 00:00:00 2001 From: Artturin Date: Wed, 1 Jun 2022 21:13:44 +0300 Subject: [PATCH 81/86] buildRubyGem: fix bundix cross allows building bundix but most ruby gems still fail with ``` ++ gem install --local --force --http-proxy http://nodtd.invalid --ignore-dependencies --install-dir /nix/store/...-ruby-aarch64-unknown-linux-gnu2.7.6-nio4r-2.5.8-aarch64-unknown-linux-gnu/lib/ruby/gems/2.7.0 --build-root / --backtrace --no-env-shebang -N /nix/store/...-nio4r-2.5.8.gem -- /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 8: require: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 9: require: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 10: require: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 12: required_version: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 14: unless: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 15: abort: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 16: end: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 18: args: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 20: begin: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 21: Gem::GemRunner.new.run: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 22: rescue: command not found /nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 23: exit: e.exit_code: numeric argument required ``` --- pkgs/development/ruby-modules/gem/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ruby-modules/gem/default.nix b/pkgs/development/ruby-modules/gem/default.nix index 7ba8c70a98059..649d33c464617 100644 --- a/pkgs/development/ruby-modules/gem/default.nix +++ b/pkgs/development/ruby-modules/gem/default.nix @@ -35,6 +35,7 @@ lib.makeOverridable ( , namePrefix ? (let rubyName = builtins.parseDrvName ruby.name; in "${rubyName.name}${rubyName.version}-") +, nativeBuildInputs ? [] , buildInputs ? [] , meta ? {} , patches ? [] @@ -87,11 +88,15 @@ stdenv.mkDerivation ((builtins.removeAttrs attrs ["source"]) // { inherit dontStrip; inherit type; - buildInputs = [ + nativeBuildInputs = [ ruby makeWrapper ] ++ lib.optionals (type == "git") [ gitMinimal ] ++ lib.optionals (type != "gem") [ bundler ] - ++ lib.optional stdenv.isDarwin darwin.libobjc + ++ nativeBuildInputs; + + buildInputs = [ + ruby + ] ++ lib.optionals stdenv.isDarwin [ darwin.libobjc ] ++ buildInputs; #name = builtins.trace (attrs.name or "no attr.name" ) "${namePrefix}${gemName}-${version}"; From 6b8ce2acdf842f17878c4f059ccede137eb9b199 Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 2 Jun 2022 16:04:21 +0300 Subject: [PATCH 82/86] buildRubyGem: inherit libobjc from darwin --- pkgs/development/ruby-modules/gem/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ruby-modules/gem/default.nix b/pkgs/development/ruby-modules/gem/default.nix index 649d33c464617..e5f9d045a5b49 100644 --- a/pkgs/development/ruby-modules/gem/default.nix +++ b/pkgs/development/ruby-modules/gem/default.nix @@ -18,7 +18,7 @@ # Normal gem packages can be used outside of bundler; a binstub is created in # $out/bin. -{ lib, fetchurl, fetchgit, makeWrapper, gitMinimal, darwin +{ lib, fetchurl, fetchgit, makeWrapper, gitMinimal, libobjc , ruby, bundler } @ defs: @@ -96,7 +96,7 @@ stdenv.mkDerivation ((builtins.removeAttrs attrs ["source"]) // { buildInputs = [ ruby - ] ++ lib.optionals stdenv.isDarwin [ darwin.libobjc ] + ] ++ lib.optionals stdenv.isDarwin [ libobjc ] ++ buildInputs; #name = builtins.trace (attrs.name or "no attr.name" ) "${namePrefix}${gemName}-${version}"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cad446e147fe9..ec65625a41ebf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14584,7 +14584,9 @@ with pkgs; inherit (ocamlPackages) reason; - buildRubyGem = callPackage ../development/ruby-modules/gem { }; + buildRubyGem = callPackage ../development/ruby-modules/gem { + inherit (darwin) libobjc; + }; defaultGemConfig = callPackage ../development/ruby-modules/gem-config { inherit (darwin) DarwinTools cctools; inherit (darwin.apple_sdk.frameworks) CoreServices; From 8004d0e497b3b0d5908bcd0ffb1ffc748eb8d934 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 30 Jun 2022 20:06:08 +0000 Subject: [PATCH 83/86] rustc: 1.61.0 -> 1.62.0 --- .../compilers/rust/{1_61.nix => 1_62.nix} | 32 +++++++++---------- pkgs/top-level/all-packages.nix | 8 ++--- 2 files changed, 20 insertions(+), 20 deletions(-) rename pkgs/development/compilers/rust/{1_61.nix => 1_62.nix} (56%) diff --git a/pkgs/development/compilers/rust/1_61.nix b/pkgs/development/compilers/rust/1_62.nix similarity index 56% rename from pkgs/development/compilers/rust/1_61.nix rename to pkgs/development/compilers/rust/1_62.nix index 7726c2db10ea2..779d24c4959c4 100644 --- a/pkgs/development/compilers/rust/1_61.nix +++ b/pkgs/development/compilers/rust/1_62.nix @@ -20,8 +20,8 @@ } @ args: import ./default.nix { - rustcVersion = "1.61.0"; - rustcSha256 = "1vfs05hkf9ilk19b2vahqn8l6k17pl9nc1ky9kgspaascx8l62xd"; + rustcVersion = "1.62.0"; + rustcSha256 = "09y06qmh7ihi9kgimpp3h4nj3cmgc1zypqyaba10dlk4kf07h23x"; llvmSharedForBuild = pkgsBuildBuild.llvmPackages_14.libllvm.override { enableSharedLibraries = true; }; llvmSharedForHost = pkgsBuildHost.llvmPackages_14.libllvm.override { enableSharedLibraries = true; }; @@ -37,25 +37,25 @@ import ./default.nix { # Note: the version MUST be one version prior to the version we're # building - bootstrapVersion = "1.60.0"; + bootstrapVersion = "1.61.0"; # fetch hashes by running `print-hashes.sh ${bootstrapVersion}` bootstrapHashes = { - i686-unknown-linux-gnu = "2a635269dc9ad8f7bbdf168cdf120e1ec803d36adc832c0804f38e0acc3e2357"; - x86_64-unknown-linux-gnu = "b8a4c3959367d053825e31f90a5eb86418eb0d80cacda52bfa80b078e18150d5"; - x86_64-unknown-linux-musl = "f0feefcb1985c5c894ad9b0f44e6f09900b31c0eb5f49827da9f37d332a63894"; - arm-unknown-linux-gnueabihf = "161b2b97d4512080350cc6656b0765ebae870335e86c2896bed08b32c66fbdf4"; - armv7-unknown-linux-gnueabihf = "f2d76e9458949675bab8fcae44f600d30d91f62bf93c127b6b1fe3130e67d5d9"; - aarch64-unknown-linux-gnu = "99c419c2f35d4324446481c39402c7baecd7a8baed7edca9f8d6bbd33c05550c"; - aarch64-unknown-linux-musl = "fe7e9bad8beea84973f7ffa39879929de4ac8afad872650fb0af6b068f05faa6"; - x86_64-apple-darwin = "0b10dc45cddc4d2355e38cac86d71a504327cb41d41d702d4050b9847ad4258c"; - aarch64-apple-darwin = "b532672c278c25683ca63d78e82bae829eea1a32308e844954fb66cfe34ad222"; - powerpc64le-unknown-linux-gnu = "80125e90285b214c2b1f56ab86a09c8509aa17aec9d7127960a86a7008e8f7de"; - riscv64gc-unknown-linux-gnu = "9cc7c6804bcbbecb9c35232035fc488dbcc8487606cc6be3da553cc446bf0fcd"; - mips64el-unknown-linux-gnuabi64 = "d413681c22511259f7cd15414a00050cf151d46ac0f9282e765faeb86688deac"; + i686-unknown-linux-gnu = "b15eb0ad44b7253e0b5b1a8cd285feb10e9fb0402840dba9a13112c3349a4b39"; + x86_64-unknown-linux-gnu = "066b324239d30787ce64142d7e04912f2e1850c07db3b2354d8654e02ff8b23a"; + x86_64-unknown-linux-musl = "0904f6b769ae28c259e0e25a41e99290a4ae2a36bca63ae153790b2ebbc427bf"; + arm-unknown-linux-gnueabihf = "cc32705cd1b583aaac74e6663f71392131dc0355a0f484cb56f0378b71ea7ebc"; + armv7-unknown-linux-gnueabihf = "2782ec75ea4abb402513e2e57becc6c14e67b492d57228cddedef6db0853b165"; + aarch64-unknown-linux-gnu = "261cd47bc3c98c9f97b601d1ad2a7d9b33c9ea63c9a351119c2f6d4e82f5d436"; + aarch64-unknown-linux-musl = "feb79985cb161a10b252236852df8db3bf3593c78905b84c7e94cd4454327e47"; + x86_64-apple-darwin = "d851f1a473926a5d8f111ed08002047a5dc4ad944a5b7f8d5d2f1f266b51e66a"; + aarch64-apple-darwin = "2dbafd13d007543aada47179fa273f9a3865f27e0a07bd69be61801232a0819e"; + powerpc64le-unknown-linux-gnu = "6d5cd579b68a2adc20384406c69a92beaaf4941056e126ff0ed1ec2f3a4e721f"; + riscv64gc-unknown-linux-gnu = "3d0f3b1a8522e09fffdf920a061794ac3107410eb1fe8f5d62a7aae3c6dcb81e"; + mips64el-unknown-linux-gnuabi64 = "6ed5b6492e68f45488108abd06dbcd4b89c46cdbd4715331bb11e88f18500815"; }; - selectRustPackage = pkgs: pkgs.rust_1_61; + selectRustPackage = pkgs: pkgs.rust_1_62; rustcPatches = [ ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b6acd73e0b022..bdbf8a806bc36 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13940,18 +13940,18 @@ with pkgs; inherit (darwin) apple_sdk; }; - rust_1_61 = callPackage ../development/compilers/rust/1_61.nix { + rust_1_62 = callPackage ../development/compilers/rust/1_62.nix { inherit (darwin.apple_sdk.frameworks) CoreFoundation Security SystemConfiguration; llvm_14 = llvmPackages_14.libllvm; }; - rust = rust_1_61; + rust = rust_1_62; mrustc = callPackage ../development/compilers/mrustc { }; mrustc-minicargo = callPackage ../development/compilers/mrustc/minicargo.nix { }; mrustc-bootstrap = callPackage ../development/compilers/mrustc/bootstrap.nix { stdenv = gcc10StdenvCompat; }; - rustPackages_1_61 = rust_1_61.packages.stable; - rustPackages = rustPackages_1_61; + rustPackages_1_62 = rust_1_62.packages.stable; + rustPackages = rustPackages_1_62; inherit (rustPackages) cargo clippy rustc rustPlatform; From dc5bdd685252c2be9432f274186283e00bd23ac9 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 2 Jul 2022 15:45:37 -0700 Subject: [PATCH 84/86] Revert "stdenv: label the ephemeral coreutils-stage4 package" This reverts commit 23ea8b35dacd9152c9e0e21577d5afe3e39b6255. --- pkgs/stdenv/linux/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 880286bbcd2f1..3b4588a70f9c3 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -355,9 +355,6 @@ in # stage5.gcc -> stage4.coreutils -> stage3.glibc -> bootstrap gmp = lib.makeOverridable (super.gmp.override { stdenv = self.stdenv; }).overrideAttrs (a: { pname = "${a.pname}-stage4"; }); - # coreutils gets rebuilt both here and also in the final stage; we rename this one to avoid confusion - coreutils = super.coreutils.overrideAttrs (a: { pname = "${a.pname}-stage4"; }); - gcc = lib.makeOverridable (import ../../build-support/cc-wrapper) { nativeTools = false; nativeLibc = false; From 3d0e70ae2ad9a6545eb70b067b5c081eba45ee6c Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sun, 3 Jul 2022 03:42:49 +0200 Subject: [PATCH 85/86] gnupg: Add patch for CVE-2022-34903 https://www.openwall.com/lists/oss-security/2022/06/30/1 https://dev.gnupg.org/T6027 --- pkgs/tools/security/gnupg/23.nix | 3 ++ ...led-status-messages-in-NOTATION_DATA.patch | 45 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 pkgs/tools/security/gnupg/CVE-2022-34903-g10-fix-garbled-status-messages-in-NOTATION_DATA.patch diff --git a/pkgs/tools/security/gnupg/23.nix b/pkgs/tools/security/gnupg/23.nix index 3687a1e9582e5..b07a3550c76dd 100644 --- a/pkgs/tools/security/gnupg/23.nix +++ b/pkgs/tools/security/gnupg/23.nix @@ -34,6 +34,9 @@ stdenv.mkDerivation rec { ./tests-add-test-cases-for-import-without-uid.patch ./allow-import-of-previously-known-keys-even-without-UI.patch ./accept-subkeys-with-a-good-revocation-but-no-self-sig.patch + + # Patch from upstream 34c649b36013, https://dev.gnupg.org/T6027 + ./CVE-2022-34903-g10-fix-garbled-status-messages-in-NOTATION_DATA.patch ]; postPatch = '' sed -i 's,\(hkps\|https\)://keyserver.ubuntu.com,hkps://keys.openpgp.org,g' configure configure.ac doc/dirmngr.texi doc/gnupg.info-1 diff --git a/pkgs/tools/security/gnupg/CVE-2022-34903-g10-fix-garbled-status-messages-in-NOTATION_DATA.patch b/pkgs/tools/security/gnupg/CVE-2022-34903-g10-fix-garbled-status-messages-in-NOTATION_DATA.patch new file mode 100644 index 0000000000000..4383475a1c83d --- /dev/null +++ b/pkgs/tools/security/gnupg/CVE-2022-34903-g10-fix-garbled-status-messages-in-NOTATION_DATA.patch @@ -0,0 +1,45 @@ +commit 34c649b3601383cd11dbc76221747ec16fd68e1b +Author: Werner Koch +Date: 2022-06-14 11:33:27 +0200 + + g10: Fix garbled status messages in NOTATION_DATA + + * g10/cpr.c (write_status_text_and_buffer): Fix off-by-one + -- + + Depending on the escaping and line wrapping the computed remaining + buffer length could be wrong. Fixed by always using a break to + terminate the escape detection loop. Might have happened for all + status lines which may wrap. + + GnuPG-bug-id: T6027 + +diff --git a/g10/cpr.c b/g10/cpr.c +index 9bfdd3c34..fa8005d6f 100644 +--- a/g10/cpr.c ++++ b/g10/cpr.c +@@ -372,20 +372,15 @@ write_status_text_and_buffer (int no, const char *string, + } + first = 0; + } +- for (esc=0, s=buffer, n=len; n && !esc; s++, n--) ++ for (esc=0, s=buffer, n=len; n; s++, n--) + { + if (*s == '%' || *(const byte*)s <= lower_limit + || *(const byte*)s == 127 ) + esc = 1; + if (wrap && ++count > wrap) +- { +- dowrap=1; +- break; +- } +- } +- if (esc) +- { +- s--; n++; ++ dowrap=1; ++ if (esc || dowrap) ++ break; + } + if (s != buffer) + es_fwrite (buffer, s-buffer, 1, statusfp); From de839d3e313118127266eae55cbd67b43f755f61 Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Mon, 4 Jul 2022 13:55:52 +0800 Subject: [PATCH 86/86] google-auth: Remove pyopenssl Pyopenssl is in `extras_require` (optional), and only needed if mTLS feature is enabled (disabled by default) https://github.com/googleapis/google-auth-library-python/pull/697 This will also make google-auth available on aarch64-darwin since pyopenssl is broken https://github.com/NixOS/nixpkgs/pull/172397 --- pkgs/development/python-modules/google-auth/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/python-modules/google-auth/default.nix b/pkgs/development/python-modules/google-auth/default.nix index 36ed891189948..3882f3571e4df 100644 --- a/pkgs/development/python-modules/google-auth/default.nix +++ b/pkgs/development/python-modules/google-auth/default.nix @@ -13,7 +13,6 @@ , pytest-localserver , responses , rsa -, pyopenssl }: buildPythonPackage rec { @@ -29,7 +28,6 @@ buildPythonPackage rec { cachetools pyasn1-modules rsa - pyopenssl pyu2f ];