From e68d2cf1284087f39b1ff55b62f656b0d111f352 Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Tue, 14 Dec 2021 13:04:02 +0900 Subject: [PATCH 01/73] help2man: restore nls support on darwin, make nls explicit --- pkgs/development/tools/misc/help2man/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/help2man/default.nix b/pkgs/development/tools/misc/help2man/default.nix index 4521eee95a2..27309183b7c 100644 --- a/pkgs/development/tools/misc/help2man/default.nix +++ b/pkgs/development/tools/misc/help2man/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, perlPackages, gettext }: +{ lib, stdenv, fetchurl, perlPackages, gettext, libintl }: # Note: this package is used for bootstrapping fetchurl, and thus # cannot use fetchpatch! All mutable patches (generated by GitHub or @@ -17,7 +17,11 @@ stdenv.mkDerivation rec { strictDeps = true; nativeBuildInputs = [ gettext perlPackages.perl perlPackages.LocaleGettext ]; - buildInputs = [ perlPackages.LocaleGettext ]; + buildInputs = [ perlPackages.LocaleGettext libintl ]; + + configureFlags = [ + "--enable-nls" + ]; doCheck = false; # target `check' is missing From 63a37b844cc5e82eb4e963f6fc85b99d2050117f Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Mon, 21 Feb 2022 19:58:30 +0100 Subject: [PATCH 02/73] darwin: deprecate phases --- pkgs/stdenv/darwin/default.nix | 75 +++++++++++----------------------- 1 file changed, 23 insertions(+), 52 deletions(-) diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index a6f927c287d..89132b8b3bb 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -98,6 +98,7 @@ rec { doSign = localSystem.isAarch64 && last != null; doUpdateAutoTools = localSystem.isAarch64 && last != null; + inherit (last.pkgs) runCommandLocal; mkExtraBuildCommands = cc: '' rsrc="$out/resource-root" @@ -223,23 +224,15 @@ rec { ''; }; - pbzx = stdenv.mkDerivation { - name = "bootstrap-stage0-pbzx"; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/bin - ln -s ${bootstrapTools}/bin/pbzx $out/bin - ''; - }; + pbzx = self.runCommandLocal "bootstrap-stage0-pbzx" { } '' + mkdir -p $out/bin + ln -s ${bootstrapTools}/bin/pbzx $out/bin + ''; - cpio = stdenv.mkDerivation { - name = "bootstrap-stage0-cpio"; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/bin - ln -s ${bootstrapFiles.cpio} $out/bin/cpio - ''; - }; + cpio = self.runCommandLocal "bootstrap-stage0-cpio" { } '' + mkdir -p $out/bin + ln -s ${bootstrapFiles.cpio} $out/bin/cpio + ''; darwin = super.darwin.overrideScope (selfDarwin: superDarwin: { darwin-stubs = superDarwin.darwin-stubs.override { inherit (self) stdenvNoCC fetchurl; }; @@ -253,43 +246,21 @@ rec { ''; }; - sigtool = stdenv.mkDerivation { - name = "bootstrap-stage0-sigtool"; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/bin - ln -s ${bootstrapTools}/bin/sigtool $out/bin - - # Rewrite nuked references - sed -e "s|[^( ]*\bsigtool\b|$out/bin/sigtool|g" \ - ${bootstrapTools}/bin/codesign > $out/bin/codesign - chmod a+x $out/bin/codesign - ''; - # on next bootstrap tools update, use the following: - # installPhase = '' - # mkdir -p $out/bin - # ln -s ${bootstrapTools}/bin/sigtool $out/bin - # ln -s ${bootstrapTools}/bin/codesign $out/bin - # ''; - }; + sigtool = self.runCommandLocal "bootstrap-stage0-sigtool" { } '' + mkdir -p $out/bin + ln -s ${bootstrapTools}/bin/sigtool $out/bin + ln -s ${bootstrapTools}/bin/codesign $out/bin + ''; - print-reexports = stdenv.mkDerivation { - name = "bootstrap-stage0-print-reexports"; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/bin - ln -s ${bootstrapTools}/bin/print-reexports $out/bin - ''; - }; + print-reexports = self.runCommandLocal "bootstrap-stage0-print-reexports" { } '' + mkdir -p $out/bin + ln -s ${bootstrapTools}/bin/print-reexports $out/bin + ''; - rewrite-tbd = stdenv.mkDerivation { - name = "bootstrap-stage0-rewrite-tbd"; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/bin - ln -s ${bootstrapTools}/bin/rewrite-tbd $out/bin - ''; - }; + rewrite-tbd = self.runCommandLocal "bootstrap-stage0-rewrite-tbd" { } '' + mkdir -p $out/bin + ln -s ${bootstrapTools}/bin/rewrite-tbd $out/bin + ''; binutils-unwrapped = { name = "bootstrap-stage0-binutils"; outPath = bootstrapTools; }; @@ -359,7 +330,7 @@ rec { libcxx = stdenv.mkDerivation { name = "bootstrap-stage0-libcxx"; - phases = [ "installPhase" "fixupPhase" ]; + dontUnpack = true; installPhase = '' mkdir -p $out/lib $out/include ln -s ${bootstrapTools}/lib/libc++.dylib $out/lib/libc++.dylib From f0dd951db17b18608c2c52447ae8b91f5c725f2f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 15 Mar 2022 09:00:15 +0000 Subject: [PATCH 03/73] libsForQt5.signond: 8.60 -> 8.61 --- pkgs/development/libraries/signond/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/signond/default.nix b/pkgs/development/libraries/signond/default.nix index 7e986ed2635..ff5aeca626e 100644 --- a/pkgs/development/libraries/signond/default.nix +++ b/pkgs/development/libraries/signond/default.nix @@ -2,13 +2,13 @@ mkDerivation rec { pname = "signond"; - version = "8.60"; + version = "8.61"; src = fetchFromGitLab { owner = "accounts-sso"; repo = pname; rev = "VERSION_${version}"; - sha256 = "pFpeJ13ut5EoP37W33WrYL2LzkX/k7ZKJcRpPO5l8i4="; + sha256 = "sha256-d7JZmGpjIvSN9l1nvKbBZjF0OR5L5frPTGHF/pNEqHE="; }; nativeBuildInputs = [ From 688695bde7c85088cccc1419a0f8a273966415eb Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Wed, 30 Mar 2022 20:41:56 +0200 Subject: [PATCH 04/73] imlib2: 1.7.5 -> 1.8.1 --- pkgs/development/libraries/imlib2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/imlib2/default.nix b/pkgs/development/libraries/imlib2/default.nix index 1447a327e0d..43f3c71d394 100644 --- a/pkgs/development/libraries/imlib2/default.nix +++ b/pkgs/development/libraries/imlib2/default.nix @@ -12,11 +12,11 @@ let in stdenv.mkDerivation rec { pname = "imlib2"; - version = "1.7.5"; + version = "1.8.1"; src = fetchurl { url = "mirror://sourceforge/enlightenment/${pname}-${version}.tar.xz"; - hash = "sha256-RY2DAKp6bUzjU1GDi7pdn9+wiES9WxU8WTjs/kP/Ngo="; + hash = "sha256-Ui4ecOZbwO3f4gdhfRXJo5VmKnwJBmHaqiwpT7fZ/ao="; }; buildInputs = [ From 078379eb336c73ebe87323732b53ea06e8e700cb Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Mon, 4 Apr 2022 18:45:13 +0200 Subject: [PATCH 05/73] imlib2: add svg and heif support --- pkgs/development/libraries/imlib2/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/imlib2/default.nix b/pkgs/development/libraries/imlib2/default.nix index 43f3c71d394..a882a660833 100644 --- a/pkgs/development/libraries/imlib2/default.nix +++ b/pkgs/development/libraries/imlib2/default.nix @@ -2,7 +2,7 @@ # Image file formats , libjpeg, libtiff, giflib, libpng, libwebp # imlib2 can load images from ID3 tags. -, libid3tag +, libid3tag, librsvg, libheif , freetype , bzip2, pkg-config , x11Support ? true, xlibsWrapper ? null }: @@ -21,8 +21,11 @@ stdenv.mkDerivation rec { buildInputs = [ libjpeg libtiff giflib libpng libwebp - bzip2 freetype libid3tag - ] ++ optional x11Support xlibsWrapper; + bzip2 freetype libid3tag libheif + ] ++ optional x11Support xlibsWrapper + # Compilation error on Darwin with librsvg. For more information see: + # https://github.com/NixOS/nixpkgs/pull/166452#issuecomment-1090725613 + ++ optional (!stdenv.isDarwin) librsvg; nativeBuildInputs = [ pkg-config ]; From f6999e0cc5d3b5b970bfa2fdc52e9c9fbcde2091 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 27 Mar 2022 18:07:48 -0400 Subject: [PATCH 06/73] sane-backends: fix build on Darwin --- pkgs/applications/graphics/sane/backends/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/graphics/sane/backends/default.nix b/pkgs/applications/graphics/sane/backends/default.nix index 93a7d75ce45..d3c5b1c0b75 100644 --- a/pkgs/applications/graphics/sane/backends/default.nix +++ b/pkgs/applications/graphics/sane/backends/default.nix @@ -40,18 +40,19 @@ stdenv.mkDerivation { buildInputs = [ avahi libgphoto2 - libieee1284 libjpeg libpng libtiff libusb1 - libv4l - net-snmp curl - systemd libxml2 poppler gawk + ] ++ lib.optionals stdenv.isLinux [ + libieee1284 + libv4l + net-snmp + systemd ]; enableParallelBuilding = true; @@ -113,6 +114,6 @@ stdenv.mkDerivation { ''; homepage = "http://www.sane-project.org/"; license = licenses.gpl2Plus; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; } From e34b228626cc36ea05455376f5d21c13fd9040cf Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Thu, 21 Apr 2022 22:58:56 -0700 Subject: [PATCH 07/73] pandoc: don't use remove-references-to with haskellPackages.HTTP Pandoc no longer depends on haskellPackages.HTTP at all. --- pkgs/development/tools/pandoc/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/development/tools/pandoc/default.nix b/pkgs/development/tools/pandoc/default.nix index e587a2ef4e7..515c7dc4c37 100644 --- a/pkgs/development/tools/pandoc/default.nix +++ b/pkgs/development/tools/pandoc/default.nix @@ -13,9 +13,6 @@ in remove-references-to \ -t ${haskellPackages.pandoc-types} \ $out/bin/pandoc - remove-references-to \ - -t ${haskellPackages.HTTP} \ - $out/bin/pandoc ''; }) static).overrideAttrs (drv: { # These libraries are still referenced, because they generate @@ -25,5 +22,5 @@ in # lead to a transitive runtime dependency on the whole GHC distribution. # This should ideally be fixed in haskellPackages (or even Cabal), # but a minimal pandoc is important enough to patch it manually. - disallowedReferences = [ haskellPackages.pandoc-types haskellPackages.HTTP ]; + disallowedReferences = [ haskellPackages.pandoc-types ]; }) From d9218155d2b3b0ce9d0c7fbc6bcfbf5beec4670c Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 21 Apr 2022 13:54:14 +0200 Subject: [PATCH 08/73] ghostscript: use system-wide openjpeg The following error occurs when using `imagemagickBig`: $ ./result/bin/identify sample.jp2 [1] 699089 IOT instruction (core dumped) ./result/bin/identify sample.jp2 When looking at the call-trace it seems as if certain symbols, e.g. `opj_malloc` are mixed up: #8 0x00007f78c79ad2f5 in MagickSignalHandler.cold () from /nix/store/bqy80qiw6czqh7vsmmmivwdswp9zzjgl-imagemagick-7.1.0-29/lib/libMagickCore-7.Q16HDRI.so.10 #9 #10 0x00007f78c5a6095f in opj_malloc () from /nix/store/wg6ly83k1k1fjiygiv1jr7li3p6dwsvq-ghostscript-with-X-9.55.0/lib/libgs.so.9 #11 0x00007f78c5a60981 in opj_calloc () from /nix/store/wg6ly83k1k1fjiygiv1jr7li3p6dwsvq-ghostscript-with-X-9.55.0/lib/libgs.so.9 #12 0x00007f78c4f48e24 in opj_create_decompress () from /nix/store/qwalb0kjz1p9c4j48qkk6ql47ds2lnhh-openjpeg-2.4.0/lib/libopenjp2.so.7 The `opj_create_decompress()` is called from the `openjpeg`-integration of `imagemagick` and thus shouldn't affect `ghostscript` at all. However, `ghostscript` (`libgs.so` to be precise) also exposes e.g. `opj_malloc`: $ objdump -t /nix/store/wg6ly83k1k1fjiygiv1jr7li3p6dwsvq-ghostscript-with-X-9.55.0/lib/libgs.so.9.55|grep opj_malloc 0000000000205940 g F .text 000000000000002b opj_malloc Because of that, two incompatible symbols are used in the same process and thus the `identify`-call breaks because the wrong one is used. To work around that I decided to use the system-wide openjpeg instead. I'm not sure why `libgs.so` wants to expose these symbols anyways, but with that workaround the problem is solved. Even though it's mentioned that ghostscript's openjpeg is heavily patched, I think that this is somewhat outdated or at least irrelevant considering that both ArchLinux[1] and Fedora[2] use the system-wide `openjpeg` instead. [1] https://github.com/archlinux/svntogit-packages/blob/bafcb5473b59d5386dd110d1cb249372dce9ea6c/trunk/PKGBUILD#L50 [2] https://src.fedoraproject.org/rpms/ghostscript/blob/e4eec13ab6ace2bad64b740d352964bbf61d1aa7/f/ghostscript.spec#_245 --- pkgs/misc/ghostscript/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index 327cf286234..2c6b800db1f 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -1,6 +1,6 @@ { config, stdenv, lib, fetchurl, pkg-config, zlib, expat, openssl, autoconf , libjpeg, libpng, libtiff, freetype, fontconfig, libpaper, jbig2dec -, libiconv, ijs, lcms2, fetchpatch, callPackage, bash, buildPackages +, libiconv, ijs, lcms2, fetchpatch, callPackage, bash, buildPackages, openjpeg , cupsSupport ? config.ghostscript.cups or (!stdenv.isDarwin), cups , x11Support ? cupsSupport, xlibsWrapper # with CUPS, X11 only adds very little }: @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { buildInputs = [ zlib expat openssl libjpeg libpng libtiff freetype fontconfig libpaper jbig2dec - libiconv ijs lcms2 bash + libiconv ijs lcms2 bash openjpeg ] ++ lib.optional x11Support xlibsWrapper ++ lib.optional cupsSupport cups @@ -72,8 +72,7 @@ stdenv.mkDerivation rec { export CCAUX=$CC_FOR_BUILD ${lib.optionalString cupsSupport ''export CUPSCONFIG="${cups.dev}/bin/cups-config"''} - # requires in-tree (heavily patched) openjpeg - rm -rf jpeg libpng zlib jasper expat tiff lcms2mt jbig2dec freetype cups/libs ijs + rm -rf jpeg libpng zlib jasper expat tiff lcms2mt jbig2dec freetype cups/libs ijs openjpeg sed "s@if ( test -f \$(INCLUDE)[^ ]* )@if ( true )@; s@INCLUDE=/usr/include@INCLUDE=/no-such-path@" -i base/unix-aux.mak sed "s@^ZLIBDIR=.*@ZLIBDIR=${zlib.dev}/include@" -i configure.ac From 8203e061ec0556b4d4a972b18ba92509cb1ddd04 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 23 Apr 2022 04:20:00 +0000 Subject: [PATCH 09/73] icu71: init at 71.1 https://github.com/unicode-org/icu/releases/tag/release-71-1 --- pkgs/development/libraries/icu/71.nix | 4 ++++ pkgs/top-level/all-packages.nix | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 pkgs/development/libraries/icu/71.nix diff --git a/pkgs/development/libraries/icu/71.nix b/pkgs/development/libraries/icu/71.nix new file mode 100644 index 00000000000..456dffc322a --- /dev/null +++ b/pkgs/development/libraries/icu/71.nix @@ -0,0 +1,4 @@ +import ./base.nix { + version = "71.1"; + sha256 = "sha256-Z6fm5R9h+vEwa2k1Mz4TssSKvY2m0vRs5q3KJLHiHr8="; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7ef042038b1..5df293f5aca 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17801,6 +17801,11 @@ with pkgs; } // (lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.cc.isGNU) { stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' })); + icu71 = callPackage ../development/libraries/icu/71.nix ({ + nativeBuildRoot = buildPackages.icu71.override { buildRootOnly = true; }; + } // (lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.cc.isGNU) { + stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' + })); icu = icu70; From 4f55f016f5fe90aedeaa627f629bc095f4ea2ee0 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 23 Apr 2022 04:20:00 +0000 Subject: [PATCH 10/73] icu: 70.1 -> 71.1 --- 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 5df293f5aca..a6f6dfd2625 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17807,7 +17807,7 @@ with pkgs; stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' })); - icu = icu70; + icu = icu71; id3lib = callPackage ../development/libraries/id3lib { }; From 77a189e066a839b1c8bb7cb8c125d434d15854ac Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 23 Apr 2022 18:49:59 +0100 Subject: [PATCH 11/73] systemd: disable EFI stripping In Issue #169693 we found out that systemd-bootaa64.efi does not have required `#### LoaderInfo: systemd-boot 250.4 ####` marking. It is destroyed by `nixpkgs`'s `_doStrip` hook (part of `fixupOutputHooks`). It makes sense as PE32+ is a bit different from ELF where `.sdmagic` section is inserted. The change avoids stripping EFI files altogether by moving them out of default strip directories of _doStrip for the time while `fixupPhase` is running. Closes: https://github.com/NixOS/nixpkgs/issues/169693 --- pkgs/os-specific/linux/systemd/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index e130abbf27f..a32083850b5 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -666,6 +666,18 @@ stdenv.mkDerivation { rm -rf $out/share/doc ''; + # Avoid *.EFI binary stripping. At least on aarch64-linux strip + # removes too much from PE32+ files: + # https://github.com/NixOS/nixpkgs/issues/169693 + # The hack is to move EFI file out of lib/ before doStrip + # run and return it after doStrip run. + preFixup = lib.optionalString withEfi '' + mv $out/lib/systemd/boot/efi $out/dont-strip-me + ''; + postFixup = lib.optionalString withEfi '' + mv $out/dont-strip-me $out/lib/systemd/boot/efi + ''; + passthru = { # The interface version prevents NixOS from switching to an # incompatible systemd at runtime. (Switching across reboots is From 7d81750f21bff6d599ce4e08c3e13be23b5104b8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 23 Apr 2022 13:33:25 +0200 Subject: [PATCH 12/73] python3Packages.flask-restful: update pname - add pythonImportsCheck - disable on older Python releases --- .../python-modules/flask-restful/default.nix | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/flask-restful/default.nix b/pkgs/development/python-modules/flask-restful/default.nix index 1af875d4bbc..25f02b87c9e 100644 --- a/pkgs/development/python-modules/flask-restful/default.nix +++ b/pkgs/development/python-modules/flask-restful/default.nix @@ -1,23 +1,28 @@ { lib +, aniso8601 +, blinker , buildPythonPackage , fetchPypi -, aniso8601 , flask -, pytz -, six -, blinker , mock , nose , pytestCheckHook +, pythonOlder +, pytz +, six }: buildPythonPackage rec { - pname = "Flask-RESTful"; + pname = "flask-restful"; version = "0.3.9"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { - inherit pname version; - sha256 = "0gm5dz088v3d2k1dkcp9b3nnqpkk0fp2jly870hijj2xhc5nbv6c"; + pname = "Flask-RESTful"; + inherit version; + hash = "sha256-zOxlC4NdSBkhOMhTKa4Dc15s7VjpstnCFG1shMBvpT4="; }; patches = [ @@ -32,19 +37,24 @@ buildPythonPackage rec { ]; checkInputs = [ - pytestCheckHook + blinker mock nose - blinker + pytestCheckHook + ]; + + pythonImportsCheck = [ + "flask_restful" ]; meta = with lib; { + description = "Framework for creating REST APIs"; homepage = "https://flask-restful.readthedocs.io"; - description = "Simple framework for creating REST APIs"; longDescription = '' Flask-RESTful provides the building blocks for creating a great REST API. ''; license = licenses.bsd3; + maintainers = with maintainers; [ ]; }; } From a649d4f03832964080ca853695cd74d5fbaafa14 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 24 Apr 2022 07:18:34 +0100 Subject: [PATCH 13/73] python: use whitespace to split possible existing options Noticed option globbing when tried to enable parallelism by default locally for most packages by default. python3Packages.yt-dlp failed as: python3.9-yt-dlp> /nix/store/5mywvxdjkk1q6srwwwgdkzc37ibla801-python3.9-setuptools-61.2.0/lib/python3.9/site-packages/setuptools/dist.py:516: UserWarning: Normalizing '2022.04.08' to '2022.4.8' python3.9-yt-dlp> warnings.warn(tmpl.format(**locals())) python3.9-yt-dlp> invalid command name 'build_lazy_extractors--parallel' The change adds leading whitespace everywhere where options might already be present. --- .../interpreters/python/hooks/setuptools-build-hook.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/python/hooks/setuptools-build-hook.sh b/pkgs/development/interpreters/python/hooks/setuptools-build-hook.sh index 89a95e98219..958a9378ef1 100644 --- a/pkgs/development/interpreters/python/hooks/setuptools-build-hook.sh +++ b/pkgs/development/interpreters/python/hooks/setuptools-build-hook.sh @@ -12,10 +12,10 @@ setuptoolsBuildPhase() { args+="$setupPyGlobalFlags" fi if [ -n "$enableParallelBuilding" ]; then - setupPyBuildFlags+="--parallel $NIX_BUILD_CORES" + setupPyBuildFlags+=" --parallel $NIX_BUILD_CORES" fi if [ -n "$setupPyBuildFlags" ]; then - args+="build_ext $setupPyBuildFlags" + args+=" build_ext $setupPyBuildFlags" fi eval "@pythonInterpreter@ nix_run_setup $args bdist_wheel" From 0c2197472daaf4f61b5c09692df5c083f855a0e1 Mon Sep 17 00:00:00 2001 From: FliegendeWurst <2012gdwu+github@posteo.de> Date: Sun, 24 Apr 2022 14:28:39 +0200 Subject: [PATCH 14/73] vim: 8.2.4609 -> 8.2.4816 --- pkgs/applications/editors/vim/common.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/vim/common.nix b/pkgs/applications/editors/vim/common.nix index fe5d5b85080..8c505865849 100644 --- a/pkgs/applications/editors/vim/common.nix +++ b/pkgs/applications/editors/vim/common.nix @@ -1,12 +1,12 @@ { lib, fetchFromGitHub }: rec { - version = "8.2.4609"; + version = "8.2.4816"; src = fetchFromGitHub { owner = "vim"; repo = "vim"; rev = "v${version}"; - sha256 = "sha256-IiWZJ4zT+VbcxwKChl847pS9jU9AlxZ/yQUIL8I2MhQ="; + sha256 = "1lgqr3ki50hwkz4vhdyaryirrs99qq4kgkhmpx7ygvn6aj2wapg5"; }; enableParallelBuilding = true; From e35682b207b733ca044caf618b8945f309e1d523 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 24 Apr 2022 19:12:51 +0100 Subject: [PATCH 15/73] gcc: 11.2.0 -> 11.3.0 Bug fix release. Changes: https://gcc.gnu.org/gcc-11/changes.html (11.3 link below). --- pkgs/development/compilers/gcc/11/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/gcc/11/default.nix b/pkgs/development/compilers/gcc/11/default.nix index 79e682e88c4..74050506202 100644 --- a/pkgs/development/compilers/gcc/11/default.nix +++ b/pkgs/development/compilers/gcc/11/default.nix @@ -52,7 +52,7 @@ with lib; with builtins; let majorVersion = "11"; - version = "${majorVersion}.2.0"; + version = "${majorVersion}.3.0"; inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -91,7 +91,7 @@ stdenv.mkDerivation ({ src = fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz"; - sha256 = "sha256-0I7cU2tUw3KhAQ/2YZ3SdMDxYDqkkhK6IPeqLNo2+os="; + sha256 = "sha256-tHzygYaR9bHiHfK7OMeV+sLPvWQO3i0KXhyJ4zijrDk="; }; inherit patches; From 890cd18a55f5dc5bce5eb647c5b8081dc87496f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 22 Apr 2022 04:31:11 +0200 Subject: [PATCH 16/73] python310Packages.pkgconfig: execute tests, adopt --- .../python-modules/pkgconfig/default.nix | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/pkgconfig/default.nix b/pkgs/development/python-modules/pkgconfig/default.nix index fc593e6a48f..105beaccb9b 100644 --- a/pkgs/development/python-modules/pkgconfig/default.nix +++ b/pkgs/development/python-modules/pkgconfig/default.nix @@ -1,8 +1,15 @@ -{ lib, buildPythonPackage, fetchPypi, pkg-config }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pkg-config +, pytestCheckHook +}: buildPythonPackage rec { pname = "pkgconfig"; version = "1.5.5"; + format = "pyproject"; inherit (pkg-config) setupHooks @@ -10,28 +17,39 @@ buildPythonPackage rec { suffixSalt targetPrefix baseBinName - ; + ; - src = fetchPypi { - inherit pname version; - sha256 = "deb4163ef11f75b520d822d9505c1f462761b4309b1bb713d08689759ea8b899"; + src = fetchFromGitHub { + owner = "matze"; + repo = "pkgconfig"; + rev = "v${version}"; + sha256 = "sha256-uuLUGRNLCR3NS9g6OPCI+qG7tPWsLhI3OE5WmSI3vm8="; }; - - propagatedNativeBuildInputs = [ pkg-config ]; - - doCheck = false; - patches = [ ./executable.patch ]; + postPatch = '' - substituteInPlace pkgconfig/pkgconfig.py --replace 'PKG_CONFIG_EXE = "pkg-config"' 'PKG_CONFIG_EXE = "${pkg-config}/bin/${pkg-config.targetPrefix}pkg-config"' + rm pkgconfig/pkgconfig.py.orig + substituteInPlace pkgconfig/pkgconfig.py \ + --replace 'PKG_CONFIG_EXE = "pkg-config"' 'PKG_CONFIG_EXE = "${pkg-config}/bin/${pkg-config.targetPrefix}pkg-config"' + + # those pc files are missing and pkg-config validates that they exist + substituteInPlace data/fake-openssl.pc \ + --replace "Requires: libssl libcrypto" "" ''; + nativeBuildInputs = [ poetry-core ]; + + propagatedNativeBuildInputs = [ pkg-config ]; + + checkInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "pkgconfig" ]; meta = with lib; { description = "Interface Python with pkg-config"; homepage = "https://github.com/matze/pkgconfig"; license = licenses.mit; + maintainers = with maintainers; [ SuperSandro2000 ]; }; } From 6694081af04c9cac0f97af88f14cf85599c58518 Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Sun, 24 Apr 2022 12:00:00 +0000 Subject: [PATCH 17/73] elfutils: mark as broken when building a static library elfutils uses dlopen for central features. --- pkgs/development/tools/misc/elfutils/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/tools/misc/elfutils/default.nix b/pkgs/development/tools/misc/elfutils/default.nix index adee94dafa9..fa867c26316 100644 --- a/pkgs/development/tools/misc/elfutils/default.nix +++ b/pkgs/development/tools/misc/elfutils/default.nix @@ -85,6 +85,8 @@ stdenv.mkDerivation rec { homepage = "https://sourceware.org/elfutils/"; description = "A set of utilities to handle ELF objects"; platforms = platforms.linux; + # https://lists.fedorahosted.org/pipermail/elfutils-devel/2014-November/004223.html + broken = stdenv.hostPlatform.isStatic; # licenses are GPL2 or LGPL3+ for libraries, GPL3+ for bins, # but since this package isn't split that way, all three are listed. license = with licenses; [ gpl2Only lgpl3Plus gpl3Plus ]; From 15f685808fa7f192cb466d8ff6f607cb338df12b Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Sun, 24 Apr 2022 12:00:00 +0000 Subject: [PATCH 18/73] kbd: fix static build --- pkgs/os-specific/linux/kbd/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/kbd/default.nix b/pkgs/os-specific/linux/kbd/default.nix index 4c89d8c8219..4d08a38dbe8 100644 --- a/pkgs/os-specific/linux/kbd/default.nix +++ b/pkgs/os-specific/linux/kbd/default.nix @@ -63,6 +63,7 @@ stdenv.mkDerivation rec { ''; buildInputs = [ check pam ]; + NIX_LDFLAGS = lib.optional stdenv.hostPlatform.isStatic "-laudit"; nativeBuildInputs = [ autoreconfHook pkg-config flex ]; passthru.tests = { From 71ca66602b1209d784321b59a01a099ce9e97f8a Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Sun, 24 Apr 2022 12:00:00 +0000 Subject: [PATCH 19/73] systemd: mark as broken for static builds --- pkgs/os-specific/linux/systemd/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index e130abbf27f..1d2c3344d44 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -687,6 +687,8 @@ stdenv.mkDerivation { description = "A system and service manager for Linux"; license = licenses.lgpl21Plus; platforms = platforms.linux; + # https://github.com/systemd/systemd/issues/20600#issuecomment-912338965 + broken = stdenv.hostPlatform.isStatic; priority = 10; maintainers = with maintainers; [ flokli kloenk mic92 ]; }; From b79ebdec9b76a04b4d583929d222e67384a6e444 Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Sun, 24 Apr 2022 12:00:00 +0000 Subject: [PATCH 20/73] util-linux: fix static build by disabling systemd support --- pkgs/os-specific/linux/util-linux/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index 3efb3914b85..efd75ce9b3f 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, pkg-config, zlib, shadow, libcap_ng , ncursesSupport ? true , ncurses, pam -, systemdSupport ? stdenv.isLinux +, systemdSupport ? stdenv.isLinux && !stdenv.hostPlatform.isStatic , systemd , nlsSupport ? true }: From e4c5ff6156b249f5a6f4017c9b792131352d9759 Mon Sep 17 00:00:00 2001 From: Shahar Dawn Or Date: Mon, 25 Apr 2022 10:52:08 +0700 Subject: [PATCH 21/73] bluez: add upstream patch for /var/lib/bluetooth --- pkgs/os-specific/linux/bluez/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/os-specific/linux/bluez/default.nix b/pkgs/os-specific/linux/bluez/default.nix index 1f6fb31d93d..1d93174ec65 100644 --- a/pkgs/os-specific/linux/bluez/default.nix +++ b/pkgs/os-specific/linux/bluez/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchurl +, fetchpatch , alsa-lib , dbus , ell @@ -49,6 +50,17 @@ in stdenv.mkDerivation rec { outputs = [ "out" "dev" ] ++ lib.optional doCheck "test"; + patches = [ + # https://github.com/bluez/bluez/commit/0905a06410d4a5189f0be81e25eb3c3e8a2199c5 + # which fixes https://github.com/bluez/bluez/issues/329 + # and is already merged upstream and not yet in a release. + (fetchpatch { + name = "StateDirectory_and_ConfigurationDirectory.patch"; + url = "https://github.com/bluez/bluez/commit/0905a06410d4a5189f0be81e25eb3c3e8a2199c5.patch"; + sha256 = "sha256-MI6yPTiDLHsSTjLvNqtWnuy2xUMYpSat1WhMbeoedSM="; + }) + ]; + postPatch = '' substituteInPlace tools/hid2hci.rules \ --replace /sbin/udevadm ${systemd}/bin/udevadm \ From dbf7109d7e451a82f61ef47dcf5106b6add9ad50 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 24 Apr 2022 20:45:41 -0700 Subject: [PATCH 22/73] webrtc-audio-processing: enable powerpc64le This commit enables powerpc64le for webrtc-audio-processing, following the pattern established by riscv64 support in f13cf5ef4779. --- .../libraries/webrtc-audio-processing/0.3.nix | 5 ++- .../enable-powerpc.patch | 37 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/webrtc-audio-processing/enable-powerpc.patch diff --git a/pkgs/development/libraries/webrtc-audio-processing/0.3.nix b/pkgs/development/libraries/webrtc-audio-processing/0.3.nix index 1ce3c2d9fa8..c9fafdd2766 100644 --- a/pkgs/development/libraries/webrtc-audio-processing/0.3.nix +++ b/pkgs/development/libraries/webrtc-audio-processing/0.3.nix @@ -9,7 +9,10 @@ stdenv.mkDerivation rec { sha256 = "1gsx7k77blfy171b6g3m0k0s0072v6jcawhmx1kjs9w5zlwdkzd0"; }; - patches = [ ./enable-riscv.patch ]; + patches = [ + ./enable-riscv.patch + ./enable-powerpc.patch + ]; buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices ]); diff --git a/pkgs/development/libraries/webrtc-audio-processing/enable-powerpc.patch b/pkgs/development/libraries/webrtc-audio-processing/enable-powerpc.patch new file mode 100644 index 00000000000..636cae4df85 --- /dev/null +++ b/pkgs/development/libraries/webrtc-audio-processing/enable-powerpc.patch @@ -0,0 +1,37 @@ +This patch was extracted from the Gentoo powerpc64le-qtwebengine +patchset, referenced here: + + https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-qt/qtwebengine/qtwebengine-5.15.3_p20220406.ebuild + +and downloaded from here: + + https://dev.gentoo.org/~asturm/distfiles/${PN}-5.15.3_p20220406-patchset.tar.xz + +From 4bbb4482e14ad27cf0bd5032b1b5d4abba29dc99 Mon Sep 17 00:00:00 2001 +From: Georgy Yakovlev +Date: Fri, 27 Nov 2020 13:05:45 -0800 +Subject: [PATCH] 5.15.2 ppc64le patchet + +diff --git a/webrtc/typedefs.h b/webrtc/typedefs.h +index ce1f3e8..fd39a16 100644 +--- a/webrtc/typedefs.h ++++ b/webrtc/typedefs.h +@@ -38,6 +38,18 @@ + #define WEBRTC_ARCH_X86 + #define WEBRTC_ARCH_32_BITS + #define WEBRTC_ARCH_LITTLE_ENDIAN ++#elif defined(__PPC__) ++#define WEBRTC_ARCH_PPC_FAMILY ++#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ ++#define WEBRTC_ARCH_LITTLE_ENDIAN ++#else ++#define WEBRTC_ARCH_BIG_ENDIAN ++#endif ++#if defined(__LP64__) ++#define WEBRTC_ARCH_64_BITS ++#else ++#define WEBRTC_ARCH_32_BITS ++#endif + #elif defined(__ARMEL__) + // TODO(ajm): We'd prefer to control platform defines here, but this is + // currently provided by the Android makefiles. Commented to avoid duplicate From e69c11d0dd8f4a1bbce00b7edd686d3b1cc4513d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 25 Apr 2022 06:40:20 +0000 Subject: [PATCH 23/73] libopenmpt: 0.6.2 -> 0.6.3 --- 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 35a79e3b358..2cca0078aff 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.2"; + version = "0.6.3"; outputs = [ "out" "dev" "bin" ]; src = fetchurl { url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz"; - sha256 = "1dp645gg6d3pzjh82srq1d7qvyxi5h22k7yfdjiyzbyry8pxdh2h"; + sha256 = "pBCv63zVlwsWuabOfazPSVsaXpEhqdZELeDAKP1Uols="; }; enableParallelBuilding = true; From d2275a71e6bdfb08863d22c4ce9bc3422271eacd Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 23 Apr 2022 07:43:42 +0000 Subject: [PATCH 24/73] librsvg: 2.54.0 -> 2.54.1 --- pkgs/development/libraries/librsvg/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/librsvg/default.nix b/pkgs/development/libraries/librsvg/default.nix index b0935441384..f8a1014ac59 100644 --- a/pkgs/development/libraries/librsvg/default.nix +++ b/pkgs/development/libraries/librsvg/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { pname = "librsvg"; - version = "2.54.0"; + version = "2.54.1"; outputs = [ "out" "dev" "installedTests" ] ++ lib.optionals withIntrospection [ "devdoc" @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "uvjrwUfxRrQmG7PQzQ+slEv427Sx8jR9IzQfl03MMIU="; + sha256 = "1VV++9zEFaQYDhEWt/c2y3EbJT0RDZX6huyDD3ACZiU="; }; cargoVendorDir = "vendor"; From 4ff24ba8584e5c46b333864e1e72c117634a9e8a Mon Sep 17 00:00:00 2001 From: happysalada Date: Mon, 25 Apr 2022 10:09:15 -0400 Subject: [PATCH 25/73] python3Package.protobuf: 3.19.3 -> 3.19.4 --- pkgs/development/libraries/protobuf/3.19.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/protobuf/3.19.nix b/pkgs/development/libraries/protobuf/3.19.nix index 7e2be4bec04..e47bb62e736 100644 --- a/pkgs/development/libraries/protobuf/3.19.nix +++ b/pkgs/development/libraries/protobuf/3.19.nix @@ -1,6 +1,6 @@ { callPackage, ... }: callPackage ./generic-v3.nix { - version = "3.19.3"; - sha256 = "sha256-nA6L064MuyP5Si4MCLk2yg8PDM7RWggFEGQyibputYQ="; + version = "3.19.4"; + sha256 = "sha256-mxQ8XonVgctfaNAyd3vqQHMLHVnkjBa9EObk47vxH24="; } From 954733296484a04ae626929792467f52080ce7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 25 Apr 2022 01:28:37 +0200 Subject: [PATCH 26/73] python310Packages.curio: ignore flaky test --- pkgs/development/python-modules/curio/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/curio/default.nix b/pkgs/development/python-modules/curio/default.nix index 1a0f4e2d9fe..7a66e479664 100644 --- a/pkgs/development/python-modules/curio/default.nix +++ b/pkgs/development/python-modules/curio/default.nix @@ -26,9 +26,10 @@ buildPythonPackage rec { disabledTests = [ "test_aside_basic" # times out + "test_write_timeout" # flaky, does not always time out "test_aside_cancel" # fails because modifies PYTHONPATH and cant find pytest "test_ssl_outgoing" # touches network - ] ++ lib.optionals (stdenv.isDarwin) [ + ] ++ lib.optionals stdenv.isDarwin [ "test_unix_echo" # socket bind error on hydra when built with other packages "test_unix_ssl_server" # socket bind error on hydra when built with other packages ]; From 532ebf6b579ebf657a473c371eef7d52e13804a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Mon, 14 Mar 2022 14:56:33 +0100 Subject: [PATCH 27/73] wrapGAppsHook: use makeBinaryWrapper Reduces the likelihood of having apps wrapped twice by a shell script, which causes problems with argv0. --- .../applications/editors/vim/configurable.nix | 6 ++---- .../setup-hooks/wrap-gapps-hook/default.nix | 20 +++++++++---------- .../setup-hooks/wrap-gapps-hook/tests/lib.nix | 13 ++++++------ 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix index bc317b91597..d5dd00b4aa6 100644 --- a/pkgs/applications/editors/vim/configurable.nix +++ b/pkgs/applications/editors/vim/configurable.nix @@ -3,7 +3,7 @@ , libX11, libXext, libSM, libXpm, libXt, libXaw, libXau, libXmu , libICE , vimPlugins -, makeWrapper, makeBinaryWrapper +, makeWrapper , wrapGAppsHook , runtimeShell @@ -133,9 +133,7 @@ in stdenv.mkDerivation rec { ++ lib.optional wrapPythonDrv makeWrapper ++ lib.optional nlsSupport gettext ++ lib.optional perlSupport perl - # Make the inner wrapper binary to avoid double wrapping issues with wrapPythonDrv - # (https://github.com/NixOS/nixpkgs/pull/164163) - ++ lib.optional (guiSupport == "gtk3") (wrapGAppsHook.override { makeWrapper = makeBinaryWrapper; }) + ++ lib.optional (guiSupport == "gtk3") wrapGAppsHook ; buildInputs = [ diff --git a/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix b/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix index d0ea088bf71..8c10f67c152 100644 --- a/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix +++ b/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix @@ -1,7 +1,7 @@ { stdenv , lib , makeSetupHook -, makeWrapper +, makeBinaryWrapper , gobject-introspection , isGraphical ? true , gtk3 @@ -34,7 +34,7 @@ makeSetupHook { ] ++ [ # We use the wrapProgram function. - makeWrapper + makeBinaryWrapper ]; substitutions = { passthru.tests = let @@ -59,8 +59,8 @@ makeSetupHook { tested = basic; in testLib.runTest "basic-contains-dconf" ( testLib.skip stdenv.isDarwin '' - ${expectSomeLineContainingYInFileXToMentionZ "${tested}/bin/foo" "GIO_EXTRA_MODULES=" "${dconf.lib}/lib/gio/modules"} - ${expectSomeLineContainingYInFileXToMentionZ "${tested}/libexec/bar" "GIO_EXTRA_MODULES=" "${dconf.lib}/lib/gio/modules"} + ${expectSomeLineContainingYInFileXToMentionZ "${tested}/bin/foo" "GIO_EXTRA_MODULES" "${dconf.lib}/lib/gio/modules"} + ${expectSomeLineContainingYInFileXToMentionZ "${tested}/libexec/bar" "GIO_EXTRA_MODULES" "${dconf.lib}/lib/gio/modules"} '' ); @@ -98,8 +98,8 @@ makeSetupHook { typelib-user-has-gi-typelib-path = let tested = typelib-user; in testLib.runTest "typelib-user-has-gi-typelib-path" '' - ${expectSomeLineContainingYInFileXToMentionZ "${tested}/bin/foo" "GI_TYPELIB_PATH=" "${typelib-Mahjong}/lib/girepository-1.0"} - ${expectSomeLineContainingYInFileXToMentionZ "${tested}/libexec/bar" "GI_TYPELIB_PATH=" "${typelib-Mahjong}/lib/girepository-1.0"} + ${expectSomeLineContainingYInFileXToMentionZ "${tested}/bin/foo" "GI_TYPELIB_PATH" "${typelib-Mahjong}/lib/girepository-1.0"} + ${expectSomeLineContainingYInFileXToMentionZ "${tested}/libexec/bar" "GI_TYPELIB_PATH" "${typelib-Mahjong}/lib/girepository-1.0"} ''; # Simple derivation containing a gobject-introspection typelib in lib output. @@ -143,8 +143,8 @@ makeSetupHook { typelib-multiout-user-has-gi-typelib-path = let tested = typelib-multiout-user; in testLib.runTest "typelib-multiout-user-has-gi-typelib-path" '' - ${expectSomeLineContainingYInFileXToMentionZ "${tested}/bin/foo" "GI_TYPELIB_PATH=" "${typelib-Bechamel.lib}/lib/girepository-1.0"} - ${expectSomeLineContainingYInFileXToMentionZ "${tested}/libexec/bar" "GI_TYPELIB_PATH=" "${typelib-Bechamel.lib}/lib/girepository-1.0"} + ${expectSomeLineContainingYInFileXToMentionZ "${tested}/bin/foo" "GI_TYPELIB_PATH" "${typelib-Bechamel.lib}/lib/girepository-1.0"} + ${expectSomeLineContainingYInFileXToMentionZ "${tested}/libexec/bar" "GI_TYPELIB_PATH" "${typelib-Bechamel.lib}/lib/girepository-1.0"} ''; # Simple derivation that contains a typelib as well as a program using it. @@ -169,8 +169,8 @@ makeSetupHook { typelib-self-user-has-gi-typelib-path = let tested = typelib-self-user; in testLib.runTest "typelib-self-user-has-gi-typelib-path" '' - ${expectSomeLineContainingYInFileXToMentionZ "${tested}/bin/foo" "GI_TYPELIB_PATH=" "${typelib-self-user}/lib/girepository-1.0"} - ${expectSomeLineContainingYInFileXToMentionZ "${tested}/libexec/bar" "GI_TYPELIB_PATH=" "${typelib-self-user}/lib/girepository-1.0"} + ${expectSomeLineContainingYInFileXToMentionZ "${tested}/bin/foo" "GI_TYPELIB_PATH" "${typelib-self-user}/lib/girepository-1.0"} + ${expectSomeLineContainingYInFileXToMentionZ "${tested}/libexec/bar" "GI_TYPELIB_PATH" "${typelib-self-user}/lib/girepository-1.0"} ''; }; }; diff --git a/pkgs/build-support/setup-hooks/wrap-gapps-hook/tests/lib.nix b/pkgs/build-support/setup-hooks/wrap-gapps-hook/tests/lib.nix index 1757bdbbe25..42866c3419d 100644 --- a/pkgs/build-support/setup-hooks/wrap-gapps-hook/tests/lib.nix +++ b/pkgs/build-support/setup-hooks/wrap-gapps-hook/tests/lib.nix @@ -1,5 +1,4 @@ -{ runCommand -}: +{ lib, runCommand }: rec { runTest = name: body: runCommand name { } '' @@ -19,12 +18,14 @@ rec { ''; expectSomeLineContainingYInFileXToMentionZ = file: filter: expected: '' - if ! cat "${file}" | grep "${filter}"; then - ${fail "The file “${file}” should include a line containing “${filter}”."} + file=${lib.escapeShellArg file} filter=${lib.escapeShellArg filter} expected=${lib.escapeShellArg expected} + + if ! grep --text --quiet "$filter" "$file"; then + ${fail "The file “$file” should include a line containing “$filter”."} fi - if ! cat "${file}" | grep "${filter}" | grep ${expected}; then - ${fail "The file “${file}” should include a line containing “${filter}” that also contains “${expected}”."} + if ! grep --text "$filter" "$file" | grep --text --quiet "$expected"; then + ${fail "The file “$file” should include a line containing “$filter” that also contains “$expected”."} fi ''; } From f8cc8ff5755528d9a73671481ba3d6fb00f4e8d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Mon, 14 Mar 2022 18:25:39 +0100 Subject: [PATCH 28/73] makeBinaryWrapper: unset NIX_CFLAGS Prevent the wrapper from being affected by the derivation's CFLAGS, which may not even apply to GCC. --- pkgs/build-support/setup-hooks/make-binary-wrapper.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/build-support/setup-hooks/make-binary-wrapper.sh b/pkgs/build-support/setup-hooks/make-binary-wrapper.sh index 986be5b9e11..7123f100c17 100644 --- a/pkgs/build-support/setup-hooks/make-binary-wrapper.sh +++ b/pkgs/build-support/setup-hooks/make-binary-wrapper.sh @@ -33,6 +33,8 @@ assertExecutable() { # To troubleshoot a binary wrapper after you compiled it, # use the `strings` command or open the binary file in a text editor. makeWrapper() { + local NIX_CFLAGS_COMPILE NIX_CFLAGS_LINK + unset NIX_CFLAGS_COMPILE NIX_CFLAGS_LINK local original="$1" local wrapper="$2" shift 2 From 629a74477f7036cec9e186ffab42915a17b7a9dd Mon Sep 17 00:00:00 2001 From: Alex Habich Date: Sat, 29 May 2021 19:05:22 -0500 Subject: [PATCH 29/73] libpulseaudio: preserve vapi files The current postInstall removes all of $out/share, which also includes pulse's vapi/deps files. Certain projects (budgie-desktop, for example) require these definitions, but do not require the full pulseaudio server. Preserving these files allows these projects to only depend on libpulseaudio. Fixes #73463. --- pkgs/servers/pulseaudio/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix index 95a454850b6..9e3075f09b7 100644 --- a/pkgs/servers/pulseaudio/default.nix +++ b/pkgs/servers/pulseaudio/default.nix @@ -114,7 +114,9 @@ stdenv.mkDerivation rec { ''; postInstall = lib.optionalString libOnly '' - rm -rf $out/{bin,share,etc,lib/{pulse-*,systemd}} + find $out/share -maxdepth 1 -mindepth 1 ! -name "vala" -prune -exec rm -r {} \; + find $out/share/vala -maxdepth 1 -mindepth 1 ! -name "vapi" -prune -exec rm -r {} \; + rm -r $out/{bin,etc,lib/pulse-*} '' + '' moveToOutput lib/cmake "$dev" From 85f5539c4bed08e58c1ea4d00fdc903e9abb2951 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 27 Apr 2022 19:56:47 +0200 Subject: [PATCH 30/73] curl: 7.82.0 -> 7.83.0 https://curl.se/changes.html#7_83_0 https://curl.se/docs/CVE-2022-22576.html https://curl.se/docs/CVE-2022-27774.html https://curl.se/docs/CVE-2022-27775.html https://curl.se/docs/CVE-2022-27776.html Fixes: CVE-2022-22576, CVE-2022-27774, CVE-2022-27775, CVE-2022-27776 --- .../curl/7.82.0-openssl-fix-CN-check.patch | 30 ------------------- pkgs/tools/networking/curl/default.nix | 5 ++-- 2 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 pkgs/tools/networking/curl/7.82.0-openssl-fix-CN-check.patch diff --git a/pkgs/tools/networking/curl/7.82.0-openssl-fix-CN-check.patch b/pkgs/tools/networking/curl/7.82.0-openssl-fix-CN-check.patch deleted file mode 100644 index 5d84f512499..00000000000 --- a/pkgs/tools/networking/curl/7.82.0-openssl-fix-CN-check.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 911714d617c106ed5d553bf003e34ec94ab6a136 Mon Sep 17 00:00:00 2001 -From: Daniel Stenberg -Date: Tue, 8 Mar 2022 13:38:13 +0100 -Subject: [PATCH] openssl: fix CN check error code - -Due to a missing 'else' this returns error too easily. - -Regressed in: d15692ebb - -Reported-by: Kristoffer Gleditsch -Fixes #8559 -Closes #8560 ---- - lib/vtls/openssl.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c -index 0b79fc50a9c5..4618beeb3867 100644 ---- a/lib/vtls/openssl.c -+++ b/lib/vtls/openssl.c -@@ -1817,7 +1817,8 @@ CURLcode Curl_ossl_verifyhost(struct Curl_easy *data, struct connectdata *conn, - memcpy(peer_CN, ASN1_STRING_get0_data(tmp), peerlen); - peer_CN[peerlen] = '\0'; - } -- result = CURLE_OUT_OF_MEMORY; -+ else -+ result = CURLE_OUT_OF_MEMORY; - } - } - else /* not a UTF8 name */ diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index a4056fd28a9..d3258e0a946 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -54,19 +54,18 @@ assert zstdSupport -> zstd != null; stdenv.mkDerivation rec { pname = "curl"; - version = "7.82.0"; + version = "7.83.0"; src = fetchurl { urls = [ "https://curl.haxx.se/download/${pname}-${version}.tar.bz2" "https://github.com/curl/curl/releases/download/${lib.replaceStrings ["."] ["_"] pname}-${version}/${pname}-${version}.tar.bz2" ]; - sha256 = "sha256-RtmgQAozQI/ZkncLBKRKdDSzA28ugImsKLV1c9WdNx8="; + sha256 = "sha256-JHx+x1IcQljmVjTlKScNIU/jKWmXHMy3KEXnqkaDH5Y="; }; patches = [ ./7.79.1-darwin-no-systemconfiguration.patch - ./7.82.0-openssl-fix-CN-check.patch ]; outputs = [ "bin" "dev" "out" "man" "devdoc" ]; From f8d7adf28432b9f90ae64e305e137088ec8efd57 Mon Sep 17 00:00:00 2001 From: Panayiotis <1040249+panayiotis@users.noreply.github.com> Date: Thu, 28 Apr 2022 03:00:10 +0300 Subject: [PATCH 31/73] fluidsynth: fix build on darwin Make optional dependency `libpulseaudio` linux-only as it is broken on darwin. --- pkgs/applications/audio/fluidsynth/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/fluidsynth/default.nix b/pkgs/applications/audio/fluidsynth/default.nix index 828c415ac5f..1e55dbe8f87 100644 --- a/pkgs/applications/audio/fluidsynth/default.nix +++ b/pkgs/applications/audio/fluidsynth/default.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ buildPackages.stdenv.cc pkg-config cmake ]; - buildInputs = [ glib libsndfile libpulseaudio libjack2 ] - ++ lib.optionals stdenv.isLinux [ alsa-lib ] + buildInputs = [ glib libsndfile libjack2 ] + ++ lib.optionals stdenv.isLinux [ alsa-lib libpulseaudio ] ++ lib.optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreMIDI CoreServices ]; cmakeFlags = [ "-Denable-framework=off" ]; From c60ce4afdc13018ab0d7268c6defb2b42f8c93b7 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 28 Apr 2022 05:36:29 +0000 Subject: [PATCH 32/73] libnotify: 0.7.9 -> 0.7.11 --- pkgs/development/libraries/libnotify/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libnotify/default.nix b/pkgs/development/libraries/libnotify/default.nix index d3b857d7673..11679ff511c 100644 --- a/pkgs/development/libraries/libnotify/default.nix +++ b/pkgs/development/libraries/libnotify/default.nix @@ -14,13 +14,13 @@ stdenv.mkDerivation rec { pname = "libnotify"; - version = "0.7.9"; + version = "0.7.11"; outputs = [ "out" "man" "dev" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "0qa7cx6ra5hwqnxw95b9svgjg5q6ynm8y843iqjszxvds5z53h36"; + sha256 = "3VaC7GgiAznhHFFZt+ASIEoxjdGzaDoJxILKQhqwc3U="; }; mesonFlags = [ From 910f84bf9ec3ef574699c85d6b132bacca71dd84 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Thu, 28 Apr 2022 13:58:16 +0200 Subject: [PATCH 33/73] libseccomp: re-enable checkPhase --- pkgs/development/libraries/libseccomp/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libseccomp/default.nix b/pkgs/development/libraries/libseccomp/default.nix index d0e8bd163dd..fbc8a026af5 100644 --- a/pkgs/development/libraries/libseccomp/default.nix +++ b/pkgs/development/libraries/libseccomp/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, getopt, util-linux, gperf, nix-update-script }: +{ lib, stdenv, fetchurl, getopt, util-linuxMinimal, which, gperf, nix-update-script }: stdenv.mkDerivation rec { pname = "libseccomp"; @@ -18,8 +18,8 @@ stdenv.mkDerivation rec { patchShebangs . ''; - checkInputs = [ util-linux ]; - doCheck = false; # dependency cycle + checkInputs = [ util-linuxMinimal which ]; + doCheck = true; # Hack to ensure that patchelf --shrink-rpath get rids of a $TMPDIR reference. preFixup = "rm -rfv src"; From 74d30c2fcd3c35ae6984a477247c980e045c6be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 28 Apr 2022 15:44:16 +0200 Subject: [PATCH 34/73] python310Packages.rich: 12.2.0 -> 12.3.0 --- pkgs/development/python-modules/rich/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/rich/default.nix b/pkgs/development/python-modules/rich/default.nix index addc12b3637..4def2f46317 100644 --- a/pkgs/development/python-modules/rich/default.nix +++ b/pkgs/development/python-modules/rich/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "rich"; - version = "12.2.0"; + version = "12.3.0"; format = "pyproject"; disabled = pythonOlder "3.6"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "Textualize"; repo = pname; rev = "v${version}"; - sha256 = "02zypmnc9sijlipki0riywh82piamd3hlrl5xbg2bxlldnlnwx1d"; + sha256 = "sha256-/BPJcFjUldbTa/M3i9jGGU7apbrTcWbF+yrrFuLXcHY="; }; nativeBuildInputs = [ poetry-core ]; From d97e95e86298c09bff338c7e9d1778e06792168f Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Sat, 4 Dec 2021 18:52:38 +0100 Subject: [PATCH 35/73] gtk3: support cross-compilation --- pkgs/development/libraries/gtk/3.x.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gtk/3.x.nix b/pkgs/development/libraries/gtk/3.x.nix index c736c5cc761..5e0dcf6ce03 100644 --- a/pkgs/development/libraries/gtk/3.x.nix +++ b/pkgs/development/libraries/gtk/3.x.nix @@ -30,7 +30,7 @@ , gnome , gsettings-desktop-schemas , sassc -, trackerSupport ? stdenv.isLinux +, trackerSupport ? stdenv.isLinux && (stdenv.buildPlatform == stdenv.hostPlatform) , tracker , x11Support ? stdenv.isLinux , waylandSupport ? stdenv.isLinux @@ -39,12 +39,13 @@ , wayland-protocols , xineramaSupport ? stdenv.isLinux , cupsSupport ? stdenv.isLinux -, withGtkDoc ? stdenv.isLinux +, withGtkDoc ? stdenv.isLinux && (stdenv.buildPlatform == stdenv.hostPlatform) , cups , AppKit , Cocoa , QuartzCore , broadwaySupport ? true +, wayland-scanner }: let @@ -85,6 +86,9 @@ stdenv.mkDerivation rec { ./patches/3.0-darwin-x11.patch ]; + depsBuildBuild = [ + pkg-config + ]; nativeBuildInputs = [ gettext gobject-introspection @@ -94,12 +98,15 @@ stdenv.mkDerivation rec { pkg-config python3 sassc + gdk-pixbuf ] ++ setupHooks ++ lib.optionals withGtkDoc [ docbook_xml_dtd_43 docbook-xsl-nons gtk-doc # For xmllint libxml2 + ] ++ lib.optionals waylandSupport [ + wayland-scanner ]; buildInputs = [ @@ -151,6 +158,7 @@ stdenv.mkDerivation rec { "-Dbroadway_backend=${lib.boolToString broadwaySupport}" "-Dx11_backend=${lib.boolToString x11Support}" "-Dquartz_backend=${lib.boolToString (stdenv.isDarwin && !x11Support)}" + "-Dintrospection=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" ]; doCheck = false; # needs X11 From 34cdbb4e731ab34d531a202990879a0587a02b4e Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Thu, 28 Apr 2022 07:37:01 +1000 Subject: [PATCH 36/73] sqlite: 3.38.2 -> 3.38.3 https://www.sqlite.org/releaselog/3_38_3.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 0d80a83e8ed..726ccff02bb 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.2"; + version = "3.38.3"; # 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-55dKoUMLrWkKXp95pu5chJKtqCadxnWHWtD7dH18raQ="; + sha256 = "sha256-YfLdk6LjjDNGi3EllnwyGL+fTdg2Xe9gJeMU+QXclC4="; }; outputs = [ "bin" "dev" "out" ]; diff --git a/pkgs/development/libraries/sqlite/tools.nix b/pkgs/development/libraries/sqlite/tools.nix index ebb887ffa01..24277989168 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 }: stdenv.mkDerivation rec { inherit pname; - version = "3.38.2"; + version = "3.38.3"; # nixpkgs-update: no auto update src = assert version == sqlite.version; fetchurl { url = "https://sqlite.org/2022/sqlite-src-${archiveVersion version}.zip"; - sha256 = "sha256-x8DwcKM4yS6wiAWQXAXyVPpG0cTdo1SKAkdPb7VnMpo="; + sha256 = "sha256-oQTUk+CEAGvXT/H/esLrKzh8fAo7Y7pv6i+vtBGDE68="; }; nativeBuildInputs = [ unzip ]; From d8891b5307f43b799a550910eca65bf85c3808e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 28 Apr 2022 11:52:36 +0200 Subject: [PATCH 37/73] python310Packages.setuptools-rust: 1.2.0 -> 1.3.0 --- pkgs/development/python-modules/setuptools-rust/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/setuptools-rust/default.nix b/pkgs/development/python-modules/setuptools-rust/default.nix index 24c60839fe0..10f46fecf6f 100644 --- a/pkgs/development/python-modules/setuptools-rust/default.nix +++ b/pkgs/development/python-modules/setuptools-rust/default.nix @@ -12,12 +12,12 @@ buildPythonPackage rec { pname = "setuptools-rust"; - version = "1.2.0"; + version = "1.3.0"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-CkraR56Mfj2L18tW4aKazCsruYwjJQUbDNy1fX8Fbeg="; + sha256 = "sha256-lYxb9Ktkg9Wdq4iFOBIYccxQBjVKQvsPvVCs8Dyq0d4="; }; nativeBuildInputs = [ setuptools-scm ]; From 2b71de4a3dafbac8533469d5f1a5d7fb10758614 Mon Sep 17 00:00:00 2001 From: Jan Solanti Date: Wed, 13 Apr 2022 15:30:13 +0300 Subject: [PATCH 38/73] pipewire: 0.3.49 -> 0.3.50 --- .../desktops/pipewire/daemon/pipewire-pulse.conf.json | 3 +++ pkgs/development/libraries/pipewire/default.nix | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/desktops/pipewire/daemon/pipewire-pulse.conf.json b/nixos/modules/services/desktops/pipewire/daemon/pipewire-pulse.conf.json index b19fb33ec17..114afbfb0ea 100644 --- a/nixos/modules/services/desktops/pipewire/daemon/pipewire-pulse.conf.json +++ b/nixos/modules/services/desktops/pipewire/daemon/pipewire-pulse.conf.json @@ -61,6 +61,9 @@ { "application.process.binary": "teams" }, + { + "application.process.binary": "teams-insiders" + }, { "application.process.binary": "skypeforlinux" } diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix index da594346c29..7324d02c7f2 100644 --- a/pkgs/development/libraries/pipewire/default.nix +++ b/pkgs/development/libraries/pipewire/default.nix @@ -68,7 +68,7 @@ let self = stdenv.mkDerivation rec { pname = "pipewire"; - version = "0.3.49"; + version = "0.3.50"; outputs = [ "out" @@ -86,7 +86,7 @@ let owner = "pipewire"; repo = "pipewire"; rev = version; - sha256 = "sha256-8heX/9BsPguIOzHOuqEQdt6MS3eS4HxR4A+FUZKNpdo="; + sha256 = "sha256-OMFtHduvSQNeEzQP+PlwfhWC09Jb8HN4SI42Z9KpZHE="; }; patches = [ @@ -102,11 +102,11 @@ let ./0090-pipewire-config-template-paths.patch # Place SPA data files in lib output to avoid dependency cycles ./0095-spa-data-dir.patch - # Fixes missing function declarations in pipewire headers + # Fixes invalid declarations in headers when compiled as ISO C90 # Should be removed after the next release (fetchpatch { - url = "https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/a2e98e28c1e6fb58b273ef582398d8bee4d2b769.patch"; - sha256 = "sha256-tqiiAW2fTEp23HT59XR2D/G08pVENJtpxUI7UVufj/A="; + url = "https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/d3ea3142e1a4de206e616bc18f63a529e6b4986a.patch"; + sha256 = "sha256-2MTCOwQEA7UAm/eigHDHA+8oFs4JgQfoMHnfzNBjqvI="; }) ]; From 37c288082b2108671d551e770f79f2f505fbdb07 Mon Sep 17 00:00:00 2001 From: Jan Solanti Date: Fri, 29 Apr 2022 04:26:53 +0300 Subject: [PATCH 39/73] pipewire: 0.3.50 -> 0.3.51 --- pkgs/development/libraries/pipewire/default.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix index 7324d02c7f2..96d8c9c2052 100644 --- a/pkgs/development/libraries/pipewire/default.nix +++ b/pkgs/development/libraries/pipewire/default.nix @@ -2,7 +2,6 @@ , lib , buildPackages , fetchFromGitLab -, fetchpatch , removeReferencesTo , python3 , meson @@ -68,7 +67,7 @@ let self = stdenv.mkDerivation rec { pname = "pipewire"; - version = "0.3.50"; + version = "0.3.51"; outputs = [ "out" @@ -86,7 +85,7 @@ let owner = "pipewire"; repo = "pipewire"; rev = version; - sha256 = "sha256-OMFtHduvSQNeEzQP+PlwfhWC09Jb8HN4SI42Z9KpZHE="; + sha256 = "sha256-k5OdKgkQUaelvrGS4KtO0MtSJg6cF2Nf8RrsR8Kf+C8="; }; patches = [ @@ -102,12 +101,6 @@ let ./0090-pipewire-config-template-paths.patch # Place SPA data files in lib output to avoid dependency cycles ./0095-spa-data-dir.patch - # Fixes invalid declarations in headers when compiled as ISO C90 - # Should be removed after the next release - (fetchpatch { - url = "https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/d3ea3142e1a4de206e616bc18f63a529e6b4986a.patch"; - sha256 = "sha256-2MTCOwQEA7UAm/eigHDHA+8oFs4JgQfoMHnfzNBjqvI="; - }) ]; nativeBuildInputs = [ From de181bc8f17f1239772ba4555b7424e4497ae5d0 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 7 Apr 2022 19:57:03 +0000 Subject: [PATCH 40/73] expat: 2.4.7 -> 2.4.8 --- pkgs/development/libraries/expat/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/expat/default.nix b/pkgs/development/libraries/expat/default.nix index a05f3b71fb4..da20ac59ec9 100644 --- a/pkgs/development/libraries/expat/default.nix +++ b/pkgs/development/libraries/expat/default.nix @@ -16,11 +16,11 @@ stdenv.mkDerivation rec { pname = "expat"; - version = "2.4.7"; + version = "2.4.8"; src = fetchurl { url = "https://github.com/libexpat/libexpat/releases/download/R_${lib.replaceStrings ["."] ["_"] version}/${pname}-${version}.tar.xz"; - sha256 = "0zbss0dssn17mjmvk17qfi5cmvm0lcyzs62cwvqr219hhl864xcq"; + sha256 = "sha256-95uPkEt0nj4NIK/q3s+CScVbLjLU67CJrjeN9HncryU="; }; outputs = [ "out" "dev" ]; # TODO: fix referrers From a14a3f1e3c66e93b9403d3fd9dd38b099e1574db Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 16 Feb 2022 10:06:32 +0100 Subject: [PATCH 41/73] python3Packages.limits: enable tests --- .../python-modules/limits/default.nix | 62 ++++++++++++++++--- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/limits/default.nix b/pkgs/development/python-modules/limits/default.nix index 7cb622df047..ba31679ebac 100644 --- a/pkgs/development/python-modules/limits/default.nix +++ b/pkgs/development/python-modules/limits/default.nix @@ -1,21 +1,69 @@ -{ lib, fetchPypi, buildPythonPackage, six }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, hiro +, pymemcache +, pymongo +, pytest-asyncio +, pytest-lazy-fixture +, pytestCheckHook +, pythonOlder +, redis +, setuptools +}: buildPythonPackage rec { pname = "limits"; version = "2.4.0"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-jiK2PfJjECB6d7db1HRZnwpGE6fZFjZQ7TpCjpzHrjU="; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "alisaifee"; + repo = pname; + rev = version; + hash = "sha256-KSYcIdLQ6TZpimxXyV88/V35GbBJ/9k9+UBM2KTMRR4="; }; - propagatedBuildInputs = [ six ]; + propagatedBuildInputs = [ + setuptools + redis + pymemcache + pymongo + ]; + + checkInputs = [ + hiro + pytest-asyncio + pytest-lazy-fixture + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pytest.ini \ + --replace "--cov=limits" "" \ + --replace "-K" "" + # redis-py-cluster doesn't support redis > 4 + substituteInPlace tests/conftest.py \ + --replace "import rediscluster" "" + ''; - doCheck = false; # ifilter + pythonImportsCheck = [ + "limits" + ]; + + pytestFlagsArray = [ + # All other tests require a running Docker instance + "tests/test_limits.py" + "tests/test_ratelimit_parser.py" + "tests/test_limit_granularities.py" + ]; meta = with lib; { description = "Rate limiting utilities"; - license = licenses.mit; homepage = "https://limits.readthedocs.org/"; + license = licenses.mit; + maintainers = with maintainers; [ ]; }; } From 22f5d327101dbf13c072761417f460ed413725e8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 27 Apr 2022 00:17:40 +0200 Subject: [PATCH 42/73] python39Packages.limits: 2.4.0 -> 2.6.1 --- pkgs/development/python-modules/limits/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/limits/default.nix b/pkgs/development/python-modules/limits/default.nix index ba31679ebac..451bcb4466a 100644 --- a/pkgs/development/python-modules/limits/default.nix +++ b/pkgs/development/python-modules/limits/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "limits"; - version = "2.4.0"; + version = "2.6.1"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "alisaifee"; repo = pname; rev = version; - hash = "sha256-KSYcIdLQ6TZpimxXyV88/V35GbBJ/9k9+UBM2KTMRR4="; + hash = "sha256-4Njai0LT72U9Ra4pgHU0ZjF9oZexbijUgLFYaZi/LgE="; }; propagatedBuildInputs = [ From 1c4be4e27174812a00531521adeb323a414d31ee Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 29 Apr 2022 00:40:23 +0200 Subject: [PATCH 43/73] python310Packages.limits: remove extra requirements --- pkgs/development/python-modules/limits/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/limits/default.nix b/pkgs/development/python-modules/limits/default.nix index 451bcb4466a..e99c23a79f4 100644 --- a/pkgs/development/python-modules/limits/default.nix +++ b/pkgs/development/python-modules/limits/default.nix @@ -1,7 +1,9 @@ { lib , buildPythonPackage +, deprecated , fetchFromGitHub , hiro +, packaging , pymemcache , pymongo , pytest-asyncio @@ -10,6 +12,7 @@ , pythonOlder , redis , setuptools +, typing-extensions }: buildPythonPackage rec { @@ -27,17 +30,20 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ + deprecated + packaging setuptools - redis - pymemcache - pymongo + typing-extensions ]; checkInputs = [ hiro + pymemcache + pymongo pytest-asyncio pytest-lazy-fixture pytestCheckHook + redis ]; postPatch = '' From 093a95361bfc1b49823dc99444ddb285a57b2402 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 30 Mar 2022 06:33:05 +0000 Subject: [PATCH 44/73] libsndfile: 1.0.31 -> 1.1.0 --- pkgs/development/libraries/libsndfile/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libsndfile/default.nix b/pkgs/development/libraries/libsndfile/default.nix index dbe108f586f..a319de5ce6b 100644 --- a/pkgs/development/libraries/libsndfile/default.nix +++ b/pkgs/development/libraries/libsndfile/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "libsndfile"; - version = "1.0.31"; + version = "1.1.0"; src = fetchFromGitHub { owner = pname; repo = pname; rev = version; - sha256 = "1alba3iv8i7i2jb5fd6q5s7j9bcj48sf28nfjd3qigz2n2is5jl2"; + sha256 = "sha256-bhIXVSKuUnUzs5aaLDHt21RcnqekEpLU414sFtl2Lro="; }; nativeBuildInputs = [ autoreconfHook autogen pkg-config python3 ]; From 2047e6eb7de7669d67ed5a234a2b89fd5da3b955 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Mon, 25 Apr 2022 22:45:03 +0100 Subject: [PATCH 45/73] ghostscript: 9.55.0 -> 9.56.1 --- pkgs/misc/ghostscript/default.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index 2c6b800db1f..28344c3fc5a 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -1,6 +1,6 @@ { config, stdenv, lib, fetchurl, pkg-config, zlib, expat, openssl, autoconf , libjpeg, libpng, libtiff, freetype, fontconfig, libpaper, jbig2dec -, libiconv, ijs, lcms2, fetchpatch, callPackage, bash, buildPackages, openjpeg +, libiconv, ijs, lcms2, callPackage, bash, buildPackages, openjpeg , cupsSupport ? config.ghostscript.cups or (!stdenv.isDarwin), cups , x11Support ? cupsSupport, xlibsWrapper # with CUPS, X11 only adds very little }: @@ -30,19 +30,14 @@ let in stdenv.mkDerivation rec { pname = "ghostscript${lib.optionalString (x11Support) "-with-X"}"; - version = "9.55.0"; + version = "9.56.1"; src = fetchurl { url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9${lib.versions.minor version}${lib.versions.patch version}/ghostscript-${version}.tar.xz"; - sha512 = "27g72152mlwlalg232jxdhaf3ykgmqwi2pccbkwfygql1h9iz40plfbwbs1n0fkvm4zwzg5r9cr8g7w2dxih4jldiidv7rflxdy1is2"; + sha512 = "22ysgdprh960rxmxyk2fy2my47cdrhfhbrwar1955hvad54iw79l916drp92wh3qzbxw6z40i70wk00vz8bn2ryig7qgpc1q01m2npy"; }; patches = [ - (fetchpatch { - name = "fix-non-vendored-lcms2-typo.patch"; - url = "https://github.com/ArtifexSoftware/ghostpdl/commit/830afae5454dea3bff903869d82022306890a96c.patch"; - sha256 = "1w9yspsgxyabvrw9ld6pv6pb7708c44ihjqvag7qqh9v1lhm48j0"; - }) ./urw-font-files.patch ./doc-no-ref.diff ]; From e19019fe327a7a9cd8539cfda2381bc2cc59ff75 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 28 Apr 2022 20:58:59 +0100 Subject: [PATCH 46/73] pythonRelaxDepsHook: init We have a common pattern here in nixpkgs for Python applications: when a Python package ships with either a requirements.txt or setup.py file, we generally end up having to modify its version restriction, otherwise we have build failures since we package only one specific version of each package normally. However, this end up being done in a completely ad-hoc way: some people use substituteInPlace, some others use sed, others uses patches, etc. In many cases, the code ends up being buggy, so it may work in one version and breaks on the next one. We can instead implement one standard way of doing this, and trying to be a correct as possible. So this is what this commit does: it implements a new build hook, that when called will automatically patch the wheel file. This is one of the most generic ways to patch Python dependencies, and should work in multiple cases. --- .../interpreters/python/hooks/default.nix | 13 ++- .../python/hooks/python-relax-deps-hook.sh | 83 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 1 + 3 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh diff --git a/pkgs/development/interpreters/python/hooks/default.nix b/pkgs/development/interpreters/python/hooks/default.nix index 1a0618225a3..63a2d5fbdd4 100644 --- a/pkgs/development/interpreters/python/hooks/default.nix +++ b/pkgs/development/interpreters/python/hooks/default.nix @@ -124,6 +124,15 @@ in rec { }; } ./python-recompile-bytecode-hook.sh ) {}; + pythonRelaxDepsHook = callPackage ({ wheel }: + makeSetupHook { + name = "python-relax-deps-hook"; + deps = [ wheel ]; + substitutions = { + inherit pythonInterpreter; + }; + } ./python-relax-deps-hook.sh) {}; + pythonRemoveBinBytecodeHook = callPackage ({ }: makeSetupHook { name = "python-remove-bin-bytecode-hook"; @@ -161,8 +170,8 @@ in rec { deps = [ ensureNewerSourcesForZipFilesHook ]; substitutions = { inherit pythonInterpreter; - }; - } ./venv-shell-hook.sh) {}); + }; + } ./venv-shell-hook.sh) {}); wheelUnpackHook = callPackage ({ wheel }: makeSetupHook { diff --git a/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh b/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh new file mode 100644 index 00000000000..7e1cfe51724 --- /dev/null +++ b/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh @@ -0,0 +1,83 @@ +# shellcheck shell=bash + +# Setup hook that modifies Python dependencies versions. +# +# Example usage in a derivation: +# +# { …, pythonPackages, … }: +# +# pythonPackages.buildPythonPackage { +# … +# nativeBuildInputs = [ pythonPackages.pythonRelaxDepsHook ]; +# +# # This will relax the dependency restrictions +# # e.g.: abc>1,<=2 -> abc +# pythonRelaxDeps = [ "abc" ]; +# # This will relax all dependencies restrictions instead +# # pythonRelaxDeps = true; +# # This will remove the dependency +# # e.g.: cde>1,<=2 -> +# pythonRemoveDeps = [ "cde" ]; +# # This will remove all dependencies from the project +# # pythonRemoveDeps = true; +# … +# } + +_pythonRelaxDeps() { + local -r metadata_file="$1" + + if [[ -z "${pythonRelaxDeps:-}" ]] || [[ "$pythonRelaxDeps" == 0 ]]; then + return + elif [[ "$pythonRelaxDeps" == 1 ]]; then + sed -i "$metadata_file" -r \ + -e 's/(Requires-Dist: \S*) \(.*\)/\1/' + else + for dep in $pythonRelaxDeps; do + sed -i "$metadata_file" -r \ + -e "s/(Requires-Dist: $dep) \(.*\)/\1/" + done + fi +} + +_pythonRemoveDeps() { + local -r metadata_file="$1" + + if [[ -z "${pythonRemoveDeps:-}" ]] || [[ "$pythonRemoveDeps" == 0 ]]; then + return + elif [[ "$pythonRemoveDeps" == 1 ]]; then + sed -i "$metadata_file" \ + -e '/Requires-Dist:.*/d' + else + for dep in $pythonRemoveDeps; do + sed -i "$metadata_file" \ + -e "/Requires-Dist: $dep/d" + done + fi + +} + +pythonRelaxDepsHook() { + pushd dist + + local -r package="$pname-$version" + local -r unpack_dir="unpacked" + local -r metadata_file="$unpack_dir/$package/$package.dist-info/METADATA" + local -r wheel=$(echo "$package"*".whl") + + @pythonInterpreter@ -m wheel unpack --dest "$unpack_dir" "$wheel" + rm -rf "$wheel" + + _pythonRelaxDeps "$metadata_file" + _pythonRemoveDeps "$metadata_file" + + if (( "${NIX_DEBUG:-0}" >= 1 )); then + echo "pythonRelaxDepsHook: resulting METADATA:" + cat "$unpack_dir/$package/$package.dist-info/METADATA" + fi + + @pythonInterpreter@ -m wheel pack "$unpack_dir/$package" + + popd +} + +postBuild+=" pythonRelaxDepsHook" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2d9631e4ac3..39f0901a020 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -119,6 +119,7 @@ in { pythonImportsCheckHook pythonNamespacesHook pythonRecompileBytecodeHook + pythonRelaxDepsHook pythonRemoveBinBytecodeHook pythonRemoveTestsDirHook setuptoolsBuildHook From 6e95481822edd16b900bc63416c06eaa98f32a53 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 28 Apr 2022 21:00:05 +0100 Subject: [PATCH 47/73] archivy: use pythonRelaxDepsHook --- pkgs/applications/misc/archivy/default.nix | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/pkgs/applications/misc/archivy/default.nix b/pkgs/applications/misc/archivy/default.nix index e7146052702..c2cf561524f 100644 --- a/pkgs/applications/misc/archivy/default.nix +++ b/pkgs/applications/misc/archivy/default.nix @@ -49,21 +49,9 @@ buildPythonApplication rec { hash = "sha256-o5dVJDbdKgo6hMMU9mKzoouSgVWl7xSAp+Aq61VcfeU="; }; - # Relax some dependencies - postPatch = '' - substituteInPlace requirements.txt \ - --replace 'WTForms ==' 'WTForms >=' \ - --replace 'attrs == 20.2.0' 'attrs' \ - --replace 'elasticsearch ==' 'elasticsearch >=' \ - --replace 'python_dotenv ==' 'python_dotenv >=' \ - --replace 'python_frontmatter == 0.5.0' 'python_frontmatter' \ - --replace 'requests ==' 'requests >=' \ - --replace 'validators ==' 'validators >=' \ - --replace 'flask-login == ' 'flask-login >= ' \ - --replace 'tinydb ==' 'tinydb >=' \ - --replace 'Flask_WTF == 0.14.3' 'Flask_WTF' \ - --replace 'Flask ==' 'Flask >=' - ''; + nativeBuildInputs = [ pythonRelaxDepsHook ]; + + pythonRelaxDeps = true; propagatedBuildInputs = [ appdirs From 4ca1a5fd256cb3ae44cae0d421926fa1a6155177 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 28 Apr 2022 22:58:28 +0100 Subject: [PATCH 48/73] python3Packages.testtools: use pythonRelaxDepsHook --- pkgs/development/python-modules/testtools/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/testtools/default.nix b/pkgs/development/python-modules/testtools/default.nix index 84900ad5477..430d0374ef2 100644 --- a/pkgs/development/python-modules/testtools/default.nix +++ b/pkgs/development/python-modules/testtools/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, pythonRelaxDepsHook , pbr , python-mimeparse , extras @@ -20,15 +21,13 @@ buildPythonPackage rec { propagatedBuildInputs = [ pbr python-mimeparse extras ]; buildInputs = [ traceback2 ]; + nativeBuildInputs = [ pythonRelaxDepsHook ]; # testscenarios has a circular dependency on testtools doCheck = false; checkInputs = [ testscenarios ]; - # testtools 2.0.0 and up has a circular run-time dependency on futures - postPatch = '' - substituteInPlace requirements.txt --replace "fixtures>=1.3.0" "" - ''; + pythonRemoveDeps = [ "fixtures" ]; meta = { description = "A set of extensions to the Python standard library's unit testing framework"; From 29bd246024a12f79097e3988becd9a98ebe515a7 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 28 Apr 2022 23:05:15 +0100 Subject: [PATCH 49/73] gitless: use pythonRelaxDepsHook --- pkgs/applications/version-management/gitless/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/version-management/gitless/default.nix b/pkgs/applications/version-management/gitless/default.nix index a7218347258..31ab40d7947 100644 --- a/pkgs/applications/version-management/gitless/default.nix +++ b/pkgs/applications/version-management/gitless/default.nix @@ -15,16 +15,15 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-xo5EWtP2aN8YzP8ro3bnxZwUGUp0PHD0g8hk+Y+gExE="; }; + nativeBuildInputs = [ python3.pkgs.pythonRelaxDepsHook ]; + propagatedBuildInputs = with python3.pkgs; [ sh pygit2 clint ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "pygit2==0.28.2" "pygit2>=0.28.2" - ''; + pythonRelaxDeps = [ "pygit2" ]; doCheck = false; From 8a00f0ca38b0c841f5d7a55bca4280bf0b46a96c Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sat, 30 Apr 2022 13:17:41 -0400 Subject: [PATCH 50/73] cdparanoiaIII: Cleanup Handle CC the normal way, `unset CC` was from quite old 28b6fb61e651a3e2cca57d087781e7ba6ab45e7c during early macOS experiments and no longer needed. Regenerate autoconf stuff unconditionally because it is so old, and unconditional is just simpler. Put conditional patches after unconditional ones as is more idiomatic. --- .../audio/cdparanoia/configure.patch | 22 ++++++++++++++++ .../applications/audio/cdparanoia/default.nix | 25 +++++++++++-------- 2 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 pkgs/applications/audio/cdparanoia/configure.patch diff --git a/pkgs/applications/audio/cdparanoia/configure.patch b/pkgs/applications/audio/cdparanoia/configure.patch new file mode 100644 index 00000000000..81c50cec814 --- /dev/null +++ b/pkgs/applications/audio/cdparanoia/configure.patch @@ -0,0 +1,22 @@ +diff --git a/configure.in b/configure.ac +similarity index 90% +rename from configure.in +rename to configure.ac +index 3ad98ca11da..8fad378faf4 100644 +--- a/configure.in ++++ b/configure.ac +@@ -1,13 +1,8 @@ + AC_INIT(interface/interface.c) + +-cp $srcdir/configure.guess $srcdir/config.guess +-cp $srcdir/configure.sub $srcdir/config.sub +- + AC_CANONICAL_HOST + +-if test -z "$CC"; then +- AC_PROG_CC +-fi ++AC_PROG_CC + AC_PROG_RANLIB + AC_CHECK_PROG(AR,ar,ar) + AC_CHECK_PROG(INSTALL,install,install) diff --git a/pkgs/applications/audio/cdparanoia/default.nix b/pkgs/applications/audio/cdparanoia/default.nix index 10ff66de77e..2c13631624e 100644 --- a/pkgs/applications/audio/cdparanoia/default.nix +++ b/pkgs/applications/audio/cdparanoia/default.nix @@ -1,4 +1,7 @@ -{ lib, stdenv, fetchurl, gnu-config, IOKit, Carbon }: +{ lib, stdenv, fetchurl +, updateAutotoolsGnuConfigScriptsHook, autoreconfHook +, IOKit, Carbon +}: stdenv.mkDerivation rec { pname = "cdparanoia-III"; @@ -9,7 +12,10 @@ stdenv.mkDerivation rec { sha256 = "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80"; }; - patches = lib.optionals stdenv.isDarwin [ + patches = [ + ./fix_private_keyword.patch + ./configure.patch + ] ++ lib.optionals stdenv.isDarwin [ (fetchurl { url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/osx_interface.patch"; sha256 = "1n86kzm2ssl8fdf5wlhp6ncb2bf6b9xlb5vg0mhc85r69prqzjiy"; @@ -18,8 +24,12 @@ stdenv.mkDerivation rec { url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/patch-paranoia_paranoia.c.10.4.diff"; sha256 = "17l2qhn8sh4jy6ryy5si6ll6dndcm0r537rlmk4a6a8vkn852vad"; }) - ] ++ lib.optional stdenv.hostPlatform.isMusl ./utils.patch - ++ [./fix_private_keyword.patch]; + ] ++ lib.optional stdenv.hostPlatform.isMusl ./utils.patch; + + nativeBuildInputs = [ + updateAutotoolsGnuConfigScriptsHook + autoreconfHook + ]; propagatedBuildInputs = lib.optionals stdenv.isDarwin [ Carbon @@ -28,13 +38,6 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - preConfigure = '' - unset CC - '' + lib.optionalString (!stdenv.hostPlatform.isx86) '' - cp ${gnu-config}/config.sub configure.sub - cp ${gnu-config}/config.guess configure.guess - ''; - # Build system reuses the same object file names for shared and static # library. Occasionally fails in the middle: # gcc -O2 -fsigned-char -g -O2 -c scan_devices.c From 79d9ef8a93be99bca1ee66eb53388e0cfbc3ea68 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 1 May 2022 08:19:53 +0100 Subject: [PATCH 51/73] python3Packages.pycurl: pull fix for curl 7.83.0 Without the change `python3Packages.pycurl` tests fail on `staging`: $ nix build -f. -L python3Packages.pycurl ... python3.9-pycurl> tests/error_test.py F..F [ 12%] ... python3.9-pycurl> > self.assertEqual('No URL set!', msg) python3.9-pycurl> E AssertionError: 'No URL set!' != 'No URL set' python3.9-pycurl> E - No URL set! python3.9-pycurl> E ? - python3.9-pycurl> E + No URL set python3.9-pycurl> tests/error_test.py:32: AssertionError --- pkgs/development/python-modules/pycurl/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/python-modules/pycurl/default.nix b/pkgs/development/python-modules/pycurl/default.nix index e7f3b87ad0c..4b0e215f22c 100644 --- a/pkgs/development/python-modules/pycurl/default.nix +++ b/pkgs/development/python-modules/pycurl/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , isPyPy , fetchPypi +, fetchpatch , pythonOlder , curl , openssl @@ -20,6 +21,16 @@ buildPythonPackage rec { sha256 = "sha256-qGOtGP9Hj1VFkkBXiHza5CLhsnRuQWdGFfaHSY6luIo="; }; + patches = [ + # Pull upstream patch for curl-3.83: + # https://github.com/pycurl/pycurl/pull/753 + (fetchpatch { + name = "curl-3.83.patch"; + url = "https://github.com/pycurl/pycurl/commit/d47c68b1364f8a1a45ab8c584c291d44b762f7b1.patch"; + sha256 = "sha256-/lGq7O7ZyytzBAxWJPigcWdvypM7OHLBcp9ItmX7z1g="; + }) + ]; + preConfigure = '' substituteInPlace setup.py --replace '--static-libs' '--libs' export PYCURL_SSL_LIBRARY=openssl From 52a2ace065810fa36ae5d9c7b2e8608d1a8711fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 1 May 2022 13:07:08 +0200 Subject: [PATCH 52/73] gmime3: 3.2.7 -> 3.2.11 The active repo is elsewhere now; reading linked from: https://gitlab.gnome.org/GNOME/gmime/-/issues/10 --- pkgs/development/libraries/gmime/3.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/gmime/3.nix b/pkgs/development/libraries/gmime/3.nix index a8e39047256..aee2dec5a9c 100644 --- a/pkgs/development/libraries/gmime/3.nix +++ b/pkgs/development/libraries/gmime/3.nix @@ -2,12 +2,12 @@ , vala }: stdenv.mkDerivation rec { - version = "3.2.7"; + version = "3.2.11"; pname = "gmime"; - src = fetchurl { - url = "mirror://gnome/sources/gmime/3.2/${pname}-${version}.tar.xz"; - sha256 = "0i3xfc84qn1z99i70q68kbnp9rmgqrnprqb418ba52s6g9j9dsia"; + src = fetchurl { # https://github.com/jstedfast/gmime/releases + url = "https://github.com/jstedfast/gmime/releases/download/${version}/gmime-${version}.tar.xz"; + sha256 = "5e023855a215b427645b400f5e55cf19cfd229f971317007e03e7bae72569bf8"; }; outputs = [ "out" "dev" ]; From df9ffaf7761e0268c6b8f27044f935a896953dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 2 May 2022 10:40:34 +0200 Subject: [PATCH 53/73] notmuch: skip a test incompatible with newer gmime3 --- pkgs/applications/networking/mailreaders/notmuch/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix index 18e09326f35..06bbf293f1d 100644 --- a/pkgs/applications/networking/mailreaders/notmuch/default.nix +++ b/pkgs/applications/networking/mailreaders/notmuch/default.nix @@ -79,6 +79,11 @@ stdenv.mkDerivation rec { in '' mkdir -p test/test-databases ln -s ${test-database} test/test-databases/database-v1.tar.xz + '' + # TODO: restore after resolved upstream + # https://www.mail-archive.com/notmuch@notmuchmail.org/msg52808.html + + '' + rm test/T355-smime.sh ''; doCheck = !stdenv.hostPlatform.isDarwin && (lib.versionAtLeast gmime.version "3.0.3"); From 4aa18d9249777f24aee61690e6cf7aa1353b69d1 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Mon, 2 May 2022 13:00:59 +0100 Subject: [PATCH 54/73] libarchive: disable cpio file-access-time related tests these are mysteriously flakey on some peoples darwin systems, which could be the result of stray accesses or timezone issues --- .../libraries/libarchive/default.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/libarchive/default.nix b/pkgs/development/libraries/libarchive/default.nix index 76e5a32316d..066ea8b60dd 100644 --- a/pkgs/development/libraries/libarchive/default.nix +++ b/pkgs/development/libraries/libarchive/default.nix @@ -40,18 +40,21 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace Makefile.am --replace '/bin/pwd' "$(type -P pwd)" - declare -a skip_tests=( + declare -a skip_test_paths=( # test won't work in nix sandbox - 'test_write_disk_perms' + 'libarchive/test/test_write_disk_perms.c' # can't be sure builder will have sparse-capable fs - 'test_sparse_basic' + 'libarchive/test/test_sparse_basic.c' # can't even be sure builder will have hardlink-capable fs - 'test_write_disk_hardlink' + 'libarchive/test/test_write_disk_hardlink.c' + # access-time-related tests flakey on some systems + 'cpio/test/test_option_a.c' + 'cpio/test/test_option_t.c' ) - for test_name in "''${skip_tests[@]}" ; do - sed -i "/$test_name/d" Makefile.am - rm "libarchive/test/$test_name.c" + for test_path in "''${skip_test_paths[@]}" ; do + substituteInPlace Makefile.am --replace "$test_path" "" + rm "$test_path" done ''; From a7be3b2607fef40cb8a9a04ea4ee7753ad8a58e0 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 3 May 2022 18:05:18 +0200 Subject: [PATCH 55/73] openssl_1_1: 1.1.1n -> 1.1.1o Fixes command injection in the c_rehash script, which at the same time is also considered obsolete and should be replaced by openssl rehash. https://mta.openssl.org/pipermail/openssl-announce/2022-May/000224.html Fixes: CVE-2022-1292 --- pkgs/development/libraries/openssl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 8182a01cd52..9e2569ae9fe 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -178,8 +178,8 @@ in { openssl_1_1 = common rec { - version = "1.1.1n"; - sha256 = "sha256-QNzrUaT2pSdb3g5r8g70uRv8Mu1XwFUuLo4VRjNysXo="; + version = "1.1.1o"; + sha256 = "sha256-k4SisFcN2ANYhBRkZ3EV33he25QccSEfdQdtcv5rQ48="; patches = [ ./1.1/nix-ssl-cert-file.patch From 207c4030f52ccefe6908b4589b837300bd6debfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Tue, 3 May 2022 23:25:49 +0000 Subject: [PATCH 56/73] libxml2: 2.9.13 -> 2.9.14 Fixes CVE-2022-29824, see https://gitlab.gnome.org/GNOME/libxml2/-/tags/v2.9.14 --- pkgs/development/libraries/libxml2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index 3b7cae36a0e..06c073c718a 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { pname = "libxml2"; - version = "2.9.13"; + version = "2.9.14"; outputs = [ "bin" "dev" "out" "man" "doc" ] ++ lib.optional pythonSupport "py" @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "J2EwYC0S/khOzANEfuXnWdBGVVj7yda9FE43RTBuvw4="; + sha256 = "1vnzk33wfms348lgz9pvkq9li7jm44pvm73lbr3w1khwgljlmmv0"; }; patches = [ From 2bd7ade9310421f06c1476ca852d1c72bf1dc414 Mon Sep 17 00:00:00 2001 From: nixpkgs-upkeep-bot Date: Wed, 4 May 2022 00:24:34 +0000 Subject: [PATCH 57/73] python3Packages.matplotlib: 3.5.1 -> 3.5.2 --- pkgs/development/python-modules/matplotlib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix index cc118d9f0ab..933fd3865d6 100644 --- a/pkgs/development/python-modules/matplotlib/default.nix +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -17,7 +17,7 @@ let in buildPythonPackage rec { - version = "3.5.1"; + version = "3.5.2"; pname = "matplotlib"; format = "setuptools"; @@ -25,7 +25,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c"; + sha256 = "18h78s5ld1i6mz00w258hy29909nfr3ddq6ry9kq18agw468bks8"; }; XDG_RUNTIME_DIR = "/tmp"; From 7c4e34a13bc902b61fb5c2a469baf0e6facd04b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 4 May 2022 21:02:51 +0200 Subject: [PATCH 58/73] Re-revert "zimg: 3.0.3 -> 3.0.4" This reverts commit b4cc9cd38f05f1a764e21bfb1b14e89be76068b0. and thus reapplies PR #171144. --- pkgs/development/libraries/zimg/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/zimg/default.nix b/pkgs/development/libraries/zimg/default.nix index 38b106d474b..475ebc7517e 100644 --- a/pkgs/development/libraries/zimg/default.nix +++ b/pkgs/development/libraries/zimg/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "zimg"; - version = "3.0.3"; + version = "3.0.4"; src = fetchFromGitHub { owner = "sekrit-twc"; repo = "zimg"; rev = "release-${version}"; - sha256 = "0pwgf1mybpa3fs13p6jryzm32vfldyql9biwaypqdcimlnlmyk20"; + sha256 = "1069x49l7kh1mqcq1h3f0m5j0h832jp5x230bh4c613ymgg5kn00"; }; nativeBuildInputs = [ autoreconfHook ]; From ec87e38d65d4ea1fa7ab76c7efe70098e36769d0 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Wed, 4 May 2022 23:11:45 -0500 Subject: [PATCH 59/73] Revert "gcc: 11.2.0 -> 11.3.0" for aarch64-darwin Patches to support GCC 11.3.0 on aarch64-darwin are not available. Homebrew also is skipping the 11.3.0 upgrade. --- pkgs/development/compilers/gcc/11/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/gcc/11/default.nix b/pkgs/development/compilers/gcc/11/default.nix index 74050506202..ba4b10cf73e 100644 --- a/pkgs/development/compilers/gcc/11/default.nix +++ b/pkgs/development/compilers/gcc/11/default.nix @@ -52,7 +52,12 @@ with lib; with builtins; let majorVersion = "11"; - version = "${majorVersion}.3.0"; + # The patch below for aarch64-darwin does not apply to 11.3.0 and an + # updated version is not available. Keep aarch64-darwin on 11.2.0 so the + # large body of packages which depend on gfortran are still functional + # until GCC 12 is the default. + version = if (stdenv.isDarwin && stdenv.isAarch64) then + "${majorVersion}.2.0" else "${majorVersion}.3.0"; inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -91,7 +96,9 @@ stdenv.mkDerivation ({ src = fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz"; - sha256 = "sha256-tHzygYaR9bHiHfK7OMeV+sLPvWQO3i0KXhyJ4zijrDk="; + sha256 = if (stdenv.isDarwin && stdenv.isAarch64) + then "sha256-0I7cU2tUw3KhAQ/2YZ3SdMDxYDqkkhK6IPeqLNo2+os=" + else "sha256-tHzygYaR9bHiHfK7OMeV+sLPvWQO3i0KXhyJ4zijrDk="; }; inherit patches; From c5e7eff560302b7bf047c5f2a5d4fa184c694fae Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Mon, 3 May 2021 21:29:01 +0200 Subject: [PATCH 60/73] wlogout: support cross-compilation --- pkgs/tools/wayland/wlogout/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/wayland/wlogout/default.nix b/pkgs/tools/wayland/wlogout/default.nix index d9d44212601..c7364af5d5f 100644 --- a/pkgs/tools/wayland/wlogout/default.nix +++ b/pkgs/tools/wayland/wlogout/default.nix @@ -23,6 +23,7 @@ stdenv.mkDerivation rec { sha256 = "cTscfx+erHVFHwwYpN7pADQWt5sq75sQSyXSP/H8kOs="; }; + depsBuildBuild = [ pkg-config ]; nativeBuildInputs = [ pkg-config meson ninja scdoc ]; buildInputs = [ gtk3 From 772502c35843f8e8e7610dc63e1b7384f6f5072c Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Tue, 23 Nov 2021 19:59:04 +0100 Subject: [PATCH 61/73] wlogout: disable gtk-layer-shell when cross-compiling Because gtk-layer-shell doesn't cross-compile properly --- pkgs/tools/wayland/wlogout/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/wayland/wlogout/default.nix b/pkgs/tools/wayland/wlogout/default.nix index c7364af5d5f..26d04bd11e0 100644 --- a/pkgs/tools/wayland/wlogout/default.nix +++ b/pkgs/tools/wayland/wlogout/default.nix @@ -10,6 +10,11 @@ , wayland , wayland-protocols , gtk-layer-shell +# gtk-layer-shell fails to cross-compile due to a hard dependency +# on gobject-introspection. +# Disable it when cross-compiling since it's an optional dependency. +# This disables transparency support. +, withGtkLayerShell ? (stdenv.buildPlatform == stdenv.hostPlatform) }: stdenv.mkDerivation rec { @@ -30,6 +35,7 @@ stdenv.mkDerivation rec { libxkbcommon wayland wayland-protocols + ] ++ lib.optionals withGtkLayerShell [ gtk-layer-shell ]; From 4ff62d90ac452024e8fe2c422e7c9f12438abdc4 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Thu, 5 May 2022 22:55:47 +0200 Subject: [PATCH 62/73] wlogout: enable strictDeps --- pkgs/tools/wayland/wlogout/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/wayland/wlogout/default.nix b/pkgs/tools/wayland/wlogout/default.nix index 26d04bd11e0..7f9935b6c3c 100644 --- a/pkgs/tools/wayland/wlogout/default.nix +++ b/pkgs/tools/wayland/wlogout/default.nix @@ -28,6 +28,7 @@ stdenv.mkDerivation rec { sha256 = "cTscfx+erHVFHwwYpN7pADQWt5sq75sQSyXSP/H8kOs="; }; + strictDeps = true; depsBuildBuild = [ pkg-config ]; nativeBuildInputs = [ pkg-config meson ninja scdoc ]; buildInputs = [ From 251ab5f3f61e2402833291d28ca6a19ec8839e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Thu, 5 May 2022 16:50:43 -0500 Subject: [PATCH 63/73] gnome: fix compilation with gcc 11.3.0 A new warning (`-Werror=overlength-strings`) is causing issues due to a recent gcc version upgrade --- pkgs/desktops/gnome/apps/cheese/default.nix | 2 ++ pkgs/desktops/gnome/apps/gnome-maps/default.nix | 2 ++ pkgs/desktops/gnome/apps/gnome-music/default.nix | 2 ++ pkgs/desktops/gnome/core/gnome-shell/default.nix | 2 ++ pkgs/desktops/gnome/core/totem/default.nix | 2 ++ 5 files changed, 10 insertions(+) diff --git a/pkgs/desktops/gnome/apps/cheese/default.nix b/pkgs/desktops/gnome/apps/cheese/default.nix index a6d70d162c0..308a30dde29 100644 --- a/pkgs/desktops/gnome/apps/cheese/default.nix +++ b/pkgs/desktops/gnome/apps/cheese/default.nix @@ -80,6 +80,8 @@ stdenv.mkDerivation rec { pipewire # PipeWire provides a gstreamer plugin for using PipeWire for video ]; + NIX_CFLAGS_COMPILE = "-Wno-error=overlength-strings"; + postPatch = '' chmod +x meson_post_install.py patchShebangs meson_post_install.py diff --git a/pkgs/desktops/gnome/apps/gnome-maps/default.nix b/pkgs/desktops/gnome/apps/gnome-maps/default.nix index a0d566c7ef9..1280c15f213 100644 --- a/pkgs/desktops/gnome/apps/gnome-maps/default.nix +++ b/pkgs/desktops/gnome/apps/gnome-maps/default.nix @@ -69,6 +69,8 @@ stdenv.mkDerivation rec { webkitgtk ]; + NIX_CFLAGS_COMPILE = "-Wno-error=overlength-strings"; + postPatch = '' chmod +x meson_post_install.py # patchShebangs requires executable file patchShebangs meson_post_install.py diff --git a/pkgs/desktops/gnome/apps/gnome-music/default.nix b/pkgs/desktops/gnome/apps/gnome-music/default.nix index 8d5f5e5f28d..40f85b8a59c 100644 --- a/pkgs/desktops/gnome/apps/gnome-music/default.nix +++ b/pkgs/desktops/gnome/apps/gnome-music/default.nix @@ -76,6 +76,8 @@ python3.pkgs.buildPythonApplication rec { gst-plugins-ugly ]); + NIX_CFLAGS_COMPILE = "-Wno-error=overlength-strings"; + pythonPath = with python3.pkgs; [ pycairo dbus-python diff --git a/pkgs/desktops/gnome/core/gnome-shell/default.nix b/pkgs/desktops/gnome/core/gnome-shell/default.nix index 1ad36f7e96b..9d7e14898e2 100644 --- a/pkgs/desktops/gnome/core/gnome-shell/default.nix +++ b/pkgs/desktops/gnome/core/gnome-shell/default.nix @@ -175,6 +175,8 @@ stdenv.mkDerivation rec { pythonEnv ]; + NIX_CFLAGS_COMPILE = "-Wno-error=overlength-strings"; + mesonFlags = [ "-Dgtk_doc=true" ]; diff --git a/pkgs/desktops/gnome/core/totem/default.nix b/pkgs/desktops/gnome/core/totem/default.nix index 44e1319f8d4..af64e40a653 100644 --- a/pkgs/desktops/gnome/core/totem/default.nix +++ b/pkgs/desktops/gnome/core/totem/default.nix @@ -77,6 +77,8 @@ stdenv.mkDerivation rec { xvfb-run ]; + NIX_CFLAGS_COMPILE = "-Wno-error=overlength-strings"; + mesonFlags = [ # TODO: https://github.com/NixOS/nixpkgs/issues/36468 "-Dc_args=-I${glib.dev}/include/gio-unix-2.0" From 976e65456a25614b4823349be44c24658fce2dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 6 May 2022 11:43:07 +0200 Subject: [PATCH 64/73] gcc11: downgrade to 11.2.0 also on x86_64-darwin https://hydra.nixos.org/build/175546330 --- pkgs/development/compilers/gcc/11/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/gcc/11/default.nix b/pkgs/development/compilers/gcc/11/default.nix index ba4b10cf73e..607c9eeac2f 100644 --- a/pkgs/development/compilers/gcc/11/default.nix +++ b/pkgs/development/compilers/gcc/11/default.nix @@ -56,7 +56,8 @@ let majorVersion = "11"; # updated version is not available. Keep aarch64-darwin on 11.2.0 so the # large body of packages which depend on gfortran are still functional # until GCC 12 is the default. - version = if (stdenv.isDarwin && stdenv.isAarch64) then + # On x86_64-darwin, building libgcc suffers from some different issues with 11.3.0. + version = if stdenv.isDarwin then "${majorVersion}.2.0" else "${majorVersion}.3.0"; inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -96,7 +97,7 @@ stdenv.mkDerivation ({ src = fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz"; - sha256 = if (stdenv.isDarwin && stdenv.isAarch64) + sha256 = if stdenv.isDarwin then "sha256-0I7cU2tUw3KhAQ/2YZ3SdMDxYDqkkhK6IPeqLNo2+os=" else "sha256-tHzygYaR9bHiHfK7OMeV+sLPvWQO3i0KXhyJ4zijrDk="; }; From 42a4c05dd092e379c57eefb174bb1a5fea90b92a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Fri, 6 May 2022 15:03:08 +0200 Subject: [PATCH 65/73] makeBinaryWrapper: add -Wno-overlength-strings The generated C code contains large string literals that are longer than the maximum length specified by the standard. However, GCC has no trouble dealing with those strings, so we can just add -Wno-overlength-strings. https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Woverlength-strings --- pkgs/build-support/setup-hooks/make-binary-wrapper.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/build-support/setup-hooks/make-binary-wrapper.sh b/pkgs/build-support/setup-hooks/make-binary-wrapper.sh index 7123f100c17..7b69583574a 100644 --- a/pkgs/build-support/setup-hooks/make-binary-wrapper.sh +++ b/pkgs/build-support/setup-hooks/make-binary-wrapper.sh @@ -46,6 +46,7 @@ makeWrapper() { makeDocumentedCWrapper "$original" "$@" | \ @CC@ \ -Wall -Werror -Wpedantic \ + -Wno-overlength-strings \ -Os \ -x c \ -o "$wrapper" - From 69c7dbb88086b9bd5dce9c314779bed6ac6cb0a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Fri, 6 May 2022 17:03:30 +0200 Subject: [PATCH 66/73] makeBinaryWrapper: add overlength-strings test --- pkgs/test/make-binary-wrapper/default.nix | 1 + .../make-binary-wrapper/overlength-strings.c | 25 +++++++++++++++++++ .../overlength-strings.cmdline | 1 + .../overlength-strings.env | 3 +++ 4 files changed, 30 insertions(+) create mode 100644 pkgs/test/make-binary-wrapper/overlength-strings.c create mode 100644 pkgs/test/make-binary-wrapper/overlength-strings.cmdline create mode 100644 pkgs/test/make-binary-wrapper/overlength-strings.env diff --git a/pkgs/test/make-binary-wrapper/default.nix b/pkgs/test/make-binary-wrapper/default.nix index b5bbf994ffa..2d3389c4a01 100644 --- a/pkgs/test/make-binary-wrapper/default.nix +++ b/pkgs/test/make-binary-wrapper/default.nix @@ -44,6 +44,7 @@ let "invalid-env" "prefix" "suffix" + "overlength-strings" ]; f = name: lib.nameValuePair name (makeGoldenTest name); in builtins.listToAttrs (builtins.map f names); diff --git a/pkgs/test/make-binary-wrapper/overlength-strings.c b/pkgs/test/make-binary-wrapper/overlength-strings.c new file mode 100644 index 00000000000..579705d33e9 --- /dev/null +++ b/pkgs/test/make-binary-wrapper/overlength-strings.c @@ -0,0 +1,25 @@ +#define _GNU_SOURCE /* See feature_test_macros(7) */ +#include +#include +#include +#include + +#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0) + +void set_env_prefix(char *env, char *sep, char *prefix) { + char *existing = getenv(env); + if (existing) { + char *val; + assert_success(asprintf(&val, "%s%s%s", prefix, sep, existing)); + assert_success(setenv(env, val, 1)); + free(val); + } else { + assert_success(setenv(env, prefix, 1)); + } +} + +int main(int argc, char **argv) { + set_env_prefix("PATH", ":", "/nix/store/00000000000000000000000000000000-loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"); + argv[0] = "/send/me/flags"; + return execv("/send/me/flags", argv); +} diff --git a/pkgs/test/make-binary-wrapper/overlength-strings.cmdline b/pkgs/test/make-binary-wrapper/overlength-strings.cmdline new file mode 100644 index 00000000000..686abbb1cdb --- /dev/null +++ b/pkgs/test/make-binary-wrapper/overlength-strings.cmdline @@ -0,0 +1 @@ + --prefix PATH : /nix/store/00000000000000000000000000000000-loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong diff --git a/pkgs/test/make-binary-wrapper/overlength-strings.env b/pkgs/test/make-binary-wrapper/overlength-strings.env new file mode 100644 index 00000000000..83a02f5f834 --- /dev/null +++ b/pkgs/test/make-binary-wrapper/overlength-strings.env @@ -0,0 +1,3 @@ +PATH=/nix/store/00000000000000000000000000000000-loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong +CWD=SUBST_CWD +SUBST_ARGV0 From d4aa650608fdbf78a9697e272d88f5f6e809744b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Fri, 6 May 2022 17:03:52 +0200 Subject: [PATCH 67/73] makeBinaryWrapper: really unset NIX_CFLAGS https://github.com/NixOS/nixpkgs/commit/f8cc8ff5755528d9a73671481ba3d6fb00f4e8d5 fails to unset the variables in the environment due to a Bash quirk, so set them to the empty string instead. --- pkgs/build-support/setup-hooks/make-binary-wrapper.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/build-support/setup-hooks/make-binary-wrapper.sh b/pkgs/build-support/setup-hooks/make-binary-wrapper.sh index 7b69583574a..3931b37c242 100644 --- a/pkgs/build-support/setup-hooks/make-binary-wrapper.sh +++ b/pkgs/build-support/setup-hooks/make-binary-wrapper.sh @@ -33,8 +33,7 @@ assertExecutable() { # To troubleshoot a binary wrapper after you compiled it, # use the `strings` command or open the binary file in a text editor. makeWrapper() { - local NIX_CFLAGS_COMPILE NIX_CFLAGS_LINK - unset NIX_CFLAGS_COMPILE NIX_CFLAGS_LINK + local NIX_CFLAGS_COMPILE= NIX_CFLAGS_LINK= local original="$1" local wrapper="$2" shift 2 From 888c82fbba7cf3016943d577e91bc0a71ab136bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Fri, 6 May 2022 17:07:34 +0200 Subject: [PATCH 68/73] Revert "gnome: fix compilation with gcc 11.3.0" This reverts commit 251ab5f3f61e2402833291d28ca6a19ec8839e2a. Fixed by https://github.com/NixOS/nixpkgs/pull/171819 instead. --- pkgs/desktops/gnome/apps/cheese/default.nix | 2 -- pkgs/desktops/gnome/apps/gnome-maps/default.nix | 2 -- pkgs/desktops/gnome/apps/gnome-music/default.nix | 2 -- pkgs/desktops/gnome/core/gnome-shell/default.nix | 2 -- pkgs/desktops/gnome/core/totem/default.nix | 2 -- 5 files changed, 10 deletions(-) diff --git a/pkgs/desktops/gnome/apps/cheese/default.nix b/pkgs/desktops/gnome/apps/cheese/default.nix index 308a30dde29..a6d70d162c0 100644 --- a/pkgs/desktops/gnome/apps/cheese/default.nix +++ b/pkgs/desktops/gnome/apps/cheese/default.nix @@ -80,8 +80,6 @@ stdenv.mkDerivation rec { pipewire # PipeWire provides a gstreamer plugin for using PipeWire for video ]; - NIX_CFLAGS_COMPILE = "-Wno-error=overlength-strings"; - postPatch = '' chmod +x meson_post_install.py patchShebangs meson_post_install.py diff --git a/pkgs/desktops/gnome/apps/gnome-maps/default.nix b/pkgs/desktops/gnome/apps/gnome-maps/default.nix index 1280c15f213..a0d566c7ef9 100644 --- a/pkgs/desktops/gnome/apps/gnome-maps/default.nix +++ b/pkgs/desktops/gnome/apps/gnome-maps/default.nix @@ -69,8 +69,6 @@ stdenv.mkDerivation rec { webkitgtk ]; - NIX_CFLAGS_COMPILE = "-Wno-error=overlength-strings"; - postPatch = '' chmod +x meson_post_install.py # patchShebangs requires executable file patchShebangs meson_post_install.py diff --git a/pkgs/desktops/gnome/apps/gnome-music/default.nix b/pkgs/desktops/gnome/apps/gnome-music/default.nix index 40f85b8a59c..8d5f5e5f28d 100644 --- a/pkgs/desktops/gnome/apps/gnome-music/default.nix +++ b/pkgs/desktops/gnome/apps/gnome-music/default.nix @@ -76,8 +76,6 @@ python3.pkgs.buildPythonApplication rec { gst-plugins-ugly ]); - NIX_CFLAGS_COMPILE = "-Wno-error=overlength-strings"; - pythonPath = with python3.pkgs; [ pycairo dbus-python diff --git a/pkgs/desktops/gnome/core/gnome-shell/default.nix b/pkgs/desktops/gnome/core/gnome-shell/default.nix index 9d7e14898e2..1ad36f7e96b 100644 --- a/pkgs/desktops/gnome/core/gnome-shell/default.nix +++ b/pkgs/desktops/gnome/core/gnome-shell/default.nix @@ -175,8 +175,6 @@ stdenv.mkDerivation rec { pythonEnv ]; - NIX_CFLAGS_COMPILE = "-Wno-error=overlength-strings"; - mesonFlags = [ "-Dgtk_doc=true" ]; diff --git a/pkgs/desktops/gnome/core/totem/default.nix b/pkgs/desktops/gnome/core/totem/default.nix index af64e40a653..44e1319f8d4 100644 --- a/pkgs/desktops/gnome/core/totem/default.nix +++ b/pkgs/desktops/gnome/core/totem/default.nix @@ -77,8 +77,6 @@ stdenv.mkDerivation rec { xvfb-run ]; - NIX_CFLAGS_COMPILE = "-Wno-error=overlength-strings"; - mesonFlags = [ # TODO: https://github.com/NixOS/nixpkgs/issues/36468 "-Dc_args=-I${glib.dev}/include/gio-unix-2.0" From 6e0f386ae4e04d29db0c31c0e073bf434ae1d587 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Fri, 6 May 2022 18:56:00 +0200 Subject: [PATCH 69/73] pythonPackages.limits: hack around versioneer non-reproducibility Context: #84312 documents that using .gitattributes on GitHub results in non-reproducible release tarballs. versioneer uses this to provide version numbers for Python libraries. Hack around that issue by deleting the file containing substitutions in the fixed hash input derivation, and recreate the required info from the derivation's version info at patchPhase time. --- pkgs/development/python-modules/limits/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/limits/default.nix b/pkgs/development/python-modules/limits/default.nix index e99c23a79f4..afc777e1d85 100644 --- a/pkgs/development/python-modules/limits/default.nix +++ b/pkgs/development/python-modules/limits/default.nix @@ -26,7 +26,13 @@ buildPythonPackage rec { owner = "alisaifee"; repo = pname; rev = version; - hash = "sha256-4Njai0LT72U9Ra4pgHU0ZjF9oZexbijUgLFYaZi/LgE="; + # Upstream uses versioneer, which relies on git attributes substitution. + # This leads to non-reproducible archives on github. Remove the substituted + # file here, and recreate it later based on our version info. + extraPostFetch = '' + rm "$out/limits/_version.py" + ''; + hash = "sha256-ja+YbRHCcZ5tFnoofdR44jbkkdDroVUdKeDOt6yE0LI="; }; propagatedBuildInputs = [ @@ -53,6 +59,9 @@ buildPythonPackage rec { # redis-py-cluster doesn't support redis > 4 substituteInPlace tests/conftest.py \ --replace "import rediscluster" "" + + # Recreate _version.py, deleted at fetch time due to non-reproducibility. + echo 'def get_versions(): return {"version": "${version}"}' > limits/_version.py ''; pythonImportsCheck = [ From 2bebc577d88eaefeae686d7972d268af65a1051f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 7 May 2022 09:01:21 +0200 Subject: [PATCH 70/73] python3Packages.PyICU: 2.8.1 -> 2.9 https://gitlab.pyicu.org/main/pyicu/-/blob/v2.9/CHANGES The important bit is support for ICU 71.1; otherwise tests failed. --- pkgs/development/python-modules/pyicu/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyicu/default.nix b/pkgs/development/python-modules/pyicu/default.nix index 02226feff2c..255231f8a49 100644 --- a/pkgs/development/python-modules/pyicu/default.nix +++ b/pkgs/development/python-modules/pyicu/default.nix @@ -8,11 +8,11 @@ buildPythonPackage rec { pname = "PyICU"; - version = "2.8.1"; + version = "2.9"; src = fetchPypi { inherit pname version; - sha256 = "sha256-8LlUmof4e6fEE/E2edE3Jx4LN/HzmwEJrOOCV9TRSNY="; + sha256 = "sha256-PCnWzmVUYVcReho0ejA+zfzxp1ke1nn8iM3vQQiEWHg="; }; nativeBuildInputs = [ icu ]; # for icu-config, but should be replaced with pkg-config From 5b42ce1da780a024a8d78846ad1fa0ef408caa5d Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 7 May 2022 13:02:26 +0100 Subject: [PATCH 71/73] imlib2: add explicit svg & heif support-disabling instead of just buildInput omission. darwin still fails to build with svg or heif support, but a change in one of the present dependencies may cause one of these libraries to be detected and the support accidentally enabled. --- pkgs/development/libraries/imlib2/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/imlib2/default.nix b/pkgs/development/libraries/imlib2/default.nix index a882a660833..26f904b49b0 100644 --- a/pkgs/development/libraries/imlib2/default.nix +++ b/pkgs/development/libraries/imlib2/default.nix @@ -5,6 +5,10 @@ , libid3tag, librsvg, libheif , freetype , bzip2, pkg-config , x11Support ? true, xlibsWrapper ? null +# Compilation error on Darwin with librsvg. For more information see: +# https://github.com/NixOS/nixpkgs/pull/166452#issuecomment-1090725613 +, svgSupport ? !stdenv.isDarwin +, heifSupport ? !stdenv.isDarwin }: let @@ -21,11 +25,10 @@ stdenv.mkDerivation rec { buildInputs = [ libjpeg libtiff giflib libpng libwebp - bzip2 freetype libid3tag libheif + bzip2 freetype libid3tag ] ++ optional x11Support xlibsWrapper - # Compilation error on Darwin with librsvg. For more information see: - # https://github.com/NixOS/nixpkgs/pull/166452#issuecomment-1090725613 - ++ optional (!stdenv.isDarwin) librsvg; + ++ optional heifSupport libheif + ++ optional svgSupport librsvg; nativeBuildInputs = [ pkg-config ]; @@ -34,6 +37,8 @@ stdenv.mkDerivation rec { # Do not build amd64 assembly code on Darwin, because it fails to compile # with unknow directive errors configureFlags = optional stdenv.isDarwin "--enable-amd64=no" + ++ optional (!svgSupport) "--without-svg" + ++ optional (!heifSupport) "--without-heif" ++ optional (!x11Support) "--without-x"; outputs = [ "bin" "out" "dev" ]; From 863cdf8f097c172ed92ccb689c6d52915c2858c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Sat, 7 May 2022 18:13:19 +0200 Subject: [PATCH 72/73] wrapFirefox: handle binary wrappers We can't just edit binary wrappers in place because of a length mismatch, so we have to parse the generating makeCWrapper call out of the binary, extract wrapper arguments from it and add them to the Firefox wrapper. All these contortions are needed because Firefox looks for its runtime in argv0, so the proper argv0 needs to be set by wrappers to always point to the "final" runtime. I think this could be avoided by wrapping /lib/$libName/firefox instead of /bin/firefox, and I'd like to look into that in the future, but for now I'm just fixing the immediate problem. --- .../networking/browsers/firefox/wrapper.nix | 67 ++++++++++--------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index d5055f04ed8..235794dd421 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -1,5 +1,5 @@ { stdenv, lib, makeDesktopItem, makeWrapper, lndir, config -, replace, fetchurl, zip, unzip, jq, xdg-utils, writeText +, fetchurl, zip, unzip, jq, xdg-utils, writeText ## various stuff that can be plugged in , ffmpeg, xorg, alsa-lib, libpulseaudio, libcanberra-gtk3, libglvnd, libnotify, opensc @@ -176,7 +176,7 @@ let startupWMClass = wmClass; }; - nativeBuildInputs = [ makeWrapper lndir replace jq ]; + nativeBuildInputs = [ makeWrapper lndir jq ]; buildInputs = [ browser.gtk3 ]; @@ -206,48 +206,50 @@ let done # fix links and absolute references - cd "${browser}" find . -type l -print0 | while read -d $'\0' l; do - target="$(readlink "$l" | replace-literal -es -- "${browser}" "$out")" + target="$(readlink "$l")" + target=''${target/#"${browser}"/"$out"} ln -sfT "$target" "$out/$l" done - # This will not patch binaries, only "text" files. - # Its there for the wrapper mostly. - cd "$out" - replace-literal -esfR -- "${browser}" "$out" - # create the wrapper executablePrefix="$out/bin" executablePath="$executablePrefix/${applicationName}" + oldWrapperArgs=() - if [ ! -x "$executablePath" ] - then - echo "cannot find executable file \`${browser}/bin/${applicationName}'" - exit 1 - fi - - if [ ! -L "$executablePath" ] - then - # Careful here, the file at executablePath may already be - # a wrapper. That is why we postfix it with -old instead - # of -wrapped. - oldExe="$executablePrefix"/".${applicationName}"-old - mv "$executablePath" "$oldExe" - else + if [[ -L $executablePath ]]; then + # Symbolic link: wrap the link's target. oldExe="$(readlink -v --canonicalize-existing "$executablePath")" - fi - - if [ ! -x "${browser}/bin/${applicationName}" ] - then - echo "cannot find executable file \`${browser}/bin/${applicationName}'" - exit 1 + rm "$executablePath" + elif wrapperCmd=$(strings -dw "$executablePath" | sed -n '/^makeCWrapper/,/^$/ p'); [[ $wrapperCmd ]]; then + # If the executable is a binary wrapper, we need to update its target to + # point to $out, but we can't just edit the binary in-place because of length + # issues. So we extract the command used to create the wrapper and add the + # arguments to our wrapper. + parseMakeCWrapperCall() { + shift # makeCWrapper + oldExe=$1; shift + for arg do case $arg in + --inherit-argv0) oldWrapperArgs+=(--argv0 '$0');; # makeWrapper doesn't understand --inherit-argv0 + *) oldWrapperArgs+=("$arg");; + esac done + } + eval "parseMakeCWrapperCall ''${wrapperCmd//"${browser}"/"$out"}" + rm "$executablePath" + else + if read -rn2 shebang < "$executablePath" && [[ $shebang == '#!' ]]; then + # Shell wrapper: patch in place to point to $out. + sed -i "s@${browser}@$out@g" "$executablePath" + fi + # Suffix the executable with -old, because -wrapped might already be used by the old wrapper. + oldExe="$executablePrefix/.${applicationName}"-old + mv "$executablePath" "$oldExe" fi makeWrapper "$oldExe" \ - "$out/bin/${applicationName}${nameSuffix}" \ + "''${executablePath}${nameSuffix}" \ --prefix LD_LIBRARY_PATH ':' "$libs" \ --suffix-each GTK_PATH ':' "$gtk_modules" \ --prefix PATH ':' "${xdg-utils}/bin" \ @@ -258,9 +260,8 @@ let --set MOZ_ALLOW_DOWNGRADE 1 \ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \ --suffix XDG_DATA_DIRS : '${gnome.adwaita-icon-theme}/share' \ - ${lib.optionalString forceWayland '' - --set MOZ_ENABLE_WAYLAND "1" \ - ''} + ${lib.optionalString forceWayland "--set MOZ_ENABLE_WAYLAND 1"} \ + "''${oldWrapperArgs[@]}" ############################# # # # END EXTRA PREF CHANGES # From 850c9fea3e9e0f572f80e8eb1df2e325c21cf43d Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sat, 7 May 2022 17:54:05 -0400 Subject: [PATCH 73/73] cdparanoiaIII: Fix Darwin build after #171046 I shouldn't have been so hasty rearranging things, and also should have tested Darwin before merging! Sorry @vcunat! --- .../applications/audio/cdparanoia/default.nix | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/audio/cdparanoia/default.nix b/pkgs/applications/audio/cdparanoia/default.nix index 2c13631624e..7f699b82aef 100644 --- a/pkgs/applications/audio/cdparanoia/default.nix +++ b/pkgs/applications/audio/cdparanoia/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl +{ lib, stdenv, fetchurl, fetchpatch , updateAutotoolsGnuConfigScriptsHook, autoreconfHook , IOKit, Carbon }: @@ -12,18 +12,24 @@ stdenv.mkDerivation rec { sha256 = "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80"; }; - patches = [ - ./fix_private_keyword.patch - ./configure.patch - ] ++ lib.optionals stdenv.isDarwin [ - (fetchurl { + patches = lib.optionals stdenv.isDarwin [ + (fetchpatch { url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/osx_interface.patch"; - sha256 = "1n86kzm2ssl8fdf5wlhp6ncb2bf6b9xlb5vg0mhc85r69prqzjiy"; + sha256 = "0hq3lvfr0h1m3p0r33jij0s1aspiqlpy533rwv19zrfllb39qvr8"; + # Our configure patch will subsume it, but we want our configure + # patch to be used on all platforms so we cannot just start where + # this leaves off. + excludes = [ "configure.in" ]; }) (fetchurl { url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/patch-paranoia_paranoia.c.10.4.diff"; sha256 = "17l2qhn8sh4jy6ryy5si6ll6dndcm0r537rlmk4a6a8vkn852vad"; }) + ] ++ [ + # Has to come after darwin patches + ./fix_private_keyword.patch + # Order does not matter + ./configure.patch ] ++ lib.optional stdenv.hostPlatform.isMusl ./utils.patch; nativeBuildInputs = [