From 0f589144a1ac500d4b24a598fed8074851b15c57 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 24 Aug 2024 13:37:39 +0000 Subject: [PATCH 001/252] rust-bindgen-unwrapped: 0.69.4 -> 0.70.1 --- pkgs/development/tools/rust/bindgen/unwrapped.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/bindgen/unwrapped.nix b/pkgs/development/tools/rust/bindgen/unwrapped.nix index a862878c9f7a..fa7484a1b041 100644 --- a/pkgs/development/tools/rust/bindgen/unwrapped.nix +++ b/pkgs/development/tools/rust/bindgen/unwrapped.nix @@ -5,15 +5,15 @@ let rustfmt-nightly = rustfmt.override { asNightly = true; }; in rustPlatform.buildRustPackage rec { pname = "rust-bindgen-unwrapped"; - version = "0.69.4"; + version = "0.70.1"; src = fetchCrate { pname = "bindgen-cli"; inherit version; - hash = "sha256-5fwJq1WsL3IEcVUjsyqKdQU8VufbbPk6TglwJg3C1Gw="; + hash = "sha256-6FRcW/VGqlmLjb64UYqk21HmQ8u0AdVD3S2F+9D/vQo="; }; - cargoHash = "sha256-UROy/MyPBKJe+EaiUIDbOYKVbge0C9LsmfnsvOLEONE="; + cargoHash = "sha256-oTeIh5278nckh5fFaEFjWht11ovGmN80MaLJl4k4NAs="; buildInputs = [ clang.cc.lib ]; From 3571c72f41c47a6261c189182c4854e7be955aa0 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 9 Sep 2024 02:20:36 +0000 Subject: [PATCH 002/252] boehmgc: 8.2.6 -> 8.2.8 --- pkgs/by-name/bo/boehmgc/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/bo/boehmgc/package.nix b/pkgs/by-name/bo/boehmgc/package.nix index 4a5418a3206b..2d7cb20c5cab 100644 --- a/pkgs/by-name/bo/boehmgc/package.nix +++ b/pkgs/by-name/bo/boehmgc/package.nix @@ -2,7 +2,7 @@ , stdenv , fetchFromGitHub , autoreconfHook -# doc: https://github.com/ivmai/bdwgc/blob/v8.2.6/doc/README.macros (LARGE_CONFIG) +# doc: https://github.com/ivmai/bdwgc/blob/v8.2.8/doc/README.macros (LARGE_CONFIG) , enableLargeConfig ? false , enableMmap ? true , enableStatic ? false @@ -11,13 +11,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "boehm-gc"; - version = "8.2.6"; + version = "8.2.8"; src = fetchFromGitHub { owner = "ivmai"; repo = "bdwgc"; rev = "v${finalAttrs.version}"; - hash = "sha256-y6hU5qU4qO9VvQvKNH9dvReCrf3+Ih2HHbF6IS1V3WQ="; + hash = "sha256-UQSLK/05uPal6/m+HMz0QwXVII1leonlmtSZsXjJ+/c="; }; outputs = [ "out" "dev" "doc" ]; @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { # not fix the problem the test failure will be a reminder to # extend the set of versions requiring the workaround). makeFlags = lib.optionals (stdenv.hostPlatform.isPower64 && - finalAttrs.version == "8.2.6") + finalAttrs.version == "8.2.8") [ # do not use /proc primitives to track dirty bits; see: # https://github.com/ivmai/bdwgc/issues/479#issuecomment-1279687537 From ac1c862a3b74130b7a70ca2a4cd385505bb2c8c2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 10 Sep 2024 00:52:00 +0000 Subject: [PATCH 003/252] directx-headers: 1.614.0 -> 1.614.1 --- pkgs/development/libraries/directx-headers/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/directx-headers/default.nix b/pkgs/development/libraries/directx-headers/default.nix index 061d18d15016..f1830f54035e 100644 --- a/pkgs/development/libraries/directx-headers/default.nix +++ b/pkgs/development/libraries/directx-headers/default.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchFromGitHub, meson, ninja }: stdenv.mkDerivation rec { pname = "directx-headers"; - version = "1.614.0"; + version = "1.614.1"; src = fetchFromGitHub { owner = "microsoft"; repo = "DirectX-Headers"; rev = "v${version}"; - hash = "sha256-0LaN9D3cKVacMJhZCe9oxDPHpd1jdCAV0ImG2rSgnxc="; + hash = "sha256-CDmzKdV40EExLpOHPAUnytqG9x1+IGW4AZldfYs5YJk="; }; nativeBuildInputs = [ meson ninja ]; From 5bd3d7b231488cca6ea0570048b7ca9b579c745c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 10 Sep 2024 01:03:07 +0000 Subject: [PATCH 004/252] imath: 3.1.11 -> 3.1.12 --- pkgs/development/libraries/imath/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/imath/default.nix b/pkgs/development/libraries/imath/default.nix index ae7bbe2fba3f..a8e1ed336bcd 100644 --- a/pkgs/development/libraries/imath/default.nix +++ b/pkgs/development/libraries/imath/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation rec { pname = "imath"; - version = "3.1.11"; + version = "3.1.12"; src = fetchFromGitHub { owner = "AcademySoftwareFoundation"; repo = "imath"; rev = "v${version}"; - sha256 = "sha256-Cnl0BTXUzkDvgLSNXJbh5ATczBdbxiwbS4J9L6N8sKI="; + sha256 = "sha256-r4FNyNsWdmpZrHOpSvaSUWRYhAU+qnW4lE5uYPKn7Mw="; }; nativeBuildInputs = [ cmake ]; From ca6df3d236ac289f418004273b860759ea5ff3e1 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 15 Sep 2024 01:13:34 +0000 Subject: [PATCH 005/252] libjpeg: 3.0.3 -> 3.0.4 --- pkgs/development/libraries/libjpeg-turbo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index 9055e75de47f..7343dbcaaf4b 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -32,13 +32,13 @@ assert !(enableJpeg7 && enableJpeg8); # pick only one or none, not both stdenv.mkDerivation (finalAttrs: { pname = "libjpeg-turbo"; - version = "3.0.3"; + version = "3.0.4"; src = fetchFromGitHub { owner = "libjpeg-turbo"; repo = "libjpeg-turbo"; rev = finalAttrs.version; - hash = "sha256-w2wJaVf4sjJ9pPPqc9R4TE6Q6Yl0U6+fI5KLpQKwEXI="; + hash = "sha256-ZNqhOfZtWcMv10VWIUxn7MSy4KhW/jBrgC1tUFKczqs="; }; patches = [ From 4d84cf2982004b9a36aee24fff78ebf156cc42d2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 1 Oct 2024 21:40:52 +0000 Subject: [PATCH 006/252] harfbuzz: 9.0.0 -> 10.0.1 --- pkgs/development/libraries/harfbuzz/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index 15208becc301..1ff6d193268e 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -33,11 +33,11 @@ stdenv.mkDerivation (finalAttrs: { pname = "harfbuzz${lib.optionalString withIcu "-icu"}"; - version = "9.0.0"; + version = "10.0.1"; src = fetchurl { url = "https://github.com/harfbuzz/harfbuzz/releases/download/${finalAttrs.version}/harfbuzz-${finalAttrs.version}.tar.xz"; - hash = "sha256-pBsnLO65IMVyY+yFFgRULZ7IXuMDBQbZRmIGfHtquJ4="; + hash = "sha256-sssTvTUZBMuQOPkH3A3uCuBxJwYSQv41VrJ5XE6XSPw="; }; postPatch = '' From 7153c0975acb31ba2d01f2b660259a498aeb2bc4 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 4 Oct 2024 14:12:56 +0000 Subject: [PATCH 007/252] libsForQt5.qcoro: 0.10.0 -> 0.11.0 --- pkgs/development/libraries/qcoro/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/qcoro/default.nix b/pkgs/development/libraries/qcoro/default.nix index e178dd5240d6..877292493dba 100644 --- a/pkgs/development/libraries/qcoro/default.nix +++ b/pkgs/development/libraries/qcoro/default.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "qcoro"; - version = "0.10.0"; + version = "0.11.0"; src = fetchFromGitHub { owner = "danvratil"; repo = "qcoro"; rev = "v${version}"; - sha256 = "sha256-C4k5ClsMwzxURAQBGV5WBwlRr5N0SvUMJobZ+ROT0EY="; + sha256 = "sha256-teRuWtNR8r/MHZhqphazr7Jmn43qsHGv9eXOGrhSND0="; }; outputs = [ "out" "dev" ]; From c31e8384dd91864330b19105e932be0fc8e9673c Mon Sep 17 00:00:00 2001 From: Marvin Dostal Date: Sat, 5 Oct 2024 20:32:41 +0200 Subject: [PATCH 008/252] lilv: add meson options to include Nix and NixOS specific paths for the default lv2 plugin search --- pkgs/development/libraries/audio/lilv/default.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/audio/lilv/default.nix b/pkgs/development/libraries/audio/lilv/default.nix index fdd50d8af937..89b3f77a405a 100644 --- a/pkgs/development/libraries/audio/lilv/default.nix +++ b/pkgs/development/libraries/audio/lilv/default.nix @@ -32,10 +32,20 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ lv2 ]; mesonFlags = [ - "-Ddocs=disabled" + (lib.mesonOption "docs" "disabled") # Tests require building a shared library. (lib.mesonEnable "tests" (!stdenv.hostPlatform.isStatic)) - ]; + ] # Add nix and NixOS specific lv2 paths + # The default values are from: https://github.com/lv2/lilv/blob/master/src/lilv_config.h + ++ lib.optional stdenv.isDarwin (lib.mesonOption "default_lv2_path" + "~/.lv2:~/Library/Audio/Plug-Ins/LV2:" + + "/usr/local/lib/lv2:/usr/lib/lv2:" + + "/Library/Audio/Plug-Ins/LV2:" + + "~/.nix-profile/lib/lv2") + ++ lib.optional stdenv.isLinux (lib.mesonOption "default_lv2_path" + "~/.lv2:/usr/local/lib/lv2:/usr/lib/lv2:" + + "~/.nix-profile/lib/lv2:/run/current-system/sw/lib/lv2:" + + "/etc/profiles/per-user/$USER/lib/lv2"); passthru = { tests = { From ba3ad022bad53bc1d1ca75c63f5981f98700b732 Mon Sep 17 00:00:00 2001 From: Marvin Dostal Date: Sun, 6 Oct 2024 16:19:57 +0200 Subject: [PATCH 009/252] lilv: remove unnecessary search path for LV2 plugins --- pkgs/development/libraries/audio/lilv/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/libraries/audio/lilv/default.nix b/pkgs/development/libraries/audio/lilv/default.nix index 89b3f77a405a..f0c2aa304546 100644 --- a/pkgs/development/libraries/audio/lilv/default.nix +++ b/pkgs/development/libraries/audio/lilv/default.nix @@ -44,8 +44,7 @@ stdenv.mkDerivation rec { + "~/.nix-profile/lib/lv2") ++ lib.optional stdenv.isLinux (lib.mesonOption "default_lv2_path" "~/.lv2:/usr/local/lib/lv2:/usr/lib/lv2:" - + "~/.nix-profile/lib/lv2:/run/current-system/sw/lib/lv2:" - + "/etc/profiles/per-user/$USER/lib/lv2"); + + "~/.nix-profile/lib/lv2:/run/current-system/sw/lib/lv2"); passthru = { tests = { From 4f9f7f80a3e13935d9d309bcf1bdc64bdfd30eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Wed, 9 Oct 2024 15:49:09 -0600 Subject: [PATCH 010/252] python3Packages.sip: 6.8.3 -> 6.8.6 --- pkgs/development/python-modules/sip/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/sip/default.nix b/pkgs/development/python-modules/sip/default.nix index 8a398654b08c..8fd6240e4a51 100644 --- a/pkgs/development/python-modules/sip/default.nix +++ b/pkgs/development/python-modules/sip/default.nix @@ -4,6 +4,7 @@ fetchPypi, pythonOlder, setuptools, + setuptools-scm, packaging, tomli, @@ -15,17 +16,20 @@ buildPythonPackage rec { pname = "sip"; - version = "6.8.3"; + version = "6.8.6"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-iIVHsBi7JMNq3tUZ6T0+UT1MaqC6VbfMGv+9Rc8Qdiw="; + hash = "sha256-f8lZ5I5uxdWvi9Am9p9eJNCLPLirs0IXb1q4AwzAfXo="; }; - nativeBuildInputs = [ setuptools ]; + build-system = [ + setuptools + setuptools-scm + ]; - propagatedBuildInputs = [ + dependencies = [ packaging setuptools ] ++ lib.optionals (pythonOlder "3.11") [ tomli ]; From 63d46aaac49a7d439ee33a4526b3470d88c9b3b1 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 10 Oct 2024 12:40:46 +0200 Subject: [PATCH 011/252] dconf: fix building without emulation available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For example, Linux → FreeBSD. --- pkgs/development/libraries/dconf/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/dconf/default.nix b/pkgs/development/libraries/dconf/default.nix index 1aad769c6db2..6d56ba075f49 100644 --- a/pkgs/development/libraries/dconf/default.nix +++ b/pkgs/development/libraries/dconf/default.nix @@ -15,7 +15,10 @@ , docbook-xsl-nons , docbook_xml_dtd_42 , nixosTests -, withDocs ? true +, buildPackages +, gobject-introspection +, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages +, withDocs ? withIntrospection }: stdenv.mkDerivation rec { @@ -49,12 +52,14 @@ stdenv.mkDerivation rec { glib bash-completion dbus + ] ++ lib.optionals withIntrospection [ vala ]; mesonFlags = [ "--sysconfdir=/etc" - "-Dgtk_doc=${lib.boolToString withDocs}" + (lib.mesonBool "gtk_doc" withDocs) + (lib.mesonBool "vapi" withIntrospection) ]; nativeCheckInputs = [ From d604acb13610ca2564677f24adbdf47eee741c70 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Sat, 12 Oct 2024 14:48:21 -0400 Subject: [PATCH 012/252] texinfo: fix reference to build platform coreutils 0e50c09 started patching shebangs for all files in tp/maintain. There are some Perl modules in tp/maintain/lib with the shebang #!/bin/false that are eventually installed to the output. In the source tarball, some of the these file are marked executable, but when they are installed, the executable bit is cleared. Therefore, they get patched with build platform shebangs in postPatch, but these shebangs are never corrected to the host platform in the fixup phase. This leaves a reference to build platform coreutils in the output. It turns out that there is only a single file in tp/maintain that actually needs to be patched, so limit the patchShebangs call to that file to avoid the issue. --- pkgs/development/tools/misc/texinfo/common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/texinfo/common.nix b/pkgs/development/tools/misc/texinfo/common.nix index e630489ffae3..04217bb672b4 100644 --- a/pkgs/development/tools/misc/texinfo/common.nix +++ b/pkgs/development/tools/misc/texinfo/common.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation { postPatch = '' - patchShebangs tp/maintain + patchShebangs tp/maintain/regenerate_commands_perl_info.pl '' # This patch is needed for IEEE-standard long doubles on # powerpc64; it does not apply cleanly to texinfo 5.x or From a670466186cf20c68265f0e9fa40a1ba596467be Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Sat, 12 Oct 2024 14:55:28 -0400 Subject: [PATCH 013/252] texinfo: use substituteInPlace --replace-fail Get rid of the deprecation warning. --- pkgs/development/tools/misc/texinfo/common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/texinfo/common.nix b/pkgs/development/tools/misc/texinfo/common.nix index 04217bb672b4..da9b2c9cbcb0 100644 --- a/pkgs/development/tools/misc/texinfo/common.nix +++ b/pkgs/development/tools/misc/texinfo/common.nix @@ -125,7 +125,7 @@ stdenv.mkDerivation { postFixup = optionalString crossBuildTools '' for f in "$out"/bin/{pod2texi,texi2any}; do substituteInPlace "$f" \ - --replace ${buildPackages.perl}/bin/perl ${perl}/bin/perl + --replace-fail ${buildPackages.perl}/bin/perl ${perl}/bin/perl done ''; From 4904021426ba51c49fb7ec81f8bec88919059f82 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 19 Sep 2024 00:16:56 +0200 Subject: [PATCH 014/252] protobuf_25: 25.4 -> 25.5 Diff: https://github.com/protocolbuffers/protobuf/compare/v25.4...v25.5 Changelog: https://github.com/protocolbuffers/protobuf/releases/tag/v25.5 --- pkgs/development/libraries/protobuf/25.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/protobuf/25.nix b/pkgs/development/libraries/protobuf/25.nix index a5a6a3419b5f..5a22c869ed0e 100644 --- a/pkgs/development/libraries/protobuf/25.nix +++ b/pkgs/development/libraries/protobuf/25.nix @@ -1,6 +1,6 @@ { callPackage, ... } @ args: callPackage ./generic.nix ({ - version = "25.4"; - hash = "sha256-dIouv6QaX6Tlahjrdz250DJkKjZ74/EwoQjTs3vBS/U="; + version = "25.5"; + hash = "sha256-DFLlk4T8ODo3lmvrANlkIsrmDXZHmqMPTYxDWaz56qA="; } // args) From b9a41bcbac86c37b936b41a889fa0be5a28b3e1e Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Tue, 15 Oct 2024 00:08:25 +0200 Subject: [PATCH 015/252] libarchive: 3.7.6 -> 3.7.7 Changes: https://github.com/libarchive/libarchive/releases/tag/v3.7.7 --- pkgs/by-name/li/libarchive/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/li/libarchive/package.nix b/pkgs/by-name/li/libarchive/package.nix index d8b11d227180..8703c1a4faba 100644 --- a/pkgs/by-name/li/libarchive/package.nix +++ b/pkgs/by-name/li/libarchive/package.nix @@ -31,13 +31,13 @@ assert xarSupport -> libxml2 != null; stdenv.mkDerivation (finalAttrs: { pname = "libarchive"; - version = "3.7.6"; + version = "3.7.7"; src = fetchFromGitHub { owner = "libarchive"; repo = "libarchive"; rev = "v${finalAttrs.version}"; - hash = "sha256-smj8JV5irW/StUx/Zp62w5cnlKbF6GRIOSh8i4ocJ8s="; + hash = "sha256-maV2+Whi4aDG1VLAYpOTxluO9I0zNiZ8fA3w7epGlDg="; }; outputs = [ "out" "lib" "dev" ]; From f6588327a25dd0eb0a06013a904fe2c7c9c737f7 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 15 Oct 2024 03:52:05 +0000 Subject: [PATCH 016/252] libxmlb: 0.3.19 -> 0.3.20 --- pkgs/development/libraries/libxmlb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libxmlb/default.nix b/pkgs/development/libraries/libxmlb/default.nix index a90ae30fec1e..49c67f74d30e 100644 --- a/pkgs/development/libraries/libxmlb/default.nix +++ b/pkgs/development/libraries/libxmlb/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { pname = "libxmlb"; - version = "0.3.19"; + version = "0.3.20"; outputs = [ "out" "lib" "dev" "devdoc" "installedTests" ]; @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { owner = "hughsie"; repo = "libxmlb"; rev = version; - hash = "sha256-gXLWHkT+h/wvmmi7PyIx16gbeYznVOT7CwuBgF3bjOY="; + hash = "sha256-X1sOUaqafppEjlcq2jYFo+BXxNX1d+vLizSQM+x/pvg="; }; patches = [ From 8044c0cc0aec2509b33dd088294f69648061b632 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 16 Oct 2024 03:12:01 +0200 Subject: [PATCH 017/252] python314: init at 3.14.0a1 https://docs.python.org/3.14/whatsnew/changelog.html#python-3-14-0-alpha-1 --- doc/languages-frameworks/python.section.md | 1 + .../python/cpython/3.14/no-ldconfig.patch | 40 +++++++++++++++++++ .../interpreters/python/default.nix | 12 ++++++ pkgs/top-level/all-packages.nix | 13 +++++- 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/interpreters/python/cpython/3.14/no-ldconfig.patch diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index 3d9736da7fa0..31f7f40346b3 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -55,6 +55,7 @@ sets are * `pkgs.python311Packages` * `pkgs.python312Packages` * `pkgs.python313Packages` +* `pkgs.python314Packages` * `pkgs.pypy27Packages` * `pkgs.pypy39Packages` * `pkgs.pypy310Packages` diff --git a/pkgs/development/interpreters/python/cpython/3.14/no-ldconfig.patch b/pkgs/development/interpreters/python/cpython/3.14/no-ldconfig.patch new file mode 100644 index 000000000000..5d176dd38de7 --- /dev/null +++ b/pkgs/development/interpreters/python/cpython/3.14/no-ldconfig.patch @@ -0,0 +1,40 @@ +diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py +index 117bf06cb01..ff50cb083bd 100644 +--- a/Lib/ctypes/util.py ++++ b/Lib/ctypes/util.py +@@ -280,34 +280,7 @@ def find_library(name, is64 = False): + else: + + def _findSoname_ldconfig(name): +- import struct +- if struct.calcsize('l') == 4: +- machine = os.uname().machine + '-32' +- else: +- machine = os.uname().machine + '-64' +- mach_map = { +- 'x86_64-64': 'libc6,x86-64', +- 'ppc64-64': 'libc6,64bit', +- 'sparc64-64': 'libc6,64bit', +- 's390x-64': 'libc6,64bit', +- 'ia64-64': 'libc6,IA-64', +- } +- abi_type = mach_map.get(machine, 'libc6') +- +- # XXX assuming GLIBC's ldconfig (with option -p) +- regex = r'\s+(lib%s\.[^\s]+)\s+\(%s' +- regex = os.fsencode(regex % (re.escape(name), abi_type)) +- try: +- with subprocess.Popen(['/sbin/ldconfig', '-p'], +- stdin=subprocess.DEVNULL, +- stderr=subprocess.DEVNULL, +- stdout=subprocess.PIPE, +- env={'LC_ALL': 'C', 'LANG': 'C'}) as p: +- res = re.search(regex, p.stdout.read()) +- if res: +- return os.fsdecode(res.group(1)) +- except OSError: +- pass ++ return None + + def _findLib_ld(name): + # See issue #9998 for why this is needed diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index 5e67c8bd4a15..9588393a33b5 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -93,6 +93,18 @@ in { hash = "sha256-CG3liC48sxDU3KSEV1IuLkgBjs1D2pzfgn9qB1nvsH0="; inherit passthruFun; }; + + python314 = callPackage ./cpython { + self = __splicedPackages.python314; + sourceVersion = { + major = "3"; + minor = "14"; + patch = "0"; + suffix = "a1"; + }; + hash = "sha256-PkZLDLt1NeLbNCYv0ZoKOT0OYr4PQ7FRPtmDebBU6tQ="; + inherit passthruFun; + }; # Minimal versions of Python (built without optional dependencies) python3Minimal = (callPackage ./cpython ({ self = __splicedPackages.python3Minimal; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dd396293a78c..24dc84b84a0a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16411,15 +16411,25 @@ with pkgs; bluezSupport = lib.meta.availableOn stdenv.hostPlatform bluez; x11Support = true; }; + python314Full = python314.override { + self = python314Full; + pythonAttr = "python314Full"; + bluezSupport = lib.meta.availableOn stdenv.hostPlatform bluez; + x11Support = true; + }; # https://py-free-threading.github.io python313FreeThreading = python313.override { pythonAttr = "python313FreeThreading"; enableGIL = false; }; + python314FreeThreading = python314.override { + pythonAttr = "python313FreeThreading"; + enableGIL = false; + }; pythonInterpreters = callPackage ./../development/interpreters/python { }; - inherit (pythonInterpreters) python27 python39 python310 python311 python312 python313 python3Minimal pypy27 pypy310 pypy39 rustpython; + inherit (pythonInterpreters) python27 python39 python310 python311 python312 python313 python314 python3Minimal pypy27 pypy310 pypy39 rustpython; # List of extensions with overrides to apply to all Python package sets. pythonPackagesExtensions = [ ]; @@ -16431,6 +16441,7 @@ with pkgs; python311Packages = recurseIntoAttrs python311.pkgs; python312Packages = recurseIntoAttrs python312.pkgs; python313Packages = python313.pkgs; + python314Packages = python314.pkgs; pypyPackages = pypy.pkgs; pypy2Packages = pypy2.pkgs; pypy27Packages = pypy27.pkgs; From 835a9710c1373bdb8f9f7943cc394e16b7bf2768 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 16 Oct 2024 03:25:18 +0200 Subject: [PATCH 018/252] python314Packages.flit-core: backport 3.14 compat patch --- .../bootstrap/flit-core/default.nix | 2 +- .../python-modules/flit-core/default.nix | 2 +- .../python-modules/flit/default.nix | 5 +++ .../flit/python314-compat.patch | 41 +++++++++++++++++++ 4 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/python-modules/flit/python314-compat.patch diff --git a/pkgs/development/python-modules/bootstrap/flit-core/default.nix b/pkgs/development/python-modules/bootstrap/flit-core/default.nix index bdd4a0f535ff..01e9e43f3acd 100644 --- a/pkgs/development/python-modules/bootstrap/flit-core/default.nix +++ b/pkgs/development/python-modules/bootstrap/flit-core/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { meta ; - sourceRoot = "${src.name}/flit_core"; + postPatch = "cd flit_core"; buildPhase = '' runHook preBuild diff --git a/pkgs/development/python-modules/flit-core/default.nix b/pkgs/development/python-modules/flit-core/default.nix index 05157efb8648..628234d2955f 100644 --- a/pkgs/development/python-modules/flit-core/default.nix +++ b/pkgs/development/python-modules/flit-core/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { inherit (flit) src patches; - sourceRoot = "${src.name}/flit_core"; + postPatch = "cd flit_core"; # Tests are run in the "flit" package. doCheck = false; diff --git a/pkgs/development/python-modules/flit/default.nix b/pkgs/development/python-modules/flit/default.nix index 9284de7d1184..825e4435535a 100644 --- a/pkgs/development/python-modules/flit/default.nix +++ b/pkgs/development/python-modules/flit/default.nix @@ -28,6 +28,11 @@ buildPythonPackage rec { hash = "sha256-yl2+PcKr7xRW4oIBWl+gzh/nKhSNu5GH9fWKRGgaNHU="; }; + patches = [ + # https://github.com/pypa/flit/commit/6ab62c91d0db451b5e9ab000f0dba5471550b442.patch + ./python314-compat.patch + ]; + nativeBuildInputs = [ flit-core ]; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/flit/python314-compat.patch b/pkgs/development/python-modules/flit/python314-compat.patch new file mode 100644 index 000000000000..439592e3a63b --- /dev/null +++ b/pkgs/development/python-modules/flit/python314-compat.patch @@ -0,0 +1,41 @@ +From 6ab62c91d0db451b5e9ab000f0dba5471550b442 Mon Sep 17 00:00:00 2001 +From: Thomas A Caswell +Date: Tue, 28 May 2024 10:25:13 -0400 +Subject: [PATCH] MNT: fix compatibility with Python 3.14 + +The ast.Str class was deprecated in 3.8 and will be removed in 3.14 +--- + flit_core/flit_core/common.py | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/flit_core/flit_core/common.py b/flit_core/flit_core/common.py +index 6625224b..8bcda3fb 100644 +--- a/flit_core/flit_core/common.py ++++ b/flit_core/flit_core/common.py +@@ -148,6 +148,10 @@ def get_docstring_and_version_via_ast(target): + with target_path.open('rb') as f: + node = ast.parse(f.read()) + for child in node.body: ++ if sys.version_info >= (3, 8): ++ target_type = ast.Constant ++ else: ++ target_type = ast.Str + # Only use the version from the given module if it's a simple + # string assignment to __version__ + is_version_str = ( +@@ -157,10 +161,13 @@ def get_docstring_and_version_via_ast(target): + and target.id == "__version__" + for target in child.targets + ) +- and isinstance(child.value, ast.Str) ++ and isinstance(child.value, target_type) + ) + if is_version_str: +- version = child.value.s ++ if sys.version_info >= (3, 8): ++ version = child.value.value ++ else: ++ version = child.value.s + break + return ast.get_docstring(node), version + From b21033f825b20c663921d8f081c93cc4caf09802 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 16 Oct 2024 03:40:32 +0200 Subject: [PATCH 019/252] OWNERS: extend my python code ownership --- ci/OWNERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/OWNERS b/ci/OWNERS index 1e4644f16c8f..703d5336dde4 100644 --- a/ci/OWNERS +++ b/ci/OWNERS @@ -149,8 +149,8 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @NixOS/nix-team @raitobeza # Python-related code and docs /doc/languages-frameworks/python.section.md @mweinelt @natsukium -/maintainers/scripts/update-python-libraries @natsukium -/pkgs/development/interpreters/python @natsukium +/maintainers/scripts/update-python-libraries @mweinelt @natsukium +/pkgs/development/interpreters/python @mweinelt @natsukium /pkgs/top-level/python-packages.nix @natsukium /pkgs/top-level/release-python.nix @natsukium From 062bd17d71320463b3986b5de2dc3b9b33417e86 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 16 Oct 2024 06:58:34 +0100 Subject: [PATCH 020/252] execline-man-pages: 2.9.6.0.1 -> 2.9.6.1.1 --- pkgs/development/skaware-packages/execline/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/skaware-packages/execline/default.nix b/pkgs/development/skaware-packages/execline/default.nix index a99f1f589264..eb552cd23957 100644 --- a/pkgs/development/skaware-packages/execline/default.nix +++ b/pkgs/development/skaware-packages/execline/default.nix @@ -16,8 +16,8 @@ in skawarePackages.buildPackage { # ${version}.3 and so on are created. manpages = skawarePackages.buildManPages { pname = "execline-man-pages"; - version = "2.9.6.0.1"; - sha256 = "sha256-0lyX3rIUZ2JqWioRSm22uDS+q9ONkwIZxfR5E2pSDC4="; + version = "2.9.6.1.1"; + sha256 = "sha256-bj+74zTkGKLdLEb1k4iHfNI1lAuxLBASc5++m17Y0O8="; description = "Port of the documentation for the execline suite to mdoc"; maintainers = [ lib.maintainers.sternenseemann ]; }; From 48f7655db81ccc8ced593f015b6b5605be3bce3f Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Wed, 16 Oct 2024 22:07:46 +0200 Subject: [PATCH 021/252] libssh2: 1.11.0 -> 1.11.1 Changes: https://libssh2.org/changes.html#1.11.1 --- .../libraries/libssh2/CVE-2023-48795.patch | 459 ------------------ .../development/libraries/libssh2/default.nix | 10 +- 2 files changed, 2 insertions(+), 467 deletions(-) delete mode 100644 pkgs/development/libraries/libssh2/CVE-2023-48795.patch diff --git a/pkgs/development/libraries/libssh2/CVE-2023-48795.patch b/pkgs/development/libraries/libssh2/CVE-2023-48795.patch deleted file mode 100644 index c89e4a137b72..000000000000 --- a/pkgs/development/libraries/libssh2/CVE-2023-48795.patch +++ /dev/null @@ -1,459 +0,0 @@ -From d34d9258b8420b19ec3f97b4cc5bf7aa7d98e35a Mon Sep 17 00:00:00 2001 -From: Michael Buckley -Date: Thu, 30 Nov 2023 15:08:02 -0800 -Subject: [PATCH] src: add 'strict KEX' to fix CVE-2023-48795 "Terrapin Attack" - -Refs: -https://terrapin-attack.com/ -https://seclists.org/oss-sec/2023/q4/292 -https://osv.dev/list?ecosystem=&q=CVE-2023-48795 -https://github.com/advisories/GHSA-45x7-px36-x8w8 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-48795 - -Fixes #1290 -Closes #1291 ---- - src/kex.c | 63 +++++++++++++++++++++++------------ - src/libssh2_priv.h | 18 +++++++--- - src/packet.c | 83 +++++++++++++++++++++++++++++++++++++++++++--- - src/packet.h | 2 +- - src/session.c | 3 ++ - src/transport.c | 12 ++++++- - 6 files changed, 149 insertions(+), 32 deletions(-) - -diff --git a/src/kex.c b/src/kex.c -index 8e7b7f0af3..a7b301e157 100644 ---- a/src/kex.c -+++ b/src/kex.c -@@ -3032,6 +3032,13 @@ kex_method_extension_negotiation = { - 0, - }; - -+static const LIBSSH2_KEX_METHOD -+kex_method_strict_client_extension = { -+ "kex-strict-c-v00@openssh.com", -+ NULL, -+ 0, -+}; -+ - static const LIBSSH2_KEX_METHOD *libssh2_kex_methods[] = { - #if LIBSSH2_ED25519 - &kex_method_ssh_curve25519_sha256, -@@ -3050,6 +3057,7 @@ static const LIBSSH2_KEX_METHOD *libssh2_kex_methods[] = { - &kex_method_diffie_helman_group1_sha1, - &kex_method_diffie_helman_group_exchange_sha1, - &kex_method_extension_negotiation, -+ &kex_method_strict_client_extension, - NULL - }; - -@@ -3302,13 +3310,13 @@ static int kexinit(LIBSSH2_SESSION * session) - return 0; - } - --/* kex_agree_instr -+/* _libssh2_kex_agree_instr - * Kex specific variant of strstr() - * Needle must be preceded by BOL or ',', and followed by ',' or EOL - */ --static unsigned char * --kex_agree_instr(unsigned char *haystack, size_t haystack_len, -- const unsigned char *needle, size_t needle_len) -+unsigned char * -+_libssh2_kex_agree_instr(unsigned char *haystack, size_t haystack_len, -+ const unsigned char *needle, size_t needle_len) - { - unsigned char *s; - unsigned char *end_haystack; -@@ -3393,7 +3401,7 @@ static int kex_agree_hostkey(LIBSSH2_SESSION * session, - while(s && *s) { - unsigned char *p = (unsigned char *) strchr((char *) s, ','); - size_t method_len = (p ? (size_t)(p - s) : strlen((char *) s)); -- if(kex_agree_instr(hostkey, hostkey_len, s, method_len)) { -+ if(_libssh2_kex_agree_instr(hostkey, hostkey_len, s, method_len)) { - const LIBSSH2_HOSTKEY_METHOD *method = - (const LIBSSH2_HOSTKEY_METHOD *) - kex_get_method_by_name((char *) s, method_len, -@@ -3427,9 +3435,9 @@ static int kex_agree_hostkey(LIBSSH2_SESSION * session, - } - - while(hostkeyp && (*hostkeyp) && (*hostkeyp)->name) { -- s = kex_agree_instr(hostkey, hostkey_len, -- (unsigned char *) (*hostkeyp)->name, -- strlen((*hostkeyp)->name)); -+ s = _libssh2_kex_agree_instr(hostkey, hostkey_len, -+ (unsigned char *) (*hostkeyp)->name, -+ strlen((*hostkeyp)->name)); - if(s) { - /* So far so good, but does it suit our purposes? (Encrypting vs - Signing) */ -@@ -3463,6 +3471,12 @@ static int kex_agree_kex_hostkey(LIBSSH2_SESSION * session, unsigned char *kex, - { - const LIBSSH2_KEX_METHOD **kexp = libssh2_kex_methods; - unsigned char *s; -+ const unsigned char *strict = -+ (unsigned char *)"kex-strict-s-v00@openssh.com"; -+ -+ if(_libssh2_kex_agree_instr(kex, kex_len, strict, 28)) { -+ session->kex_strict = 1; -+ } - - if(session->kex_prefs) { - s = (unsigned char *) session->kex_prefs; -@@ -3470,7 +3484,7 @@ static int kex_agree_kex_hostkey(LIBSSH2_SESSION * session, unsigned char *kex, - while(s && *s) { - unsigned char *q, *p = (unsigned char *) strchr((char *) s, ','); - size_t method_len = (p ? (size_t)(p - s) : strlen((char *) s)); -- q = kex_agree_instr(kex, kex_len, s, method_len); -+ q = _libssh2_kex_agree_instr(kex, kex_len, s, method_len); - if(q) { - const LIBSSH2_KEX_METHOD *method = (const LIBSSH2_KEX_METHOD *) - kex_get_method_by_name((char *) s, method_len, -@@ -3504,9 +3518,9 @@ static int kex_agree_kex_hostkey(LIBSSH2_SESSION * session, unsigned char *kex, - } - - while(*kexp && (*kexp)->name) { -- s = kex_agree_instr(kex, kex_len, -- (unsigned char *) (*kexp)->name, -- strlen((*kexp)->name)); -+ s = _libssh2_kex_agree_instr(kex, kex_len, -+ (unsigned char *) (*kexp)->name, -+ strlen((*kexp)->name)); - if(s) { - /* We've agreed on a key exchange method, - * Can we agree on a hostkey that works with this kex? -@@ -3550,7 +3564,7 @@ static int kex_agree_crypt(LIBSSH2_SESSION * session, - unsigned char *p = (unsigned char *) strchr((char *) s, ','); - size_t method_len = (p ? (size_t)(p - s) : strlen((char *) s)); - -- if(kex_agree_instr(crypt, crypt_len, s, method_len)) { -+ if(_libssh2_kex_agree_instr(crypt, crypt_len, s, method_len)) { - const LIBSSH2_CRYPT_METHOD *method = - (const LIBSSH2_CRYPT_METHOD *) - kex_get_method_by_name((char *) s, method_len, -@@ -3572,9 +3586,9 @@ static int kex_agree_crypt(LIBSSH2_SESSION * session, - } - - while(*cryptp && (*cryptp)->name) { -- s = kex_agree_instr(crypt, crypt_len, -- (unsigned char *) (*cryptp)->name, -- strlen((*cryptp)->name)); -+ s = _libssh2_kex_agree_instr(crypt, crypt_len, -+ (unsigned char *) (*cryptp)->name, -+ strlen((*cryptp)->name)); - if(s) { - endpoint->crypt = *cryptp; - return 0; -@@ -3614,7 +3628,7 @@ static int kex_agree_mac(LIBSSH2_SESSION * session, - unsigned char *p = (unsigned char *) strchr((char *) s, ','); - size_t method_len = (p ? (size_t)(p - s) : strlen((char *) s)); - -- if(kex_agree_instr(mac, mac_len, s, method_len)) { -+ if(_libssh2_kex_agree_instr(mac, mac_len, s, method_len)) { - const LIBSSH2_MAC_METHOD *method = (const LIBSSH2_MAC_METHOD *) - kex_get_method_by_name((char *) s, method_len, - (const LIBSSH2_COMMON_METHOD **) -@@ -3635,8 +3649,9 @@ static int kex_agree_mac(LIBSSH2_SESSION * session, - } - - while(*macp && (*macp)->name) { -- s = kex_agree_instr(mac, mac_len, (unsigned char *) (*macp)->name, -- strlen((*macp)->name)); -+ s = _libssh2_kex_agree_instr(mac, mac_len, -+ (unsigned char *) (*macp)->name, -+ strlen((*macp)->name)); - if(s) { - endpoint->mac = *macp; - return 0; -@@ -3667,7 +3682,7 @@ static int kex_agree_comp(LIBSSH2_SESSION *session, - unsigned char *p = (unsigned char *) strchr((char *) s, ','); - size_t method_len = (p ? (size_t)(p - s) : strlen((char *) s)); - -- if(kex_agree_instr(comp, comp_len, s, method_len)) { -+ if(_libssh2_kex_agree_instr(comp, comp_len, s, method_len)) { - const LIBSSH2_COMP_METHOD *method = - (const LIBSSH2_COMP_METHOD *) - kex_get_method_by_name((char *) s, method_len, -@@ -3689,8 +3704,9 @@ static int kex_agree_comp(LIBSSH2_SESSION *session, - } - - while(*compp && (*compp)->name) { -- s = kex_agree_instr(comp, comp_len, (unsigned char *) (*compp)->name, -- strlen((*compp)->name)); -+ s = _libssh2_kex_agree_instr(comp, comp_len, -+ (unsigned char *) (*compp)->name, -+ strlen((*compp)->name)); - if(s) { - endpoint->comp = *compp; - return 0; -@@ -3871,6 +3887,7 @@ _libssh2_kex_exchange(LIBSSH2_SESSION * session, int reexchange, - session->local.kexinit = key_state->oldlocal; - session->local.kexinit_len = key_state->oldlocal_len; - key_state->state = libssh2_NB_state_idle; -+ session->state &= ~LIBSSH2_STATE_INITIAL_KEX; - session->state &= ~LIBSSH2_STATE_KEX_ACTIVE; - session->state &= ~LIBSSH2_STATE_EXCHANGING_KEYS; - return -1; -@@ -3896,6 +3913,7 @@ _libssh2_kex_exchange(LIBSSH2_SESSION * session, int reexchange, - session->local.kexinit = key_state->oldlocal; - session->local.kexinit_len = key_state->oldlocal_len; - key_state->state = libssh2_NB_state_idle; -+ session->state &= ~LIBSSH2_STATE_INITIAL_KEX; - session->state &= ~LIBSSH2_STATE_KEX_ACTIVE; - session->state &= ~LIBSSH2_STATE_EXCHANGING_KEYS; - return -1; -@@ -3944,6 +3962,7 @@ _libssh2_kex_exchange(LIBSSH2_SESSION * session, int reexchange, - session->remote.kexinit = NULL; - } - -+ session->state &= ~LIBSSH2_STATE_INITIAL_KEX; - session->state &= ~LIBSSH2_STATE_KEX_ACTIVE; - session->state &= ~LIBSSH2_STATE_EXCHANGING_KEYS; - -diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h -index 7660366954..18d9ab2130 100644 ---- a/src/libssh2_priv.h -+++ b/src/libssh2_priv.h -@@ -736,6 +736,9 @@ struct _LIBSSH2_SESSION - /* key signing algorithm preferences -- NULL yields server order */ - char *sign_algo_prefs; - -+ /* Whether to use the OpenSSH Strict KEX extension */ -+ int kex_strict; -+ - /* (remote as source of data -- packet_read ) */ - libssh2_endpoint_data remote; - -@@ -908,6 +911,7 @@ struct _LIBSSH2_SESSION - int fullpacket_macstate; - size_t fullpacket_payload_len; - int fullpacket_packet_type; -+ uint32_t fullpacket_required_type; - - /* State variables used in libssh2_sftp_init() */ - libssh2_nonblocking_states sftpInit_state; -@@ -948,10 +952,11 @@ struct _LIBSSH2_SESSION - }; - - /* session.state bits */ --#define LIBSSH2_STATE_EXCHANGING_KEYS 0x00000001 --#define LIBSSH2_STATE_NEWKEYS 0x00000002 --#define LIBSSH2_STATE_AUTHENTICATED 0x00000004 --#define LIBSSH2_STATE_KEX_ACTIVE 0x00000008 -+#define LIBSSH2_STATE_INITIAL_KEX 0x00000001 -+#define LIBSSH2_STATE_EXCHANGING_KEYS 0x00000002 -+#define LIBSSH2_STATE_NEWKEYS 0x00000004 -+#define LIBSSH2_STATE_AUTHENTICATED 0x00000008 -+#define LIBSSH2_STATE_KEX_ACTIVE 0x00000010 - - /* session.flag helpers */ - #ifdef MSG_NOSIGNAL -@@ -1182,6 +1187,11 @@ ssize_t _libssh2_send(libssh2_socket_t socket, const void *buffer, - int _libssh2_kex_exchange(LIBSSH2_SESSION * session, int reexchange, - key_exchange_state_t * state); - -+unsigned char *_libssh2_kex_agree_instr(unsigned char *haystack, -+ size_t haystack_len, -+ const unsigned char *needle, -+ size_t needle_len); -+ - /* Let crypt.c/hostkey.c expose their method structs */ - const LIBSSH2_CRYPT_METHOD **libssh2_crypt_methods(void); - const LIBSSH2_HOSTKEY_METHOD **libssh2_hostkey_methods(void); -diff --git a/src/packet.c b/src/packet.c -index eccb8c56a8..6da14e9fa1 100644 ---- a/src/packet.c -+++ b/src/packet.c -@@ -624,14 +624,13 @@ packet_authagent_open(LIBSSH2_SESSION * session, - * layer when it has received a packet. - * - * The input pointer 'data' is pointing to allocated data that this function -- * is asked to deal with so on failure OR success, it must be freed fine. -- * The only exception is when the return code is LIBSSH2_ERROR_EAGAIN. -+ * will be freed unless return the code is LIBSSH2_ERROR_EAGAIN. - * - * This function will always be called with 'datalen' greater than zero. - */ - int - _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, -- size_t datalen, int macstate) -+ size_t datalen, int macstate, uint32_t seq) - { - int rc = 0; - unsigned char *message = NULL; -@@ -676,6 +675,70 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, - break; - } - -+ if(session->state & LIBSSH2_STATE_INITIAL_KEX) { -+ if(msg == SSH_MSG_KEXINIT) { -+ if(!session->kex_strict) { -+ if(datalen < 17) { -+ LIBSSH2_FREE(session, data); -+ session->packAdd_state = libssh2_NB_state_idle; -+ return _libssh2_error(session, -+ LIBSSH2_ERROR_BUFFER_TOO_SMALL, -+ "Data too short extracting kex"); -+ } -+ else { -+ const unsigned char *strict = -+ (unsigned char *)"kex-strict-s-v00@openssh.com"; -+ struct string_buf buf; -+ unsigned char *algs = NULL; -+ size_t algs_len = 0; -+ -+ buf.data = (unsigned char *)data; -+ buf.dataptr = buf.data; -+ buf.len = datalen; -+ buf.dataptr += 17; /* advance past type and cookie */ -+ -+ if(_libssh2_get_string(&buf, &algs, &algs_len)) { -+ LIBSSH2_FREE(session, data); -+ session->packAdd_state = libssh2_NB_state_idle; -+ return _libssh2_error(session, -+ LIBSSH2_ERROR_BUFFER_TOO_SMALL, -+ "Algs too short"); -+ } -+ -+ if(algs_len == 0 || -+ _libssh2_kex_agree_instr(algs, algs_len, strict, 28)) { -+ session->kex_strict = 1; -+ } -+ } -+ } -+ -+ if(session->kex_strict && seq) { -+ LIBSSH2_FREE(session, data); -+ session->socket_state = LIBSSH2_SOCKET_DISCONNECTED; -+ session->packAdd_state = libssh2_NB_state_idle; -+ libssh2_session_disconnect(session, "strict KEX violation: " -+ "KEXINIT was not the first packet"); -+ -+ return _libssh2_error(session, LIBSSH2_ERROR_SOCKET_DISCONNECT, -+ "strict KEX violation: " -+ "KEXINIT was not the first packet"); -+ } -+ } -+ -+ if(session->kex_strict && session->fullpacket_required_type && -+ session->fullpacket_required_type != msg) { -+ LIBSSH2_FREE(session, data); -+ session->socket_state = LIBSSH2_SOCKET_DISCONNECTED; -+ session->packAdd_state = libssh2_NB_state_idle; -+ libssh2_session_disconnect(session, "strict KEX violation: " -+ "unexpected packet type"); -+ -+ return _libssh2_error(session, LIBSSH2_ERROR_SOCKET_DISCONNECT, -+ "strict KEX violation: " -+ "unexpected packet type"); -+ } -+ } -+ - if(session->packAdd_state == libssh2_NB_state_allocated) { - /* A couple exceptions to the packet adding rule: */ - switch(msg) { -@@ -1364,6 +1427,15 @@ _libssh2_packet_ask(LIBSSH2_SESSION * session, unsigned char packet_type, - - return 0; - } -+ else if(session->kex_strict && -+ (session->state & LIBSSH2_STATE_INITIAL_KEX)) { -+ libssh2_session_disconnect(session, "strict KEX violation: " -+ "unexpected packet type"); -+ -+ return _libssh2_error(session, LIBSSH2_ERROR_SOCKET_DISCONNECT, -+ "strict KEX violation: " -+ "unexpected packet type"); -+ } - packet = _libssh2_list_next(&packet->node); - } - return -1; -@@ -1425,7 +1497,10 @@ _libssh2_packet_require(LIBSSH2_SESSION * session, unsigned char packet_type, - } - - while(session->socket_state == LIBSSH2_SOCKET_CONNECTED) { -- int ret = _libssh2_transport_read(session); -+ int ret; -+ session->fullpacket_required_type = packet_type; -+ ret = _libssh2_transport_read(session); -+ session->fullpacket_required_type = 0; - if(ret == LIBSSH2_ERROR_EAGAIN) - return ret; - else if(ret < 0) { -diff --git a/src/packet.h b/src/packet.h -index 1d90b8af12..955351e5f6 100644 ---- a/src/packet.h -+++ b/src/packet.h -@@ -72,6 +72,6 @@ int _libssh2_packet_burn(LIBSSH2_SESSION * session, - int _libssh2_packet_write(LIBSSH2_SESSION * session, unsigned char *data, - unsigned long data_len); - int _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, -- size_t datalen, int macstate); -+ size_t datalen, int macstate, uint32_t seq); - - #endif /* LIBSSH2_PACKET_H */ -diff --git a/src/session.c b/src/session.c -index 35e7929fe7..9d89ade8ec 100644 ---- a/src/session.c -+++ b/src/session.c -@@ -469,6 +469,8 @@ libssh2_session_init_ex(LIBSSH2_ALLOC_FUNC((*my_alloc)), - session->abstract = abstract; - session->api_timeout = 0; /* timeout-free API by default */ - session->api_block_mode = 1; /* blocking API by default */ -+ session->state = LIBSSH2_STATE_INITIAL_KEX; -+ session->fullpacket_required_type = 0; - session->packet_read_timeout = LIBSSH2_DEFAULT_READ_TIMEOUT; - session->flag.quote_paths = 1; /* default behavior is to quote paths - for the scp subsystem */ -@@ -1223,6 +1225,7 @@ libssh2_session_disconnect_ex(LIBSSH2_SESSION *session, int reason, - const char *desc, const char *lang) - { - int rc; -+ session->state &= ~LIBSSH2_STATE_INITIAL_KEX; - session->state &= ~LIBSSH2_STATE_EXCHANGING_KEYS; - BLOCK_ADJUST(rc, session, - session_disconnect(session, reason, desc, lang)); -diff --git a/src/transport.c b/src/transport.c -index 21be9d2b80..a8bb588a4b 100644 ---- a/src/transport.c -+++ b/src/transport.c -@@ -186,6 +186,7 @@ fullpacket(LIBSSH2_SESSION * session, int encrypted /* 1 or 0 */ ) - struct transportpacket *p = &session->packet; - int rc; - int compressed; -+ uint32_t seq = session->remote.seqno; - - if(session->fullpacket_state == libssh2_NB_state_idle) { - session->fullpacket_macstate = LIBSSH2_MAC_CONFIRMED; -@@ -317,7 +318,7 @@ fullpacket(LIBSSH2_SESSION * session, int encrypted /* 1 or 0 */ ) - if(session->fullpacket_state == libssh2_NB_state_created) { - rc = _libssh2_packet_add(session, p->payload, - session->fullpacket_payload_len, -- session->fullpacket_macstate); -+ session->fullpacket_macstate, seq); - if(rc == LIBSSH2_ERROR_EAGAIN) - return rc; - if(rc) { -@@ -328,6 +329,11 @@ fullpacket(LIBSSH2_SESSION * session, int encrypted /* 1 or 0 */ ) - - session->fullpacket_state = libssh2_NB_state_idle; - -+ if(session->kex_strict && -+ session->fullpacket_packet_type == SSH_MSG_NEWKEYS) { -+ session->remote.seqno = 0; -+ } -+ - return session->fullpacket_packet_type; - } - -@@ -1093,6 +1099,10 @@ int _libssh2_transport_send(LIBSSH2_SESSION *session, - - session->local.seqno++; - -+ if(session->kex_strict && data[0] == SSH_MSG_NEWKEYS) { -+ session->local.seqno = 0; -+ } -+ - ret = LIBSSH2_SEND(session, p->outbuf, total_length, - LIBSSH2_SOCKET_SEND_FLAGS(session)); - if(ret < 0) diff --git a/pkgs/development/libraries/libssh2/default.nix b/pkgs/development/libraries/libssh2/default.nix index e548b011f66d..42f8acbc8f3f 100644 --- a/pkgs/development/libraries/libssh2/default.nix +++ b/pkgs/development/libraries/libssh2/default.nix @@ -15,19 +15,13 @@ stdenv.mkDerivation rec { pname = "libssh2"; - version = "1.11.0"; + version = "1.11.1"; src = fetchurl { url = "https://www.libssh2.org/download/libssh2-${version}.tar.gz"; - sha256 = "sha256-NzYWHkHiaTMk3rOMJs/cPv5iCdY0ukJY2xzs/2pa1GE="; + hash = "sha256-2ex2y+NNuY7sNTn+LImdJrDIN8s+tGalaw8QnKv2WPc="; }; - patches = [ - # fetchpatch cannot be used due to infinite recursion - # https://github.com/libssh2/libssh2/commit/d34d9258b8420b19ec3f97b4cc5bf7aa7d98e35a - ./CVE-2023-48795.patch - ]; - # this could be accomplished by updateAutotoolsGnuConfigScriptsHook, but that causes infinite recursion # necessary for FreeBSD code path in configure postPatch = '' From 59b91bae8c9f855411d9f4cb847a6d17e73284b5 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 17 Oct 2024 07:13:39 +0100 Subject: [PATCH 022/252] autoconf-archive: 2023.02.20 -> 2024.10.16 --- pkgs/development/tools/misc/autoconf-archive/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/autoconf-archive/default.nix b/pkgs/development/tools/misc/autoconf-archive/default.nix index 3fbfabcee265..a507fd8094ef 100644 --- a/pkgs/development/tools/misc/autoconf-archive/default.nix +++ b/pkgs/development/tools/misc/autoconf-archive/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "autoconf-archive"; - version = "2023.02.20"; + version = "2024.10.16"; src = fetchurl { url = "mirror://gnu/autoconf-archive/autoconf-archive-${version}.tar.xz"; - hash = "sha256-cdQEhHmuKPH1eUYZw9ct+cAd9JscYo74X943WW3DGjM="; + hash = "sha256-e81dABkW86UO10NvT3AOPSsbrePtgDIZxZLWJQKlc2M="; }; strictDeps = true; From e2e74de075a3d06facde5e2c67b66bdf4340577c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 17 Oct 2024 06:32:14 +0000 Subject: [PATCH 023/252] vim: 9.1.0765 -> 9.1.0787 --- 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 67cf247fe72a..afe60212baf7 100644 --- a/pkgs/applications/editors/vim/common.nix +++ b/pkgs/applications/editors/vim/common.nix @@ -1,6 +1,6 @@ { lib, fetchFromGitHub }: rec { - version = "9.1.0765"; + version = "9.1.0787"; outputs = [ "out" "xxd" ]; @@ -8,7 +8,7 @@ rec { owner = "vim"; repo = "vim"; rev = "v${version}"; - hash = "sha256-LtEEMpdWXA6qyjAIjgsZoc4hNXXG2ZXxCsbWKC5aEPI="; + hash = "sha256-kV2SaIOUv+ZcDsqBibZZ38gCevVLhejcYtY0TCQVtig="; }; enableParallelBuilding = true; From 68da0b94729bfcccfb7944f26b192f739b565cd8 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 17 Oct 2024 10:45:39 +0000 Subject: [PATCH 024/252] memcached: 1.6.29 -> 1.6.31 --- pkgs/servers/memcached/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/memcached/default.nix b/pkgs/servers/memcached/default.nix index f1e2c027db6a..52dee4aa95dd 100644 --- a/pkgs/servers/memcached/default.nix +++ b/pkgs/servers/memcached/default.nix @@ -1,12 +1,12 @@ {lib, stdenv, fetchurl, cyrus_sasl, libevent, nixosTests }: stdenv.mkDerivation rec { - version = "1.6.29"; + version = "1.6.31"; pname = "memcached"; src = fetchurl { url = "https://memcached.org/files/${pname}-${version}.tar.gz"; - sha256 = "sha256-JpZD1Ri3uiAzx6H2b9/FYNcnJaKCIZTZDII1QIxEOkk="; + sha256 = "sha256-INjTObj7H2x5zuIFWdxv+13+6E255Yn06yFPbSyHPvU="; }; configureFlags = [ From 58b590d966e4f2aefcd6271b6ae63a9a8b1b3c1a Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 17 Oct 2024 13:36:33 +0100 Subject: [PATCH 025/252] darwin.libiconv: unconditionalize static patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To ensure that it doesn’t bitrot again. --- .../apple-source-releases/libiconv/package.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-source-releases/libiconv/package.nix b/pkgs/os-specific/darwin/apple-source-releases/libiconv/package.nix index 615e9b840751..0803ff7a4dad 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libiconv/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libiconv/package.nix @@ -20,15 +20,12 @@ mkAppleDerivation (finalAttrs: { xcodeHash = "sha256-IiTqhEJIZ8JYjlpBS7ITwYlp8ndU6cehus9TIr+5LYM="; - patches = - lib.optionals hostPlatform.isStatic [ - # Use gperf to implement module loading statically by looking up the module functions in the static binary. - ./patches/0001-Support-static-module-loading.patch - ] - ++ [ - # Avoid out of bounds write with ISO-2022 - ./patches/0002-Fix-ISO-2022-out-of-bounds-write-with-encoded-charac.patch - ]; + patches = [ + # Use gperf to implement module loading statically by looking up the module functions in the static binary. + ./patches/0001-Support-static-module-loading.patch + # Avoid out of bounds write with ISO-2022 + ./patches/0002-Fix-ISO-2022-out-of-bounds-write-with-encoded-charac.patch + ]; # Propagate `out` only when there are dylibs to link (i.e., don’t propagate when doing a static build). propagatedBuildOutputs = lib.optionalString (!hostPlatform.isStatic) "out"; From 11cced659e5ae12645b4542c12527d6c09d74066 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:17:39 -0400 Subject: [PATCH 026/252] python312Packages.clickclick: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/clickclick/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/clickclick/default.nix b/pkgs/development/python-modules/clickclick/default.nix index 117e5c0c4196..d12463132c96 100644 --- a/pkgs/development/python-modules/clickclick/default.nix +++ b/pkgs/development/python-modules/clickclick/default.nix @@ -7,7 +7,7 @@ pyyaml, six, pytestCheckHook, - pytest-cov, + pytest-cov-stub, }: buildPythonPackage rec { @@ -24,7 +24,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub ]; propagatedBuildInputs = [ flake8 From 195c9123542cd2489685a0a5273516fe3d622a2e Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:19:16 -0400 Subject: [PATCH 027/252] python312Packages.dbus-next: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/dbus-next/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/dbus-next/default.nix b/pkgs/development/python-modules/dbus-next/default.nix index 117fa8c08948..038186c8d3aa 100644 --- a/pkgs/development/python-modules/dbus-next/default.nix +++ b/pkgs/development/python-modules/dbus-next/default.nix @@ -6,7 +6,7 @@ setuptools, dbus, pytest, - pytest-cov, + pytest-cov-stub, pytest-asyncio, pytest-timeout, }: @@ -28,7 +28,7 @@ buildPythonPackage rec { nativeCheckInputs = [ dbus pytest - pytest-cov + pytest-cov-stub pytest-asyncio pytest-timeout ]; From 6244788e1e21fc20525fb2403978ce2461127494 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:19:23 -0400 Subject: [PATCH 028/252] python312Packages.echo: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/echo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/echo/default.nix b/pkgs/development/python-modules/echo/default.nix index a07f10e8a4b1..376938a55cbe 100644 --- a/pkgs/development/python-modules/echo/default.nix +++ b/pkgs/development/python-modules/echo/default.nix @@ -11,7 +11,7 @@ qtpy, pyqt6, pytestCheckHook, - pytest-cov, + pytest-cov-stub, }: buildPythonPackage rec { @@ -51,7 +51,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub ]; pythonImportsCheck = [ "echo" ]; From df2eef0dedc3aeb49a2158f4dd57a2bed9b49875 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:19:32 -0400 Subject: [PATCH 029/252] python312Packages.fairscale: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/fairscale/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/fairscale/default.nix b/pkgs/development/python-modules/fairscale/default.nix index 4472d6e24a4f..e870e2c934e7 100644 --- a/pkgs/development/python-modules/fairscale/default.nix +++ b/pkgs/development/python-modules/fairscale/default.nix @@ -11,7 +11,7 @@ # check inputs pytestCheckHook, parameterized, - pytest-cov, + pytest-cov-stub, pytest-timeout, remote-pdb, }: @@ -51,7 +51,7 @@ buildPythonPackage { nativeCheckInputs = [ pytestCheckHook parameterized - pytest-cov + pytest-cov-stub pytest-timeout remote-pdb ]; From 7d76cd700d7be8724ce472845fed933faa159484 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:19:40 -0400 Subject: [PATCH 030/252] python312Packages.fast-histogram: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/fast-histogram/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/fast-histogram/default.nix b/pkgs/development/python-modules/fast-histogram/default.nix index d0621c1b539e..3a3ada743a4e 100644 --- a/pkgs/development/python-modules/fast-histogram/default.nix +++ b/pkgs/development/python-modules/fast-histogram/default.nix @@ -10,7 +10,7 @@ numpy, wheel, hypothesis, - pytest-cov, + pytest-cov-stub, }: buildPythonPackage rec { @@ -38,7 +38,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook hypothesis - pytest-cov + pytest-cov-stub ]; pytestFlagsArray = [ "${builtins.placeholder "out"}/${python.sitePackages}" ]; From bbfbfa07bdf92e82f0685b616badc13c82332f20 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:19:57 -0400 Subject: [PATCH 031/252] python312Packages.flufl-lock: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/flufl/lock.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/flufl/lock.nix b/pkgs/development/python-modules/flufl/lock.nix index 3c1b2ce83efd..f11178381f4b 100644 --- a/pkgs/development/python-modules/flufl/lock.nix +++ b/pkgs/development/python-modules/flufl/lock.nix @@ -5,7 +5,7 @@ fetchPypi, hatchling, psutil, - pytest-cov, + pytest-cov-stub, pytestCheckHook, pythonOlder, sybil, @@ -33,7 +33,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub sybil ]; From 4c0dbf162baf31e47df038392db84ce5f487931e Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:20:03 -0400 Subject: [PATCH 032/252] python312Packages.googlemaps: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/googlemaps/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/googlemaps/default.nix b/pkgs/development/python-modules/googlemaps/default.nix index 0e936dd7e183..c4396a52ae30 100644 --- a/pkgs/development/python-modules/googlemaps/default.nix +++ b/pkgs/development/python-modules/googlemaps/default.nix @@ -2,7 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, - pytest-cov, + pytest-cov-stub, pytestCheckHook, pythonOlder, requests, @@ -26,7 +26,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ requests ]; nativeCheckInputs = [ - pytest-cov + pytest-cov-stub pytestCheckHook responses ]; From c97526afed386b049106a40ba6888d401bde011c Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:20:13 -0400 Subject: [PATCH 033/252] python312Packages.gunicorn: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/gunicorn/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/gunicorn/default.nix b/pkgs/development/python-modules/gunicorn/default.nix index 45a7b6862421..d6130ef31287 100644 --- a/pkgs/development/python-modules/gunicorn/default.nix +++ b/pkgs/development/python-modules/gunicorn/default.nix @@ -17,7 +17,7 @@ setproctitle, pytestCheckHook, - pytest-cov, + pytest-cov-stub, }: buildPythonPackage rec { @@ -50,7 +50,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub ] ++ lib.flatten (lib.attrValues optional-dependencies); meta = { From a07ff3b1bbebdcac1ee3d1317c47aff100c308c2 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:20:21 -0400 Subject: [PATCH 034/252] python312Packages.haystack-ai: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/haystack-ai/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/haystack-ai/default.nix b/pkgs/development/python-modules/haystack-ai/default.nix index c5d12912633e..f1ac68d9374a 100644 --- a/pkgs/development/python-modules/haystack-ai/default.nix +++ b/pkgs/development/python-modules/haystack-ai/default.nix @@ -42,7 +42,7 @@ pylint, pytest, pytest-asyncio, - pytest-cov, + pytest-cov-stub, # , pytest-custom-exit-code python-multipart, reno, @@ -167,7 +167,7 @@ buildPythonPackage rec { pylint pytest pytest-asyncio - pytest-cov + pytest-cov-stub # pytest-custom-exit-code python-multipart reno From 788d11f457aada708de6c5f167d25d730d7355ec Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:20:30 -0400 Subject: [PATCH 035/252] python312Packages.injector: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/injector/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/injector/default.nix b/pkgs/development/python-modules/injector/default.nix index 7ce90c23f622..734b3b3f6d33 100644 --- a/pkgs/development/python-modules/injector/default.nix +++ b/pkgs/development/python-modules/injector/default.nix @@ -5,7 +5,7 @@ fetchFromGitHub, typing-extensions, pytestCheckHook, - pytest-cov, + pytest-cov-stub, }: buildPythonPackage rec { @@ -24,7 +24,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub ]; pythonImportsCheck = [ "injector" ]; From 8ebf13b49711009445948a328ce3d61fb78226eb Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:20:37 -0400 Subject: [PATCH 036/252] python312Packages.iocapture: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/iocapture/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/iocapture/default.nix b/pkgs/development/python-modules/iocapture/default.nix index a36a01eeeead..0e44cad6916b 100644 --- a/pkgs/development/python-modules/iocapture/default.nix +++ b/pkgs/development/python-modules/iocapture/default.nix @@ -4,7 +4,7 @@ fetchPypi, flexmock, pytest, - pytest-cov, + pytest-cov-stub, six, }: @@ -21,7 +21,7 @@ buildPythonPackage rec { nativeCheckInputs = [ flexmock pytest - pytest-cov + pytest-cov-stub six ]; From 2d53d3790721b8a67b31fe92caddb3a210e2a27d Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:20:45 -0400 Subject: [PATCH 037/252] python312Packages.ipfshttpclient: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/ipfshttpclient/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/ipfshttpclient/default.nix b/pkgs/development/python-modules/ipfshttpclient/default.nix index e44127372172..263870816dab 100644 --- a/pkgs/development/python-modules/ipfshttpclient/default.nix +++ b/pkgs/development/python-modules/ipfshttpclient/default.nix @@ -8,7 +8,7 @@ py-multiaddr, requests, pytestCheckHook, - pytest-cov, + pytest-cov-stub, pytest-dependency, pytest-localserver, pytest-mock, @@ -42,7 +42,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub pytest-dependency pytest-localserver pytest-mock From 3d7a2e91743dd7e3bb1e80736db6d63423d8507a Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:20:50 -0400 Subject: [PATCH 038/252] python312Packages.isbnlib: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/isbnlib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/isbnlib/default.nix b/pkgs/development/python-modules/isbnlib/default.nix index 8bf7e67b9ecd..627bdeadfc1e 100644 --- a/pkgs/development/python-modules/isbnlib/default.nix +++ b/pkgs/development/python-modules/isbnlib/default.nix @@ -3,7 +3,7 @@ buildPythonPackage, fetchFromGitHub, pytestCheckHook, - pytest-cov, + pytest-cov-stub, setuptools, }: @@ -23,7 +23,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub ]; pytestFlagsArray = [ "isbnlib/test/" ]; From e198a6026839ed6d451add6eafd1c622278b0b22 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:20:57 -0400 Subject: [PATCH 039/252] python312Packages.jwt: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/jwt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/jwt/default.nix b/pkgs/development/python-modules/jwt/default.nix index fc058f7d7004..2da80c7e183c 100644 --- a/pkgs/development/python-modules/jwt/default.nix +++ b/pkgs/development/python-modules/jwt/default.nix @@ -6,7 +6,7 @@ cryptography, freezegun, pytestCheckHook, - pytest-cov, + pytest-cov-stub, }: buildPythonPackage rec { @@ -33,7 +33,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook freezegun - pytest-cov + pytest-cov-stub ]; pythonImportsCheck = [ "jwt" ]; From 6d73eaa60dfabbead35a7b1781c077f9d9c613ba Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:21:04 -0400 Subject: [PATCH 040/252] python312Packages.monero: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/monero/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/monero/default.nix b/pkgs/development/python-modules/monero/default.nix index a0ef05cb3b05..4fdab49a521e 100644 --- a/pkgs/development/python-modules/monero/default.nix +++ b/pkgs/development/python-modules/monero/default.nix @@ -9,7 +9,7 @@ six, varint, pytestCheckHook, - pytest-cov, + pytest-cov-stub, responses, }: @@ -44,7 +44,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub responses ]; From 87135622104d51fd84f3ff91c1369ebe77206ab0 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:21:12 -0400 Subject: [PATCH 041/252] python312Packages.pettingzoo: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/pettingzoo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pettingzoo/default.nix b/pkgs/development/python-modules/pettingzoo/default.nix index e2e562f0d0f1..f388de21a026 100644 --- a/pkgs/development/python-modules/pettingzoo/default.nix +++ b/pkgs/development/python-modules/pettingzoo/default.nix @@ -17,7 +17,7 @@ pre-commit, pynput, pytest, - pytest-cov, + pytest-cov-stub, pytest-markdown-docs, pytest-xdist, pytestCheckHook, @@ -87,7 +87,7 @@ buildPythonPackage rec { pre-commit pynput pytest - pytest-cov + pytest-cov-stub pytest-markdown-docs pytest-xdist ]; From afadc6f9260e3120cc427a7c13865c8023b2160a Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:21:20 -0400 Subject: [PATCH 042/252] python312Packages.pgmpy: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/pgmpy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pgmpy/default.nix b/pkgs/development/python-modules/pgmpy/default.nix index 1217f573cdcd..810f1aa26859 100644 --- a/pkgs/development/python-modules/pgmpy/default.nix +++ b/pkgs/development/python-modules/pgmpy/default.nix @@ -20,7 +20,7 @@ # tests pytestCheckHook, - pytest-cov, + pytest-cov-stub, coverage, mock, black, @@ -69,7 +69,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook # xdoctest - pytest-cov + pytest-cov-stub coverage mock black From c56d950ff3b558bdc9c8677d8ae00b3ca5ac171b Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:21:26 -0400 Subject: [PATCH 043/252] python312Packages.plaster: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/plaster/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/plaster/default.nix b/pkgs/development/python-modules/plaster/default.nix index 3585d4a7721b..0651404dc477 100644 --- a/pkgs/development/python-modules/plaster/default.nix +++ b/pkgs/development/python-modules/plaster/default.nix @@ -2,7 +2,7 @@ buildPythonPackage, fetchPypi, pytest, - pytest-cov, + pytest-cov-stub, }: buildPythonPackage rec { @@ -21,6 +21,6 @@ buildPythonPackage rec { nativeCheckInputs = [ pytest - pytest-cov + pytest-cov-stub ]; } From e197c36efdc7ecde34f36cb7de8f88c1d399d0bb Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:21:34 -0400 Subject: [PATCH 044/252] python312Packages.property-manager: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/property-manager/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/property-manager/default.nix b/pkgs/development/python-modules/property-manager/default.nix index e1eee500812e..71fa0e1aeddb 100644 --- a/pkgs/development/python-modules/property-manager/default.nix +++ b/pkgs/development/python-modules/property-manager/default.nix @@ -6,7 +6,7 @@ verboselogs, coloredlogs, pytest, - pytest-cov, + pytest-cov-stub, }: buildPythonPackage rec { @@ -28,7 +28,7 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ pytest - pytest-cov + pytest-cov-stub ]; meta = with lib; { From b703f4d0ce9e6a5b573ca81d8c7311b47869270c Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:21:42 -0400 Subject: [PATCH 045/252] python312Packages.psautohint: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/psautohint/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/psautohint/default.nix b/pkgs/development/python-modules/psautohint/default.nix index 9782458b4ccb..605936dd8637 100644 --- a/pkgs/development/python-modules/psautohint/default.nix +++ b/pkgs/development/python-modules/psautohint/default.nix @@ -8,7 +8,7 @@ fs, # for fonttools extras setuptools-scm, pytestCheckHook, - pytest-cov, + pytest-cov-stub, pytest-xdist, runAllTests ? false, psautohint, # for passthru.tests @@ -45,7 +45,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub pytest-xdist ]; disabledTests = lib.optionals (!runAllTests) [ From 112a7efe154309cbcb1ec584134d116d9dcbf079 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:21:49 -0400 Subject: [PATCH 046/252] python312Packages.pyevtk: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/pyevtk/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyevtk/default.nix b/pkgs/development/python-modules/pyevtk/default.nix index 16081d1cc613..6fd66a737ceb 100644 --- a/pkgs/development/python-modules/pyevtk/default.nix +++ b/pkgs/development/python-modules/pyevtk/default.nix @@ -5,7 +5,7 @@ setuptools, numpy, pytestCheckHook, - pytest-cov, + pytest-cov-stub, }: buildPythonPackage rec { @@ -30,7 +30,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub ]; pythonImportsCheck = [ "pyevtk" ]; From c4a2c16c76b3a7bff32edf69630d3d6a8c3350a6 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:21:57 -0400 Subject: [PATCH 047/252] python312Packages.pyexcel-xls: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/pyexcel-xls/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyexcel-xls/default.nix b/pkgs/development/python-modules/pyexcel-xls/default.nix index c372ca08adf1..81bcc8ade772 100644 --- a/pkgs/development/python-modules/pyexcel-xls/default.nix +++ b/pkgs/development/python-modules/pyexcel-xls/default.nix @@ -8,7 +8,7 @@ xlwt, pyexcel, pytestCheckHook, - pytest-cov, + pytest-cov-stub, setuptools, }: @@ -45,7 +45,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook pyexcel - pytest-cov + pytest-cov-stub ]; postPatch = '' From da9a4b0b6404960833cb6691ccd4429658aa8e97 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:22:04 -0400 Subject: [PATCH 048/252] python312Packages.pymaven-patch: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/pymaven-patch/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pymaven-patch/default.nix b/pkgs/development/python-modules/pymaven-patch/default.nix index c390123e4c5a..a8622f2e9bd5 100644 --- a/pkgs/development/python-modules/pymaven-patch/default.nix +++ b/pkgs/development/python-modules/pymaven-patch/default.nix @@ -7,7 +7,7 @@ six, lxml, pytestCheckHook, - pytest-cov, + pytest-cov-stub, mock, }: buildPythonPackage rec { @@ -29,7 +29,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub mock ]; From 5db834e1729ab3dda998cdf5feb2fdc3676e2174 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:22:23 -0400 Subject: [PATCH 049/252] python312Packages.pyscaffold*: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/pyscaffold/default.nix | 4 ++-- .../python-modules/pyscaffoldext-cookiecutter/default.nix | 4 ++-- .../python-modules/pyscaffoldext-custom-extension/default.nix | 4 ++-- .../python-modules/pyscaffoldext-django/default.nix | 4 ++-- .../python-modules/pyscaffoldext-dsproject/default.nix | 4 ++-- .../python-modules/pyscaffoldext-markdown/default.nix | 4 ++-- .../python-modules/pyscaffoldext-travis/default.nix | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/pyscaffold/default.nix b/pkgs/development/python-modules/pyscaffold/default.nix index 127ca5bb96c2..5a0b13086071 100644 --- a/pkgs/development/python-modules/pyscaffold/default.nix +++ b/pkgs/development/python-modules/pyscaffold/default.nix @@ -23,7 +23,7 @@ certifi, flake8, pytest, - pytest-cov, + pytest-cov-stub, pytest-randomly, pytest-xdist, sphinx, @@ -80,7 +80,7 @@ buildPythonPackage rec { flake8 pre-commit pytest - pytest-cov + pytest-cov-stub pytest-randomly pytest-xdist setuptools diff --git a/pkgs/development/python-modules/pyscaffoldext-cookiecutter/default.nix b/pkgs/development/python-modules/pyscaffoldext-cookiecutter/default.nix index a34bf93334e9..d5ba7c9b6d82 100644 --- a/pkgs/development/python-modules/pyscaffoldext-cookiecutter/default.nix +++ b/pkgs/development/python-modules/pyscaffoldext-cookiecutter/default.nix @@ -11,7 +11,7 @@ configupdater, pre-commit, pytest, - pytest-cov, + pytest-cov-stub, pytest-xdist, tox, virtualenv, @@ -44,7 +44,7 @@ buildPythonPackage rec { configupdater pre-commit pytest - pytest-cov + pytest-cov-stub pytest-xdist setuptools-scm tox diff --git a/pkgs/development/python-modules/pyscaffoldext-custom-extension/default.nix b/pkgs/development/python-modules/pyscaffoldext-custom-extension/default.nix index ee4bc3aa728b..0ee14743b5e9 100644 --- a/pkgs/development/python-modules/pyscaffoldext-custom-extension/default.nix +++ b/pkgs/development/python-modules/pyscaffoldext-custom-extension/default.nix @@ -11,7 +11,7 @@ pyscaffold, pre-commit, pytest, - pytest-cov, + pytest-cov-stub, pytest-xdist, tox, virtualenv, @@ -45,7 +45,7 @@ buildPythonPackage rec { configupdater pre-commit pytest - pytest-cov + pytest-cov-stub pytest-xdist setuptools-scm tox diff --git a/pkgs/development/python-modules/pyscaffoldext-django/default.nix b/pkgs/development/python-modules/pyscaffoldext-django/default.nix index e0e9ca4cf69f..6270dbc2d1d5 100644 --- a/pkgs/development/python-modules/pyscaffoldext-django/default.nix +++ b/pkgs/development/python-modules/pyscaffoldext-django/default.nix @@ -10,7 +10,7 @@ configupdater, pre-commit, pytest, - pytest-cov, + pytest-cov-stub, pytest-xdist, tox, virtualenv, @@ -42,7 +42,7 @@ buildPythonPackage rec { configupdater pre-commit pytest - pytest-cov + pytest-cov-stub pytest-xdist setuptools-scm tox diff --git a/pkgs/development/python-modules/pyscaffoldext-dsproject/default.nix b/pkgs/development/python-modules/pyscaffoldext-dsproject/default.nix index 9763ba8ace95..cc70d4098ab8 100644 --- a/pkgs/development/python-modules/pyscaffoldext-dsproject/default.nix +++ b/pkgs/development/python-modules/pyscaffoldext-dsproject/default.nix @@ -11,7 +11,7 @@ configupdater, pre-commit, pytest, - pytest-cov, + pytest-cov-stub, pytest-xdist, tox, virtualenv, @@ -44,7 +44,7 @@ buildPythonPackage rec { configupdater pre-commit pytest - pytest-cov + pytest-cov-stub pytest-xdist setuptools-scm tox diff --git a/pkgs/development/python-modules/pyscaffoldext-markdown/default.nix b/pkgs/development/python-modules/pyscaffoldext-markdown/default.nix index 4d6157ed4d99..d84320a77a95 100644 --- a/pkgs/development/python-modules/pyscaffoldext-markdown/default.nix +++ b/pkgs/development/python-modules/pyscaffoldext-markdown/default.nix @@ -11,7 +11,7 @@ configupdater, pre-commit, pytest, - pytest-cov, + pytest-cov-stub, pytest-xdist, tox, twine, @@ -46,7 +46,7 @@ buildPythonPackage rec { configupdater pre-commit pytest - pytest-cov + pytest-cov-stub pytest-xdist setuptools-scm tox diff --git a/pkgs/development/python-modules/pyscaffoldext-travis/default.nix b/pkgs/development/python-modules/pyscaffoldext-travis/default.nix index 6c08f6c23adc..4eeaafd14c22 100644 --- a/pkgs/development/python-modules/pyscaffoldext-travis/default.nix +++ b/pkgs/development/python-modules/pyscaffoldext-travis/default.nix @@ -10,7 +10,7 @@ configupdater, pre-commit, pytest, - pytest-cov, + pytest-cov-stub, pytest-xdist, tox, virtualenv, @@ -42,7 +42,7 @@ buildPythonPackage rec { configupdater pre-commit pytest - pytest-cov + pytest-cov-stub pytest-xdist setuptools-scm tox From d5886a2e3166ed668a4581182b1d6647c46fcf5e Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:23:33 -0400 Subject: [PATCH 050/252] python312Packages.pystac: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/pystac/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pystac/default.nix b/pkgs/development/python-modules/pystac/default.nix index c97862176e26..3f118b581a5c 100644 --- a/pkgs/development/python-modules/pystac/default.nix +++ b/pkgs/development/python-modules/pystac/default.nix @@ -7,7 +7,7 @@ html5lib, jsonschema, - pytest-cov, + pytest-cov-stub, pytest-mock, pytest-recording, python-dateutil, @@ -36,7 +36,7 @@ buildPythonPackage rec { html5lib jsonschema pytestCheckHook - pytest-cov + pytest-cov-stub pytest-mock pytest-recording requests-mock From 73cf526286a09a8a43bf34ffe4018cdc731ffb77 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:23:42 -0400 Subject: [PATCH 051/252] python312Packages.pytest-*: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/pytest-cid/default.nix | 4 ++-- .../python-modules/pytest-filter-subpackage/default.nix | 4 ++-- pkgs/development/python-modules/pytest-notebook/default.nix | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pytest-cid/default.nix b/pkgs/development/python-modules/pytest-cid/default.nix index b73648e2a673..ae5b5e848855 100644 --- a/pkgs/development/python-modules/pytest-cid/default.nix +++ b/pkgs/development/python-modules/pytest-cid/default.nix @@ -6,7 +6,7 @@ flit-core, py-cid, pytestCheckHook, - pytest-cov, + pytest-cov-stub, }: buildPythonPackage rec { @@ -33,7 +33,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub ]; pythonImportsCheck = [ "pytest_cid" ]; diff --git a/pkgs/development/python-modules/pytest-filter-subpackage/default.nix b/pkgs/development/python-modules/pytest-filter-subpackage/default.nix index 9908c3b2b4ff..cdb9765243c0 100644 --- a/pkgs/development/python-modules/pytest-filter-subpackage/default.nix +++ b/pkgs/development/python-modules/pytest-filter-subpackage/default.nix @@ -3,7 +3,7 @@ buildPythonPackage, fetchPypi, pytest, - pytest-cov, + pytest-cov-stub, pytest-doctestplus, pytestCheckHook, pythonOlder, @@ -28,7 +28,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ pytest-doctestplus - pytest-cov + pytest-cov-stub ]; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/pytest-notebook/default.nix b/pkgs/development/python-modules/pytest-notebook/default.nix index 21f40beb6a89..f66f42081c58 100644 --- a/pkgs/development/python-modules/pytest-notebook/default.nix +++ b/pkgs/development/python-modules/pytest-notebook/default.nix @@ -12,7 +12,7 @@ black, coverage, ipykernel, - pytest-cov, + pytest-cov-stub, pytest-regressions, pytestCheckHook, }: @@ -54,7 +54,7 @@ buildPythonPackage rec { black coverage ipykernel - pytest-cov + pytest-cov-stub pytest-regressions pytestCheckHook ]; From 202b4b5c7ca9221a831d3680f2a5805c5e14a532 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:23:51 -0400 Subject: [PATCH 052/252] python312Packages.rdflib: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/rdflib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/rdflib/default.nix b/pkgs/development/python-modules/rdflib/default.nix index f6a5ded15e74..72f6e8c8d485 100644 --- a/pkgs/development/python-modules/rdflib/default.nix +++ b/pkgs/development/python-modules/rdflib/default.nix @@ -23,7 +23,7 @@ # tests pip, - pytest-cov, + pytest-cov-stub, pytest7CheckHook, setuptools, }: @@ -59,7 +59,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pip - pytest-cov + pytest-cov-stub # Failed: DID NOT WARN. No warnings of type (,) were emitted. pytest7CheckHook setuptools From 7f7c3242afa2afb51b547e30c4c9417d1366f666 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:23:58 -0400 Subject: [PATCH 053/252] python312Packages.reikna: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/reikna/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/reikna/default.nix b/pkgs/development/python-modules/reikna/default.nix index 716162be03a4..f1877c11e12e 100644 --- a/pkgs/development/python-modules/reikna/default.nix +++ b/pkgs/development/python-modules/reikna/default.nix @@ -3,7 +3,7 @@ fetchPypi, buildPythonPackage, sphinx, - pytest-cov, + pytest-cov-stub, pytest, mako, numpy, @@ -26,7 +26,7 @@ buildPythonPackage rec { nativeCheckInputs = [ sphinx - pytest-cov + pytest-cov-stub pytest ]; From 419db747e45e713fdb08019d595366d81495b16f Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:24:06 -0400 Subject: [PATCH 054/252] python312Packages.schwifty: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/schwifty/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/schwifty/default.nix b/pkgs/development/python-modules/schwifty/default.nix index 02a70e00ecec..34ff86457720 100644 --- a/pkgs/development/python-modules/schwifty/default.nix +++ b/pkgs/development/python-modules/schwifty/default.nix @@ -18,7 +18,7 @@ # tests pytestCheckHook, - pytest-cov, + pytest-cov-stub, pythonOlder, }: @@ -50,7 +50,7 @@ buildPythonPackage rec { }; nativeCheckInputs = [ - pytest-cov + pytest-cov-stub pytestCheckHook ] ++ lib.flatten (lib.attrValues optional-dependencies); From 9e2dc7918b3434081593933dc8505a48ff6c1a4d Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:28:04 -0400 Subject: [PATCH 055/252] python312Packages.sentence-transformers: pytest-cov -> pytest-cov-stub --- .../python-modules/sentence-transformers/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sentence-transformers/default.nix b/pkgs/development/python-modules/sentence-transformers/default.nix index c70ea216cd42..fde086510905 100644 --- a/pkgs/development/python-modules/sentence-transformers/default.nix +++ b/pkgs/development/python-modules/sentence-transformers/default.nix @@ -23,7 +23,7 @@ accelerate, datasets, pytestCheckHook, - pytest-cov, + pytest-cov-stub, }: buildPythonPackage rec { @@ -57,7 +57,7 @@ buildPythonPackage rec { accelerate datasets pytestCheckHook - pytest-cov + pytest-cov-stub ]; pythonImportsCheck = [ "sentence_transformers" ]; From 59d1cfb2350a2340037d0cc90184c6c62cdcf1ae Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:28:10 -0400 Subject: [PATCH 056/252] python312Packages.snapshottest: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/snapshottest/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/snapshottest/default.nix b/pkgs/development/python-modules/snapshottest/default.nix index 4c697fcdb923..244a1627f11c 100644 --- a/pkgs/development/python-modules/snapshottest/default.nix +++ b/pkgs/development/python-modules/snapshottest/default.nix @@ -6,7 +6,7 @@ six, termcolor, pytestCheckHook, - pytest-cov, + pytest-cov-stub, django, }: @@ -29,7 +29,7 @@ buildPythonPackage rec { nativeCheckInputs = [ django pytestCheckHook - pytest-cov + pytest-cov-stub ]; pythonImportsCheck = [ "snapshottest" ]; From 48887a6046f6449fc6308505c4f4783854509f2b Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:28:17 -0400 Subject: [PATCH 057/252] python312Packages.sortedcollections: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/sortedcollections/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sortedcollections/default.nix b/pkgs/development/python-modules/sortedcollections/default.nix index 3ee4eff75023..a525167635b6 100644 --- a/pkgs/development/python-modules/sortedcollections/default.nix +++ b/pkgs/development/python-modules/sortedcollections/default.nix @@ -2,7 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, - pytest-cov, + pytest-cov-stub, pytestCheckHook, sortedcontainers, }: @@ -22,7 +22,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ sortedcontainers ]; nativeCheckInputs = [ - pytest-cov + pytest-cov-stub pytestCheckHook ]; From 2b8b58d8de5552a4b0d4f34e1c54a3d22f780229 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:28:25 -0400 Subject: [PATCH 058/252] python312Packages.stups-fullstop: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/stups-fullstop/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/stups-fullstop/default.nix b/pkgs/development/python-modules/stups-fullstop/default.nix index 494c8ecf1e9e..a2662d754c55 100644 --- a/pkgs/development/python-modules/stups-fullstop/default.nix +++ b/pkgs/development/python-modules/stups-fullstop/default.nix @@ -7,7 +7,7 @@ stups-cli-support, stups-zign, pytest, - pytest-cov, + pytest-cov-stub, isPy3k, }: @@ -36,7 +36,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytest - pytest-cov + pytest-cov-stub ]; meta = with lib; { From e208ff1087bdfd2a31b40929609f9dbe22487e06 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:28:32 -0400 Subject: [PATCH 059/252] python312Packages.subliminal: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/subliminal/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/subliminal/default.nix b/pkgs/development/python-modules/subliminal/default.nix index 23347af0ff45..a810ecb48699 100644 --- a/pkgs/development/python-modules/subliminal/default.nix +++ b/pkgs/development/python-modules/subliminal/default.nix @@ -21,7 +21,7 @@ tomli, pytestCheckHook, - pytest-cov, + pytest-cov-stub, pytest-xdist, mypy, sympy, @@ -62,7 +62,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub pytest-xdist mypy sympy From 5391f72c5604c645ca770481027c60b2ba0e9618 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:28:38 -0400 Subject: [PATCH 060/252] python312Packages.tf2onnx: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/tf2onnx/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tf2onnx/default.nix b/pkgs/development/python-modules/tf2onnx/default.nix index 54a837089bc8..5049d5043775 100644 --- a/pkgs/development/python-modules/tf2onnx/default.nix +++ b/pkgs/development/python-modules/tf2onnx/default.nix @@ -14,7 +14,7 @@ pytestCheckHook, graphviz, parameterized, - pytest-cov, + pytest-cov-stub, pyyaml, timeout-decorator, onnxruntime, @@ -57,7 +57,7 @@ buildPythonPackage rec { pytestCheckHook graphviz parameterized - pytest-cov + pytest-cov-stub pyyaml timeout-decorator keras From 6372046ee5e290c252edca127ab05632974d9e16 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:28:48 -0400 Subject: [PATCH 061/252] python312Packages.torch-geometric: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/torch-geometric/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/torch-geometric/default.nix b/pkgs/development/python-modules/torch-geometric/default.nix index ed3bbdc73569..952aa7bd1294 100644 --- a/pkgs/development/python-modules/torch-geometric/default.nix +++ b/pkgs/development/python-modules/torch-geometric/default.nix @@ -52,7 +52,7 @@ onnx, onnxruntime, pytest, - pytest-cov, + pytest-cov-stub, # tests pytestCheckHook, @@ -137,7 +137,7 @@ buildPythonPackage rec { onnx onnxruntime pytest - pytest-cov + pytest-cov-stub ]; }; From c4407814cc915fc191422855ae4b65ab5e65d48b Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:28:57 -0400 Subject: [PATCH 062/252] python312Packages.uarray: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/uarray/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/uarray/default.nix b/pkgs/development/python-modules/uarray/default.nix index a151ba1f1d80..ef7284f3196f 100644 --- a/pkgs/development/python-modules/uarray/default.nix +++ b/pkgs/development/python-modules/uarray/default.nix @@ -9,7 +9,7 @@ astunparse, typing-extensions, pytest7CheckHook, - pytest-cov, + pytest-cov-stub, }: buildPythonPackage rec { @@ -39,7 +39,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytest7CheckHook - pytest-cov + pytest-cov-stub ]; # Tests must be run from outside the source directory From edc1dfd1c4124182e005a719b6699036636f551a Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:29:11 -0400 Subject: [PATCH 063/252] python312Packages.unstructured*: pytest-cov -> pytest-cov-stub --- .../python-modules/unstructured-api-tools/default.nix | 4 ++-- .../python-modules/unstructured-inference/default.nix | 4 ++-- pkgs/development/python-modules/unstructured/default.nix | 4 ++-- .../python-modules/validator-collection/default.nix | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/unstructured-api-tools/default.nix b/pkgs/development/python-modules/unstructured-api-tools/default.nix index 0eae368c30c3..656fa897e8d2 100644 --- a/pkgs/development/python-modules/unstructured-api-tools/default.nix +++ b/pkgs/development/python-modules/unstructured-api-tools/default.nix @@ -22,7 +22,7 @@ flake8, httpx, ipython, - pytest-cov, + pytest-cov-stub, requests, requests-toolbelt, nbdev, @@ -77,7 +77,7 @@ buildPythonPackage { flake8 httpx ipython - pytest-cov + pytest-cov-stub requests requests-toolbelt nbdev diff --git a/pkgs/development/python-modules/unstructured-inference/default.nix b/pkgs/development/python-modules/unstructured-inference/default.nix index 96398e97c713..eacd9f8124d8 100644 --- a/pkgs/development/python-modules/unstructured-inference/default.nix +++ b/pkgs/development/python-modules/unstructured-inference/default.nix @@ -17,7 +17,7 @@ click, httpx, mypy, - pytest-cov, + pytest-cov-stub, pdf2image, }: @@ -58,7 +58,7 @@ buildPythonPackage rec { click httpx mypy - pytest-cov + pytest-cov-stub pdf2image huggingface-hub ]; diff --git a/pkgs/development/python-modules/unstructured/default.nix b/pkgs/development/python-modules/unstructured/default.nix index 6625de40c87c..74667094daa2 100644 --- a/pkgs/development/python-modules/unstructured/default.nix +++ b/pkgs/development/python-modules/unstructured/default.nix @@ -51,7 +51,7 @@ freezegun, # , label-studio-sdk mypy, - pytest-cov, + pytest-cov-stub, pytest-mock, vcrpy, grpcio, @@ -137,7 +137,7 @@ buildPythonPackage { click freezegun mypy - pytest-cov + pytest-cov-stub pytest-mock vcrpy grpcio diff --git a/pkgs/development/python-modules/validator-collection/default.nix b/pkgs/development/python-modules/validator-collection/default.nix index fbec2841fcdb..bd5117f252eb 100644 --- a/pkgs/development/python-modules/validator-collection/default.nix +++ b/pkgs/development/python-modules/validator-collection/default.nix @@ -35,7 +35,7 @@ pyparsing, pytest, pytest-benchmark, - pytest-cov, + pytest-cov-stub, pytz, readme-renderer, requests, @@ -108,7 +108,7 @@ buildPythonPackage rec { pyparsing pytest pytest-benchmark - pytest-cov + pytest-cov-stub pytz readme-renderer requests From 0684b2b042c2ef352b9a1d137908cdad9802ad5b Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:29:18 -0400 Subject: [PATCH 064/252] python312Packages.venusian: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/venusian/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/venusian/default.nix b/pkgs/development/python-modules/venusian/default.nix index 7dd1e7a818f9..2794a7a1699b 100644 --- a/pkgs/development/python-modules/venusian/default.nix +++ b/pkgs/development/python-modules/venusian/default.nix @@ -4,7 +4,7 @@ fetchPypi, isPy27, pytestCheckHook, - pytest-cov, + pytest-cov-stub, setuptools, }: @@ -24,7 +24,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub ]; checkPhase = '' From bf595a9173bc473c9cea43b6a08b98dddadf6545 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 21:29:33 -0400 Subject: [PATCH 065/252] python312Packages.xformers: pytest-cov -> pytest-cov-stub --- pkgs/development/python-modules/xformers/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/xformers/default.nix b/pkgs/development/python-modules/xformers/default.nix index 69c7583c9eac..32f5fb7c6d39 100644 --- a/pkgs/development/python-modules/xformers/default.nix +++ b/pkgs/development/python-modules/xformers/default.nix @@ -10,7 +10,7 @@ torch, # check dependencies pytestCheckHook, - pytest-cov, + pytest-cov-stub, # , pytest-mpi pytest-timeout, # , pytorch-image-models @@ -99,7 +99,7 @@ buildPythonPackage { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub pytest-timeout hydra-core fairscale From 16cbbf66510f4fc496e313ae7e11ce28ea225464 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 18 Oct 2024 07:04:06 +0100 Subject: [PATCH 066/252] cmake: 3.30.4 -> 3.30.5 Changes: https://cmake.org/cmake/help/latest/release/3.30.html#id25 --- pkgs/by-name/cm/cmake/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/cm/cmake/package.nix b/pkgs/by-name/cm/cmake/package.nix index 4ccac7799541..4c94ca9e9f2a 100644 --- a/pkgs/by-name/cm/cmake/package.nix +++ b/pkgs/by-name/cm/cmake/package.nix @@ -48,11 +48,11 @@ stdenv.mkDerivation (finalAttrs: { + lib.optionalString isMinimalBuild "-minimal" + lib.optionalString cursesUI "-cursesUI" + lib.optionalString qt5UI "-qt5UI"; - version = "3.30.4"; + version = "3.30.5"; src = fetchurl { url = "https://cmake.org/files/v${lib.versions.majorMinor finalAttrs.version}/cmake-${finalAttrs.version}.tar.gz"; - hash = "sha256-x1nJcnTx56qq/LHw0mH53pvzpdbst+LfYWMkpG/nBLI="; + hash = "sha256-n1XhpAUI8vKbfgZfoIwp+CxAL6BALag5//5koldVqG0="; }; patches = [ From a59a45073da523548ba0ffd59a936ba4bb29b6d1 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 18 Oct 2024 13:51:07 +0000 Subject: [PATCH 067/252] dav1d: 1.4.3 -> 1.5.0 --- pkgs/development/libraries/dav1d/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/dav1d/default.nix b/pkgs/development/libraries/dav1d/default.nix index d0b77e2477c9..dc7efc22e852 100644 --- a/pkgs/development/libraries/dav1d/default.nix +++ b/pkgs/development/libraries/dav1d/default.nix @@ -26,13 +26,13 @@ assert useVulkan -> withExamples; stdenv.mkDerivation rec { pname = "dav1d"; - version = "1.4.3"; + version = "1.5.0"; src = fetchFromGitHub { owner = "videolan"; repo = pname; rev = version; - hash = "sha256-uudtA9ZpGIpw1yfCzbywFyH7EWYHuXfE6pBb2eksx1g="; + hash = "sha256-eOMQj88vlgoxguV+eK4iWXFjUPiXwqRTJlhehev+yGY="; }; outputs = [ "out" "dev" ]; From d4bc528d44713970bca18c97ba23c01337885978 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 18 Oct 2024 13:20:59 +0300 Subject: [PATCH 068/252] libogg: build shared library Fixes a regression from 04bf3a5a24294b530a985b95ec8aa984c7d339ae --- pkgs/development/libraries/libogg/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/libogg/default.nix b/pkgs/development/libraries/libogg/default.nix index ae104d5f8df3..14ad2231d3bf 100644 --- a/pkgs/development/libraries/libogg/default.nix +++ b/pkgs/development/libraries/libogg/default.nix @@ -28,6 +28,10 @@ stdenv.mkDerivation (finalAttrs: { cmake ]; + cmakeFlags = [ + (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) + ]; + meta = { description = "Media container library to manipulate Ogg files"; longDescription = '' From 77d256a1e18af8107bb8e08731969880c42f3900 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 18 Oct 2024 17:44:36 +0200 Subject: [PATCH 069/252] python312Packages.markupsafe: 3.0.1 -> 3.0.2 https://markupsafe.palletsprojects.com/page/changes/#version-3-0-2 --- pkgs/development/python-modules/markupsafe/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/markupsafe/default.nix b/pkgs/development/python-modules/markupsafe/default.nix index ede8b745c0f7..6e69ea0488c4 100644 --- a/pkgs/development/python-modules/markupsafe/default.nix +++ b/pkgs/development/python-modules/markupsafe/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { pname = "markupsafe"; - version = "3.0.1"; + version = "3.0.2"; pyproject = true; disabled = pythonOlder "3.8"; @@ -28,7 +28,7 @@ buildPythonPackage rec { owner = "pallets"; repo = "markupsafe"; rev = "refs/tags/${version}"; - hash = "sha256-YMvEfrIwGy5Ug4EjkiWOlijEWltWSjJGDrpseH86778="; + hash = "sha256-BqCkQqPhjEx3qB/k3d3fSirR/HDBa7e4kpx3/VSwXJM="; }; build-system = [ setuptools ]; From 15e4102a6a0a006df68a97ddad275e7d7f63c075 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Wed, 9 Oct 2024 21:19:36 +0200 Subject: [PATCH 070/252] vvenc: init at 1.12.0 --- pkgs/by-name/vv/vvenc/package.nix | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pkgs/by-name/vv/vvenc/package.nix diff --git a/pkgs/by-name/vv/vvenc/package.nix b/pkgs/by-name/vv/vvenc/package.nix new file mode 100644 index 000000000000..774645e29ff9 --- /dev/null +++ b/pkgs/by-name/vv/vvenc/package.nix @@ -0,0 +1,48 @@ +{ + lib, + fetchFromGitHub, + stdenv, + gitUpdater, + testers, + cmake, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "vvenc"; + version = "1.12.0"; + + outputs = [ + "out" + "lib" + "dev" + ]; + + src = fetchFromGitHub { + owner = "fraunhoferhhi"; + repo = "vvenc"; + rev = "v${finalAttrs.version}"; + hash = "sha256-C7ApayhubunkXBqJ/EqntaFPn6zk8rZ9fUqg7kbhvAk="; + }; + + nativeBuildInputs = [ cmake ]; + + cmakeFlags = [ + (lib.cmakeBool "VVENC_INSTALL_FULLFEATURE_APP" true) + (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) + ]; + + passthru = { + updateScript = gitUpdater { rev-prefix = "v"; }; + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + }; + + meta = { + homepage = "https://github.com/fraunhoferhhi/vvenc"; + description = "Fraunhofer Versatile Video Encoder"; + license = lib.licenses.bsd3Clear; + mainProgram = "vvencapp"; + pkgConfigModules = [ "libvvenc" ]; + maintainers = with lib.maintainers; [ jopejoe1 ]; + platforms = lib.platforms.all; + }; +}) From cb2ef37af34beee3624db963653a8a36e1170006 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Wed, 9 Oct 2024 22:05:36 +0200 Subject: [PATCH 071/252] lcevcdec: init at 3.2.1 --- pkgs/by-name/lc/lcevcdec/package.nix | 104 +++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 pkgs/by-name/lc/lcevcdec/package.nix diff --git a/pkgs/by-name/lc/lcevcdec/package.nix b/pkgs/by-name/lc/lcevcdec/package.nix new file mode 100644 index 000000000000..20526efebc91 --- /dev/null +++ b/pkgs/by-name/lc/lcevcdec/package.nix @@ -0,0 +1,104 @@ +{ + cmake, + copyPkgconfigItems, + fetchFromGitHub, + fmt, + git, + gitUpdater, + gtest, + lib, + makePkgconfigItem, + pkg-config, + python3, + range-v3, + rapidjson, + stdenv, + testers, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "lcevcdec"; + version = "3.2.1"; + + outputs = [ + "out" + "lib" + "dev" + ]; + + src = fetchFromGitHub { + owner = "v-novaltd"; + repo = "LCEVCdec"; + rev = "refs/tags/${finalAttrs.version}"; + hash = "sha256-Nf0YntB1A3AH0MTXlfUHhxYbzZqeB0EH9Fe9Xrqdsts="; + }; + + postPatch = '' + substituteInPlace cmake/tools/version_files.py \ + --replace-fail "args.git_version" '"${finalAttrs.version}"' \ + --replace-fail "args.git_hash" '"${finalAttrs.src.rev}"' \ + --replace-fail "args.git_date" '"1970-01-01"' + ''; + + env = { + includedir = "${placeholder "dev"}/include"; + libdir = "${placeholder "out"}/lib"; + }; + + pkgconfigItems = [ + (makePkgconfigItem rec { + name = "lcevc_dec"; + inherit (finalAttrs) version; + libs = [ + "-L${variables.libdir}" + "-llcevc_dec_api" + ]; + libsPrivate = [ + "-lpthread" + "-llcevc_dec_core" + ]; + cflags = [ + "-I${variables.includedir}" + ]; + variables = { + prefix = "@dev@"; + includedir = "@includedir@"; + libdir = "@libdir@"; + }; + }) + ]; + + nativeBuildInputs = [ + cmake + python3 + git + pkg-config + copyPkgconfigItems + ]; + + buildInputs = [ + rapidjson + fmt + range-v3 + ]; + + cmakeFlags = [ + (lib.cmakeFeature "VN_SDK_FFMPEG_LIBS_PACKAGE" "") + (lib.cmakeBool "VN_SDK_UNIT_TESTS" false) + (lib.cmakeBool "VN_SDK_SAMPLE_SOURCE" false) + ]; + + passthru = { + updateScript = gitUpdater { }; + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + }; + + meta = { + homepage = "https://github.com/v-novaltd/LCEVCdec"; + description = "MPEG-5 LCEVC Decoder"; + license = lib.licenses.bsd3Clear; + pkgConfigModules = [ "lcevc_dec" ]; + maintainers = with lib.maintainers; [ jopejoe1 ]; + platforms = lib.platforms.all; + }; +}) From 46c012331f624423e3ac968c252eb54ce4558b67 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Wed, 9 Oct 2024 21:48:28 +0200 Subject: [PATCH 072/252] ffmpeg: add vvenc option --- pkgs/development/libraries/ffmpeg/generic.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index e6863e849324..b336948d6fe3 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -127,6 +127,7 @@ , withVpl ? false # Hardware acceleration via intel libvpl , withVpx ? withHeadlessDeps && stdenv.buildPlatform == stdenv.hostPlatform # VP8 & VP9 de/encoding , withVulkan ? withSmallDeps && !stdenv.hostPlatform.isDarwin +, withVvenc ? withFullDeps && lib.versionAtLeast version "7.1" # H.266/VVC encoding , withWebp ? withHeadlessDeps # WebP encoder , withX264 ? withHeadlessDeps && withGPL # H.264/AVC encoder , withX265 ? withHeadlessDeps && withGPL # H.265/HEVC encoder @@ -315,6 +316,7 @@ , vo-amrwbenc , vulkan-headers , vulkan-loader +, vvenc , x264 , x265 , xavs @@ -665,6 +667,9 @@ stdenv.mkDerivation (finalAttrs: { (enableFeature withVorbis "libvorbis") (enableFeature withVpx "libvpx") (enableFeature withVulkan "vulkan") + ] ++ optionals (versionAtLeast version "7.1") [ + (enableFeature withVvenc "libvvenc") + ] ++ [ (enableFeature withWebp "libwebp") (enableFeature withX264 "libx264") (enableFeature withX265 "libx265") @@ -808,6 +813,7 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withVpl [ libvpl ] ++ optionals withVpx [ libvpx ] ++ optionals withVulkan [ vulkan-headers vulkan-loader ] + ++ optionals withVvenc [ vvenc ] ++ optionals withWebp [ libwebp ] ++ optionals withX264 [ x264 ] ++ optionals withX265 [ x265 ] From 22faf0ac9e16a5a2457944be5a42543591addb0c Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Tue, 15 Oct 2024 15:56:42 +0200 Subject: [PATCH 073/252] ffmpeg: add lc3 option --- pkgs/development/libraries/ffmpeg/generic.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index b336948d6fe3..89aa6c64d640 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -75,6 +75,7 @@ , withJack ? withFullDeps && !stdenv.hostPlatform.isDarwin # Jack audio , withJxl ? withFullDeps && lib.versionAtLeast version "5" # JPEG XL de/encoding , withLadspa ? withFullDeps # LADSPA audio filtering +, withLc3 ? withFullDeps && lib.versionAtLeast version "7.1" # LC3 de/encoding , withLcms2 ? withFullDeps # ICC profile support via lcms2 , withLzma ? withHeadlessDeps # xz-utils , withMetal ? false # Unfree and requires manual downloading of files @@ -263,6 +264,7 @@ , libilbc , libjack2 , libjxl +, liblc3 , libmodplug , libmysofa , libopenmpt @@ -603,6 +605,8 @@ stdenv.mkDerivation (finalAttrs: { (enableFeature withJxl "libjxl") ] ++ [ (enableFeature withLadspa "ladspa") + ] ++ optionals (versionAtLeast version "7.1") [ + (enableFeature withLc3 "liblc3") ] ++ optionals (versionAtLeast version "5.1") [ (enableFeature withLcms2 "lcms2") ] ++ [ @@ -766,6 +770,7 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withJack [ libjack2 ] ++ optionals withJxl [ libjxl ] ++ optionals withLadspa [ ladspaH ] + ++ optionals withLc3 [ liblc3 ] ++ optionals withLcms2 [ lcms2 ] ++ optionals withLzma [ xz ] ++ optionals withMfx [ intel-media-sdk ] From fdf2cbdc1c13df3c62d1ff2e48d1e6fbf5384f8f Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Tue, 15 Oct 2024 15:57:04 +0200 Subject: [PATCH 074/252] ffmpeg: add lcevcdec option --- pkgs/development/libraries/ffmpeg/generic.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 89aa6c64d640..bd029d80c890 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -76,6 +76,7 @@ , withJxl ? withFullDeps && lib.versionAtLeast version "5" # JPEG XL de/encoding , withLadspa ? withFullDeps # LADSPA audio filtering , withLc3 ? withFullDeps && lib.versionAtLeast version "7.1" # LC3 de/encoding +, withLcevcdec ? withFullDeps && lib.versionAtLeast version "7.1" # LCEVC decoding , withLcms2 ? withFullDeps # ICC profile support via lcms2 , withLzma ? withHeadlessDeps # xz-utils , withMetal ? false # Unfree and requires manual downloading of files @@ -247,6 +248,7 @@ , intel-media-sdk , ladspaH , lame +, lcevcdec , lcms2 , libaom , libaribcaption @@ -607,6 +609,7 @@ stdenv.mkDerivation (finalAttrs: { (enableFeature withLadspa "ladspa") ] ++ optionals (versionAtLeast version "7.1") [ (enableFeature withLc3 "liblc3") + (enableFeature withLcevcdec "liblcevc-dec") ] ++ optionals (versionAtLeast version "5.1") [ (enableFeature withLcms2 "lcms2") ] ++ [ @@ -771,6 +774,7 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withJxl [ libjxl ] ++ optionals withLadspa [ ladspaH ] ++ optionals withLc3 [ liblc3 ] + ++ optionals withLcevcdec [ lcevcdec ] ++ optionals withLcms2 [ lcms2 ] ++ optionals withLzma [ xz ] ++ optionals withMfx [ intel-media-sdk ] From e266fb9a509e4651b3604bf4009e495c03c2f022 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 21 Oct 2024 06:55:57 +0100 Subject: [PATCH 075/252] iwd: 2.22 -> 3.0 Changes: https://git.kernel.org/pub/scm/network/wireless/iwd.git/tree/ChangeLog?h=3.0 --- pkgs/os-specific/linux/iwd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/iwd/default.nix b/pkgs/os-specific/linux/iwd/default.nix index fdd289722155..cdab250abd96 100644 --- a/pkgs/os-specific/linux/iwd/default.nix +++ b/pkgs/os-specific/linux/iwd/default.nix @@ -13,12 +13,12 @@ stdenv.mkDerivation rec { pname = "iwd"; - version = "2.22"; + version = "3.0"; src = fetchgit { url = "https://git.kernel.org/pub/scm/network/wireless/iwd.git"; rev = version; - hash = "sha256-t2mfBRP/PRlcfeezu3B7myCKXVv9SHeW8HlGK1cO3/I="; + hash = "sha256-pkren8mF0xg5yrkaIrMJ5auq+7w8VAldbgVflE2BmlM="; }; outputs = [ "out" "man" "doc" ] From 9767bb9bf1e6beaf4169e55963d7f44c637d4d22 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Sun, 29 Sep 2024 18:37:00 +0200 Subject: [PATCH 076/252] stdenv/setup: make substituteInPlace require actual files I've often run into substituteInPlace doing nothing when I invoked it wrong, like: substituteInPlace --replace-fail from to file.txt The substitute function would pass file.txt on to substituteStream, which complain about the extraneous argument. However, if no files are passed, substitute is never called and substituteInPlace silently does nothing. It would be more annoying to make substituteInPlace accept file arguments anywhere (since it would need to understand the arguments to substituteStream), so let's error on this incorrect usage instead. Change-Id: Ib2daad6f49bbe516a273a35d7f2a31fc42fd053c --- pkgs/stdenv/generic/setup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 0287b3a90a2a..67dfb1d2f3b8 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -1073,6 +1073,10 @@ substituteInPlace() { fileNames+=("$arg") shift done + if ! [[ "${#fileNames[@]}" -gt 0 ]]; then + echo >&2 "substituteInPlace called without any files to operate on (files must come before options!)" + return 1 + fi for file in "${fileNames[@]}"; do substitute "$file" "$file" "$@" From ba99a7b1efacfe5d2549bdc67e6ba0561860fbbd Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Thu, 10 Oct 2024 18:09:48 +0200 Subject: [PATCH 077/252] numactl: Fix memory corruption in set_nodemask_size --- pkgs/os-specific/linux/numactl/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/numactl/default.nix b/pkgs/os-specific/linux/numactl/default.nix index 142dd064e0f9..4eceef0b2bf1 100644 --- a/pkgs/os-specific/linux/numactl/default.nix +++ b/pkgs/os-specific/linux/numactl/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }: stdenv.mkDerivation rec { pname = "numactl"; @@ -11,6 +11,14 @@ stdenv.mkDerivation rec { hash = "sha256-ry29RUNa0Hv5gIhy2RTVT94mHhgfdIwb5aqjBycxxj0="; }; + patches = [ + # Fix for memory corruption in set_nodemask_size + (fetchpatch { + url = "https://github.com/numactl/numactl/commit/f9deba0c8404529772468d6dd01389f7dbfa5ba9.patch"; + hash = "sha256-TmWfD99YaSIHA5PSsWHE91GSsdsVgVU+qIow7LOwOGw="; + }) + ]; + outputs = [ "out" "dev" "man" ]; nativeBuildInputs = [ autoreconfHook ]; From 3576b958e4397bcfbf8d664286fca8f418c906be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 21 Oct 2024 15:58:56 +0200 Subject: [PATCH 078/252] Reapply "bmake: 20240808 -> 20240921" (PR #349649) This reverts commit 65f28f123e4656ddff8fa6e1864ade99860c6b92. Update moved to staging due to causing rebuilds on staging-next. --- pkgs/by-name/bm/bmake/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/bm/bmake/package.nix b/pkgs/by-name/bm/bmake/package.nix index f18b65c62552..05729f8aa848 100644 --- a/pkgs/by-name/bm/bmake/package.nix +++ b/pkgs/by-name/bm/bmake/package.nix @@ -11,11 +11,11 @@ stdenv.mkDerivation (finalAttrs: { pname = "bmake"; - version = "20240808"; + version = "20240921"; src = fetchurl { url = "https://www.crufty.net/ftp/pub/sjg/bmake-${finalAttrs.version}.tar.gz"; - hash = "sha256-tZGJJRtIPezUSS8fdDh7KlhMA9WqRjfNSLOOxiucCEg="; + hash = "sha256-s0ZXnoLSltGk2ineqFlOPuWWEwsgeG3sDziZo+ESdcI="; }; patches = [ From 52dc9272a140389f392b109b0b171bd6cba1297f Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 21 Oct 2024 16:30:13 +0200 Subject: [PATCH 079/252] meson: 1.5.2 -> 1.6.0 --- .../me/meson/007-case-sensitive-fs.patch | 87 ------------------- .../me/meson/007-freebsd-pkgconfig-path.patch | 13 +-- pkgs/by-name/me/meson/package.nix | 25 +----- 3 files changed, 10 insertions(+), 115 deletions(-) delete mode 100644 pkgs/by-name/me/meson/007-case-sensitive-fs.patch diff --git a/pkgs/by-name/me/meson/007-case-sensitive-fs.patch b/pkgs/by-name/me/meson/007-case-sensitive-fs.patch deleted file mode 100644 index 54d07d85585c..000000000000 --- a/pkgs/by-name/me/meson/007-case-sensitive-fs.patch +++ /dev/null @@ -1,87 +0,0 @@ -From a6fb2c165cda4bbf315424c96165ec9cc7052363 Mon Sep 17 00:00:00 2001 -From: Randy Eckenrode -Date: Wed, 3 Apr 2024 17:35:56 -0400 -Subject: [PATCH] dependencies: find extraframeworks on case-sensitive - filesystems - -Fixes a test failure on case-sensitive filesystems when a CMake -dependency is turned into an Apple framework. ---- - mesonbuild/dependencies/framework.py | 9 +++++++-- - test cases/osx/11 case sensitive apfs/meson.build | 5 +++++ - test cases/osx/11 case sensitive apfs/prog.c | 3 +++ - test cases/osx/11 case sensitive apfs/test.json | 5 +++++ - 4 files changed, 20 insertions(+), 2 deletions(-) - create mode 100644 test cases/osx/11 case sensitive apfs/meson.build - create mode 100644 test cases/osx/11 case sensitive apfs/prog.c - create mode 100644 test cases/osx/11 case sensitive apfs/test.json - -diff --git a/mesonbuild/dependencies/framework.py b/mesonbuild/dependencies/framework.py -index 3c880c7430af..1fbd628235ba 100644 ---- a/mesonbuild/dependencies/framework.py -+++ b/mesonbuild/dependencies/framework.py -@@ -47,6 +47,7 @@ def detect(self, name: str, paths: T.List[str]) -> None: - framework_path = self._get_framework_path(p, name) - if framework_path is None: - continue -+ framework_name = framework_path.stem - # We want to prefer the specified paths (in order) over the system - # paths since these are "extra" frameworks. - # For example, Python2's framework is in /System/Library/Frameworks and -@@ -54,11 +55,15 @@ def detect(self, name: str, paths: T.List[str]) -> None: - # Python.framework. We need to know for sure that the framework was - # found in the path we expect. - allow_system = p in self.system_framework_paths -- args = self.clib_compiler.find_framework(name, self.env, [p], allow_system) -+ args = self.clib_compiler.find_framework(framework_name, self.env, [p], allow_system) - if args is None: - continue - self.link_args = args - self.framework_path = framework_path.as_posix() -+ # The search is done case-insensitively, so the found name may differ -+ # from the one that was requested. Setting the name ensures the correct -+ # one is used when linking on case-sensitive filesystems. -+ self.name = framework_name - self.compile_args = ['-F' + self.framework_path] - # We need to also add -I includes to the framework because all - # cross-platform projects such as OpenGL, Python, Qt, GStreamer, -@@ -74,7 +79,7 @@ def _get_framework_path(self, path: str, name: str) -> T.Optional[Path]: - p = Path(path) - lname = name.lower() - for d in p.glob('*.framework/'): -- if lname == d.name.rsplit('.', 1)[0].lower(): -+ if lname == d.stem.lower(): - return d - return None - -diff --git a/test cases/osx/11 case sensitive apfs/meson.build b/test cases/osx/11 case sensitive apfs/meson.build -new file mode 100644 -index 000000000000..dd566b185f28 ---- /dev/null -+++ b/test cases/osx/11 case sensitive apfs/meson.build -@@ -0,0 +1,5 @@ -+project('case-sensitive APFS with extra frameworks test', 'c') -+ -+dep = dependency('FoUnDaTiOn') -+ -+exe = executable('prog', 'prog.c', install : true, dependencies: dep) -diff --git a/test cases/osx/11 case sensitive apfs/prog.c b/test cases/osx/11 case sensitive apfs/prog.c -new file mode 100644 -index 000000000000..9b6bdc2ec2f0 ---- /dev/null -+++ b/test cases/osx/11 case sensitive apfs/prog.c -@@ -0,0 +1,3 @@ -+int main(void) { -+ return 0; -+} -diff --git a/test cases/osx/11 case sensitive apfs/test.json b/test cases/osx/11 case sensitive apfs/test.json -new file mode 100644 -index 000000000000..a883714eaa27 ---- /dev/null -+++ b/test cases/osx/11 case sensitive apfs/test.json -@@ -0,0 +1,5 @@ -+{ -+ "installed": [ -+ {"type": "file", "file": "usr/bin/prog"} -+ ] -+} diff --git a/pkgs/by-name/me/meson/007-freebsd-pkgconfig-path.patch b/pkgs/by-name/me/meson/007-freebsd-pkgconfig-path.patch index 3a9ba6f092dd..8eb172bb1256 100644 --- a/pkgs/by-name/me/meson/007-freebsd-pkgconfig-path.patch +++ b/pkgs/by-name/me/meson/007-freebsd-pkgconfig-path.patch @@ -1,15 +1,16 @@ -diff -ur a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py ---- a/mesonbuild/modules/pkgconfig.py 2024-05-17 17:52:30.880877000 -0700 -+++ b/mesonbuild/modules/pkgconfig.py 2024-05-17 17:53:10.901068000 -0700 -@@ -693,10 +693,7 @@ +diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py +index 1bdf82931..db165ea12 100644 +--- a/mesonbuild/modules/pkgconfig.py ++++ b/mesonbuild/modules/pkgconfig.py +@@ -701,10 +701,7 @@ class PkgConfigModule(NewExtensionModule): pcfile = filebase + '.pc' pkgroot = pkgroot_name = kwargs['install_dir'] or default_install_dir if pkgroot is None: - if mesonlib.is_freebsd(): -- pkgroot = os.path.join(_as_str(state.environment.coredata.get_option(mesonlib.OptionKey('prefix'))), 'libdata', 'pkgconfig') +- pkgroot = os.path.join(_as_str(state.environment.coredata.get_option(OptionKey('prefix'))), 'libdata', 'pkgconfig') - pkgroot_name = os.path.join('{prefix}', 'libdata', 'pkgconfig') - elif mesonlib.is_haiku(): + if mesonlib.is_haiku(): - pkgroot = os.path.join(_as_str(state.environment.coredata.get_option(mesonlib.OptionKey('prefix'))), 'develop', 'lib', 'pkgconfig') + pkgroot = os.path.join(_as_str(state.environment.coredata.get_option(OptionKey('prefix'))), 'develop', 'lib', 'pkgconfig') pkgroot_name = os.path.join('{prefix}', 'develop', 'lib', 'pkgconfig') else: diff --git a/pkgs/by-name/me/meson/package.nix b/pkgs/by-name/me/meson/package.nix index d463190fec08..419e489e2b2e 100644 --- a/pkgs/by-name/me/meson/package.nix +++ b/pkgs/by-name/me/meson/package.nix @@ -13,7 +13,6 @@ , python3 , substituteAll , zlib -, fetchpatch }: let @@ -21,13 +20,13 @@ let in python3.pkgs.buildPythonApplication rec { pname = "meson"; - version = "1.5.2"; + version = "1.6.0"; src = fetchFromGitHub { owner = "mesonbuild"; repo = "meson"; rev = "refs/tags/${version}"; - hash = "sha256-cesMepnD3fHX2CwnSQ3c5TE9kPSa0FkCVVVZDgXwo8M="; + hash = "sha256-st0dbb+GfF0KEyF+Qn/PIE2462ZrrXy8YcnrulHTI8M="; }; patches = [ @@ -74,24 +73,6 @@ python3.pkgs.buildPythonApplication rec { # This edge case is explicitly part of meson but is wrong for nix ./007-freebsd-pkgconfig-path.patch - - (fetchpatch { - name = "tests-skip-framework-recasting-if-CMake-unavailable.patch"; - url = "https://github.com/mesonbuild/meson/commit/8a8a3a0578fd8d5a8720a7a706f6f3b99e857f9c.patch"; - hash = "sha256-XkwNQ5eg/fVekhsFg/V2/S2LbIVGz3H0wsSFlUT3ZZE="; - }) - - # Fix extraframework lookup on case-sensitive APFS. - # https://github.com/mesonbuild/meson/pull/13038 - ./007-case-sensitive-fs.patch - - # Fix meson's detection for zig's linker - # https://github.com/mesonbuild/meson/pull/12293 - (fetchpatch { - name = "linker-support-zig-cc.patch"; - url = "https://github.com/mesonbuild/meson/pull/12293/commits/2baae244c995794d9addfe6ed924dfa72f01be82.patch"; - hash = "sha256-dDOmSRBKl/gs7I3kmLXIyQk3zsOdlaYov72pPSel4+I="; - }) ]; buildInputs = lib.optionals (python3.pythonOlder "3.9") [ @@ -129,7 +110,7 @@ python3.pkgs.buildPythonApplication rec { patchShebangs 'test cases' substituteInPlace \ 'test cases/native/8 external program shebang parsing/script.int.in' \ - 'test cases/common/273 customtarget exe for test/generate.py' \ + 'test cases/common/274 customtarget exe for test/generate.py' \ --replace /usr/bin/env ${coreutils}/bin/env '' ] From 1ceba9367c27ec3586766df242081ef55ba56f66 Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Wed, 18 Sep 2024 21:54:02 +0200 Subject: [PATCH 080/252] meson/setup-hook.sh: make build directory configurable --- doc/hooks/meson.section.md | 10 ++++++++++ pkgs/by-name/me/meson/setup-hook.sh | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/hooks/meson.section.md b/doc/hooks/meson.section.md index 3a7fb5032082..c3cd89b12e89 100644 --- a/doc/hooks/meson.section.md +++ b/doc/hooks/meson.section.md @@ -18,6 +18,16 @@ setup hook registering ninja-based build and install phases. Controls the flags passed to `meson setup` during configure phase. +#### `mesonBuildDir` {#meson-build-dir} + +Directory where Meson will put intermediate files. + +Setting this can be useful for debugging multiple Meson builds while in the same source directory, for example, when building for different platforms. +Different values for each build will prevent build artefacts from interefering with each other. +This setting has no tangible effect when running the build in a sandboxed derivation. + +The default value is `build`. + #### `mesonWrapMode` {#meson-wrap-mode} Which value is passed as diff --git a/pkgs/by-name/me/meson/setup-hook.sh b/pkgs/by-name/me/meson/setup-hook.sh index 55ea8b5c1d97..a88a276f09a8 100644 --- a/pkgs/by-name/me/meson/setup-hook.sh +++ b/pkgs/by-name/me/meson/setup-hook.sh @@ -3,6 +3,8 @@ mesonConfigurePhase() { runHook preConfigure + : ${mesonBuildDir:=build} + local flagsArray=() if [ -z "${dontAddPrefix-}" ]; then @@ -28,8 +30,8 @@ mesonConfigurePhase() { echoCmd 'mesonConfigurePhase flags' "${flagsArray[@]}" - meson setup build "${flagsArray[@]}" - cd build || { echoCmd 'mesonConfigurePhase' "could not cd to build"; exit 1; } + meson setup "$mesonBuildDir" "${flagsArray[@]}" + cd "$mesonBuildDir" || { echoCmd 'mesonConfigurePhase' "could not cd to $mesonBuildDir"; exit 1; } if ! [[ -v enableParallelBuilding ]]; then enableParallelBuilding=1 From e6f4812da2d393f7446b3f91fae69a7d85894d42 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Mon, 21 Oct 2024 09:32:03 -0700 Subject: [PATCH 081/252] tinyxxd: 1.3.5 -> 1.3.6 Diff: https://github.com/xyproto/tinyxxd/compare/v1.3.5...v1.3.6 --- pkgs/by-name/ti/tinyxxd/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ti/tinyxxd/package.nix b/pkgs/by-name/ti/tinyxxd/package.nix index a19f9d7ef3f3..2da810f16614 100644 --- a/pkgs/by-name/ti/tinyxxd/package.nix +++ b/pkgs/by-name/ti/tinyxxd/package.nix @@ -8,13 +8,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "tinyxxd"; - version = "1.3.5"; + version = "1.3.6"; src = fetchFromGitHub { repo = "tinyxxd"; owner = "xyproto"; rev = "v${finalAttrs.version}"; - hash = "sha256-W7BrQga98ACrhTHF3UlGQMRmcdJaxgorDP6FpD5mr2A="; + hash = "sha256-SPKDowZrr1m9DiL7p8pKHKJuahEiwCmW5VhuE314Otw="; }; nativeBuildInputs = [ installShellFiles ]; From 72413bfe89d7499f0b9aa1b9e5cb6a93485a6c7d Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 21 Oct 2024 20:05:35 +0200 Subject: [PATCH 082/252] binutils: make patches unconditional The Darwin patch was always supposed to be unconditional, and neither of these patches should have any effect when applied to other targets. Conditional application should be avoided where possible as it makes it very easy to miss when a patch needs to be updated. --- .../tools/misc/binutils/default.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 1e465654badd..4d90fa66ea7d 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -72,18 +72,18 @@ stdenv.mkDerivation (finalAttrs: { # not need to know binutils' BINDIR at all. It's an absolute path # where libraries are stored. ./plugins-no-BINDIR.patch - ] ++ lib.optionals hostPlatform.isDarwin [ - # Note: Conditional to avoid Linux rebuilds on staging-next. Remove the conditional with the next update. + # ld64 needs `-undefined dynamic_lookup` to link `libctf-nobfd.dylib`, but the Darwin # version detection in `libtool.m4` fails to detect the Darwin version correctly. ./0001-libtool.m4-update-macos-version-detection-block.patch - ] - # Adds AVR-specific options to "size" for compatibility with Atmel's downstream distribution - # Patch from arch-community - # https://github.com/archlinux/svntogit-community/blob/c8d53dd1734df7ab15931f7fad0c9acb8386904c/trunk/avr-size.patch - ++ lib.optional targetPlatform.isAvr ./avr-size.patch - ++ lib.optional stdenv.targetPlatform.isWindows ./windres-locate-gcc.patch - ; + + # Adds AVR-specific options to "size" for compatibility with Atmel's downstream distribution + # Patch from arch-community + # https://github.com/archlinux/svntogit-community/blob/c8d53dd1734df7ab15931f7fad0c9acb8386904c/trunk/avr-size.patch + ./avr-size.patch + + ./windres-locate-gcc.patch + ]; outputs = [ "out" "info" "man" "dev" ] # Ideally we would like to always install 'lib' into a separate From 985072e2ce4afa4201b49a20154fcc888aaccec5 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 18 Oct 2024 20:50:27 +0300 Subject: [PATCH 083/252] cc-wrapper: Hardcode path to `mktemp` and `rm` if possible These commands are run after the path backup is restored Co-authored-by: IlyaNiklyaev --- pkgs/build-support/cc-wrapper/cc-wrapper.sh | 4 ++-- pkgs/build-support/cc-wrapper/default.nix | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh index 4cc661721f44..a539f9da4318 100644 --- a/pkgs/build-support/cc-wrapper/cc-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh @@ -251,8 +251,8 @@ if [[ -e @out@/nix-support/cc-wrapper-hook ]]; then fi if (( "${NIX_CC_USE_RESPONSE_FILE:-@use_response_file_by_default@}" >= 1 )); then - responseFile=$(mktemp "${TMPDIR:-/tmp}/cc-params.XXXXXX") - trap 'rm -f -- "$responseFile"' EXIT + responseFile=$(@mktemp@ "${TMPDIR:-/tmp}/cc-params.XXXXXX") + trap '@rm@ -f -- "$responseFile"' EXIT printf "%q\n" \ ${extraBefore+"${extraBefore[@]}"} \ ${params+"${params[@]}"} \ diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 01f91b408e38..37eb6692e731 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -741,6 +741,8 @@ stdenvNoCC.mkDerivation { # TODO(@sternenseemann): rename env var via stdenv rebuild shell = getBin runtimeShell + runtimeShell.shellPath or ""; gnugrep_bin = optionalString (!nativeTools) gnugrep; + rm = if nativeTools then "rm" else lib.getExe' coreutils "rm"; + mktemp = if nativeTools then "mktemp" else lib.getExe' coreutils "mktemp"; # stdenv.cc.cc should not be null and we have nothing better for now. # if the native impure bootstrap is gotten rid of this can become `inherit cc;` again. cc = optionalString (!nativeTools) cc; From 62f2fc1ae5f6e99d5aa5ae2829730c73a65cf7ed Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 19 Oct 2024 00:31:24 +0300 Subject: [PATCH 084/252] tests.cc-wrapper: Add `NIX_CC_USE_RESPONSE_FILE` check --- pkgs/test/cc-wrapper/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/test/cc-wrapper/default.nix b/pkgs/test/cc-wrapper/default.nix index 9e25be460e25..61d65784f5b9 100644 --- a/pkgs/test/cc-wrapper/default.nix +++ b/pkgs/test/cc-wrapper/default.nix @@ -131,6 +131,9 @@ in stdenv.mkDerivation { ASAN_OPTIONS=use_sigaltstack=0 ${emulator} ./sanitizers ''} + echo "Check whether CC with NIX_CC_USE_RESPONSE_FILE hardcodes all required binaries..." >&2 + NIX_CC_USE_RESPONSE_FILE=1 ${CC} -v + touch $out ''; From ca81d85c856c1d9435ac1a5c5a2f38fa5b443a2d Mon Sep 17 00:00:00 2001 From: scraptux Date: Tue, 22 Oct 2024 10:50:55 +0200 Subject: [PATCH 085/252] grpc: 1.62.1 -> 1.67.0 --- pkgs/development/libraries/grpc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index 948048895700..3fa4f5492d31 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { pname = "grpc"; - version = "1.66.1"; # N.B: if you change this, please update: + version = "1.67.0"; # N.B: if you change this, please update: # pythonPackages.grpcio-tools # pythonPackages.grpcio-status @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { owner = "grpc"; repo = "grpc"; rev = "v${version}"; - hash = "sha256-CmQUUbIYPWRS7q7OX+TmkTvoqtJAUEwhL/lev8JdB8U="; + hash = "sha256-NjoSm3ZiHqe0QeVRFWO2FheoOzKjSX2oyiCM3qNUxhM="; fetchSubmodules = true; }; From f922c45fded80b7371a637203afd7bdd7dad5cbe Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 22 Oct 2024 12:34:32 +0200 Subject: [PATCH 086/252] nspr: 4.35 -> 4.36 https://groups.google.com/a/mozilla.org/g/dev-tech-crypto/c/FhX0-10xYrI --- pkgs/development/libraries/nspr/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/nspr/default.nix b/pkgs/development/libraries/nspr/default.nix index efea4a4cc81f..1f126d256870 100644 --- a/pkgs/development/libraries/nspr/default.nix +++ b/pkgs/development/libraries/nspr/default.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation rec { pname = "nspr"; - version = "4.35"; + version = "4.36"; src = fetchurl { url = "mirror://mozilla/nspr/releases/v${version}/src/nspr-${version}.tar.gz"; - hash = "sha256-fqMpfqWWm10lpd2NR/JEPNqI6e50YwH24eFCb4pqvI8="; + hash = "sha256-Vd7DF/FAHNLl26hE00C5MKt1R/gYF5pAArzmLm8caJU="; }; patches = [ From 19ac92c619b942bf4a8bb3b236c82fdff0adc895 Mon Sep 17 00:00:00 2001 From: scraptux Date: Tue, 22 Oct 2024 10:51:39 +0200 Subject: [PATCH 087/252] python312Packages.grpcio-channelz: 1.66.2 -> 1.67.0 --- pkgs/development/python-modules/grpcio-channelz/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/grpcio-channelz/default.nix b/pkgs/development/python-modules/grpcio-channelz/default.nix index 4d5662509e06..dc73ee462b68 100644 --- a/pkgs/development/python-modules/grpcio-channelz/default.nix +++ b/pkgs/development/python-modules/grpcio-channelz/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "grpcio-channelz"; - version = "1.66.2"; + version = "1.67.0"; pyproject = true; src = fetchPypi { pname = "grpcio_channelz"; inherit version; - hash = "sha256-SQTHg3UjQ2YkiV2QYmlPKQt/Mzg7KWoex8SXtuTH7Rk="; + hash = "sha256-F2Jfq6lOYn4RsjP9Ay21G67F6HkGeY3SIEk26Z0BWnE="; }; build-system = [ setuptools ]; From e1b88807433c5abbd98b829abf5283f67596370f Mon Sep 17 00:00:00 2001 From: scraptux Date: Tue, 22 Oct 2024 10:52:17 +0200 Subject: [PATCH 088/252] python312Packages.grpcio-health-checking: 1.66.2 -> 1.67.0 --- .../python-modules/grpcio-health-checking/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/grpcio-health-checking/default.nix b/pkgs/development/python-modules/grpcio-health-checking/default.nix index e7b6f49f158b..c235e46bee7e 100644 --- a/pkgs/development/python-modules/grpcio-health-checking/default.nix +++ b/pkgs/development/python-modules/grpcio-health-checking/default.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "grpcio-health-checking"; - version = "1.66.2"; + version = "1.67.0"; format = "setuptools"; src = fetchPypi { pname = "grpcio_health_checking"; inherit version; - hash = "sha256-yQ35YiRWBC7DSV03qzC190ckqsW11VMU8HPu9eJHChM="; + hash = "sha256-PepxXVboJQ/wW6Se9RF/g2skD/N5vkY2DCbO/ZydsRo="; }; propagatedBuildInputs = [ From 2853e86dfd45652cd1f5dbdd1e77c759c1e661c9 Mon Sep 17 00:00:00 2001 From: scraptux Date: Tue, 22 Oct 2024 10:52:35 +0200 Subject: [PATCH 089/252] python312Packages.grpcio-reflection: 1.66.2 -> 1.67.0 --- pkgs/development/python-modules/grpcio-reflection/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/grpcio-reflection/default.nix b/pkgs/development/python-modules/grpcio-reflection/default.nix index 35fb1faaeaef..804e1fe65655 100644 --- a/pkgs/development/python-modules/grpcio-reflection/default.nix +++ b/pkgs/development/python-modules/grpcio-reflection/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "grpcio-reflection"; - version = "1.66.2"; + version = "1.67.0"; pyproject = true; src = fetchPypi { pname = "grpcio_reflection"; inherit version; - hash = "sha256-rdgn4t61bpaAPIKs4dTnf6DI7DdH1jmOmVH3OdcQZ9Q="; + hash = "sha256-xHFDc4sYl7bOSvXg4zjIXJruX9y7M1XTaKjcrkbYkzw="; }; build-system = [ setuptools ]; From 0bddc71698b5594a58b342bf55abe141929ff4a6 Mon Sep 17 00:00:00 2001 From: scraptux Date: Tue, 22 Oct 2024 10:52:50 +0200 Subject: [PATCH 090/252] python312Packages.grpcio-status: 1.64.1 -> 1.67.0 --- pkgs/development/python-modules/grpcio-status/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/grpcio-status/default.nix b/pkgs/development/python-modules/grpcio-status/default.nix index 89c02c344dd7..e6c03a04a1fe 100644 --- a/pkgs/development/python-modules/grpcio-status/default.nix +++ b/pkgs/development/python-modules/grpcio-status/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "grpcio-status"; - version = "1.66.2"; + version = "1.67.0"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -18,7 +18,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "grpcio_status"; inherit version; - hash = "sha256-+1XLtcLmcGL3pNXJnkidB0+1fphnjVw8ZpKi102J6a4="; + hash = "sha256-w+Wob6AH6eJjzV+YioqQdITaTKq1godOoqSmCSc0BGs="; }; postPatch = '' From 2a4535cc10bc7a06db9fa06a40f43445da7f4ef5 Mon Sep 17 00:00:00 2001 From: scraptux Date: Tue, 22 Oct 2024 10:53:03 +0200 Subject: [PATCH 091/252] python312Packages.grpcio-testing: 1.66.2 -> 1.67.0 --- pkgs/development/python-modules/grpcio-testing/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/grpcio-testing/default.nix b/pkgs/development/python-modules/grpcio-testing/default.nix index cabad7a8cfbe..ed4fcdb36114 100644 --- a/pkgs/development/python-modules/grpcio-testing/default.nix +++ b/pkgs/development/python-modules/grpcio-testing/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "grpcio-testing"; - version = "1.66.2"; + version = "1.67.0"; pyproject = true; disabled = pythonOlder "3.7"; @@ -18,7 +18,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "grpcio_testing"; inherit version; - hash = "sha256-pje9w7MSutXZKQd2dP0TS0zJbkm0P39OwQVLR28ZRgQ="; + hash = "sha256-YVRnu0aObDSfYCIKlrvMKin70hmwDdip96I+Qyi7+Dw="; }; postPatch = '' From 6b5a8cb3f462b163674ab883bdffcda9c24f4940 Mon Sep 17 00:00:00 2001 From: scraptux Date: Tue, 22 Oct 2024 10:53:19 +0200 Subject: [PATCH 092/252] python312Packages.grpcio-tools: 1.65.1 -> 1.67.0 --- pkgs/development/python-modules/grpcio-tools/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/grpcio-tools/default.nix b/pkgs/development/python-modules/grpcio-tools/default.nix index 50b243cdf3d2..9fa12e405e14 100644 --- a/pkgs/development/python-modules/grpcio-tools/default.nix +++ b/pkgs/development/python-modules/grpcio-tools/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "grpcio-tools"; - version = "1.66.2"; - format = "setuptools"; + version = "1.67.0"; + pyproject = true; src = fetchPypi { pname = "grpcio_tools"; inherit version; - hash = "sha256-SjbgeRPSa6XM/SaFumPKl/JrCMJJ0syedN2jfvpJ1+Q="; + hash = "sha256-GBs9TmG4MULBguw2bzB5sAI1CXQ5huVMlGXKOMrCVfg="; }; outputs = [ From da16a24f0aff890f114d545b7d5fee89f458dc8b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 19 Oct 2024 10:56:52 +0200 Subject: [PATCH 093/252] python312Packages.grpcio: 1.64.1 -> 1.67.0 Changelog: https://github.com/grpc/grpc/releases/tag/v1.67.0 --- .../python-modules/grpcio/default.nix | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/pkgs/development/python-modules/grpcio/default.nix b/pkgs/development/python-modules/grpcio/default.nix index 8cff17c81eb4..976b3e9c2736 100644 --- a/pkgs/development/python-modules/grpcio/default.nix +++ b/pkgs/development/python-modules/grpcio/default.nix @@ -2,24 +2,24 @@ lib, stdenv, buildPythonPackage, + c-ares, + cython, fetchPypi, grpc, - six, - protobuf, - enum34 ? null, - futures ? null, - isPy27, - pkg-config, - cython, - c-ares, openssl, + pkg-config, + protobuf, + pythonOlder, + setuptools, zlib, }: buildPythonPackage rec { pname = "grpcio"; - format = "setuptools"; - version = "1.66.2"; + version = "1.67.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; @@ -31,6 +31,8 @@ buildPythonPackage rec { "dev" ]; + build-system = [ setuptools ]; + nativeBuildInputs = [ cython pkg-config @@ -41,15 +43,8 @@ buildPythonPackage rec { openssl zlib ]; - propagatedBuildInputs = - [ - six - protobuf - ] - ++ lib.optionals (isPy27) [ - enum34 - futures - ]; + + dependencies = [ protobuf ]; preBuild = '' @@ -76,8 +71,9 @@ buildPythonPackage rec { meta = with lib; { description = "HTTP/2-based RPC framework"; - license = licenses.asl20; homepage = "https://grpc.io/grpc/python/"; + changelog = "https://github.com/grpc/grpc/releases/tag/v${version}"; + license = licenses.asl20; maintainers = [ ]; }; } From 07aa0b864b9e3852006aad9f75cafdcc3ac9ab21 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 23 Oct 2024 01:25:21 +0000 Subject: [PATCH 094/252] nghttp2: 1.63.0 -> 1.64.0 --- pkgs/development/libraries/nghttp2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/nghttp2/default.nix b/pkgs/development/libraries/nghttp2/default.nix index 77de8633b917..64e1e255c30b 100644 --- a/pkgs/development/libraries/nghttp2/default.nix +++ b/pkgs/development/libraries/nghttp2/default.nix @@ -32,11 +32,11 @@ assert enableJemalloc -> enableApp; stdenv.mkDerivation rec { pname = "nghttp2"; - version = "1.63.0"; + version = "1.64.0"; src = fetchurl { url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-${version}.tar.bz2"; - sha256 = "sha256-YHsXRVTSKoKLxTLR1zT+D3KbXV7SB/LxLpamLoPynFU="; + sha256 = "sha256-OmcN83joUrhaIpXyXk9RzCj1bg/MSWQIuMN2QpBTevU="; }; outputs = [ "out" "dev" "lib" "doc" "man" ]; From 5f6c78c303e281fbd13ff75d5d32ef39b71333d3 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 23 Oct 2024 09:53:19 +0200 Subject: [PATCH 095/252] protobuf: 28.2 -> 28.3 Diff: https://github.com/protocolbuffers/protobuf/compare/v28.2...v28.3 Changelog: https://github.com/protocolbuffers/protobuf/releases/tag/v28.3 --- pkgs/development/libraries/protobuf/28.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/protobuf/28.nix b/pkgs/development/libraries/protobuf/28.nix index 340bac0ffe43..ae6940fa050e 100644 --- a/pkgs/development/libraries/protobuf/28.nix +++ b/pkgs/development/libraries/protobuf/28.nix @@ -2,8 +2,8 @@ callPackage ./generic.nix ( { - version = "28.2"; - hash = "sha256-+ogjfmsbPUhqETJyHxoc1gYW/7a/JMc5l1gb/7WDqLE="; + version = "28.3"; + hash = "sha256-+bb5RxITzxuX50ItmpQhWEG1kMfvlizWTMJJzwlhhYM="; } // args ) From 2c59da55cb1a4c9f30d7f88e4ea6835b71691237 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 23 Oct 2024 09:54:31 +0200 Subject: [PATCH 096/252] python312Packages.protobuf: 5.28.2 -> 5.28.3 --- pkgs/development/python-modules/protobuf/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/protobuf/default.nix b/pkgs/development/python-modules/protobuf/default.nix index 228f8140fbe6..8e0cc3cc7a51 100644 --- a/pkgs/development/python-modules/protobuf/default.nix +++ b/pkgs/development/python-modules/protobuf/default.nix @@ -8,12 +8,12 @@ buildPythonPackage rec { pname = "protobuf"; - version = "5.28.2"; + version = "5.28.3"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-WTeWdP8RlxdAT3RUZHkTeHA08D/nBJy+8ddKl7tFk/A="; + hash = "sha256-ZLrbxJGApeQB83P5znqx0Ytj991KnNxDySufC0gc73s="; }; build-system = [ setuptools ]; From 5b4cc3f8048a9f1c35862fe132fca5242b027344 Mon Sep 17 00:00:00 2001 From: K900 Date: Wed, 23 Oct 2024 17:16:01 +0300 Subject: [PATCH 097/252] pipewire: 1.2.5 -> 1.2.6 Diff: https://gitlab.freedesktop.org/pipewire/pipewire/-/compare/1.2.5...1.2.6 Changelog: https://gitlab.freedesktop.org/pipewire/pipewire/-/releases/1.2.6 --- pkgs/development/libraries/pipewire/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix index 6d5a19409b69..f8735c294a07 100644 --- a/pkgs/development/libraries/pipewire/default.nix +++ b/pkgs/development/libraries/pipewire/default.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation(finalAttrs: { pname = "pipewire"; - version = "1.2.5"; + version = "1.2.6"; outputs = [ "out" @@ -75,7 +75,7 @@ stdenv.mkDerivation(finalAttrs: { owner = "pipewire"; repo = "pipewire"; rev = finalAttrs.version; - sha256 = "sha256-cYzcEit5zW29GYhvH/pTXqnYFi6AEaS5wl8nD74eWVY="; + sha256 = "sha256-AmrbA1YQBeETLC9u9rQ2f85rG9TASvcbCZ/Xlz7ICdY="; }; patches = [ From 5aa080a4906bac66c70a67b940269dab503b1746 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Tue, 22 Oct 2024 21:16:48 +0200 Subject: [PATCH 098/252] upower: Fix a race condition in test_sibling_priority_no_overwrite --- pkgs/os-specific/linux/upower/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/os-specific/linux/upower/default.nix b/pkgs/os-specific/linux/upower/default.nix index 5b4e4ede7b56..5f2321bb407f 100644 --- a/pkgs/os-specific/linux/upower/default.nix +++ b/pkgs/os-specific/linux/upower/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitLab +, fetchpatch , makeWrapper , pkg-config , libxslt @@ -53,6 +54,13 @@ stdenv.mkDerivation (finalAttrs: { ./i686-test-remove-battery-check.patch ] ++ [ ./installed-tests-path.patch + + # Fix a race condition in test_sibling_priority_no_overwrite + # Remove when updating to > 1.90.6 + (fetchpatch { + url = "https://gitlab.freedesktop.org/upower/upower/-/commit/9ee76826bd41a5d3a377dfd6f5835f42ec50be9a.patch"; + hash = "sha256-E56iz/iHn+VM7Opo0a13A5nhnB9nf6C7Y1kyWzk4ZnU="; + }) ]; strictDeps = true; From ae207af82b4c38b878a8928d2d54454a6f6bf387 Mon Sep 17 00:00:00 2001 From: piegames Date: Wed, 23 Oct 2024 21:52:18 +0200 Subject: [PATCH 099/252] treewide: More string indentation fixes Follow-up on #350296 with the packages that cause big rebuilds and need to go through staging. --- .../version-management/git/default.nix | 15 ++++---- pkgs/by-name/cu/cue/validator.nix | 4 +-- .../development/compilers/flutter/wrapper.nix | 3 +- pkgs/development/compilers/gcc/default.nix | 3 +- .../haskell-modules/configuration-nix.nix | 2 +- pkgs/development/libraries/check/default.nix | 16 ++++----- .../development/libraries/clutter/default.nix | 24 ++++++------- pkgs/development/libraries/glibc/common.nix | 14 ++++---- pkgs/development/libraries/gmp/4.3.2.nix | 4 +-- pkgs/development/libraries/gmp/5.1.x.nix | 4 +-- pkgs/development/libraries/gmp/6.x.nix | 36 +++++++++---------- pkgs/development/libraries/gnutls/default.nix | 3 +- pkgs/development/libraries/libmpc/default.nix | 10 +++--- .../build-managers/bazel/bazel_7/tests.nix | 2 +- pkgs/development/tools/misc/gdb/default.nix | 8 ++--- .../tools/misc/gengetopt/default.nix | 10 +++--- pkgs/tools/archivers/sharutils/default.nix | 4 +-- pkgs/tools/compression/brotli/default.nix | 22 ++++++------ pkgs/tools/compression/gzip/default.nix | 20 +++++------ pkgs/tools/compression/xz/default.nix | 24 ++++++------- 20 files changed, 117 insertions(+), 111 deletions(-) diff --git a/pkgs/applications/version-management/git/default.nix b/pkgs/applications/version-management/git/default.nix index 1b4f736ed63f..57779cb487d0 100644 --- a/pkgs/applications/version-management/git/default.nix +++ b/pkgs/applications/version-management/git/default.nix @@ -245,10 +245,11 @@ stdenv.mkDerivation (finalAttrs: { + (if svnSupport then '' # wrap git-svn - wrapProgram $out/libexec/git-core/git-svn \ - --set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath (perlLibs ++ [svn.out])}" \ - --prefix PATH : "${svn.out}/bin" '' - else '' # replace git-svn by notification script + wrapProgram $out/libexec/git-core/git-svn \ + --set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath (perlLibs ++ [svn.out])}" \ + --prefix PATH : "${svn.out}/bin" + '' else '' + # replace git-svn by notification script notSupported $out/libexec/git-core/git-svn '') @@ -261,9 +262,11 @@ stdenv.mkDerivation (finalAttrs: { notSupported $out/libexec/git-core/git-send-email '') - + lib.optionalString withManual ''# Install man pages + + lib.optionalString withManual '' + # Install man pages make -j $NIX_BUILD_CORES PERL_PATH="${buildPackages.perl}/bin/perl" cmd-list.made install install-html \ - -C Documentation '' + -C Documentation + '' + (if guiSupport then '' # Wrap Tcl/Tk programs diff --git a/pkgs/by-name/cu/cue/validator.nix b/pkgs/by-name/cu/cue/validator.nix index cddc3fe342b7..09e852347341 100644 --- a/pkgs/by-name/cu/cue/validator.nix +++ b/pkgs/by-name/cu/cue/validator.nix @@ -5,8 +5,8 @@ # against the fragment described by `document` or the whole definition. # The script will be strict and enforce concrete values, i.e. partial documents are not supported. cueSchemaFile: { document ? null }: - writeShellScript "validate-using-cue" - ''${cue}/bin/cue \ + writeShellScript "validate-using-cue" '' + ${cue}/bin/cue \ --all-errors \ --strict \ vet \ diff --git a/pkgs/development/compilers/flutter/wrapper.nix b/pkgs/development/compilers/flutter/wrapper.nix index 2c1b1ea125c8..9b4123b0e7d9 100644 --- a/pkgs/development/compilers/flutter/wrapper.nix +++ b/pkgs/development/compilers/flutter/wrapper.nix @@ -146,7 +146,8 @@ in '' + lib.optionalString (flutter ? engine && flutter.engine.meta.available) '' --set-default FLUTTER_ENGINE "${flutter.engine}" \ --add-flags "--local-engine-host ${flutter.engine.outName}" \ - '' + '' --suffix PATH : '${lib.makeBinPath (tools ++ buildTools)}' \ + '' + '' + --suffix PATH : '${lib.makeBinPath (tools ++ buildTools)}' \ --suffix PKG_CONFIG_PATH : "$FLUTTER_PKG_CONFIG_PATH" \ --suffix LIBRARY_PATH : '${lib.makeLibraryPath appStaticBuildDeps}' \ --prefix CXXFLAGS "''\t" '${builtins.concatStringsSep " " (includeFlags ++ extraCxxFlags)}' \ diff --git a/pkgs/development/compilers/gcc/default.nix b/pkgs/development/compilers/gcc/default.nix index d5d59adabb74..40a0484d5c50 100644 --- a/pkgs/development/compilers/gcc/default.nix +++ b/pkgs/development/compilers/gcc/default.nix @@ -226,7 +226,8 @@ pipe ((callFile ./common/builder.nix {}) ({ libc = if libcCross != null then libcCross else stdenv.cc.libc; in ( - '' echo "fixing the {GLIBC,UCLIBC,MUSL}_DYNAMIC_LINKER macros..." + '' + echo "fixing the {GLIBC,UCLIBC,MUSL}_DYNAMIC_LINKER macros..." for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h do grep -q _DYNAMIC_LINKER "$header" || continue diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 269fef0dd6a8..0a30703684c4 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -523,7 +523,7 @@ self: super: builtins.intersectAttrs super { "--extra-include-dirs=${pkgs.cwiid}/include" "--extra-include-dirs=${pkgs.bluez.dev}/include" ]; - prePatch = '' sed -i -e "/Extra-Lib-Dirs/d" -e "/Include-Dirs/d" "hcwiid.cabal" ''; + prePatch = ''sed -i -e "/Extra-Lib-Dirs/d" -e "/Include-Dirs/d" "hcwiid.cabal"''; }) super.hcwiid; # cabal2nix doesn't pick up some of the dependencies. diff --git a/pkgs/development/libraries/check/default.nix b/pkgs/development/libraries/check/default.nix index 10030f5653c2..82aca7c4ec01 100644 --- a/pkgs/development/libraries/check/default.nix +++ b/pkgs/development/libraries/check/default.nix @@ -22,14 +22,14 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Unit testing framework for C"; - longDescription = - '' Check is a unit testing framework for C. It features a simple - interface for defining unit tests, putting little in the way of the - developer. Tests are run in a separate address space, so Check can - catch both assertion failures and code errors that cause - segmentation faults or other signals. The output from unit tests - can be used within source code editors and IDEs. - ''; + longDescription = '' + Check is a unit testing framework for C. It features a simple + interface for defining unit tests, putting little in the way of the + developer. Tests are run in a separate address space, so Check can + catch both assertion failures and code errors that cause + segmentation faults or other signals. The output from unit tests + can be used within source code editors and IDEs. + ''; homepage = "https://libcheck.github.io/check/"; diff --git a/pkgs/development/libraries/clutter/default.nix b/pkgs/development/libraries/clutter/default.nix index bb7ddf08957f..3831e3105208 100644 --- a/pkgs/development/libraries/clutter/default.nix +++ b/pkgs/development/libraries/clutter/default.nix @@ -84,20 +84,20 @@ stdenv.mkDerivation rec { meta = { description = "Library for creating fast, dynamic graphical user interfaces"; - longDescription = - '' Clutter is free software library for creating fast, compelling, - portable, and dynamic graphical user interfaces. It is a core part - of MeeGo, and is supported by the open source community. Its - development is sponsored by Intel. + longDescription = '' + Clutter is free software library for creating fast, compelling, + portable, and dynamic graphical user interfaces. It is a core part + of MeeGo, and is supported by the open source community. Its + development is sponsored by Intel. - Clutter uses OpenGL for rendering (and optionally OpenGL|ES for use - on mobile and embedded platforms), but wraps an easy to use, - efficient, flexible API around GL's complexity. + Clutter uses OpenGL for rendering (and optionally OpenGL|ES for use + on mobile and embedded platforms), but wraps an easy to use, + efficient, flexible API around GL's complexity. - Clutter enforces no particular user interface style, but provides a - rich, generic foundation for higher-level toolkits tailored to - specific needs. - ''; + Clutter enforces no particular user interface style, but provides a + rich, generic foundation for higher-level toolkits tailored to + specific needs. + ''; license = lib.licenses.lgpl2Plus; homepage = "http://www.clutter-project.org/"; diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index a611cb38d836..09dde042848b 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -283,14 +283,14 @@ stdenv.mkDerivation ({ homepage = "https://www.gnu.org/software/libc/"; description = "GNU C Library"; - longDescription = - '' Any Unix-like operating system needs a C library: the library which - defines the "system calls" and other basic facilities such as - open, malloc, printf, exit... + longDescription = '' + Any Unix-like operating system needs a C library: the library which + defines the "system calls" and other basic facilities such as + open, malloc, printf, exit... - The GNU C library is used as the C library in the GNU system and - most systems with the Linux kernel. - ''; + The GNU C library is used as the C library in the GNU system and + most systems with the Linux kernel. + ''; license = licenses.lgpl2Plus; diff --git a/pkgs/development/libraries/gmp/4.3.2.nix b/pkgs/development/libraries/gmp/4.3.2.nix index 9d014c266753..2700dad0db09 100644 --- a/pkgs/development/libraries/gmp/4.3.2.nix +++ b/pkgs/development/libraries/gmp/4.3.2.nix @@ -43,8 +43,8 @@ let self = stdenv.mkDerivation rec { branch = "4"; description = "GNU multiple precision arithmetic library"; - longDescription = - '' GMP is a free library for arbitrary precision arithmetic, operating + longDescription = '' + GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. There is no practical limit to the precision except the ones implied by the available memory in the machine GMP runs on. GMP has a rich diff --git a/pkgs/development/libraries/gmp/5.1.x.nix b/pkgs/development/libraries/gmp/5.1.x.nix index 43e3ca9759eb..adc4d7946862 100644 --- a/pkgs/development/libraries/gmp/5.1.x.nix +++ b/pkgs/development/libraries/gmp/5.1.x.nix @@ -56,8 +56,8 @@ let self = stdenv.mkDerivation rec { description = "GNU multiple precision arithmetic library"; license = licenses.gpl3Plus; - longDescription = - '' GMP is a free library for arbitrary precision arithmetic, operating + longDescription = '' + GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. There is no practical limit to the precision except the ones implied by the available memory in the machine GMP runs on. GMP has a rich diff --git a/pkgs/development/libraries/gmp/6.x.nix b/pkgs/development/libraries/gmp/6.x.nix index e1a8ff0ecdc1..458c7928c00e 100644 --- a/pkgs/development/libraries/gmp/6.x.nix +++ b/pkgs/development/libraries/gmp/6.x.nix @@ -64,27 +64,27 @@ let self = stdenv.mkDerivation rec { gpl2Only ]; - longDescription = - '' GMP is a free library for arbitrary precision arithmetic, operating - on signed integers, rational numbers, and floating point numbers. - There is no practical limit to the precision except the ones implied - by the available memory in the machine GMP runs on. GMP has a rich - set of functions, and the functions have a regular interface. + longDescription = '' + GMP is a free library for arbitrary precision arithmetic, operating + on signed integers, rational numbers, and floating point numbers. + There is no practical limit to the precision except the ones implied + by the available memory in the machine GMP runs on. GMP has a rich + set of functions, and the functions have a regular interface. - The main target applications for GMP are cryptography applications - and research, Internet security applications, algebra systems, - computational algebra research, etc. + The main target applications for GMP are cryptography applications + and research, Internet security applications, algebra systems, + computational algebra research, etc. - GMP is carefully designed to be as fast as possible, both for small - operands and for huge operands. The speed is achieved by using - fullwords as the basic arithmetic type, by using fast algorithms, - with highly optimised assembly code for the most common inner loops - for a lot of CPUs, and by a general emphasis on speed. + GMP is carefully designed to be as fast as possible, both for small + operands and for huge operands. The speed is achieved by using + fullwords as the basic arithmetic type, by using fast algorithms, + with highly optimised assembly code for the most common inner loops + for a lot of CPUs, and by a general emphasis on speed. - GMP is faster than any other bignum library. The advantage for GMP - increases with the operand sizes for many operations, since GMP uses - asymptotically faster algorithms. - ''; + GMP is faster than any other bignum library. The advantage for GMP + increases with the operand sizes for many operations, since GMP uses + asymptotically faster algorithms. + ''; platforms = platforms.all; maintainers = [ ]; diff --git a/pkgs/development/libraries/gnutls/default.nix b/pkgs/development/libraries/gnutls/default.nix index 3e9395668c85..964c0acb7c78 100644 --- a/pkgs/development/libraries/gnutls/default.nix +++ b/pkgs/development/libraries/gnutls/default.nix @@ -98,7 +98,8 @@ stdenv.mkDerivation rec { sed '2iexit 77' -i tests/{pkgconfig,fastopen}.sh sed '/^void doit(void)/,/^{/ s/{/{ exit(77);/' -i tests/{trust-store,psk-file}.c sed 's:/usr/lib64/pkcs11/ /usr/lib/pkcs11/ /usr/lib/x86_64-linux-gnu/pkcs11/:`pkg-config --variable=p11_module_path p11-kit-1`:' -i tests/p11-kit-trust.sh - '' + lib.optionalString stdenv.hostPlatform.isMusl '' # See https://gitlab.com/gnutls/gnutls/-/issues/945 + '' + lib.optionalString stdenv.hostPlatform.isMusl '' + # See https://gitlab.com/gnutls/gnutls/-/issues/945 sed '2iecho "certtool tests skipped in musl build"\nexit 0' -i tests/cert-tests/certtool.sh '' + lib.optionalString stdenv.hostPlatform.isLinux '' sed '2iexit 77' -i tests/{ktls,ktls_keyupdate}.sh diff --git a/pkgs/development/libraries/libmpc/default.nix b/pkgs/development/libraries/libmpc/default.nix index fe11b59f4523..053f0113b444 100644 --- a/pkgs/development/libraries/libmpc/default.nix +++ b/pkgs/development/libraries/libmpc/default.nix @@ -26,11 +26,11 @@ stdenv.mkDerivation rec { meta = { description = "Library for multiprecision complex arithmetic with exact rounding"; - longDescription = - '' GNU MPC is a C library for the arithmetic of complex numbers with - arbitrarily high precision and correct rounding of the result. It is - built upon and follows the same principles as GNU MPFR. - ''; + longDescription = '' + GNU MPC is a C library for the arithmetic of complex numbers with + arbitrarily high precision and correct rounding of the result. It is + built upon and follows the same principles as GNU MPFR. + ''; homepage = "https://www.multiprecision.org/mpc/"; license = lib.licenses.lgpl2Plus; diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/tests.nix b/pkgs/development/tools/build-managers/bazel/bazel_7/tests.nix index 0976d1c2d5a6..768804ecd555 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_7/tests.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/tests.nix @@ -104,7 +104,7 @@ let } ${# Note https://github.com/bazelbuild/bazel/issues/5763#issuecomment-456374609 # about why to create a subdir for the workspace. - '' cp -r ${workspaceDir} wd && chmod ug+rw -R wd && cd wd '' + ''cp -r ${workspaceDir} wd && chmod ug+rw -R wd && cd wd'' } ${# run the actual test snippet bazelScript diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix index 40808bcdb439..3a41ff855d38 100644 --- a/pkgs/development/tools/misc/gdb/default.nix +++ b/pkgs/development/tools/misc/gdb/default.nix @@ -117,10 +117,10 @@ stdenv.mkDerivation rec { ++ lib.optional enableDebuginfod "--with-debuginfod=yes" ++ lib.optional (!enableSim) "--disable-sim"; - postInstall = - '' # Remove Info files already provided by Binutils and other packages. - rm -v $out/share/info/bfd.info - ''; + postInstall = '' + # Remove Info files already provided by Binutils and other packages. + rm -v $out/share/info/bfd.info + ''; # TODO: Investigate & fix the test failures. doCheck = false; diff --git a/pkgs/development/tools/misc/gengetopt/default.nix b/pkgs/development/tools/misc/gengetopt/default.nix index 9ef5ec24d545..b0492665de1b 100644 --- a/pkgs/development/tools/misc/gengetopt/default.nix +++ b/pkgs/development/tools/misc/gengetopt/default.nix @@ -35,11 +35,11 @@ stdenv.mkDerivation rec { description = "Command-line option parser generator"; mainProgram = "gengetopt"; - longDescription = - '' GNU Gengetopt program generates a C function that uses getopt_long - function to parse the command line options, to validate them and - fills a struct - ''; + longDescription = '' + GNU Gengetopt program generates a C function that uses getopt_long + function to parse the command line options, to validate them and + fills a struct + ''; homepage = "https://www.gnu.org/software/gengetopt/"; diff --git a/pkgs/tools/archivers/sharutils/default.nix b/pkgs/tools/archivers/sharutils/default.nix index 557fdae4d22b..6a30ae1ff946 100644 --- a/pkgs/tools/archivers/sharutils/default.nix +++ b/pkgs/tools/archivers/sharutils/default.nix @@ -66,8 +66,8 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Tools for remote synchronization and `shell archives'"; - longDescription = - '' GNU shar makes so-called shell archives out of many files, preparing + longDescription = '' + GNU shar makes so-called shell archives out of many files, preparing them for transmission by electronic mail services. A shell archive is a collection of files that can be unpacked by /bin/sh. A wide range of features provide extensive flexibility in manufacturing diff --git a/pkgs/tools/compression/brotli/default.nix b/pkgs/tools/compression/brotli/default.nix index 94ed992812e5..0a7bbfe1746c 100644 --- a/pkgs/tools/compression/brotli/default.nix +++ b/pkgs/tools/compression/brotli/default.nix @@ -54,18 +54,18 @@ stdenv.mkDerivation (finalAttrs: { meta = with lib; { homepage = "https://github.com/google/brotli"; description = "Generic-purpose lossless compression algorithm and tool"; - longDescription = - '' Brotli is a generic-purpose lossless compression algorithm that - compresses data using a combination of a modern variant of the LZ77 - algorithm, Huffman coding and 2nd order context modeling, with a - compression ratio comparable to the best currently available - general-purpose compression methods. It is similar in speed with - deflate but offers more dense compression. + longDescription = '' + Brotli is a generic-purpose lossless compression algorithm that + compresses data using a combination of a modern variant of the LZ77 + algorithm, Huffman coding and 2nd order context modeling, with a + compression ratio comparable to the best currently available + general-purpose compression methods. It is similar in speed with + deflate but offers more dense compression. - The specification of the Brotli Compressed Data Format is defined - in the following internet draft: - http://www.ietf.org/id/draft-alakuijala-brotli - ''; + The specification of the Brotli Compressed Data Format is defined + in the following internet draft: + http://www.ietf.org/id/draft-alakuijala-brotli + ''; license = licenses.mit; maintainers = with maintainers; [ freezeboy ]; pkgConfigModules = [ diff --git a/pkgs/tools/compression/gzip/default.nix b/pkgs/tools/compression/gzip/default.nix index 8b10fa1c98d4..cbca093bcb4f 100644 --- a/pkgs/tools/compression/gzip/default.nix +++ b/pkgs/tools/compression/gzip/default.nix @@ -55,17 +55,17 @@ stdenv.mkDerivation rec { homepage = "https://www.gnu.org/software/gzip/"; description = "GNU zip compression program"; - longDescription = - ''gzip (GNU zip) is a popular data compression program written by - Jean-loup Gailly for the GNU project. Mark Adler wrote the - decompression part. + longDescription = '' + gzip (GNU zip) is a popular data compression program written by + Jean-loup Gailly for the GNU project. Mark Adler wrote the + decompression part. - We developed this program as a replacement for compress because of - the Unisys and IBM patents covering the LZW algorithm used by - compress. These patents made it impossible for us to use compress, - and we needed a replacement. The superior compression ratio of gzip - is just a bonus. - ''; + We developed this program as a replacement for compress because of + the Unisys and IBM patents covering the LZW algorithm used by + compress. These patents made it impossible for us to use compress, + and we needed a replacement. The superior compression ratio of gzip + is just a bonus. + ''; platforms = lib.platforms.all; diff --git a/pkgs/tools/compression/xz/default.nix b/pkgs/tools/compression/xz/default.nix index c05350ba9b64..47619ac751b3 100644 --- a/pkgs/tools/compression/xz/default.nix +++ b/pkgs/tools/compression/xz/default.nix @@ -65,19 +65,19 @@ stdenv.mkDerivation (finalAttrs: { changelog = "https://github.com/tukaani-project/xz/releases/tag/v${finalAttrs.version}"; description = "General-purpose data compression software, successor of LZMA"; homepage = "https://tukaani.org/xz/"; - longDescription = - '' XZ Utils is free general-purpose data compression software with high - compression ratio. XZ Utils were written for POSIX-like systems, - but also work on some not-so-POSIX systems. XZ Utils are the - successor to LZMA Utils. + longDescription = '' + XZ Utils is free general-purpose data compression software with high + compression ratio. XZ Utils were written for POSIX-like systems, + but also work on some not-so-POSIX systems. XZ Utils are the + successor to LZMA Utils. - The core of the XZ Utils compression code is based on LZMA SDK, but - it has been modified quite a lot to be suitable for XZ Utils. The - primary compression algorithm is currently LZMA2, which is used - inside the .xz container format. With typical files, XZ Utils - create 30 % smaller output than gzip and 15 % smaller output than - bzip2. - ''; + The core of the XZ Utils compression code is based on LZMA SDK, but + it has been modified quite a lot to be suitable for XZ Utils. The + primary compression algorithm is currently LZMA2, which is used + inside the .xz container format. With typical files, XZ Utils + create 30 % smaller output than gzip and 15 % smaller output than + bzip2. + ''; license = with licenses; [ gpl2Plus lgpl21Plus ]; maintainers = with maintainers; [ sander ]; platforms = platforms.all; From 74d8a923cb7947cc12cee722d75d5d3fd7d26c6b Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Wed, 23 Oct 2024 13:22:44 -0700 Subject: [PATCH 100/252] tinyxxd: 1.3.6 -> 1.3.7 Diff: https://github.com/xyproto/tinyxxd/compare/v1.3.6...v1.3.7 A compatibility error with vim's xxd was reported and fixed: - https://github.com/xyproto/tinyxxd/issues/15 --- pkgs/by-name/ti/tinyxxd/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ti/tinyxxd/package.nix b/pkgs/by-name/ti/tinyxxd/package.nix index 2da810f16614..ed491ca42b61 100644 --- a/pkgs/by-name/ti/tinyxxd/package.nix +++ b/pkgs/by-name/ti/tinyxxd/package.nix @@ -8,13 +8,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "tinyxxd"; - version = "1.3.6"; + version = "1.3.7"; src = fetchFromGitHub { repo = "tinyxxd"; owner = "xyproto"; rev = "v${finalAttrs.version}"; - hash = "sha256-SPKDowZrr1m9DiL7p8pKHKJuahEiwCmW5VhuE314Otw="; + hash = "sha256-Yj9n/reWAjKY1spXiW/fjPGTgj1Yc18FzFln6f5LK9c="; }; nativeBuildInputs = [ installShellFiles ]; From 5e29fe353405fea970eec69ae76638c606886886 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Tue, 13 Aug 2024 23:28:48 +0200 Subject: [PATCH 101/252] kvazaar: init at 2.3.1 --- pkgs/by-name/kv/kvazaar/package.nix | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pkgs/by-name/kv/kvazaar/package.nix diff --git a/pkgs/by-name/kv/kvazaar/package.nix b/pkgs/by-name/kv/kvazaar/package.nix new file mode 100644 index 000000000000..9fe102f82d5c --- /dev/null +++ b/pkgs/by-name/kv/kvazaar/package.nix @@ -0,0 +1,44 @@ +{ + lib, + stdenv, + fetchFromGitHub, + gitUpdater, + testers, + cmake, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "kvazaar"; + version = "2.3.1"; + + src = fetchFromGitHub { + owner = "ultravideo"; + repo = "kvazaar"; + rev = "v${finalAttrs.version}"; + hash = "sha256-d/OkX18nyHSQXJgNhBtiCLb/Fe8Y/MpddXxLpNMZiXI="; + }; + + nativeBuildInputs = [ cmake ]; + + outputs = [ + "out" + "lib" + "dev" + "man" + ]; + + passthru = { + updateScript = gitUpdater { rev-prefix = "v"; }; + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + }; + + meta = { + description = "Open-source HEVC encoder"; + homepage = "https://github.com/ultravideo/kvazaar"; + changelog = "https://github.com/ultravideo/kvazaar/releases/tag/v${finalAttrs.version}"; + pkgConfigModules = [ "kvazaar" ]; + license = lib.licenses.bsd3; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ jopejoe1 ]; + }; +}) From 77a6293b4ff3d241c37204ece7e141c491249b6b Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Tue, 13 Aug 2024 23:38:57 +0200 Subject: [PATCH 102/252] ffmpeg: add kvazaar option --- pkgs/development/libraries/ffmpeg/generic.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index e6863e849324..c7cdaa766d92 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -74,6 +74,7 @@ , withIlbc ? withFullDeps # iLBC de/encoding , withJack ? withFullDeps && !stdenv.hostPlatform.isDarwin # Jack audio , withJxl ? withFullDeps && lib.versionAtLeast version "5" # JPEG XL de/encoding +, withKvazaar ? withFullDeps # HEVC encoding , withLadspa ? withFullDeps # LADSPA audio filtering , withLcms2 ? withFullDeps # ICC profile support via lcms2 , withLzma ? withHeadlessDeps # xz-utils @@ -243,6 +244,7 @@ , gsm , harfbuzz , intel-media-sdk +, kvazaar , ladspaH , lame , lcms2 @@ -600,6 +602,7 @@ stdenv.mkDerivation (finalAttrs: { ] ++ optionals (versionAtLeast finalAttrs.version "5.0") [ (enableFeature withJxl "libjxl") ] ++ [ + (enableFeature withKvazaar "libkvazaar") (enableFeature withLadspa "ladspa") ] ++ optionals (versionAtLeast version "5.1") [ (enableFeature withLcms2 "lcms2") @@ -760,6 +763,7 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withIlbc [ libilbc ] ++ optionals withJack [ libjack2 ] ++ optionals withJxl [ libjxl ] + ++ optionals withKvazaar [ kvazaar ] ++ optionals withLadspa [ ladspaH ] ++ optionals withLcms2 [ lcms2 ] ++ optionals withLzma [ xz ] From 1971cea5492516371f36931c5b2793074d7815cc Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 24 Oct 2024 01:47:43 +0200 Subject: [PATCH 103/252] python312Packages.pillow-simd: drop Pillow is on 11.0, pillow-simd remains on 9.5.0.post2. We've seen various CVEs since, and since pillow-simd is a leaf package we remove it now. --- .../python-modules/pillow-simd/default.nix | 63 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 5 -- 3 files changed, 1 insertion(+), 68 deletions(-) delete mode 100644 pkgs/development/python-modules/pillow-simd/default.nix diff --git a/pkgs/development/python-modules/pillow-simd/default.nix b/pkgs/development/python-modules/pillow-simd/default.nix deleted file mode 100644 index 2d3551d171e9..000000000000 --- a/pkgs/development/python-modules/pillow-simd/default.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ - lib, - stdenv, - buildPythonPackage, - fetchFromGitHub, - isPyPy, - isPy3k, - olefile, - freetype, - libjpeg, - zlib, - libtiff, - libwebp, - libxcrypt, - tcl, - lcms2, - libxcb, - tk, - libX11, - openjpeg, - libimagequant, - pyroma, - numpy, - defusedxml, - pytestCheckHook, - setuptools, -}@args: - -import ../pillow/generic.nix ( - rec { - pname = "Pillow-SIMD"; - # check for release version on https://pypi.org/project/Pillow-SIMD/#history - # does not match the latest pillow release version! - version = "9.0.0.post1"; - format = "setuptools"; - - disabled = !isPy3k; - - src = fetchFromGitHub { - owner = "uploadcare"; - repo = "pillow-simd"; - rev = "v${version}"; - hash = "sha256-qTZYhgHjVMXqoYl3mG1xVrFaWrPidSY8HlyFQizV27Y="; - }; - - meta = with lib; { - broken = - (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) || stdenv.hostPlatform.isDarwin; - homepage = "https://python-pillow.github.io/pillow-perf/"; - description = "Friendly PIL fork - SIMD version"; - longDescription = '' - Pillow-SIMD is "following" Pillow. Pillow-SIMD versions are 100% compatible drop-in replacements for Pillow of the same version. - - SIMD stands for "single instruction, multiple data" and its essence is in performing the same operation on multiple data points simultaneously by using multiple processing elements. Common CPU SIMD instruction sets are MMX, SSE-SSE4, AVX, AVX2, AVX512, NEON. - - Currently, Pillow-SIMD can be compiled with SSE4 (default) or AVX2 support. - ''; - license = licenses.hpnd; - maintainers = [ ]; - }; - } - // args -) diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index b55e051e41a5..634992d9eaee 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -402,6 +402,7 @@ mapAliases ({ pdfminer = pdfminer-six; # added 2022-05-25 pdfx = throw "pdfx has been removed because the upstream repository was archived in 2023"; # Added 2024-10-04 pep257 = pydocstyle; # added 2022-04-12 + pillow-simd = throw "pillow-simd has been removed for lagging behind pillow upstream, which exposes it to various security issues."; # Added 2024-10-24 pixelmatch = "pixelmatch has been removed as it was unmaintained"; # Added 2024-08-18 pkutils = throw "pkutils was removed as it was unused and is not applicable to modern Python build tools"; # added 2024-07-28 poetry = throw "poetry was promoted to a top-level attribute, use poetry-core to build Python packages"; # added 2023-01-09 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bc41e8b2046f..492c9dba514d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10079,11 +10079,6 @@ self: super: with self; { pillow-jpls = callPackage ../development/python-modules/pillow-jpls { }; - pillow-simd = callPackage ../development/python-modules/pillow-simd { - inherit (pkgs) freetype libjpeg zlib libtiff libwebp tcl lcms2 tk; - inherit (pkgs.xorg) libX11; - }; - pims = callPackage ../development/python-modules/pims { }; pinboard = callPackage ../development/python-modules/pinboard { }; From fa3075a22d795d1a55e50e811cecb483aed5b474 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 24 Oct 2024 03:11:22 +0200 Subject: [PATCH 104/252] lib/licenses: introduce MIT-CMU license --- lib/licenses.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/licenses.nix b/lib/licenses.nix index fb7b6c2e837f..495823c90a35 100644 --- a/lib/licenses.nix +++ b/lib/licenses.nix @@ -890,6 +890,11 @@ lib.mapAttrs mkLicense ({ fullName = "MIT License"; }; + mit-cmu = { + spdxId = "MIT-CMU"; + fullName = "CMU License"; + }; + mit-feh = { spdxId = "MIT-feh"; fullName = "feh License"; From 477d7f77483665a57d06c0962189dde3a9395034 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 24 Oct 2024 03:05:57 +0200 Subject: [PATCH 105/252] python312Packages.pillow: 10.4.0 -> 11.0 https://pillow.readthedocs.io/en/stable/releasenotes/11.0.0.html Removes the generalization of the package that has become obsolete with the pillow-simd removal. --- .../python-modules/pillow/default.nix | 174 +++++++++++++----- .../python-modules/pillow/generic.nix | 109 ----------- pkgs/top-level/python-packages.nix | 14 +- 3 files changed, 137 insertions(+), 160 deletions(-) delete mode 100644 pkgs/development/python-modules/pillow/generic.nix diff --git a/pkgs/development/python-modules/pillow/default.nix b/pkgs/development/python-modules/pillow/default.nix index b5257f5101d2..30d741052a09 100644 --- a/pkgs/development/python-modules/pillow/default.nix +++ b/pkgs/development/python-modules/pillow/default.nix @@ -3,26 +3,35 @@ stdenv, buildPythonPackage, pythonOlder, - fetchPypi, - isPyPy, - defusedxml, - olefile, + fetchFromGitHub, + + # build-system + setuptools, + pkg-config, + + # native dependencies freetype, + lcms2, + libimagequant, libjpeg, - zlib, + libraqm, libtiff, libwebp, - libxcrypt, - tcl, - lcms2, - tk, - libX11, libxcb, openjpeg, - libimagequant, + tkinter, + zlib, + + # optional dependencies + defusedxml, + olefile, + typing-extensions, + + # tests numpy, + pytest-cov-stub, pytestCheckHook, - setuptools, + # for passthru.tests imageio, matplotlib, @@ -30,45 +39,112 @@ pydicom, reportlab, sage, -}@args: +}: -import ./generic.nix ( - rec { - pname = "pillow"; - version = "10.4.0"; - format = "pyproject"; +buildPythonPackage rec { + pname = "pillow"; + version = "11.0.0"; + pyproject = true; - disabled = pythonOlder "3.8"; + src = fetchFromGitHub { + owner = "python-pillow"; + repo = "pillow"; + rev = "refs/tags/${version}"; + hash = "sha256-vWNqzA2ZfJcWexXw790RgyYtP8WDtahoQIX16otCRnk="; + }; - src = fetchPypi { - pname = "pillow"; - inherit version; - hash = "sha256-Fmwc1NJDCbMNYfefSpEUt7IxPXRQkSJ3hV/139fNSgY="; - }; + build-system = [ setuptools ]; - passthru.tests = { - inherit - imageio - matplotlib - pilkit - pydicom - reportlab - sage - ; - }; + nativeBuildInputs = [ pkg-config ]; - meta = with lib; { - homepage = "https://python-pillow.org/"; - description = "Friendly PIL fork (Python Imaging Library)"; - longDescription = '' - The Python Imaging Library (PIL) adds image processing - capabilities to your Python interpreter. This library - supports many file formats, and provides powerful image - processing and graphics capabilities. - ''; - license = licenses.hpnd; - maintainers = with maintainers; [ prikhi ]; - }; - } - // args -) + # https://pillow.readthedocs.io/en/latest/installation/building-from-source.html#building-from-source + buildInputs = [ + freetype + lcms2 + libimagequant + libjpeg + libraqm + libtiff + libwebp + libxcb + openjpeg + tkinter + zlib + ]; + + pypaBuildFlags = [ + # Disable platform guessing, which tries various FHS paths + "--config=setting=--disable-platform-guessing" + ]; + + preConfigure = + let + getLibAndInclude = pkg: ''"${pkg.out}/lib", "${lib.getDev pkg}/include"''; + in + '' + # The build process fails to find the pkg-config files for these dependencies + substituteInPlace setup.py \ + --replace-fail 'IMAGEQUANT_ROOT = None' 'IMAGEQUANT_ROOT = ${getLibAndInclude libimagequant}' \ + --replace-fail 'JPEG2K_ROOT = None' 'JPEG2K_ROOT = ${getLibAndInclude openjpeg}' + + # Build with X11 support + export LDFLAGS="$LDFLAGS -L${libxcb}/lib" + export CFLAGS="$CFLAGS -I${libxcb.dev}/include" + ''; + + optional-dependencies = { + fpx = [ olefile ]; + mic = [ olefile ]; + typing = lib.optionals (pythonOlder "3.10") [ typing-extensions ]; + xmp = [ defusedxml ]; + }; + + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + numpy + ] ++ lib.flatten (lib.attrValues optional-dependencies); + + disabledTests = + [ + # Code quality mismathch 9 vs 10 + "test_pyroma" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # Disable darwin tests which require executables: `iconutil` and `screencapture` + "test_grab" + "test_grabclipboard" + "test_save" + ]; + + disabledTestPaths = lib.optionals stdenv.isDarwin [ + # Crashes the interpreter + "Tests/test_imagetk.py" + ]; + + passthru.tests = { + inherit + imageio + matplotlib + pilkit + pydicom + reportlab + sage + ; + }; + + meta = with lib; { + homepage = "https://python-pillow.org"; + changelog = "https://pillow.readthedocs.io/en/stable/releasenotes/${version}.html"; + description = "Friendly PIL fork (Python Imaging Library)"; + longDescription = '' + The Python Imaging Library (PIL) adds image processing + capabilities to your Python interpreter. This library + supports many file formats, and provides powerful image + processing and graphics capabilities. + ''; + license = licenses.mit-cmu; + maintainers = with maintainers; [ hexa ]; + }; + +} diff --git a/pkgs/development/python-modules/pillow/generic.nix b/pkgs/development/python-modules/pillow/generic.nix deleted file mode 100644 index 1ecaea6b205d..000000000000 --- a/pkgs/development/python-modules/pillow/generic.nix +++ /dev/null @@ -1,109 +0,0 @@ -{ - pname, - version, - src, - patches ? [ ], - meta, - passthru ? { }, - ... -}@args: - -with args; - -buildPythonPackage rec { - inherit - pname - version - format - src - meta - passthru - patches - ; - - # Disable imagefont tests, because they don't work well with infinality: - # https://github.com/python-pillow/Pillow/issues/1259 - postPatch = '' - rm Tests/test_imagefont.py - ''; - - disabledTests = - [ - # Code quality mismathch 9 vs 10 - "test_pyroma" - - # pillow-simd - "test_roundtrip" - "test_basic" - "test_custom_metadata" - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - # Disable darwin tests which require executables: `iconutil` and `screencapture` - "test_grab" - "test_grabclipboard" - "test_save" - ]; - - propagatedBuildInputs = [ - olefile - ] ++ lib.optionals (lib.versionAtLeast version "8.2.0") [ defusedxml ]; - - nativeCheckInputs = [ - pytestCheckHook - numpy - ]; - - nativeBuildInputs = [ setuptools ]; - - buildInputs = - [ - freetype - libjpeg - openjpeg - libimagequant - zlib - libtiff - libwebp - libxcrypt - tcl - lcms2 - ] - ++ lib.optionals (lib.versionAtLeast version "7.1.0") [ libxcb ] - ++ lib.optionals (isPyPy) [ - tk - libX11 - ]; - - # NOTE: we use LCMS_ROOT as WEBP root since there is not other setting for webp. - # NOTE: The Pillow install script will, by default, add paths like /usr/lib - # and /usr/include to the search paths. This can break things when building - # on a non-NixOS system that has some libraries installed that are not - # installed in Nix (for example, Arch Linux has jpeg2000 but Nix doesn't - # build Pillow with this support). We patch the `disable_platform_guessing` - # setting here, instead of passing the `--disable-platform-guessing` - # command-line option, since the command-line option doesn't work when we run - # tests. - preConfigure = - let - libinclude' = pkg: ''"${pkg.out}/lib", "${pkg.out}/include"''; - libinclude = pkg: ''"${pkg.out}/lib", "${pkg.dev}/include"''; - in - '' - sed -i "setup.py" \ - -e 's|^FREETYPE_ROOT =.*$|FREETYPE_ROOT = ${libinclude freetype}|g ; - s|^JPEG_ROOT =.*$|JPEG_ROOT = ${libinclude libjpeg}|g ; - s|^JPEG2K_ROOT =.*$|JPEG2K_ROOT = ${libinclude openjpeg}|g ; - s|^IMAGEQUANT_ROOT =.*$|IMAGEQUANT_ROOT = ${libinclude' libimagequant}|g ; - s|^ZLIB_ROOT =.*$|ZLIB_ROOT = ${libinclude zlib}|g ; - s|^LCMS_ROOT =.*$|LCMS_ROOT = ${libinclude lcms2}|g ; - s|^TIFF_ROOT =.*$|TIFF_ROOT = ${libinclude libtiff}|g ; - s|^TCL_ROOT=.*$|TCL_ROOT = ${libinclude' tcl}|g ; - s|self\.disable_platform_guessing = None|self.disable_platform_guessing = True|g ;' - export LDFLAGS="$LDFLAGS -L${libwebp}/lib" - export CFLAGS="$CFLAGS -I${libwebp}/include" - '' - + lib.optionalString (lib.versionAtLeast version "7.1.0") '' - export LDFLAGS="$LDFLAGS -L${libxcb}/lib" - export CFLAGS="$CFLAGS -I${libxcb.dev}/include" - ''; -} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 492c9dba514d..7becfdc8c678 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10071,8 +10071,18 @@ self: super: with self; { pillowfight = callPackage ../development/python-modules/pillowfight { }; pillow = callPackage ../development/python-modules/pillow { - inherit (pkgs) freetype libjpeg zlib libtiff libwebp tcl lcms2 tk; - inherit (pkgs.xorg) libX11 libxcb; + inherit (pkgs) + freetype + lcms2 + libimagequant + libjpeg + libraqm + libtiff + libwebp + openjpeg + zlib + ; + inherit (pkgs.xorg) libxcb; }; pillow-heif = callPackage ../development/python-modules/pillow-heif { }; From 2713abab68939a23b13d2add48a527167eb277da Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 24 Oct 2024 03:40:49 +0200 Subject: [PATCH 106/252] python312Packages.pillow-heif: 0.18.0 -> 0.20.0 https://github.com/bigcat88/pillow_heif/releases/tag/v0.20.0 --- pkgs/development/python-modules/pillow-heif/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pillow-heif/default.nix b/pkgs/development/python-modules/pillow-heif/default.nix index be57d452680b..caa81ce9720b 100644 --- a/pkgs/development/python-modules/pillow-heif/default.nix +++ b/pkgs/development/python-modules/pillow-heif/default.nix @@ -28,14 +28,14 @@ buildPythonPackage rec { pname = "pillow-heif"; - version = "0.18.0"; + version = "0.20.0"; pyproject = true; src = fetchFromGitHub { owner = "bigcat88"; repo = "pillow_heif"; rev = "refs/tags/v${version}"; - hash = "sha256-+HQvDf5aovUtZ++BoD22B012N32A+7++O/jbpkIVQws="; + hash = "sha256-a1qCxI+mMuEYsCk2CUYGNKCe+SONuvVizqUvmQKy3sE="; }; postPatch = '' From 464344156d32f320beafc520288df2e1ba6cdff6 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 24 Oct 2024 05:24:07 +0200 Subject: [PATCH 107/252] python312Packages.imageio: disable failing test --- .../python-modules/imageio/default.nix | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/imageio/default.nix b/pkgs/development/python-modules/imageio/default.nix index 0c489b5c30d2..8ce6d5d4f4ec 100644 --- a/pkgs/development/python-modules/imageio/default.nix +++ b/pkgs/development/python-modules/imageio/default.nix @@ -3,7 +3,6 @@ stdenv, buildPythonPackage, fetchFromGitHub, - fetchpatch, isPyPy, substituteAll, @@ -98,15 +97,21 @@ buildPythonPackage rec { "tests/test_swf.py" ]; - disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ - # Segmentation fault - "test_bayer_write" - # RuntimeError: No valid H.264 encoder was found with the ffmpeg installation - "test_writer_file_properly_closed" - "test_writer_pixelformat_size_verbose" - "test_writer_ffmpeg_params" - "test_reverse_read" - ]; + disabledTests = + [ + # Pillow 11.0.0 compat + # https://github.com/imageio/imageio/issues/1104 + "test_gif" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # Segmentation fault + "test_bayer_write" + # RuntimeError: No valid H.264 encoder was found with the ffmpeg installation + "test_writer_file_properly_closed" + "test_writer_pixelformat_size_verbose" + "test_writer_ffmpeg_params" + "test_reverse_read" + ]; meta = { description = "Library for reading and writing a wide range of image, video, scientific, and volumetric data formats"; From 000c1bad0d8a0fba6b7c3753ed25a80cef707643 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 24 Oct 2024 18:13:14 +0200 Subject: [PATCH 108/252] python312Packages.starlette: 0.39.2 -> 0.40.0 https://www.starlette.io/release-notes/#0400-october-15-2024 https://github.com/encode/starlette/security/advisories/GHSA-f96h-pmfr-66vw Fixes: CVE-2024-47874 --- pkgs/development/python-modules/starlette/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/starlette/default.nix b/pkgs/development/python-modules/starlette/default.nix index c68e0f515ce5..c1b0fa8be4bd 100644 --- a/pkgs/development/python-modules/starlette/default.nix +++ b/pkgs/development/python-modules/starlette/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { pname = "starlette"; - version = "0.39.2"; + version = "0.40.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -37,7 +37,7 @@ buildPythonPackage rec { owner = "encode"; repo = "starlette"; rev = "refs/tags/${version}"; - hash = "sha256-sAvtqeyfyMf+xt78bqlaNYW9xYYCFkiW45OVlI9itgg="; + hash = "sha256-CBkDDsIw9LAIeAzN5E9gdEvznFugoa/RilPmnwcJBy4="; }; build-system = [ hatchling ]; From 427db1945c38561784df1d88bae6694f0491d2a0 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 24 Oct 2024 18:19:43 +0200 Subject: [PATCH 109/252] python312Packages.anyio: 4.6.0 -> 4.6.2 https://github.com/agronholm/anyio/blob/refs/tags/4.6.2/docs/versionhistory.rst --- pkgs/development/python-modules/anyio/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/anyio/default.nix b/pkgs/development/python-modules/anyio/default.nix index 298bd4d7e33c..c5e13ea20f1c 100644 --- a/pkgs/development/python-modules/anyio/default.nix +++ b/pkgs/development/python-modules/anyio/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { pname = "anyio"; - version = "4.6.0"; + version = "4.6.2"; pyproject = true; disabled = pythonOlder "3.8"; @@ -41,7 +41,7 @@ buildPythonPackage rec { owner = "agronholm"; repo = "anyio"; rev = "refs/tags/${version}"; - hash = "sha256-aC/+46SWrpt+4MtvrqZq4gljWb3Kgps2r2/CeN0JfHE="; + hash = "sha256-8QLOAjQpiNtbd+YSHfqcBVdtMSGJFRevOcacZErKuso="; }; build-system = [ setuptools-scm ]; From fc8e85adff2680adda0c88772d914a948ea88d0a Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 24 Oct 2024 18:33:41 +0200 Subject: [PATCH 110/252] python312Packages.uvicorn: 0.31.0 -> 0.32.0 https://github.com/encode/uvicorn/blob/refs/tags/0.32.0/CHANGELOG.md --- pkgs/development/python-modules/uvicorn/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/uvicorn/default.nix b/pkgs/development/python-modules/uvicorn/default.nix index f0d29c6381a8..ab72df02971f 100644 --- a/pkgs/development/python-modules/uvicorn/default.nix +++ b/pkgs/development/python-modules/uvicorn/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "uvicorn"; - version = "0.31.0"; + version = "0.32.0"; disabled = pythonOlder "3.8"; pyproject = true; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = "encode"; repo = "uvicorn"; rev = "refs/tags/${version}"; - hash = "sha256-Au8+8l8JfOUeLDxN2UONP0W+fsb38QCAunblmxJdGus="; + hash = "sha256-LTioJNDq1zsy/FO6lBgRW8Ow5qyxUD8NjNCj4nIrVDM="; }; outputs = [ From d38c5bebc6a9db57ec77303ef7c3c952512507d0 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 24 Oct 2024 18:44:02 +0200 Subject: [PATCH 111/252] python312Packages.fastapi: 0.115.0 -> 0.115.3 https://github.com/fastapi/fastapi/releases/tag/0.115.1 https://github.com/fastapi/fastapi/releases/tag/0.115.2 https://github.com/fastapi/fastapi/releases/tag/0.115.3 --- pkgs/development/python-modules/fastapi/default.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/fastapi/default.nix b/pkgs/development/python-modules/fastapi/default.nix index 1f29059bba72..e9ed6eb2e2ea 100644 --- a/pkgs/development/python-modules/fastapi/default.nix +++ b/pkgs/development/python-modules/fastapi/default.nix @@ -40,7 +40,7 @@ buildPythonPackage rec { pname = "fastapi"; - version = "0.115.0"; + version = "0.115.3"; pyproject = true; disabled = pythonOlder "3.7"; @@ -49,7 +49,7 @@ buildPythonPackage rec { owner = "tiangolo"; repo = "fastapi"; rev = "refs/tags/${version}"; - hash = "sha256-TewFTbYdWIHcgRH+YNxNEUZVlaUn2aTZ0YFmDPrPZl4="; + hash = "sha256-JIaPgZVbz887liVwd3YtubJm+L4tFCM9Jcn9/smjiKo="; }; build-system = [ pdm-backend ]; @@ -106,24 +106,20 @@ buildPythonPackage rec { disabledTests = [ # Coverage test "test_fastapi_cli" - # ResourceWarning: Unclosed - "test_openapi_schema" ]; disabledTestPaths = [ # Don't test docs and examples "docs_src" - # databases is incompatible with SQLAlchemy 2.0 - "tests/test_tutorial/test_async_sql_databases" "tests/test_tutorial/test_sql_databases" ]; pythonImportsCheck = [ "fastapi" ]; meta = with lib; { - changelog = "https://github.com/tiangolo/fastapi/releases/tag/${version}"; + changelog = "https://github.com/fastapi/fastapi/releases/tag/${version}"; description = "Web framework for building APIs"; - homepage = "https://github.com/tiangolo/fastapi"; + homepage = "https://github.com/fastapi/fastapi"; license = licenses.mit; maintainers = with maintainers; [ wd15 ]; }; From a92ce87eb3d50d91a947a8ab89baab37436e8743 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 24 Oct 2024 18:49:32 +0200 Subject: [PATCH 112/252] python312Packages.aiohttp: 3.10.8 -> 3.10.10 https://github.com/aio-libs/aiohttp/blob/v3.10.10/CHANGES.rst --- pkgs/development/python-modules/aiohttp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aiohttp/default.nix b/pkgs/development/python-modules/aiohttp/default.nix index e021832f15d1..2ccea52e36a7 100644 --- a/pkgs/development/python-modules/aiohttp/default.nix +++ b/pkgs/development/python-modules/aiohttp/default.nix @@ -39,7 +39,7 @@ buildPythonPackage rec { pname = "aiohttp"; - version = "3.10.8"; + version = "3.10.10"; pyproject = true; disabled = pythonOlder "3.8"; @@ -48,7 +48,7 @@ buildPythonPackage rec { owner = "aio-libs"; repo = "aiohttp"; rev = "refs/tags/v${version}"; - hash = "sha256-ksvGRzar1Gp+86WrRFwyHoEdthyzvaAbyubdIhON/sk="; + hash = "sha256-c2mnt2ZQ7d7WO7Z8eDaUo9y+v0V0JwXUa1WJI9bwGTM="; }; patches = [ From 2ff66debd8c849f2a2b788f2ea0dedd31e379d28 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 24 Oct 2024 18:54:35 +0200 Subject: [PATCH 113/252] python312Packages.pdm-backend: 2.4.1 -> 2.4.3 https://github.com/pdm-project/pdm-backend/releases/tag/2.4.2 https://github.com/pdm-project/pdm-backend/releases/tag/2.4.3 --- pkgs/development/python-modules/pdm-backend/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pdm-backend/default.nix b/pkgs/development/python-modules/pdm-backend/default.nix index 98c6b451ee6f..b7a7f87a4fd0 100644 --- a/pkgs/development/python-modules/pdm-backend/default.nix +++ b/pkgs/development/python-modules/pdm-backend/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "pdm-backend"; - version = "2.4.1"; + version = "2.4.3"; pyproject = true; src = fetchFromGitHub { owner = "pdm-project"; repo = "pdm-backend"; rev = "refs/tags/${version}"; - hash = "sha256-YQavUP3RaZns9byli54feVtG92Stozr3T66WouQwF+s="; + hash = "sha256-XbHlzt00R0kB8I6nRvteAgpFlUTAvBcF5iaQD5V30ok="; }; env.PDM_BUILD_SCM_VERSION = version; From 514b00cf08702b31cdf873a798f1ff100d4f2cf7 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 18 Oct 2024 16:05:43 +0100 Subject: [PATCH 114/252] clang: skip the `-nostdlibinc` patch on Darwin --- pkgs/build-support/cc-wrapper/add-flags.sh | 5 ----- .../compilers/llvm/common/clang/default.nix | 18 +++++++++++------- .../compilers/llvm/common/default.nix | 18 +++++++++++++++++- pkgs/stdenv/darwin/default.nix | 11 +++++++++++ 4 files changed, 39 insertions(+), 13 deletions(-) diff --git a/pkgs/build-support/cc-wrapper/add-flags.sh b/pkgs/build-support/cc-wrapper/add-flags.sh index cd5396f45f8b..838b963ead7b 100644 --- a/pkgs/build-support/cc-wrapper/add-flags.sh +++ b/pkgs/build-support/cc-wrapper/add-flags.sh @@ -95,11 +95,6 @@ if [ "@darwinMinVersion@" ]; then # xcbuild needs `SDKROOT` to be the name of the SDK, which it sets in its own wrapper, # but compilers expect it to point to the absolute path. SDKROOT="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" - - # Set up various library paths since compilers may not support (or may have disabled) finding them in the sysroot. - NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@+=" -isysroot $SDKROOT" - NIX_CFLAGS_COMPILE_@suffixSalt@+=" -idirafter $SDKROOT/usr/include" - NIX_CFLAGS_COMPILE_@suffixSalt@+=" -iframework $SDKROOT/System/Library/Frameworks" fi # That way forked processes will not extend these environment variables again. diff --git a/pkgs/development/compilers/llvm/common/clang/default.nix b/pkgs/development/compilers/llvm/common/clang/default.nix index 5c9662c24d58..4bf30400832a 100644 --- a/pkgs/development/compilers/llvm/common/clang/default.nix +++ b/pkgs/development/compilers/llvm/common/clang/default.nix @@ -81,13 +81,17 @@ let # Make sure clang passes the correct location of libLTO to ld64 substituteInPlace lib/Driver/ToolChains/Darwin.cpp \ --replace-fail 'StringRef P = llvm::sys::path::parent_path(D.Dir);' 'StringRef P = "${lib.getLib libllvm}";' - '' + (if lib.versionOlder release_version "13" then '' - sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \ - -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \ - lib/Driver/ToolChains/*.cpp - '' else '' - (cd tools && ln -s ../../clang-tools-extra extra) - '') + lib.optionalString stdenv.hostPlatform.isMusl '' + '' + ( + # See the comment on the `add-nostdlibinc-flag.patch` patch in + # `../default.nix` for why we skip Darwin here. + if lib.versionOlder release_version "13" && (!stdenv.hostPlatform.isDarwin || !stdenv.targetPlatform.isDarwin) then '' + sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \ + -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \ + lib/Driver/ToolChains/*.cpp + '' else '' + (cd tools && ln -s ../../clang-tools-extra extra) + '' + ) + lib.optionalString stdenv.hostPlatform.isMusl '' sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp ''; diff --git a/pkgs/development/compilers/llvm/common/default.nix b/pkgs/development/compilers/llvm/common/default.nix index eaba6f45edfe..c3a98c1f063f 100644 --- a/pkgs/development/compilers/llvm/common/default.nix +++ b/pkgs/development/compilers/llvm/common/default.nix @@ -529,8 +529,24 @@ let # mis-compilation in firefox. # See: https://bugzilla.mozilla.org/show_bug.cgi?id=1741454 (metadata.getVersionFile "clang/revert-malloc-alignment-assumption.patch") + # This patch prevents global system header directories from + # leaking through on non‐NixOS Linux. However, on macOS, the + # SDK path is used as the sysroot, and forcing `-nostdlibinc` + # breaks `-isysroot` with an unwrapped compiler. As macOS has + # no `/usr/include`, there’s essentially no risk to skipping + # the patch there. It’s possible that Homebrew headers in + # `/usr/local/include` might leak through to unwrapped + # compilers being used without an SDK set or something, but + # it hopefully shouldn’t matter. + # + # TODO: Figure out a better solution to this whole problem so + # that we won’t have to choose between breaking unwrapped + # compilers breaking libclang when we can do Linux‐to‐Darwin + # cross‐compilation again. + ++ lib.optional ( + !args.stdenv.hostPlatform.isDarwin || !args.stdenv.targetPlatform.isDarwin + ) ./clang/add-nostdlibinc-flag.patch ++ [ - ./clang/add-nostdlibinc-flag.patch (substituteAll { src = if (lib.versionOlder metadata.release_version "16") then diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 5a3ef15e392d..070d5ec23851 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -133,6 +133,17 @@ let ln -s "${compiler-rt.out}/lib" "$rsrc/lib" ln -s "${compiler-rt.out}/share" "$rsrc/share" echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags + '' + + lib.optionalString (isFromBootstrapFiles prevStage.llvmPackages.clang-unwrapped) '' + # Work around the `-nostdlibinc` patch in the bootstrap tools. + # TODO: Remove after the bootstrap tools have been updated. + substituteAll ${builtins.toFile "add-flags-extra.sh" '' + if [ "@darwinMinVersion@" ]; then + NIX_CFLAGS_COMPILE_@suffixSalt@+=" -idirafter $SDKROOT/usr/include" + NIX_CFLAGS_COMPILE_@suffixSalt@+=" -iframework $SDKROOT/System/Library/Frameworks" + fi + ''} add-flags-extra.sh + cat add-flags-extra.sh >> $out/nix-support/add-flags.sh ''; cc = prevStage.llvmPackages.clang-unwrapped; From 5036d2221600877719fef7c86b4223222d37dee8 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 24 Oct 2024 18:56:40 +0200 Subject: [PATCH 115/252] python312Packages.build: 1.2.2 -> 1.2.2.post1 https://github.com/pypa/build/blob/1.2.2.post1/CHANGELOG.rst --- pkgs/development/python-modules/build/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/build/default.nix b/pkgs/development/python-modules/build/default.nix index b5077ddc5f66..75b9e2a4703e 100644 --- a/pkgs/development/python-modules/build/default.nix +++ b/pkgs/development/python-modules/build/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { pname = "build"; - version = "1.2.2"; + version = "1.2.2.post1"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -30,7 +30,7 @@ buildPythonPackage rec { owner = "pypa"; repo = "build"; rev = "refs/tags/${version}"; - hash = "sha256-pord65+Mg3TmHpAtU6PQAzxAmGtNu6MSxTruJsnA0EE="; + hash = "sha256-PHS7CjdKo5u4VTpbo409zLQAOmslV9bX0j0S83Gdv1U="; }; postPatch = '' From b75c70282f91276908adf0f286437eadbb638119 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 23 Oct 2024 17:13:28 +0100 Subject: [PATCH 116/252] ld64: search standard library locations This is basically harmless for the same reason as it is for Clang, and lets us avoid doing wrapper hacks to fix things like the .NET build. This reverts commit 4340a5addb0c9da67b1f68dc00ba2a3fc80436cb. --- .../add-darwin-ldflags-before.sh | 10 -------- ...rching-in-standard-library-locations.patch | 25 ------------------- pkgs/by-name/ld/ld64/package.nix | 2 -- pkgs/stdenv/darwin/default.nix | 13 +++++++++- 4 files changed, 12 insertions(+), 38 deletions(-) delete mode 100644 pkgs/by-name/ld/ld64/0008-Disable-searching-in-standard-library-locations.patch diff --git a/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh b/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh index 0a2961bbe46e..127f83e303a3 100644 --- a/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh +++ b/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh @@ -85,13 +85,3 @@ mangleVarSingle DEVELOPER_DIR ${role_suffixes[@]+"${role_suffixes[@]}"} # Allow wrapped bintools to do something useful when no `DEVELOPER_DIR` is set, which can happen when # the compiler is run outside of a stdenv or intentionally in an environment with no environment variables set. DEVELOPER_DIR=${DEVELOPER_DIR_@suffixSalt@:-@fallback_sdk@} - -# Darwin looks for frameworks in the SDK located at `DEVELOPER_DIR`. -extraBefore+=("-F$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks") -extraBefore+=("-L$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib") - -# While the Swift wrapper should take care of this, anything that needs to link Swift auto-linked frameworks -# also needs these paths. Note: Test and conditionally add it because the path may not exist in older SDKs. -if [ -d "$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/swift" ]; then - extraBefore+=("-L$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/swift") -fi diff --git a/pkgs/by-name/ld/ld64/0008-Disable-searching-in-standard-library-locations.patch b/pkgs/by-name/ld/ld64/0008-Disable-searching-in-standard-library-locations.patch deleted file mode 100644 index ddda588c6aaf..000000000000 --- a/pkgs/by-name/ld/ld64/0008-Disable-searching-in-standard-library-locations.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 3e80d438e2a3ec50d666f2b6e32007c275d4a08a Mon Sep 17 00:00:00 2001 -From: Randy Eckenrode -Date: Thu, 11 Apr 2024 23:13:29 -0400 -Subject: [PATCH 8/8] Disable searching in standard library locations - ---- - src/ld/Options.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/ld/Options.cpp b/src/ld/Options.cpp -index 67a9f53..611b583 100644 ---- a/src/ld/Options.cpp -+++ b/src/ld/Options.cpp -@@ -4320,7 +4320,7 @@ bool Options::shouldUseBuildVersion(ld::Platform plat, uint32_t minOSvers) const - - void Options::buildSearchPaths(int argc, const char* argv[]) - { -- bool addStandardLibraryDirectories = true; -+ bool addStandardLibraryDirectories = false; - ld::Platform platform = ld::Platform::unknown; - std::vector libraryPaths; - std::vector frameworkPaths; --- -2.45.1 - diff --git a/pkgs/by-name/ld/ld64/package.nix b/pkgs/by-name/ld/ld64/package.nix index b5900f3576ac..d3dfe3b8b7e6 100644 --- a/pkgs/by-name/ld/ld64/package.nix +++ b/pkgs/by-name/ld/ld64/package.nix @@ -128,8 +128,6 @@ stdenv.mkDerivation (finalAttrs: { ./0006-Add-libcd_is_blob_a_linker_signature-implementation.patch # Add OpenSSL implementation of CoreCrypto digest functions. Avoids use of private and non-free APIs. ./0007-Add-OpenSSL-based-CoreCrypto-digest-functions.patch - # ld64 will search `/usr/lib`, `/Library/Frameworks`, etc by default. Disable that. - ./0008-Disable-searching-in-standard-library-locations.patch ]; postPatch = '' diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 070d5ec23851..0fb0f27f23ba 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -449,9 +449,15 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check bintools = selfDarwin.binutils-unwrapped; - # Bootstrap tools cctools needs the hook and wrappers to make sure things are signed properly. + # Bootstrap tools cctools needs the hook and wrappers to make sure things are signed properly, + # and additional linker flags to work around a since‐removed patch. # This can be dropped once the bootstrap tools cctools has been updated to 1010.6. extraBuildCommands = '' + printf %s ${lib.escapeShellArg '' + extraBefore+=("-F$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks") + extraBefore+=("-L$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib") + ''} >> $out/nix-support/add-local-ldflags-before.sh + echo 'source ${selfDarwin.postLinkSignHook}' >> $out/nix-support/post-link-hook export signingUtils=${selfDarwin.signingUtils} @@ -694,6 +700,11 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check # Bootstrap tools cctools needs the hook and wrappers to make sure things are signed properly. # This can be dropped once the bootstrap tools cctools has been updated to 1010.6. extraBuildCommands = '' + printf %s ${lib.escapeShellArg '' + extraBefore+=("-F$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks") + extraBefore+=("-L$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib") + ''} >> $out/nix-support/add-local-ldflags-before.sh + echo 'source ${selfDarwin.postLinkSignHook}' >> $out/nix-support/post-link-hook export signingUtils=${selfDarwin.signingUtils} From d831e4c17ba9568973a3e0a2cd8ce14343e7f335 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 17:28:27 +0000 Subject: [PATCH 117/252] openjdk8: 8u422-ga -> 8u432-b06 --- pkgs/development/compilers/openjdk/8/source.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/openjdk/8/source.json b/pkgs/development/compilers/openjdk/8/source.json index 47ad1dc0596a..6cedef5ccb7b 100644 --- a/pkgs/development/compilers/openjdk/8/source.json +++ b/pkgs/development/compilers/openjdk/8/source.json @@ -1,6 +1,6 @@ { - "hash": "sha256-uMo1DIkji+FPTbFRwURXybkLE5xv+teSClWP9RfAvfo=", + "hash": "sha256-48DyJXD7D28LFa+4ONeMgSddqrCLn6FLwEGWGeP4upM=", "owner": "openjdk", "repo": "jdk8u", - "rev": "jdk8u422-ga" + "rev": "refs/tags/jdk8u432-b06" } From afa5f909846cd0f80d38d0a50e7b2aa770d65eb0 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 17:29:39 +0000 Subject: [PATCH 118/252] openjdk11: 11.0.24+8 -> 11.0.25+9 --- pkgs/development/compilers/openjdk/11/source.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/openjdk/11/source.json b/pkgs/development/compilers/openjdk/11/source.json index 8683cdecba3d..68080694d667 100644 --- a/pkgs/development/compilers/openjdk/11/source.json +++ b/pkgs/development/compilers/openjdk/11/source.json @@ -1,6 +1,6 @@ { - "hash": "sha256-H/VmT6NYbbZBba7Js8xk+epVZ2kLfvlwTNgg5SQ4ljA=", + "hash": "sha256-HqFm4qESB5T4Y1FLgfHZxURi7l7NkLzx2w8GzmB1jSY=", "owner": "openjdk", "repo": "jdk11u", - "rev": "jdk-11.0.24+8" + "rev": "refs/tags/jdk-11.0.25+9" } From 10ba3b431ac58117e1a2254279b9ac538040d71a Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 24 Oct 2024 21:07:01 +0200 Subject: [PATCH 119/252] nss_latest: 3.105 -> 3.106 https://groups.google.com/a/mozilla.org/g/dev-tech-crypto/c/c1bFm1SR6hQ --- pkgs/development/libraries/nss/latest.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/nss/latest.nix b/pkgs/development/libraries/nss/latest.nix index 143bb32a5677..a6c5e3dd4c2b 100644 --- a/pkgs/development/libraries/nss/latest.nix +++ b/pkgs/development/libraries/nss/latest.nix @@ -5,6 +5,6 @@ # Example: nix-shell ./maintainers/scripts/update.nix --argstr package cacert import ./generic.nix { - version = "3.105"; - hash = "sha256-Nfd7u0sdGqUCznnUxEJQFs+QuRSb+b7rZrcvKryimOQ="; + version = "3.106"; + hash = "sha256-j8B5RgEdBbtqPmIUniNF8ToGPIrPJ8gVTMplcv72fD0="; } From fe4e4a1ae23b5f96df2de7399e857c8762fc5fba Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 17:30:51 +0000 Subject: [PATCH 120/252] openjdk17: 17.0.12+7 -> 17.0.13+11 Drop an upstreamed patch, and update another for upstream changes. --- .../17/patches/fix-library-path-jdk17.patch | 31 ++++++++++--------- .../compilers/openjdk/17/source.json | 4 +-- .../development/compilers/openjdk/generic.nix | 9 ------ 3 files changed, 18 insertions(+), 26 deletions(-) diff --git a/pkgs/development/compilers/openjdk/17/patches/fix-library-path-jdk17.patch b/pkgs/development/compilers/openjdk/17/patches/fix-library-path-jdk17.patch index 4c38aca2b48a..71d96631ef89 100644 --- a/pkgs/development/compilers/openjdk/17/patches/fix-library-path-jdk17.patch +++ b/pkgs/development/compilers/openjdk/17/patches/fix-library-path-jdk17.patch @@ -1,6 +1,8 @@ +diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp +index 7c951cee51..bcc61ff43d 100644 --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp -@@ -412,18 +412,8 @@ void os::init_system_properties_values() { +@@ -416,18 +416,8 @@ // 1: ... // ... // 7: The default directories, normally /lib and /usr/lib. @@ -18,8 +20,8 @@ -#define SYS_EXT_DIR "/usr/java/packages" #define EXTENSIONS_DIR "/lib/ext" - // Buffer that fits several sprintfs. -@@ -431,7 +421,7 @@ void os::init_system_properties_values() { + // Buffer that fits several snprintfs. +@@ -435,7 +425,7 @@ // by the nulls included by the sizeof operator. const size_t bufsize = MAX2((size_t)MAXPATHLEN, // For dll_dir & friends. @@ -28,28 +30,26 @@ char *buf = NEW_C_HEAP_ARRAY(char, bufsize, mtInternal); // sysclasspath, java_home, dll_dir -@@ -478,26 +468,22 @@ void os::init_system_properties_values() { +@@ -482,24 +472,20 @@ // should always exist (until the legacy problem cited above is // addressed). const char *v = ::getenv("LD_LIBRARY_PATH"); - const char *v_colon = ":"; - if (v == NULL) { v = ""; v_colon = ""; } +- // That's +1 for the colon and +1 for the trailing '\0'. +- size_t pathsize = strlen(v) + 1 + sizeof(SYS_EXT_DIR) + sizeof("/lib/") + sizeof(DEFAULT_LIBPATH) + 1; + if (v == NULL) { v = ""; } - // That's +1 for the colon and +1 for the trailing '\0'. - char *ld_library_path = NEW_C_HEAP_ARRAY(char, -- strlen(v) + 1 + -- sizeof(SYS_EXT_DIR) + sizeof("/lib/") + sizeof(DEFAULT_LIBPATH) + 1, -+ strlen(v) + 1, - mtInternal); -- sprintf(ld_library_path, "%s%s" SYS_EXT_DIR "/lib:" DEFAULT_LIBPATH, v, v_colon); -+ sprintf(ld_library_path, "%s", v); ++ size_t pathsize = strlen(v) + 1; + char *ld_library_path = NEW_C_HEAP_ARRAY(char, pathsize, mtInternal); +- os::snprintf_checked(ld_library_path, pathsize, "%s%s" SYS_EXT_DIR "/lib:" DEFAULT_LIBPATH, v, v_colon); ++ os::snprintf_checked(ld_library_path, pathsize, "%s", v); Arguments::set_library_path(ld_library_path); FREE_C_HEAP_ARRAY(char, ld_library_path); } // Extensions directories. -- sprintf(buf, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home()); -+ sprintf(buf, "%s" EXTENSIONS_DIR, Arguments::get_java_home()); +- os::snprintf_checked(buf, bufsize, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home()); ++ os::snprintf_checked(buf, bufsize, "%s" EXTENSIONS_DIR, Arguments::get_java_home()); Arguments::set_ext_dirs(buf); FREE_C_HEAP_ARRAY(char, buf); @@ -57,4 +57,5 @@ -#undef DEFAULT_LIBPATH -#undef SYS_EXT_DIR #undef EXTENSIONS_DIR - } \ No newline at end of file + } + diff --git a/pkgs/development/compilers/openjdk/17/source.json b/pkgs/development/compilers/openjdk/17/source.json index 546e2fff8a19..c372853e70e0 100644 --- a/pkgs/development/compilers/openjdk/17/source.json +++ b/pkgs/development/compilers/openjdk/17/source.json @@ -1,6 +1,6 @@ { - "hash": "sha256-9UB1H3gd+b4wWxOMgsdDPgX/IGWNORKk1gMsSjYoZMw=", + "hash": "sha256-wHJlCmaE8titkfcWb2WboqemekPBn3JWc4bGyWskmoY=", "owner": "openjdk", "repo": "jdk17u", - "rev": "jdk-17.0.12+7" + "rev": "refs/tags/jdk-17.0.13+11" } diff --git a/pkgs/development/compilers/openjdk/generic.nix b/pkgs/development/compilers/openjdk/generic.nix index 49742ca8b989..669057216a55 100644 --- a/pkgs/development/compilers/openjdk/generic.nix +++ b/pkgs/development/compilers/openjdk/generic.nix @@ -221,15 +221,6 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-Qcm3ZmGCOYLZcskNjj7DYR85R4v07vYvvavrVOYL8vg="; }) ] - ++ lib.optionals (featureVersion == "17") [ - # Backport fixes for musl 1.2.4 which are already applied in jdk21+ - # Fetching patch from chimera because they already went through the effort of rebasing it onto jdk17 - (fetchurl { - name = "lfs64.patch"; - url = "https://raw.githubusercontent.com/chimera-linux/cports/4614075d19e9c9636f3f7e476687247f63330a35/contrib/openjdk17/patches/lfs64.patch"; - hash = "sha256-t2mRbdEiumBAbIAC0zsJNwCn59WYWHsnRtuOSL6bWB4="; - }) - ] ++ lib.optionals (!headless && enableGtk) [ ( if atLeast17 then From fc8beb4a6a025b7fceea8c2a597543c0cfcbac92 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 17:32:03 +0000 Subject: [PATCH 121/252] openjdk21: 21.0.4+7 -> 21.0.5+11 --- pkgs/development/compilers/openjdk/21/source.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/openjdk/21/source.json b/pkgs/development/compilers/openjdk/21/source.json index d0db28246a84..9808423ccff1 100644 --- a/pkgs/development/compilers/openjdk/21/source.json +++ b/pkgs/development/compilers/openjdk/21/source.json @@ -1,6 +1,6 @@ { - "hash": "sha256-+xpQtQ1IQ7btVWnENT9XS5A/2VP101/+XR3BMo8BqYI=", + "hash": "sha256-H28Hp1SzANkrgnC6xdkiSEcRK6bm8BcT/lbJDEUvRYY=", "owner": "openjdk", "repo": "jdk21u", - "rev": "jdk-21.0.4+7" + "rev": "refs/tags/jdk-21.0.5+11" } From 860924d70406ee12fb85edf08871c285a7a228ea Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 17:33:14 +0000 Subject: [PATCH 122/252] openjdk23: 23-ga -> 23.0.1+11 --- pkgs/development/compilers/openjdk/23/source.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/openjdk/23/source.json b/pkgs/development/compilers/openjdk/23/source.json index b47426326ecd..d56aeb591498 100644 --- a/pkgs/development/compilers/openjdk/23/source.json +++ b/pkgs/development/compilers/openjdk/23/source.json @@ -1,6 +1,6 @@ { - "hash": "sha256-lcLnWAiskWindOqWmOWiIHiYKXGSJZK4d20k19QZfrE=", + "hash": "sha256-Sl0aEtndzlyuwMtcjOeDe2CVls89ONzicP5IXhAU2FA=", "owner": "openjdk", "repo": "jdk23u", - "rev": "jdk-23-ga" + "rev": "refs/tags/jdk-23.0.1+11" } From 7bc545f5a811d2835b7b2ded7f74434439a197fe Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 18:49:28 +0100 Subject: [PATCH 123/252] openjdk{8,11,17,21,23}: remove obsolete version logic --- pkgs/development/compilers/openjdk/generic.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/development/compilers/openjdk/generic.nix b/pkgs/development/compilers/openjdk/generic.nix index 669057216a55..a551b974f93f 100644 --- a/pkgs/development/compilers/openjdk/generic.nix +++ b/pkgs/development/compilers/openjdk/generic.nix @@ -99,12 +99,8 @@ let atLeast23 = lib.versionAtLeast featureVersion "23"; tagPrefix = if atLeast11 then "jdk-" else "jdk"; - # TODO: Merge these `lib.removePrefix` calls once update scripts have - # been run. - version = lib.removePrefix tagPrefix (lib.removePrefix "refs/tags/" source.src.rev); - versionSplit = - # TODO: Remove `-ga` logic once update scripts have been run. - builtins.match (if atLeast11 then "(.+)[-+](.+)" else "(.+)-b?(.+)") version; + version = lib.removePrefix "refs/tags/${tagPrefix}" source.src.rev; + versionSplit = builtins.match (if atLeast11 then "(.+)+(.+)" else "(.+)-b(.+)") version; versionBuild = lib.elemAt versionSplit 1; # The JRE 8 libraries are in directories that depend on the CPU. From 09adc5dc965bb9edfb69b258876727b06f018553 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 19:17:45 +0000 Subject: [PATCH 124/252] openjfx17: 17.0.11-ga -> 17.0.11+3 So this is fun: the hash here is actually the hash we had previously for 17.0.6+3. 614dc610feb174b3a220d7cda36e7fbf565fc172 bumped to this version, with the correct hash, but then the conversion to use the Gradle setup hook in e6f8a3babaadc3e1560e5143610cf1098fee4a77 regressed it back, presumably due to a merge issue, and of course nobody noticed until now. Drop an upstreamed WebKit Ruby compatibility fix that should never have been needed for the version we advertised this as being at the time. Fixes: e6f8a3babaadc3e1560e5143610cf1098fee4a77 --- pkgs/by-name/op/openjfx/17/deps.json | 4 ++-- pkgs/by-name/op/openjfx/17/source.json | 4 ++-- pkgs/by-name/op/openjfx/package.nix | 5 ----- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/op/openjfx/17/deps.json b/pkgs/by-name/op/openjfx/17/deps.json index a9fa40a91be1..ec1816339f40 100644 --- a/pkgs/by-name/op/openjfx/17/deps.json +++ b/pkgs/by-name/op/openjfx/17/deps.json @@ -7,8 +7,8 @@ } }, "https://github.com": { - "unicode-org/icu/releases/download/release-71-1/icu4c-71_1-data-bin-l": { - "zip": "sha256-pVWIy0BkICsthA5mxhR9SJQHleMNnaEcGl/AaLi5qZM=" + "unicode-org/icu/releases/download/release-73-1/icu4c-73_1-data-bin-l": { + "zip": "sha256-QDgpjuAqDDiRcYXvj/Tr3pyLVSx3f9A+TfbGtLGCXiA=" } }, "https://repo.maven.apache.org/maven2": { diff --git a/pkgs/by-name/op/openjfx/17/source.json b/pkgs/by-name/op/openjfx/17/source.json index 932875548f4b..df4010708c42 100644 --- a/pkgs/by-name/op/openjfx/17/source.json +++ b/pkgs/by-name/op/openjfx/17/source.json @@ -1,6 +1,6 @@ { + "hash": "sha256-WV8NHlYlt7buGbirLSorLnS2TnyBD17zUquFfwSL3xE=", "owner": "openjdk", "repo": "jfx17u", - "rev": "17.0.11-ga", - "sha256": "sha256-9VfXk2EfMebMyVKPohPRP2QXRFf8XemUtfY0JtBCHyw=" + "rev": "refs/tags/17.0.11+3" } diff --git a/pkgs/by-name/op/openjfx/package.nix b/pkgs/by-name/op/openjfx/package.nix index 96269280f7b6..aaac6be0c9cd 100644 --- a/pkgs/by-name/op/openjfx/package.nix +++ b/pkgs/by-name/op/openjfx/package.nix @@ -139,11 +139,6 @@ stdenv.mkDerivation { -i modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/Heap.cpp \ modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/IsoSharedPageInlines.h - '' - + lib.optionalString (!atLeast21) '' - substituteInPlace modules/javafx.web/src/main/native/Source/JavaScriptCore/offlineasm/parser.rb \ - --replace-fail "File.exists?" "File.exist?" - '' + '' ln -s $config gradle.properties From 2c50b625cf3e496ce5a600486553908f79b13121 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 19:35:01 +0000 Subject: [PATCH 125/252] openjfx21: 21.0.3-ga -> 21.0.3+2 Purely cosmetic change; these versions are identical. --- pkgs/by-name/op/openjfx/21/source.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/op/openjfx/21/source.json b/pkgs/by-name/op/openjfx/21/source.json index adecaa605bcc..73d3a6adbb5c 100644 --- a/pkgs/by-name/op/openjfx/21/source.json +++ b/pkgs/by-name/op/openjfx/21/source.json @@ -2,5 +2,5 @@ "hash": "sha256-7z0GIbkQwG9mXY9dssaicqaKpMo3FkNEpyAvkswoQQ4=", "owner": "openjdk", "repo": "jfx21u", - "rev": "21.0.3-ga" + "rev": "refs/tags/21.0.3+2" } From f95c2f68da044de1766fa6a6655085422e7346ee Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 19:43:24 +0000 Subject: [PATCH 126/252] openjfx23: 23-ga -> 23.0.1+4 Drop a backported patch that was upstreamed. --- pkgs/by-name/op/openjfx/23/source.json | 4 ++-- pkgs/by-name/op/openjfx/package.nix | 16 ++++------------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/op/openjfx/23/source.json b/pkgs/by-name/op/openjfx/23/source.json index a67cd0f370f1..19ca02f90b00 100644 --- a/pkgs/by-name/op/openjfx/23/source.json +++ b/pkgs/by-name/op/openjfx/23/source.json @@ -1,6 +1,6 @@ { - "hash": "sha256-a/ev91Rq7D3z9O56ZZQCgvvbfj5GBt5Lonow2NH3s/E=", + "hash": "sha256-H3BPLo7yKWBiiI8sd3wkLJDN9h6jbWj5119cs2YHLwU=", "owner": "openjdk", "repo": "jfx23u", - "rev": "23-ga" + "rev": "refs/tags/23.0.1+4" } diff --git a/pkgs/by-name/op/openjfx/package.nix b/pkgs/by-name/op/openjfx/package.nix index aaac6be0c9cd..b64ce6d32e15 100644 --- a/pkgs/by-name/op/openjfx/package.nix +++ b/pkgs/by-name/op/openjfx/package.nix @@ -69,17 +69,8 @@ stdenv.mkDerivation { inherit (source) src; - patches = - if featureVersion == "23" then - [ - # 8338701: Provide media support for libavcodec version 61 - # - (fetchpatch2 { - url = "https://github.com/openjdk/jfx23u/commit/aba60fda1c82f00e8e685107592305c403a31287.patch?full_index=1"; - hash = "sha256-+aRhTwi4VQthAq1SH1jxPl0mTosNMKoTY52jm+jiKso="; - }) - ] - else if atLeast21 then + patches = lib.optionals (!atLeast23) ( + if atLeast21 then [ ./21/patches/backport-ffmpeg-7-support-jfx21.patch ] @@ -87,7 +78,8 @@ stdenv.mkDerivation { [ ./17/patches/backport-ffmpeg-6-support-jfx11.patch ./17/patches/backport-ffmpeg-7-support-jfx11.patch - ]; + ] + ); nativeBuildInputs = [ gradle_openjfx From 1b0dadd10238de0c60ed27d36cd500b8210111f2 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 20:54:37 +0100 Subject: [PATCH 127/252] nixpkgs-openjdk-updater.openjdkSource: enforce `source.json` schema --- .../ni/nixpkgs-openjdk-updater/package.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/ni/nixpkgs-openjdk-updater/package.nix b/pkgs/by-name/ni/nixpkgs-openjdk-updater/package.nix index 124a1fced4c6..e23d573d9641 100644 --- a/pkgs/by-name/ni/nixpkgs-openjdk-updater/package.nix +++ b/pkgs/by-name/ni/nixpkgs-openjdk-updater/package.nix @@ -43,11 +43,17 @@ python3Packages.buildPythonApplication { featureVersionPrefix, }: let - # TODO: Tighten up after update scripts are run. - src = fetchFromGitHub (lib.importJSON sourceFile); + sourceInfo = lib.importJSON sourceFile; in { - inherit src; + src = fetchFromGitHub { + inherit (sourceInfo) + owner + repo + rev + hash + ; + }; updateScript = { command = [ @@ -57,10 +63,10 @@ python3Packages.buildPythonApplication { sourceFile "--owner" - src.owner + sourceInfo.owner "--repo" - src.repo + sourceInfo.repo "--feature-version-prefix" featureVersionPrefix From c1f644cdccfc5b555ef90abd1536057eea7f572d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 25 Oct 2024 10:12:46 +0000 Subject: [PATCH 128/252] ethtool: 6.9 -> 6.11 --- pkgs/tools/misc/ethtool/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/ethtool/default.nix b/pkgs/tools/misc/ethtool/default.nix index ff7fe2603271..ebd26985f7f4 100644 --- a/pkgs/tools/misc/ethtool/default.nix +++ b/pkgs/tools/misc/ethtool/default.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation rec { pname = "ethtool"; - version = "6.9"; + version = "6.11"; src = fetchurl { url = "mirror://kernel/software/network/ethtool/ethtool-${version}.tar.xz"; - sha256 = "sha256-pxsDVAEGYcXPF4vGBu1Q/LkYBc8Yl60OsoGDh6X9DNk="; + sha256 = "sha256-jZH1xyrj8lt+iNR4EnncsyD3HjAFiRQ3CxxXTJazEgI="; }; nativeBuildInputs = [ From d29d7043a7c3dae0371a35676ba5b5192ef32b0e Mon Sep 17 00:00:00 2001 From: Steven Keuchel Date: Fri, 25 Oct 2024 12:30:30 +0200 Subject: [PATCH 129/252] tinysparql: upstream patch to fix a test that is broken on some platforms --- pkgs/by-name/ti/tinysparql/package.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/ti/tinysparql/package.nix b/pkgs/by-name/ti/tinysparql/package.nix index 82aa22d44bc7..204880568531 100644 --- a/pkgs/by-name/ti/tinysparql/package.nix +++ b/pkgs/by-name/ti/tinysparql/package.nix @@ -1,5 +1,6 @@ { stdenv , lib +, fetchpatch2 , fetchurl , gettext , meson @@ -106,13 +107,15 @@ stdenv.mkDerivation (finalAttrs: { "-Dsystemd_user_services=false" ]; - doCheck = - # https://gitlab.gnome.org/GNOME/tinysparql/-/issues/402 - !stdenv.hostPlatform.isDarwin - # https://gitlab.gnome.org/GNOME/tinysparql/-/issues/398 - && !stdenv.hostPlatform.is32bit - # https://gitlab.gnome.org/GNOME/tinysparql/-/issues/474 - && !stdenv.hostPlatform.isMusl; + patches = [ + # https://gitlab.gnome.org/GNOME/tinysparql/-/merge_requests/730 + (fetchpatch2 { + url = "https://gitlab.gnome.org/GNOME/tinysparql/commit/12ed969913cb579f638fa0aa0853aeb6c6c6f536.patch"; + hash = "sha256-jyx9hdWUUxfCSTGn7lZL4RUiQAF4pkf4gfCP8g9Ep3U="; + }) + ]; + + doCheck = true; postPatch = '' chmod +x \ From 49e79fb61529569688fd51af1c22a7ba805cbf9c Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 25 Oct 2024 00:32:02 +0100 Subject: [PATCH 130/252] ffmpeg_{4,6,7}: clean up old Darwin SDK pattern --- pkgs/development/libraries/ffmpeg/default.nix | 8 -------- pkgs/development/libraries/ffmpeg/generic.nix | 15 ++------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/default.nix b/pkgs/development/libraries/ffmpeg/default.nix index eac16d659dac..d07551608a54 100644 --- a/pkgs/development/libraries/ffmpeg/default.nix +++ b/pkgs/development/libraries/ffmpeg/default.nix @@ -9,14 +9,6 @@ let initArgs: ffmpegVariant: callPackage ./generic.nix ( { - inherit (darwin.apple_sdk.frameworks) - Accelerate - AppKit - AudioToolbox - AVFoundation - CoreImage - VideoToolbox - ; inherit (darwin) xcode; inherit (cudaPackages) cuda_cudart cuda_nvcc libnpp; } diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index f6f85b5b8e2a..6dc9daa4ea0c 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -333,14 +333,8 @@ , zlib , zvbi /* - * Darwin frameworks + * Darwin */ -, Accelerate -, AppKit -, AudioToolbox -, AVFoundation -, CoreImage -, VideoToolbox , xcode # unfree contains metalcc and metallib /* * Cuda Packages @@ -735,12 +729,9 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withAlsa [ alsa-lib ] ++ optionals withAmf [ amf-headers ] ++ optionals withAom [ libaom ] - ++ optionals withAppKit [ AppKit ] ++ optionals withAribb24 [ aribb24 ] ++ optionals withAribcaption [ libaribcaption ] ++ optionals withAss [ libass ] - ++ optionals withAudioToolbox [ AudioToolbox ] - ++ optionals withAvFoundation [ AVFoundation ] ++ optionals withAvisynth [ avisynthplus ] ++ optionals withBluray [ libbluray ] ++ optionals withBs2b [ libbs2b ] @@ -750,7 +741,6 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withCelt [ celt ] ++ optionals withChromaprint [ chromaprint ] ++ optionals withCodec2 [ codec2 ] - ++ optionals withCoreImage [ CoreImage ] ++ optionals withCudaNVCC [ cuda_cudart cuda_nvcc ] ++ optionals withDav1d [ dav1d ] ++ optionals withDc1394 [ libdc1394 libraw1394 ] @@ -794,7 +784,7 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withQuirc [ quirc ] ++ optionals withRav1e [ rav1e ] ++ optionals withRtmp [ rtmpdump ] - ++ optionals withRubberband ([ rubberband ] ++ lib.optional stdenv.hostPlatform.isDarwin Accelerate) + ++ optionals withRubberband [ rubberband ] ++ optionals withSamba [ samba ] ++ optionals withSdl2 [ SDL2 ] ++ optionals withShaderc [ shaderc ] @@ -812,7 +802,6 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withV4l2 [ libv4l ] ++ optionals withVaapi [ (if withSmallDeps then libva else libva-minimal) ] ++ optionals withVdpau [ libvdpau ] - ++ optionals withVideoToolbox [ VideoToolbox ] ++ optionals withVidStab [ vid-stab ] ++ optionals withVmaf [ libvmaf ] ++ optionals withVoAmrwbenc [ vo-amrwbenc ] From 151d5da2e624159658d90e563e325b0c3844dfa2 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 25 Oct 2024 00:32:02 +0100 Subject: [PATCH 131/252] ffmpeg_{4,6,7}: remove redundant Darwin framework feature flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All of these are supplied in the standard environment as part of the SDK now, so there’s no closure difference at build or runtime and no reason to turn them off. --- pkgs/development/libraries/ffmpeg/generic.nix | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 6dc9daa4ea0c..5259fb9df4aa 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -36,12 +36,9 @@ , withAlsa ? withHeadlessDeps && stdenv.hostPlatform.isLinux # Alsa in/output supporT , withAmf ? lib.meta.availableOn stdenv.hostPlatform amf # AMD Media Framework video encoding , withAom ? withHeadlessDeps # AV1 reference encoder -, withAppKit ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple AppKit framework , withAribb24 ? withFullDeps # ARIB text and caption decoding , withAribcaption ? withFullDeps && lib.versionAtLeast version "6.1" # ARIB STD-B24 Caption Decoder/Renderer , withAss ? withHeadlessDeps && stdenv.hostPlatform == stdenv.buildPlatform # (Advanced) SubStation Alpha subtitle rendering -, withAudioToolbox ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple AudioToolbox -, withAvFoundation ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple AVFoundation framework , withAvisynth ? withFullDeps # AviSynth script files reading , withBluray ? withFullDeps # BluRay reading , withBs2b ? withFullDeps # bs2b DSP library @@ -51,7 +48,6 @@ , withCelt ? withHeadlessDeps # CELT decoder , withChromaprint ? withFullDeps # Audio fingerprinting , withCodec2 ? withFullDeps # codec2 en/decoding -, withCoreImage ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple CoreImage framework , withCuda ? withFullDeps && withNvcodec , withCudaLLVM ? withFullDeps , withCudaNVCC ? withFullDeps && withUnfree && config.cudaSupport @@ -121,7 +117,6 @@ , withV4l2M2m ? withV4l2 , withVaapi ? withHeadlessDeps && (with stdenv; isLinux || isFreeBSD) # Vaapi hardware acceleration , withVdpau ? withSmallDeps && !stdenv.hostPlatform.isMinGW # Vdpau hardware acceleration -, withVideoToolbox ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple VideoToolbox , withVidStab ? withHeadlessDeps && withGPL # Video stabilization , withVmaf ? withFullDeps && !stdenv.hostPlatform.isAarch64 && lib.versionAtLeast version "5" # Netflix's VMAF (Video Multi-Method Assessment Fusion) , withVoAmrwbenc ? withFullDeps && withVersion3 # AMR-WB encoder @@ -554,14 +549,11 @@ stdenv.mkDerivation (finalAttrs: { (enableFeature withAlsa "alsa") (enableFeature withAmf "amf") (enableFeature withAom "libaom") - (enableFeature withAppKit "appkit") (enableFeature withAribb24 "libaribb24") ] ++ optionals (versionAtLeast version "6.1") [ (enableFeature withAribcaption "libaribcaption") ] ++ [ (enableFeature withAss "libass") - (enableFeature withAudioToolbox "audiotoolbox") - (enableFeature withAvFoundation "avfoundation") (enableFeature withAvisynth "avisynth") (enableFeature withBluray "libbluray") (enableFeature withBs2b "libbs2b") @@ -571,7 +563,6 @@ stdenv.mkDerivation (finalAttrs: { (enableFeature withCelt "libcelt") (enableFeature withChromaprint "chromaprint") (enableFeature withCodec2 "libcodec2") - (enableFeature withCoreImage "coreimage") (enableFeature withCuda "cuda") (enableFeature withCudaLLVM "cuda-llvm") (enableFeature withCudaNVCC "cuda-nvcc") @@ -661,7 +652,6 @@ stdenv.mkDerivation (finalAttrs: { ] ++ optionals (versionAtLeast version "6.0") [ (enableFeature withVpl "libvpl") ] ++ [ - (enableFeature withVideoToolbox "videotoolbox") (enableFeature withVidStab "libvidstab") # Actual min. version 2.0 (enableFeature withVmaf "libvmaf") (enableFeature withVoAmrwbenc "libvo-amrwbenc") From 927d45eccfd8e5f922d7a35c273bad359f035b73 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 25 Oct 2024 00:32:02 +0100 Subject: [PATCH 132/252] ffmpeg_{4,6,7}: build with `apple-sdk_15` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream is pretty good about using availability checks, and there are runtime‐checked features for macOS 10.13, 11, and 12 that are only available if we build with a modern SDK. This impacts, e.g. hardware‐accelerated video decoding in mpv. FFmpeg should still continue to build and run on all our supported macOS releases, with runtime functionality being no worse than before on older versions. --- pkgs/development/libraries/ffmpeg/generic.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 5259fb9df4aa..53d2c700317f 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -330,6 +330,7 @@ /* * Darwin */ +, apple-sdk_15 , xcode # unfree contains metalcc and metallib /* * Cuda Packages @@ -716,6 +717,7 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withCudaNVCC [ cuda_nvcc ]; buildInputs = [] + ++ optionals stdenv.hostPlatform.isDarwin [ apple-sdk_15 ] ++ optionals withAlsa [ alsa-lib ] ++ optionals withAmf [ amf-headers ] ++ optionals withAom [ libaom ] From f108380db7a157daf23e0fe957bda5690c58d2b6 Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Fri, 25 Oct 2024 18:06:31 +0200 Subject: [PATCH 133/252] openssh, openssh_hpn, openssh_gssapi: 9.8p1 -> 9.9p1 (#350699) * openssh: 9.8p1 -> 9.9p1 Changes: https://www.openssh.com/releasenotes.html#9.9p1 * openssh_hpn: 9.8p1 -> 9.9p1 Changes: https://www.openssh.com/releasenotes.html#9.9p1 * openssh_gssapi: 9.8p1 -> 9.9p1 Changes: https://www.openssh.com/releasenotes.html#9.9p1 --------- Co-authored-by: Ashish SHUKLA --- pkgs/tools/networking/openssh/common.nix | 7 ------- pkgs/tools/networking/openssh/default.nix | 16 ++++++++-------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/pkgs/tools/networking/openssh/common.nix b/pkgs/tools/networking/openssh/common.nix index b92f770018ac..95445b92375b 100644 --- a/pkgs/tools/networking/openssh/common.nix +++ b/pkgs/tools/networking/openssh/common.nix @@ -47,13 +47,6 @@ stdenv.mkDerivation (finalAttrs: { url = "https://git.alpinelinux.org/aports/plain/main/openssh/gss-serv.c.patch?id=a7509603971ce2f3282486a43bb773b1b522af83"; sha256 = "sha256-eFFOd4B2nccRZAQWwdBPBoKWjfEdKEVGJvKZAzLu3HU="; }) - - (fetchpatch { - name = "musl.patch"; - url = "https://anongit.mindrot.org/openssh.git/patch/?id=8b664df75966e5aed8dabea00b8838303d3488b8"; - hash = "sha256-siVg1mnGiZ2aP3IIY4y1WAp3nkOk0XKSBDqYfw6lrQg="; - }) - # See discussion in https://github.com/NixOS/nixpkgs/pull/16966 ./dont_create_privsep_path.patch ] ++ extraPatches; diff --git a/pkgs/tools/networking/openssh/default.nix b/pkgs/tools/networking/openssh/default.nix index 96505155fb34..2bda81df9003 100644 --- a/pkgs/tools/networking/openssh/default.nix +++ b/pkgs/tools/networking/openssh/default.nix @@ -5,11 +5,11 @@ in { openssh = common rec { pname = "openssh"; - version = "9.8p1"; + version = "9.9p1"; src = fetchurl { url = "mirror://openbsd/OpenSSH/portable/openssh-${version}.tar.gz"; - hash = "sha256-3YvQAqN5tdSZ37BQ3R+pr4Ap6ARh9LtsUjxJlz9aOfM="; + hash = "sha256-s0P7zb/4fxWxmG5uFdbU/Jp9NgZr5rf7UHCHuo+WbAI="; }; extraPatches = [ ./ssh-keysign-8.5.patch ]; @@ -18,12 +18,12 @@ in openssh_hpn = common rec { pname = "openssh-with-hpn"; - version = "9.8p1"; + version = "9.9p1"; extraDesc = " with high performance networking patches"; src = fetchurl { url = "mirror://openbsd/OpenSSH/portable/openssh-${version}.tar.gz"; - hash = "sha256-3YvQAqN5tdSZ37BQ3R+pr4Ap6ARh9LtsUjxJlz9aOfM="; + hash = "sha256-s0P7zb/4fxWxmG5uFdbU/Jp9NgZr5rf7UHCHuo+WbAI="; }; extraPatches = let url = "https://raw.githubusercontent.com/freebsd/freebsd-ports/7ba88c964b6e5724eec462021d984da3989e6a08/security/openssh-portable/files/extra-patch-hpn"; in @@ -58,12 +58,12 @@ in openssh_gssapi = common rec { pname = "openssh-with-gssapi"; - version = "9.8p1"; + version = "9.9p1"; extraDesc = " with GSSAPI support"; src = fetchurl { url = "mirror://openbsd/OpenSSH/portable/openssh-${version}.tar.gz"; - hash = "sha256-3YvQAqN5tdSZ37BQ3R+pr4Ap6ARh9LtsUjxJlz9aOfM="; + hash = "sha256-s0P7zb/4fxWxmG5uFdbU/Jp9NgZr5rf7UHCHuo+WbAI="; }; extraPatches = [ @@ -71,8 +71,8 @@ in (fetchpatch { name = "openssh-gssapi.patch"; - url = "https://salsa.debian.org/ssh-team/openssh/raw/debian/1%25${version}-3/debian/patches/gssapi.patch"; - hash = "sha256-BnmEZ5pMIbbysesMSm54ykdweH4JudM9D4Pn5uWf3EY="; + url = "https://salsa.debian.org/ssh-team/openssh/raw/debian/1%25${version}-2/debian/patches/gssapi.patch"; + hash = "sha256-cQF5psMZpLWwVqK9CNi+Q8wHn6w6ffQUJRNI5jKGgD0="; }) ]; From 3157d712e141272f48f7e93dc03afe84d018c35a Mon Sep 17 00:00:00 2001 From: Anthony ROUSSEL Date: Thu, 24 Oct 2024 22:23:51 +0200 Subject: [PATCH 134/252] ruby.rubygems: 3.5.21 -> 3.5.22 https://github.com/rubygems/rubygems/compare/v3.5.21...v3.5.22 --- pkgs/development/interpreters/ruby/rubygems/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/ruby/rubygems/default.nix b/pkgs/development/interpreters/ruby/rubygems/default.nix index 68e404be0ea8..9c56917ef5f2 100644 --- a/pkgs/development/interpreters/ruby/rubygems/default.nix +++ b/pkgs/development/interpreters/ruby/rubygems/default.nix @@ -7,11 +7,11 @@ stdenv.mkDerivation rec { pname = "rubygems"; - version = "3.5.21"; + version = "3.5.22"; src = fetchurl { url = "https://rubygems.org/rubygems/rubygems-${version}.tgz"; - hash = "sha256-lZs+SIaYaXXYXQsCEXeQiD5TuNBRUp326s/mR0XvMWA="; + hash = "sha256-IpyOOTpBLpnWoP4qIvuY99Li15zbxI5ajcym+po1bIc="; }; patches = [ From 0855ae2c46caa7787bc1d0825e8795011b6f8560 Mon Sep 17 00:00:00 2001 From: Anthony ROUSSEL Date: Thu, 24 Oct 2024 22:24:00 +0200 Subject: [PATCH 135/252] bundler: 2.5.21 -> 2.5.22 https://github.com/rubygems/rubygems/compare/v3.5.21...bundler-v2.5.22 --- pkgs/development/ruby-modules/bundler/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ruby-modules/bundler/default.nix b/pkgs/development/ruby-modules/bundler/default.nix index 0e5c71ba2da7..ac81e5b797bf 100644 --- a/pkgs/development/ruby-modules/bundler/default.nix +++ b/pkgs/development/ruby-modules/bundler/default.nix @@ -4,8 +4,8 @@ buildRubyGem rec { inherit ruby; name = "${gemName}-${version}"; gemName = "bundler"; - version = "2.5.21"; - source.sha256 = "sha256-ID1kXl9tqmC7+0zMsafUq6gXFnTgC8KHJChHQPjZ7/s="; + version = "2.5.22"; + source.sha256 = "sha256-dj8w1ZjuWHQu6ikoWHVDXqciIY1N8UneNbzjfALOlo4="; dontPatchShebangs = true; postFixup = '' From a95abfd5e49f4c6c6ca5336470e91bb88768ea0c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 25 Oct 2024 19:35:18 +0000 Subject: [PATCH 136/252] publicsuffix-list: 0-unstable-2024-09-10 -> 0-unstable-2024-10-25 --- pkgs/data/misc/publicsuffix-list/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/data/misc/publicsuffix-list/default.nix b/pkgs/data/misc/publicsuffix-list/default.nix index d12c615487ad..ef24d5765133 100644 --- a/pkgs/data/misc/publicsuffix-list/default.nix +++ b/pkgs/data/misc/publicsuffix-list/default.nix @@ -2,13 +2,13 @@ stdenvNoCC.mkDerivation { pname = "publicsuffix-list"; - version = "0-unstable-2024-09-10"; + version = "0-unstable-2024-10-25"; src = fetchFromGitHub { owner = "publicsuffix"; repo = "list"; - rev = "fbcc4c495e8aed1fe0e90156e6b3796556eb6978"; - hash = "sha256-L6TepLI91IWImX453GO8VNSSle75f0H1IZbFr2qepDA="; + rev = "435e07efb28973ea116592dc2291b1f8c27080aa"; + hash = "sha256-nLuZVgPHNnxOT3GcGz6TEbHkiNgVU5f2uWcgCfr7tZ8="; }; dontBuild = true; From 9142a070307ca6f18eb6e02aa2bca4855406680e Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 25 Oct 2024 19:41:08 +0100 Subject: [PATCH 137/252] {bintools-wrapper,cc-wrapper}: factor out Darwin SDK logic This reduces code duplication, makes the SDK variables available earlier in the wrappers, and makes the behaviour between the two wrappers more consistent. --- .../add-darwin-ldflags-before.sh | 6 ----- .../bintools-wrapper/default.nix | 22 ++++++++----------- .../bintools-wrapper/ld-wrapper.sh | 2 ++ pkgs/build-support/cc-wrapper/add-flags.sh | 13 +---------- pkgs/build-support/cc-wrapper/cc-wrapper.sh | 2 ++ pkgs/build-support/cc-wrapper/default.nix | 13 +++++------ .../wrapper-common/darwin-sdk-setup.bash | 16 ++++++++++++++ 7 files changed, 35 insertions(+), 39 deletions(-) create mode 100644 pkgs/build-support/wrapper-common/darwin-sdk-setup.bash diff --git a/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh b/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh index 127f83e303a3..75d9484846a8 100644 --- a/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh +++ b/pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh @@ -79,9 +79,3 @@ if [ ! "$havePlatformVersionFlag" ]; then extraBefore+=(-@darwinPlatform@_version_min "${@darwinMinVersionVariable@_@suffixSalt@:-@darwinMinVersion@}") fi fi - -mangleVarSingle DEVELOPER_DIR ${role_suffixes[@]+"${role_suffixes[@]}"} - -# Allow wrapped bintools to do something useful when no `DEVELOPER_DIR` is set, which can happen when -# the compiler is run outside of a stdenv or intentionally in an environment with no environment variables set. -DEVELOPER_DIR=${DEVELOPER_DIR_@suffixSalt@:-@fallback_sdk@} diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index a2a0736c2221..fc0446274161 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -372,24 +372,15 @@ stdenvNoCC.mkDerivation { substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh substituteAll ${./add-hardening.sh} $out/nix-support/add-hardening.sh substituteAll ${../wrapper-common/utils.bash} $out/nix-support/utils.bash + substituteAll ${../wrapper-common/darwin-sdk-setup.bash} $out/nix-support/darwin-sdk-setup.bash '' ### ### Ensure consistent LC_VERSION_MIN_MACOSX ### - + optionalString targetPlatform.isDarwin ( - let - inherit (targetPlatform) - darwinPlatform darwinSdkVersion - darwinMinVersion darwinMinVersionVariable; - in '' - export darwinPlatform=${darwinPlatform} - export darwinMinVersion=${darwinMinVersion} - export darwinSdkVersion=${darwinSdkVersion} - export darwinMinVersionVariable=${darwinMinVersionVariable} - substituteAll ${./add-darwin-ldflags-before.sh} $out/nix-support/add-local-ldflags-before.sh - '' - ) + + optionalString targetPlatform.isDarwin '' + substituteAll ${./add-darwin-ldflags-before.sh} $out/nix-support/add-local-ldflags-before.sh + '' ## ## Extra custom steps @@ -407,6 +398,11 @@ stdenvNoCC.mkDerivation { inherit dynamicLinker targetPrefix suffixSalt coreutils_bin; inherit bintools_bin libc_bin libc_dev libc_lib; default_hardening_flags_str = builtins.toString defaultHardeningFlags; + } // lib.mapAttrs (_: lib.optionalString targetPlatform.isDarwin) { + # These will become empty strings when not targeting Darwin. + inherit (targetPlatform) + darwinPlatform darwinSdkVersion + darwinMinVersion darwinMinVersionVariable; } // lib.optionalAttrs (apple-sdk != null && stdenvNoCC.targetPlatform.isDarwin) { # Wrapped compilers should do something useful even when no SDK is provided at `DEVELOPER_DIR`. fallback_sdk = apple-sdk.__spliced.buildTarget or apple-sdk; diff --git a/pkgs/build-support/bintools-wrapper/ld-wrapper.sh b/pkgs/build-support/bintools-wrapper/ld-wrapper.sh index 7e00d02b0374..1c5b08541ac2 100644 --- a/pkgs/build-support/bintools-wrapper/ld-wrapper.sh +++ b/pkgs/build-support/bintools-wrapper/ld-wrapper.sh @@ -16,6 +16,8 @@ fi source @out@/nix-support/utils.bash +source @out@/nix-support/darwin-sdk-setup.bash + if [ -z "${NIX_BINTOOLS_WRAPPER_FLAGS_SET_@suffixSalt@:-}" ]; then source @out@/nix-support/add-flags.sh fi diff --git a/pkgs/build-support/cc-wrapper/add-flags.sh b/pkgs/build-support/cc-wrapper/add-flags.sh index 838b963ead7b..2c3dc8884023 100644 --- a/pkgs/build-support/cc-wrapper/add-flags.sh +++ b/pkgs/build-support/cc-wrapper/add-flags.sh @@ -78,23 +78,12 @@ if [ -e @out@/nix-support/cc-cflags-before ]; then NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@="$(< @out@/nix-support/cc-cflags-before) $NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@" fi -# Only add darwin min version flag and set up `DEVELOPER_DIR` if a default darwin min version is set, +# Only add darwin min version flag if a default darwin min version is set, # which is a signal that we're targetting darwin. if [ "@darwinMinVersion@" ]; then mangleVarSingle @darwinMinVersionVariable@ ${role_suffixes[@]+"${role_suffixes[@]}"} NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@="-m@darwinPlatformForCC@-version-min=${@darwinMinVersionVariable@_@suffixSalt@:-@darwinMinVersion@} $NIX_CFLAGS_COMPILE_BEFORE_@suffixSalt@" - - # `DEVELOPER_DIR` is used to dynamically locate libSystem (and the SDK frameworks) based on the SDK at that path. - mangleVarSingle DEVELOPER_DIR ${role_suffixes[@]+"${role_suffixes[@]}"} - - # Allow wrapped compilers to do something useful when no `DEVELOPER_DIR` is set, which can happen when - # the compiler is run outside of a stdenv or intentionally in an environment with no environment variables set. - DEVELOPER_DIR=${DEVELOPER_DIR_@suffixSalt@:-@fallback_sdk@} - - # xcbuild needs `SDKROOT` to be the name of the SDK, which it sets in its own wrapper, - # but compilers expect it to point to the absolute path. - SDKROOT="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" fi # That way forked processes will not extend these environment variables again. diff --git a/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh index a539f9da4318..5d338a0dd0dc 100644 --- a/pkgs/build-support/cc-wrapper/cc-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh @@ -17,6 +17,8 @@ fi source @out@/nix-support/utils.bash +source @out@/nix-support/darwin-sdk-setup.bash + # Parse command line options and set several variables. # For instance, figure out if linker flags should be passed. diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index b9def8632615..001123fe3d85 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -284,13 +284,6 @@ let if (targetPlatform.darwinPlatform == "macos" && isGNU) then "macosx" else targetPlatform.darwinPlatform ); - - darwinMinVersion = optionalString targetPlatform.isDarwin ( - targetPlatform.darwinMinVersion - ); - - darwinMinVersionVariable = optionalString targetPlatform.isDarwin - targetPlatform.darwinMinVersionVariable; in assert includeFortifyHeaders' -> fortify-headers != null; @@ -707,6 +700,7 @@ stdenvNoCC.mkDerivation { substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh substituteAll ${./add-hardening.sh} $out/nix-support/add-hardening.sh substituteAll ${../wrapper-common/utils.bash} $out/nix-support/utils.bash + substituteAll ${../wrapper-common/darwin-sdk-setup.bash} $out/nix-support/darwin-sdk-setup.bash '' + optionalString cc.langAda or false '' @@ -751,8 +745,11 @@ stdenvNoCC.mkDerivation { wrapperName = "CC_WRAPPER"; inherit suffixSalt coreutils_bin bintools; inherit libc_bin libc_dev libc_lib; - inherit darwinPlatformForCC darwinMinVersion darwinMinVersionVariable; + inherit darwinPlatformForCC; default_hardening_flags_str = builtins.toString defaultHardeningFlags; + } // lib.mapAttrs (_: lib.optionalString targetPlatform.isDarwin) { + # These will become empty strings when not targeting Darwin. + inherit (targetPlatform) darwinMinVersion darwinMinVersionVariable; } // lib.optionalAttrs (apple-sdk != null && stdenvNoCC.targetPlatform.isDarwin) { # Wrapped compilers should do something useful even when no SDK is provided at `DEVELOPER_DIR`. fallback_sdk = apple-sdk.__spliced.buildTarget or apple-sdk; diff --git a/pkgs/build-support/wrapper-common/darwin-sdk-setup.bash b/pkgs/build-support/wrapper-common/darwin-sdk-setup.bash new file mode 100644 index 000000000000..8c6a337a8fca --- /dev/null +++ b/pkgs/build-support/wrapper-common/darwin-sdk-setup.bash @@ -0,0 +1,16 @@ +accumulateRoles + +# Only set up `DEVELOPER_DIR` if a default darwin min version is set, +# which is a signal that we're targetting darwin. +if [[ "@darwinMinVersion@" ]]; then + # `DEVELOPER_DIR` is used to dynamically locate libSystem (and the SDK frameworks) based on the SDK at that path. + mangleVarSingle DEVELOPER_DIR ${role_suffixes[@]+"${role_suffixes[@]}"} + + # Allow wrapped compilers to do something useful when no `DEVELOPER_DIR` is set, which can happen when + # the compiler is run outside of a stdenv or intentionally in an environment with no environment variables set. + DEVELOPER_DIR=${DEVELOPER_DIR_@suffixSalt@:-@fallback_sdk@} + + # xcbuild needs `SDKROOT` to be the name of the SDK, which it sets in its own wrapper, + # but compilers expect it to point to the absolute path. + SDKROOT="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" +fi From b50611e7496742b3d83f955ef019f2bb3dfa2892 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sat, 26 Oct 2024 12:57:20 +0900 Subject: [PATCH 138/252] python312Packages.ipython: 8.27.0 -> 8.29.0 Changelog: https://github.com/ipython/ipython/blob/8.29.0/docs/source/whatsnew/version8.rst --- pkgs/development/python-modules/ipython/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/ipython/default.nix b/pkgs/development/python-modules/ipython/default.nix index 33c3c0a8a754..45cd52fdbac3 100644 --- a/pkgs/development/python-modules/ipython/default.nix +++ b/pkgs/development/python-modules/ipython/default.nix @@ -42,13 +42,13 @@ buildPythonPackage rec { pname = "ipython"; - version = "8.27.0"; + version = "8.29.0"; pyproject = true; disabled = pythonOlder "3.10"; src = fetchPypi { inherit pname version; - hash = "sha256-C5mi3J8V/WhpLomOVWhyXG1JxSfTap+1lg/73qqC/34="; + hash = "sha256-QLYOFbIlkUUO73PkCgJ893vWUudXUj7rxb18fEmCkOs="; }; build-system = [ setuptools ]; From 48e5645c753744e8c956f14a5c836ea682abfbbd Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 26 Oct 2024 04:36:09 +0000 Subject: [PATCH 139/252] liburing: 2.7 -> 2.8 --- pkgs/development/libraries/liburing/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/liburing/default.nix b/pkgs/development/libraries/liburing/default.nix index c35df57b6052..931cbd77b041 100644 --- a/pkgs/development/libraries/liburing/default.nix +++ b/pkgs/development/libraries/liburing/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation rec { pname = "liburing"; - version = "2.7"; + version = "2.8"; src = fetchFromGitHub { owner = "axboe"; repo = "liburing"; rev = "refs/tags/liburing-${version}"; - hash = "sha256-WhNlO2opPM7v4LOLWpmzPv31++zmn5Hmb6Su9IQBDH8="; + hash = "sha256-10zmoMDzO41oNRVXE/6FzDGPVRVJTJTARVUmc1b7f+o="; }; separateDebugInfo = true; From 2f31fd064f926b1f6534fe9d1ac134fc243ec591 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 26 Oct 2024 13:59:55 +0100 Subject: [PATCH 140/252] ffmpeg_7: remove obsolete macOS 10.12 SDK patch --- ...tion.m-macOS-SDK-10.12-compatibility.patch | 25 ------------------- pkgs/development/libraries/ffmpeg/generic.nix | 1 - 2 files changed, 26 deletions(-) delete mode 100644 pkgs/development/libraries/ffmpeg/0001-avfoundation.m-macOS-SDK-10.12-compatibility.patch diff --git a/pkgs/development/libraries/ffmpeg/0001-avfoundation.m-macOS-SDK-10.12-compatibility.patch b/pkgs/development/libraries/ffmpeg/0001-avfoundation.m-macOS-SDK-10.12-compatibility.patch deleted file mode 100644 index 60004b1766ca..000000000000 --- a/pkgs/development/libraries/ffmpeg/0001-avfoundation.m-macOS-SDK-10.12-compatibility.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a804dd05351716b1fd9a7c2b7ed636613edd9c0f Mon Sep 17 00:00:00 2001 -From: toonn -Date: Fri, 21 Jun 2024 18:59:49 +0000 -Subject: [PATCH] avfoundation.m: macOS SDK 10.12 compatibility - ---- - libavdevice/avfoundation.m | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m -index d9b17ccdae..2a1f66d751 100644 ---- a/libavdevice/avfoundation.m -+++ b/libavdevice/avfoundation.m -@@ -762,7 +762,7 @@ static int get_audio_config(AVFormatContext *s) - return 0; - } - --static NSArray* getDevicesWithMediaType(AVMediaType mediaType) { -+static NSArray* getDevicesWithMediaType(NSString * mediaType) { - #if ((TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000) || (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)) - NSMutableArray *deviceTypes = nil; - if (mediaType == AVMediaTypeVideo) { --- -2.44.0 - diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 53d2c700317f..52104529e162 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -455,7 +455,6 @@ stdenv.mkDerivation (finalAttrs: { }) ] ++ optionals (lib.versionAtLeast version "7.1") [ - ./0001-avfoundation.m-macOS-SDK-10.12-compatibility.patch ./fix-fate-ffmpeg-spec-disposition-7.1.patch # Expose a private API for Chromium / Qt WebEngine. From e047c69ed406c834722b6ed7bb1bdd39d3e5eef0 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 25 Oct 2024 19:41:08 +0100 Subject: [PATCH 141/252] {bintools-wrapper,cc-wrapper}: allow paths relative to the Darwin SDK MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `-L` and `-I` are interpreted relative to the `$SDKROOT` by the Darwin toolchain, so we have to avoid filtering out such paths in the purity filter hacks in order to not break e.g. the .NET Core build system. It’s also just the correct thing to do for the platform. --- pkgs/build-support/bintools-wrapper/ld-wrapper.sh | 4 ++-- pkgs/build-support/cc-wrapper/cc-wrapper.sh | 2 +- pkgs/build-support/wrapper-common/utils.bash | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/bintools-wrapper/ld-wrapper.sh b/pkgs/build-support/bintools-wrapper/ld-wrapper.sh index 1c5b08541ac2..310cbc001c8b 100644 --- a/pkgs/build-support/bintools-wrapper/ld-wrapper.sh +++ b/pkgs/build-support/bintools-wrapper/ld-wrapper.sh @@ -44,9 +44,9 @@ if [[ "${NIX_ENFORCE_PURITY:-}" = 1 && -n "${NIX_STORE:-}" while (( "$n" < "$nParams" )); do p=${params[n]} p2=${params[n+1]:-} # handle `p` being last one - if [ "${p:0:3}" = -L/ ] && badPath "${p:2}"; then + if [ "${p:0:3}" = -L/ ] && badPathWithDarwinSdk "${p:2}"; then skip "${p:2}" - elif [ "$p" = -L ] && badPath "$p2"; then + elif [ "$p" = -L ] && badPathWithDarwinSdk "$p2"; then n+=1; skip "$p2" elif [ "$p" = -rpath ] && badPath "$p2"; then n+=1; skip "$p2" diff --git a/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh index 5d338a0dd0dc..da1a709684da 100644 --- a/pkgs/build-support/cc-wrapper/cc-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh @@ -103,7 +103,7 @@ if [[ "${NIX_ENFORCE_PURITY:-}" = 1 && -n "$NIX_STORE" ]]; then -[IL] | -isystem) path=$p2 skipNext=true ;; esac - if [[ -n $path ]] && badPath "$path"; then + if [[ -n $path ]] && badPathWithDarwinSdk "$path"; then skip "$path" $skipNext && n+=1 continue diff --git a/pkgs/build-support/wrapper-common/utils.bash b/pkgs/build-support/wrapper-common/utils.bash index 2faf96df15b4..c9870d1b4d41 100644 --- a/pkgs/build-support/wrapper-common/utils.bash +++ b/pkgs/build-support/wrapper-common/utils.bash @@ -118,6 +118,21 @@ badPath() { "${p#"${TEMPDIR:-/tmp}"}" = "$p" } +# Like `badPath`, but handles paths that may be interpreted relative to +# `$SDKROOT` on Darwin. For example, `-L/usr/lib/swift` is interpreted +# as `-L$SDKROOT/usr/lib/swift` when `$SDKROOT` is set and +# `$SDKROOT/usr/lib/swift` exists. +badPathWithDarwinSdk() { + path=$1 + if [[ "@darwinMinVersion@" ]]; then + sdkPath=$SDKROOT/$path + if [[ -e $sdkPath ]]; then + path=$sdkPath + fi + fi + badPath "$path" +} + expandResponseParams() { declare -ga params=("$@") local arg From 53765b0fb33db341bd67a4d97a2fed3863457c80 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sat, 26 Oct 2024 14:27:23 -0400 Subject: [PATCH 142/252] darwin.stdenv: avoid building a second Python just for locales --- pkgs/stdenv/darwin/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 5a3ef15e392d..3c3f378fe5f9 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -1016,6 +1016,8 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check # Build expand-response-params with last stage like below inherit (prevStage) expand-response-params; }; + # Avoid rebuilding bmake (and Python) just for locales + locale = superDarwin.locale.override { inherit (prevStage) bmake; }; } ); From 04ba4d1a3bbde89a862a5cfd03277aba7a51ff0b Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 26 Oct 2024 22:21:08 +0100 Subject: [PATCH 143/252] =?UTF-8?q?bintools-wrapper:=20fix=20late=E2=80=90?= =?UTF-8?q?bound=20command=20references?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ports 985072e2ce4afa4201b49a20154fcc888aaccec5 to bintools-wrapper. Co-authored-by: Artturin Co-authored-by: IlyaNiklyaev --- pkgs/build-support/bintools-wrapper/default.nix | 2 ++ pkgs/build-support/bintools-wrapper/ld-wrapper.sh | 4 ++-- pkgs/test/cc-wrapper/default.nix | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index a2a0736c2221..05d5f0d39664 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -403,6 +403,8 @@ stdenvNoCC.mkDerivation { # TODO(@sternenseemann): rename env var via stdenv rebuild shell = (getBin runtimeShell + runtimeShell.shellPath or ""); gnugrep_bin = optionalString (!nativeTools) gnugrep; + rm = if nativeTools then "rm" else lib.getExe' coreutils "rm"; + mktemp = if nativeTools then "mktemp" else lib.getExe' coreutils "mktemp"; wrapperName = "BINTOOLS_WRAPPER"; inherit dynamicLinker targetPrefix suffixSalt coreutils_bin; inherit bintools_bin libc_bin libc_dev libc_lib; diff --git a/pkgs/build-support/bintools-wrapper/ld-wrapper.sh b/pkgs/build-support/bintools-wrapper/ld-wrapper.sh index 7e00d02b0374..9b2f752af5fe 100644 --- a/pkgs/build-support/bintools-wrapper/ld-wrapper.sh +++ b/pkgs/build-support/bintools-wrapper/ld-wrapper.sh @@ -251,8 +251,8 @@ PATH="$path_backup" # Old bash workaround, see above. if (( "${NIX_LD_USE_RESPONSE_FILE:-@use_response_file_by_default@}" >= 1 )); then - responseFile=$(mktemp "${TMPDIR:-/tmp}/ld-params.XXXXXX") - trap 'rm -f -- "$responseFile"' EXIT + responseFile=$(@mktemp@ "${TMPDIR:-/tmp}/ld-params.XXXXXX") + trap '@rm@ -f -- "$responseFile"' EXIT printf "%q\n" \ ${extraBefore+"${extraBefore[@]}"} \ ${params+"${params[@]}"} \ diff --git a/pkgs/test/cc-wrapper/default.nix b/pkgs/test/cc-wrapper/default.nix index 61d65784f5b9..22991e0dc07d 100644 --- a/pkgs/test/cc-wrapper/default.nix +++ b/pkgs/test/cc-wrapper/default.nix @@ -131,8 +131,8 @@ in stdenv.mkDerivation { ASAN_OPTIONS=use_sigaltstack=0 ${emulator} ./sanitizers ''} - echo "Check whether CC with NIX_CC_USE_RESPONSE_FILE hardcodes all required binaries..." >&2 - NIX_CC_USE_RESPONSE_FILE=1 ${CC} -v + echo "Check whether CC and LD with NIX_X_USE_RESPONSE_FILE hardcodes all required binaries..." >&2 + NIX_CC_USE_RESPONSE_FILE=1 NIX_LD_USE_RESPONSE_FILE=1 ${CC} -v touch $out ''; From eb4f33e14c9710f445963ec7698c0395273ee37d Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Sun, 27 Oct 2024 06:31:52 +0100 Subject: [PATCH 144/252] cmake: Fix the FindCURL module This helps building `pkgsStatic` executables that link in `libcurl.a`. Before this patch linker options for curl's own dependencies were simply missing. --- ...ore-target-properties-from-pkg-config.diff | 32 +++++++++++++++++++ pkgs/by-name/cm/cmake/package.nix | 7 +++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 pkgs/by-name/cm/cmake/008-FindCURL-Add-more-target-properties-from-pkg-config.diff diff --git a/pkgs/by-name/cm/cmake/008-FindCURL-Add-more-target-properties-from-pkg-config.diff b/pkgs/by-name/cm/cmake/008-FindCURL-Add-more-target-properties-from-pkg-config.diff new file mode 100644 index 000000000000..8dfc354a9c20 --- /dev/null +++ b/pkgs/by-name/cm/cmake/008-FindCURL-Add-more-target-properties-from-pkg-config.diff @@ -0,0 +1,32 @@ +diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake +index 5ce8a9046b..f7361308b7 100644 +--- a/Modules/FindCURL.cmake ++++ b/Modules/FindCURL.cmake +@@ -239,9 +239,24 @@ if(CURL_FOUND) + IMPORTED_LOCATION_DEBUG "${CURL_LIBRARY_DEBUG}") + endif() + +- if(CURL_USE_STATIC_LIBS AND MSVC) +- set_target_properties(CURL::libcurl PROPERTIES +- INTERFACE_LINK_LIBRARIES "normaliz.lib;ws2_32.lib;wldap32.lib") ++ if(PC_CURL_FOUND) ++ if(PC_CURL_LINK_LIBRARIES) ++ set_property(TARGET CURL::libcurl PROPERTY ++ INTERFACE_LINK_LIBRARIES "${PC_CURL_LINK_LIBRARIES}") ++ endif() ++ if(PC_CURL_LDFLAGS_OTHER) ++ set_property(TARGET CURL::libcurl PROPERTY ++ INTERFACE_LINK_OPTIONS "${PC_CURL_LDFLAGS_OTHER}") ++ endif() ++ if(PC_CURL_CFLAGS_OTHER) ++ set_property(TARGET CURL::libcurl PROPERTY ++ INTERFACE_COMPILE_OPTIONS "${PC_CURL_CFLAGS_OTHER}") ++ endif() ++ else() ++ if(CURL_USE_STATIC_LIBS AND MSVC) ++ set_target_properties(CURL::libcurl PROPERTIES ++ INTERFACE_LINK_LIBRARIES "normaliz.lib;ws2_32.lib;wldap32.lib") ++ endif() + endif() + + endif() diff --git a/pkgs/by-name/cm/cmake/package.nix b/pkgs/by-name/cm/cmake/package.nix index 82563e56c2b0..64dccbba31a0 100644 --- a/pkgs/by-name/cm/cmake/package.nix +++ b/pkgs/by-name/cm/cmake/package.nix @@ -76,7 +76,12 @@ stdenv.mkDerivation (finalAttrs: { substituteAll { src = ./007-darwin-bsd-ps-abspath.diff; ps = lib.getExe ps; - }); + }) + ++ [ + # Backport of https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9900 + # Needed to corretly link curl in pkgsStatic. + ./008-FindCURL-Add-more-target-properties-from-pkg-config.diff + ]; outputs = [ "out" ] ++ lib.optionals buildDocs [ "man" "info" ]; separateDebugInfo = true; From 1472acd79c091d5f481b039867c450e74e4224af Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 27 Oct 2024 07:14:08 +0000 Subject: [PATCH 145/252] mpg123: 1.32.7 -> 1.32.8 Changes: https://www.mpg123.de/#2024-10-26 --- pkgs/applications/audio/mpg123/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/mpg123/default.nix b/pkgs/applications/audio/mpg123/default.nix index 9fe4e925c13a..f18469f56588 100644 --- a/pkgs/applications/audio/mpg123/default.nix +++ b/pkgs/applications/audio/mpg123/default.nix @@ -22,11 +22,11 @@ assert withConplay -> !libOnly; stdenv.mkDerivation rec { pname = "${lib.optionalString libOnly "lib"}mpg123"; - version = "1.32.7"; + version = "1.32.8"; src = fetchurl { url = "mirror://sourceforge/mpg123/mpg123-${version}.tar.bz2"; - hash = "sha256-PIkZJDcHlRysDjw5u/KGU7yv/EPJj/FoAaJzUNuPDyE="; + hash = "sha256-/u4TdMeVQODkBd8LxF/eIK1nARQlw2GidZ4hRolKJ6c="; }; outputs = [ "out" "dev" "man" ] ++ lib.optional withConplay "conplay"; From 11aee2d2258ac116368cd662df490e2553237dea Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 20 Oct 2024 06:00:16 +0100 Subject: [PATCH 146/252] libgit2: 1.8.1 -> 1.8.3 Changes: - https://github.com/libgit2/libgit2/releases/tag/v1.8.2 - https://github.com/libgit2/libgit2/releases/tag/v1.8.3 --- pkgs/development/libraries/libgit2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libgit2/default.nix b/pkgs/development/libraries/libgit2/default.nix index af0ae5f73a7d..5e38abebd5ee 100644 --- a/pkgs/development/libraries/libgit2/default.nix +++ b/pkgs/development/libraries/libgit2/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "libgit2"; - version = "1.8.1"; + version = "1.8.3"; # also check the following packages for updates: python3Packages.pygit2 and libgit2-glib outputs = ["lib" "dev" "out"]; @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "libgit2"; repo = "libgit2"; rev = "v${finalAttrs.version}"; - hash = "sha256-J2rCxTecyLbbDdsyBWn9w7r3pbKRMkI9E7RvRgAqBdY="; + hash = "sha256-ugVvXn9/ZXlJJQgh3zTBQYPGFrVDF3yxVynQyYzvXoY="; }; cmakeFlags = [ From 8fbfbf557a7aae568bf492710c34c9e75def8bf3 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 27 Oct 2024 17:20:40 +0100 Subject: [PATCH 147/252] python312Packages.grpcio: fix src hash The version was bumped, but src wasn't updated to reflect that. Fixes: da16a24 ("python312Packages.grpcio: 1.64.1 -> 1.67.0") --- pkgs/development/python-modules/grpcio/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/grpcio/default.nix b/pkgs/development/python-modules/grpcio/default.nix index 976b3e9c2736..01751b4145a2 100644 --- a/pkgs/development/python-modules/grpcio/default.nix +++ b/pkgs/development/python-modules/grpcio/default.nix @@ -5,7 +5,6 @@ c-ares, cython, fetchPypi, - grpc, openssl, pkg-config, protobuf, @@ -23,7 +22,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - hash = "sha256-VjWIxYe3XDS5KLxChUjlsA6jjEaXIYGk2Ldbp+PyQjE="; + hash = "sha256-4JCyVT4Noch1RJyOdQc91EFd1xyb3mpAYkD99MDuRnw="; }; outputs = [ From 55dfed83c07faaa7aa9d279af787ec41b8baed9a Mon Sep 17 00:00:00 2001 From: Emily Date: Sun, 27 Oct 2024 17:44:56 +0000 Subject: [PATCH 148/252] {bintools-wrapper,cc-wrapper}: export Darwin SDK variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 514b00cf08702b31cdf873a798f1ff100d4f2cf7 exposed another bug in the existing wrapper logic: Darwin SDK variables are only exported by the SDK package hook, so if those variables aren’t already exported inside the wrappers, the modified versions are not passed down to the compiler tools, breaking the fallback SDK logic. This was previously partially masked by passing down a normally‐redundant `-isysroot` to the compiler, but now we fix it at the source. This broke e.g. running `clang(1)` without any environment, something the GHC binary package `installCheckPhase` does indirectly to verify that there’s nothing missing from the wrapped GHC `$PATH`. It may also have caused issues building for the build platform inside a Darwin‐to‐non‐Darwin cross‐compilation build. --- pkgs/build-support/wrapper-common/darwin-sdk-setup.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/wrapper-common/darwin-sdk-setup.bash b/pkgs/build-support/wrapper-common/darwin-sdk-setup.bash index 8c6a337a8fca..3b31a4aa6981 100644 --- a/pkgs/build-support/wrapper-common/darwin-sdk-setup.bash +++ b/pkgs/build-support/wrapper-common/darwin-sdk-setup.bash @@ -8,9 +8,9 @@ if [[ "@darwinMinVersion@" ]]; then # Allow wrapped compilers to do something useful when no `DEVELOPER_DIR` is set, which can happen when # the compiler is run outside of a stdenv or intentionally in an environment with no environment variables set. - DEVELOPER_DIR=${DEVELOPER_DIR_@suffixSalt@:-@fallback_sdk@} + export DEVELOPER_DIR=${DEVELOPER_DIR_@suffixSalt@:-@fallback_sdk@} # xcbuild needs `SDKROOT` to be the name of the SDK, which it sets in its own wrapper, # but compilers expect it to point to the absolute path. - SDKROOT="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" + export SDKROOT="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" fi From fe04acd93b8cdb6aed211bdce9b164b39b6fe03d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 27 Oct 2024 11:23:52 -0700 Subject: [PATCH 149/252] python312Packages.passlib: modernize and adopt --- .../python-modules/passlib/default.nix | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/passlib/default.nix b/pkgs/development/python-modules/passlib/default.nix index 7bbd361cb2b1..98be7873032a 100644 --- a/pkgs/development/python-modules/passlib/default.nix +++ b/pkgs/development/python-modules/passlib/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitLab, argon2-cffi, bcrypt, cryptography, @@ -14,15 +14,20 @@ buildPythonPackage rec { pname = "passlib"; version = "1.7.4"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; - src = fetchPypi { - inherit pname version; - hash = "sha256-3v1Q9ytlxUAqssVzgwppeOXyAq0NmEeTyN3ixBUuvgQ"; + src = fetchFromGitLab { + domain = "foss.heptapod.net"; + owner = "python-libs"; + repo = "passlib"; + rev = "refs/tags/${version}"; + hash = "sha256-Mx2Xg/KAEfvfep2B/gWATTiAPJc+f22MTcsEdRpt3n8="; }; + build-system = [ setuptools ]; + dependencies = [ setuptools ]; optional-dependencies = { @@ -60,10 +65,11 @@ buildPythonPackage rec { "--deselect=passlib/tests/test_handlers.py::sha256_crypt_os_crypt_test::test_82_crypt_support" ]; - meta = with lib; { + meta = { + changelog = "https://foss.heptapod.net/python-libs/passlib/-/blob/${version}/docs/history/${lib.versions.majorMinor version}.rst"; description = "Password hashing library for Python"; homepage = "https://foss.heptapod.net/python-libs/passlib"; - license = licenses.bsdOriginal; - maintainers = [ ]; + license = lib.licenses.bsdOriginal; + maintainers = with lib.maintainers; [ dotlambda ]; }; } From 714b0306e33aa057e3f8a617644a05342053b03c Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 28 Oct 2024 06:37:59 +0000 Subject: [PATCH 150/252] gjs: 1.82.0 -> 1.82.1 Changes: https://gitlab.gnome.org/GNOME/gjs/-/tags/1.82.1 --- pkgs/development/libraries/gjs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gjs/default.nix b/pkgs/development/libraries/gjs/default.nix index b3a9f606d17f..fee889cbd537 100644 --- a/pkgs/development/libraries/gjs/default.nix +++ b/pkgs/development/libraries/gjs/default.nix @@ -32,13 +32,13 @@ let ]; in stdenv.mkDerivation (finalAttrs: { pname = "gjs"; - version = "1.82.0"; + version = "1.82.1"; outputs = [ "out" "dev" "installedTests" ]; src = fetchurl { url = "mirror://gnome/sources/gjs/${lib.versions.majorMinor finalAttrs.version}/gjs-${finalAttrs.version}.tar.xz"; - hash = "sha256-FEkCNoaNC/gi96p884/NMz52IHYP3PUOkyQjYR9iZiM="; + hash = "sha256-+zmqVjZXbeDloRcfVqGlgl4r0aaZcvsSC6eL0Qm1aTw="; }; patches = [ From 0b96d8b9a46a67429bdd757b99431f0378691632 Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Fri, 25 Oct 2024 08:32:53 +0200 Subject: [PATCH 151/252] python312Packages.werkzeug: 3.0.4 -> 3.0.6 Changelog: https://werkzeug.palletsprojects.com/en/3.0.x/changes/#version-3-0-5 https://werkzeug.palletsprojects.com/en/stable/changes/#version-3-0-6 --- pkgs/development/python-modules/werkzeug/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/werkzeug/default.nix b/pkgs/development/python-modules/werkzeug/default.nix index 6da0b68c6c05..feafb29bcbd3 100644 --- a/pkgs/development/python-modules/werkzeug/default.nix +++ b/pkgs/development/python-modules/werkzeug/default.nix @@ -29,14 +29,14 @@ buildPythonPackage rec { pname = "werkzeug"; - version = "3.0.4"; + version = "3.0.6"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-NPI3FQayUN9NT4S/57CSHkdiUldiu9k2YUkJ/iXNcwY="; + hash = "sha256-qN1Z1N4oynBHGjTLp5vtX37y4Danazqwg1R0JG60H40="; }; build-system = [ flit-core ]; From e774447767e998ae66203d2fceb5a326038e015e Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 28 Oct 2024 15:13:02 +0200 Subject: [PATCH 152/252] python312Packages.scipy: 1.14.0 -> 1.14.1 Diff: https://github.com/scipy/scipy/compare/refs/tags/v1.14.0...v1.14.1 Changelog: https://github.com/scipy/scipy/releases/tag/v1.14.1 --- pkgs/development/python-modules/scipy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index 4677b47f1188..e5b2db20a1c0 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -48,8 +48,8 @@ let # nix-shell maintainers/scripts/update.nix --argstr package python3.pkgs.scipy # # The update script uses sed regexes to replace them with the updated hashes. - version = "1.14.0"; - srcHash = "sha256-rNplvbDExmMfcPuvhs+y9j5/9G6QR1GdMgQLty6oi2c="; + version = "1.14.1"; + srcHash = "sha256-eYuUHr9wZMXvEsIhssGR35JnRBNGaOL/j1LNM5sHuYY="; datasetsHashes = { ascent = "1qjp35ncrniq9rhzb14icwwykqg2208hcssznn3hz27w39615kh3"; ecg = "1bwbjp43b7znnwha5hv6wiz3g0bhwrpqpi75s12zidxrbwvd62pj"; From 1f8bb94bcab905561b7e7e28fa9ff833ef77652c Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Mon, 28 Oct 2024 21:19:51 +0800 Subject: [PATCH 153/252] pythonOutputDistHook: append *Phases with appendToVar --- .../interpreters/python/hooks/python-output-dist-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/hooks/python-output-dist-hook.sh b/pkgs/development/interpreters/python/hooks/python-output-dist-hook.sh index 83b79d01fa40..8e4a15dc277f 100644 --- a/pkgs/development/interpreters/python/hooks/python-output-dist-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-output-dist-hook.sh @@ -21,4 +21,4 @@ EOF echo "Finished executing pythonOutputDistPhase" } -preFixupPhases+=" pythonOutputDistPhase" +appendToVar preFixupPhases pythonOutputDistPhase From c4bc1a8bb6038a26ac3d18a84841428bdedbd711 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Wed, 11 Sep 2024 04:23:36 +0800 Subject: [PATCH 154/252] pipBuildHook: handle pipBuildFlags `__structuredAttrs`-agnostically --- .../python/hooks/pip-build-hook.sh | 25 +++++++++++-------- .../meson-python/add-build-flags.sh | 2 +- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/pkgs/development/interpreters/python/hooks/pip-build-hook.sh b/pkgs/development/interpreters/python/hooks/pip-build-hook.sh index 3d70de729f2d..430951bac7c9 100644 --- a/pkgs/development/interpreters/python/hooks/pip-build-hook.sh +++ b/pkgs/development/interpreters/python/hooks/pip-build-hook.sh @@ -1,22 +1,27 @@ # Setup hook to use for pip projects -echo "Sourcing pip-build-hook" +# shellcheck shell=bash -declare -a pipBuildFlags +echo "Sourcing pip-build-hook" pipBuildPhase() { echo "Executing pipBuildPhase" runHook preBuild mkdir -p dist + + local -a flagsArray=( + --verbose + --no-index + --no-deps + --no-clean + --no-build-isolation + --wheel-dir dist + ) + concatTo flagsArray pipBuildFlags + echo "Creating a wheel..." - @pythonInterpreter@ -m pip wheel \ - --verbose \ - --no-index \ - --no-deps \ - --no-clean \ - --no-build-isolation \ - --wheel-dir dist \ - $pipBuildFlags . + echoCmd 'pip build flags' "${flagsArray[@]}" + @pythonInterpreter@ -m pip wheel "${flagsArray[@]}" . echo "Finished creating a wheel..." runHook postBuild diff --git a/pkgs/development/python-modules/meson-python/add-build-flags.sh b/pkgs/development/python-modules/meson-python/add-build-flags.sh index d9327960eb1d..d781b1f966f6 100644 --- a/pkgs/development/python-modules/meson-python/add-build-flags.sh +++ b/pkgs/development/python-modules/meson-python/add-build-flags.sh @@ -3,7 +3,7 @@ mesonPythonBuildFlagsHook() { for f in $mesonFlags; do pypaBuildFlags+=" -Csetup-args=$f" # This requires pip>23.0.1, see: https://meson-python.readthedocs.io/en/latest/how-to-guides/config-settings.html - pipBuildFlags+=" --config-settings=setup-args=$f" + appendToVar pipBuildFlags "--config-settings=setup-args=$f" done } From 3a0f6fabff15e2e59847bfc6c9563cc37b21de0c Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Wed, 11 Sep 2024 04:46:25 +0800 Subject: [PATCH 155/252] pipInstallHook: handle pipInstallFlags `__structuredAttrs`-agnostically --- .../python/hooks/pip-install-hook.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/python/hooks/pip-install-hook.sh b/pkgs/development/interpreters/python/hooks/pip-install-hook.sh index a4f08b8b14cb..0f718a6c4bb8 100644 --- a/pkgs/development/interpreters/python/hooks/pip-install-hook.sh +++ b/pkgs/development/interpreters/python/hooks/pip-install-hook.sh @@ -1,17 +1,27 @@ # Setup hook for pip. -echo "Sourcing pip-install-hook" +# shellcheck shell=bash -declare -a pipInstallFlags +echo "Sourcing pip-install-hook" pipInstallPhase() { echo "Executing pipInstallPhase" runHook preInstall + # shellcheck disable=SC2154 mkdir -p "$out/@pythonSitePackages@" export PYTHONPATH="$out/@pythonSitePackages@:$PYTHONPATH" + local -a flagsArray=( + --no-index + --no-warn-script-location + --prefix="$out" + --no-cache + ) + concatTo flagsArray pipInstallFlags + pushd dist || return 1 - @pythonInterpreter@ -m pip install ./*.whl --no-index --no-warn-script-location --prefix="$out" --no-cache $pipInstallFlags + echoCmd 'pip install flags' "${flagsArray[@]}" + @pythonInterpreter@ -m pip install ./*.whl "${flagsArray[@]}" popd || return 1 runHook postInstall From 1f39bb6586ec2e89076f8f8f562bfd388e749903 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Wed, 11 Sep 2024 05:01:37 +0800 Subject: [PATCH 156/252] pypaBuildHook: handle pypaBuildFlags `__structuredAttrs`-agnostically --- .../interpreters/python/hooks/pypa-build-hook.sh | 10 +++++++++- .../python-modules/meson-python/add-build-flags.sh | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/python/hooks/pypa-build-hook.sh b/pkgs/development/interpreters/python/hooks/pypa-build-hook.sh index dd49d935bcee..d1a1b10bf520 100644 --- a/pkgs/development/interpreters/python/hooks/pypa-build-hook.sh +++ b/pkgs/development/interpreters/python/hooks/pypa-build-hook.sh @@ -5,8 +5,16 @@ pypaBuildPhase() { echo "Executing pypaBuildPhase" runHook preBuild + local -a flagsArray=( + --no-isolation + --outdir dist/ + --wheel + ) + concatTo flagsArray pypaBuildFlags + echo "Creating a wheel..." - @build@/bin/pyproject-build --no-isolation --outdir dist/ --wheel $pypaBuildFlags + echoCmd 'pypa build flags' "${flagsArray[@]}" + @build@/bin/pyproject-build "${flagsArray[@]}" echo "Finished creating a wheel..." runHook postBuild diff --git a/pkgs/development/python-modules/meson-python/add-build-flags.sh b/pkgs/development/python-modules/meson-python/add-build-flags.sh index d781b1f966f6..e1b2588f07fc 100644 --- a/pkgs/development/python-modules/meson-python/add-build-flags.sh +++ b/pkgs/development/python-modules/meson-python/add-build-flags.sh @@ -1,7 +1,7 @@ mesonPythonBuildFlagsHook() { # Add all of mesonFlags to -Csetup-args for pypa builds for f in $mesonFlags; do - pypaBuildFlags+=" -Csetup-args=$f" + appendToVar pypaBuildFlags "-Csetup-args=$f" # This requires pip>23.0.1, see: https://meson-python.readthedocs.io/en/latest/how-to-guides/config-settings.html appendToVar pipBuildFlags "--config-settings=setup-args=$f" done From 69f4871514c06e92dc4ead9491e4581efa9898f9 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Wed, 11 Sep 2024 04:54:28 +0800 Subject: [PATCH 157/252] pypaBuildHook: lint with ShellCheck --- pkgs/development/interpreters/python/hooks/pypa-build-hook.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/interpreters/python/hooks/pypa-build-hook.sh b/pkgs/development/interpreters/python/hooks/pypa-build-hook.sh index d1a1b10bf520..88472b468688 100644 --- a/pkgs/development/interpreters/python/hooks/pypa-build-hook.sh +++ b/pkgs/development/interpreters/python/hooks/pypa-build-hook.sh @@ -1,4 +1,6 @@ # Setup hook to use for pypa/build projects +# shellcheck shell=bash + echo "Sourcing pypa-build-hook" pypaBuildPhase() { From 967e5b43ed61d2a2bf7b2d194aa2e51c2cfc1904 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Tue, 10 Sep 2024 23:08:01 +0800 Subject: [PATCH 158/252] pythonImportsCheckHook: support __structuredAttrs = true --- .../python/hooks/python-imports-check-hook.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/interpreters/python/hooks/python-imports-check-hook.sh b/pkgs/development/interpreters/python/hooks/python-imports-check-hook.sh index 591060aca6d0..2788a947fe95 100644 --- a/pkgs/development/interpreters/python/hooks/python-imports-check-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-imports-check-hook.sh @@ -4,15 +4,16 @@ echo "Sourcing python-imports-check-hook.sh" pythonImportsCheckPhase() { echo "Executing pythonImportsCheckPhase" - if [ -n "$pythonImportsCheck" ]; then - echo "Check whether the following modules can be imported: $pythonImportsCheck" - pythonImportsCheckOutput=$out - if [ -n "$python" ]; then + if [ -n "${pythonImportsCheck[*]-}" ]; then + echo "Check whether the following modules can be imported: ${pythonImportsCheck[*]}" + # shellcheck disable=SC2154 + pythonImportsCheckOutput="$out" + if [ -n "${python-}" ]; then echo "Using python specific output \$python for imports check" pythonImportsCheckOutput=$python fi export PYTHONPATH="$pythonImportsCheckOutput/@pythonSitePackages@:$PYTHONPATH" - (cd $pythonImportsCheckOutput && @pythonCheckInterpreter@ -c 'import os; import importlib; list(map(lambda mod: importlib.import_module(mod), os.environ["pythonImportsCheck"].split()))') + (cd "$pythonImportsCheckOutput" && @pythonCheckInterpreter@ -c 'import sys; import importlib; list(map(lambda mod: importlib.import_module(mod), sys.argv[1:]))' ${pythonImportsCheck[*]}) fi } From 34ebbd650cbae6a973dc08bf91b230e0093507ce Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Mon, 28 Oct 2024 17:05:49 +0800 Subject: [PATCH 159/252] pkgs/stdenv/generic/setup.sh: lint with ShellCheck The behaviour of [[ -n/-z "${FOO[@]}" ]] is unspecified. Use [[ -n/-z "${FOO[*]-}" ]] instead --- pkgs/stdenv/generic/setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 0287b3a90a2a..86e8d764bab1 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -15,6 +15,7 @@ shopt -s inherit_errexit # $NIX_DEBUG must be a documented integer level, if set, so we can use it safely as an integer. # See the `Verbosity` enum in the Nix source for these levels. if ! [[ -z ${NIX_DEBUG-} || $NIX_DEBUG == [0-7] ]]; then + # shellcheck disable=SC2016 printf 'The `NIX_DEBUG` environment variable has an unexpected value: %s\n' "${NIX_DEBUG}" echo "It can only be unset or an integer between 0 and 7." exit 1 @@ -396,7 +397,7 @@ concatTo() { for arg in "$@"; do IFS="=" read -r name default <<< "$arg" local -n nameref="$name" - if [[ ! -n "${nameref[@]}" && -n "$default" ]]; then + if [[ -z "${nameref[*]}" && -n "$default" ]]; then targetref+=( "$default" ) elif type=$(declare -p "$name" 2> /dev/null); then case "${type#* }" in From 7451482dbe2fc2108b65b554d2a27047c4292e11 Mon Sep 17 00:00:00 2001 From: Reno Dakota <170618376+paparodeo@users.noreply.github.com> Date: Mon, 28 Oct 2024 09:45:14 +0000 Subject: [PATCH 160/252] python311Packages.tesnsorflow: fix evaulation error remove invalid argument grpc argument from override as it was removed in 8fbfbf557a7aae568bf492710c34c9e75def8bf3 --- pkgs/top-level/python-packages.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f31d47437aaa..18ad97b7293a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15478,7 +15478,6 @@ self: super: with self; { }; grpcioTF = self.grpcio.override { protobuf = protobufTF; - grpc = grpcTF; }; tensorboard-plugin-profileTF = self.tensorboard-plugin-profile.override { protobuf = protobuf-pythonTF; From 593d771826649ec9a41b37315e9ef0ae1cb6c53b Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 28 Oct 2024 17:41:46 +0000 Subject: [PATCH 161/252] xterm: 394 -> 395 (#351129) Changes: https://invisible-island.net/xterm/xterm.log.html#xterm_395 --- pkgs/applications/terminal-emulators/xterm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/terminal-emulators/xterm/default.nix b/pkgs/applications/terminal-emulators/xterm/default.nix index 41f3b5bd8b3f..f9a2e0151f6a 100644 --- a/pkgs/applications/terminal-emulators/xterm/default.nix +++ b/pkgs/applications/terminal-emulators/xterm/default.nix @@ -4,14 +4,14 @@ stdenv.mkDerivation rec { pname = "xterm"; - version = "394"; + version = "395"; src = fetchurl { urls = [ "ftp://ftp.invisible-island.net/xterm/${pname}-${version}.tgz" "https://invisible-mirror.net/archives/xterm/${pname}-${version}.tgz" ]; - hash = "sha256-oqDLIG6wQj3tw0eU9cLTjIM5DS3REGtmq6CWDDqXbHo="; + hash = "sha256-KG48qlk46uOOICgnYhVnYp3+quaJ6AcLQTyhE5gJPcg="; }; patches = [ ./sixel-256.support.patch ]; From 87fe6550bb0daa75864e6028d04c9c9d0efb3592 Mon Sep 17 00:00:00 2001 From: Niklas Korz Date: Mon, 28 Oct 2024 21:00:09 +0100 Subject: [PATCH 162/252] zed-editor: remove darwin workaround for isysroot --- pkgs/by-name/ze/zed-editor/package.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/by-name/ze/zed-editor/package.nix b/pkgs/by-name/ze/zed-editor/package.nix index 07f577e685eb..8962e7fb7d83 100644 --- a/pkgs/by-name/ze/zed-editor/package.nix +++ b/pkgs/by-name/ze/zed-editor/package.nix @@ -197,9 +197,6 @@ rustPlatform.buildRustPackage rec { ZED_UPDATE_EXPLANATION = "Zed has been installed using Nix. Auto-updates have thus been disabled."; # Used by `zed --version` RELEASE_VERSION = version; - # Required until `-isysroot` can be used with libclang in nixpkgs on darwin, otherwise - # rust bindgen will not work as expected - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-F${apple-sdk_15.sdkroot}/System/Library/Frameworks"; }; RUSTFLAGS = if withGLES then "--cfg gles" else ""; From d85a1e50fea67aa559cb578efc4415cd6adc22ef Mon Sep 17 00:00:00 2001 From: Emily Date: Mon, 28 Oct 2024 18:59:35 +0000 Subject: [PATCH 163/252] libsForQt5.qtbase: fix Darwin build by removing obsolete patches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Another existing bug exposed by 514b00cf08702b31cdf873a798f1ff100d4f2cf7: the build system was interpolating an empty SDK directory and passing `-isysroot -g0`, eating a compiler flag and breaking the build now that we don’t pass a redundant `-isysroot` of our own. Thankfully, with the new SDK pattern, we don’t need to do any of this elaborate patching; just pointing it at the right tools from `xcbuild` lets it figure everything out itself. --- .../libraries/qt-5/5.15/default.nix | 10 +- .../0001-qtbase-mkspecs-mac.patch | 485 ------------------ .../0012-qtbase-tbd-frameworks.patch | 15 - .../qtbase.patch.d/0014-aarch64-darwin.patch | 275 ---------- .../libraries/qt-5/modules/qtbase.nix | 24 +- 5 files changed, 19 insertions(+), 790 deletions(-) delete mode 100644 pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch delete mode 100644 pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0012-qtbase-tbd-frameworks.patch delete mode 100644 pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0014-aarch64-darwin.patch diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index 240e914241ed..b94be6d893d2 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -28,15 +28,7 @@ let qtCompatVersion = srcs.qtbase.version; patches = { - qtbase = lib.optionals stdenv.hostPlatform.isDarwin [ - ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch - - # Patch framework detection to support X.framework/X.tbd, - # extending the current support for X.framework/X. - ./qtbase.patch.d/0012-qtbase-tbd-frameworks.patch - - ./qtbase.patch.d/0014-aarch64-darwin.patch - ] ++ [ + qtbase = [ ./qtbase.patch.d/0003-qtbase-mkspecs.patch ./qtbase.patch.d/0004-qtbase-replace-libdir.patch ./qtbase.patch.d/0005-qtbase-cmake.patch diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch deleted file mode 100644 index 9d2a47c7c348..000000000000 --- a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch +++ /dev/null @@ -1,485 +0,0 @@ -From 5ec1d1009d9943f20e82ffc087deabb31d447e75 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Milan=20P=C3=A4ssler?= -Date: Fri, 3 Apr 2020 21:07:58 +0200 -Subject: [PATCH 01/11] qtbase-mkspecs-mac - ---- - mkspecs/common/mac.conf | 2 +- - mkspecs/features/mac/default_post.prf | 206 -------------------------- - mkspecs/features/mac/default_pre.prf | 58 -------- - mkspecs/features/mac/sdk.mk | 25 ---- - mkspecs/features/mac/sdk.prf | 61 -------- - 5 files changed, 1 insertion(+), 351 deletions(-) - delete mode 100644 mkspecs/features/mac/sdk.mk - delete mode 100644 mkspecs/features/mac/sdk.prf - -diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf -index 61bea952b2..9909dae726 100644 ---- a/mkspecs/common/mac.conf -+++ b/mkspecs/common/mac.conf -@@ -23,7 +23,7 @@ QMAKE_INCDIR_OPENGL = \ - - QMAKE_FIX_RPATH = install_name_tool -id - --QMAKE_LFLAGS_RPATH = -Wl,-rpath, -+QMAKE_LFLAGS_RPATH = - QMAKE_LFLAGS_GCSECTIONS = -Wl,-dead_strip - - QMAKE_LFLAGS_REL_RPATH = -diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf -index abc6d82ade..59b94fe5b6 100644 ---- a/mkspecs/features/mac/default_post.prf -+++ b/mkspecs/features/mac/default_post.prf -@@ -1,9 +1,5 @@ - load(default_post) - --# Recompute SDK version in case the user set it explicitly --sdk_version = $$QMAKE_MAC_SDK_VERSION --QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion) -- - contains(TEMPLATE, .*app) { - !macx-xcode:if(isEmpty(BUILDS)|build_pass) { - # Detect changes to the platform SDK -@@ -16,36 +12,6 @@ contains(TEMPLATE, .*app) { - QMAKE_EXTRA_INCLUDES += $$shell_quote($$PWD/sdk.mk) - } - -- # Detect incompatible SDK versions -- -- isEmpty(QT_MAC_SDK_VERSION_MIN): \ -- QT_MAC_SDK_VERSION_MIN = $$QT_MAC_SDK_VERSION -- -- !versionAtLeast(QMAKE_MAC_SDK_VERSION, $$QT_MAC_SDK_VERSION_MIN): \ -- warning("Qt requires at least version $$QT_MAC_SDK_VERSION_MIN of the platform SDK," \ -- "you're building against version $${QMAKE_MAC_SDK_VERSION}. Please upgrade.") -- -- !isEmpty(QT_MAC_SDK_VERSION_MAX) { -- # For Qt developers only -- !isEmpty($$list($$(QT_MAC_SDK_NO_VERSION_CHECK))): \ -- CONFIG += sdk_no_version_check -- -- QMAKE_MAC_SDK_MAJOR_VERSION = $$replace(QMAKE_MAC_SDK_VERSION, "(\\d+)(\\.\\d+)(\\.\\d+)?", \\1) -- -- !sdk_no_version_check:!versionAtMost(QMAKE_MAC_SDK_MAJOR_VERSION, $$QT_MAC_SDK_VERSION_MAX) { -- warning("Qt has only been tested with version $$QT_MAC_SDK_VERSION_MAX"\ -- "of the platform SDK, you're using $${QMAKE_MAC_SDK_MAJOR_VERSION}.") -- warning("This is an unsupported configuration. You may experience build issues," \ -- "and by using") -- warning("the $$QMAKE_MAC_SDK_VERSION SDK you are opting in to new features" \ -- "that Qt has not been prepared for.") -- -- warning("Please downgrade the SDK you use to build your app to version" \ -- "$$QT_MAC_SDK_VERSION_MAX, or configure") -- warning("with CONFIG+=sdk_no_version_check when running qmake" \ -- "to silence this warning.") -- } -- } - } - - !no_objective_c:CONFIG += objective_c -@@ -73,230 +39,6 @@ qt { - } - } - --# Add the same default rpaths as Xcode does for new projects. --# This is especially important for iOS/tvOS/watchOS where no other option is possible. --!no_default_rpath { -- uikit: QMAKE_RPATHDIR += @executable_path/Frameworks -- else: QMAKE_RPATHDIR += @executable_path/../Frameworks -- equals(TEMPLATE, lib):!plugin:lib_bundle: QMAKE_RPATHDIR += @loader_path/Frameworks --} -- --# Don't pass -headerpad_max_install_names when using Bitcode. --# In that case the linker emits a warning stating that the flag is ignored when --# used with bitcode, for reasons that cannot be determined (rdar://problem/20748962). --# Using this flag is also unnecessary in practice on UIKit platforms since they --# are sandboxed, and only UIKit platforms support bitcode to begin with. --!bitcode: QMAKE_LFLAGS += $$QMAKE_LFLAGS_HEADERPAD -- --app_extension_api_only { -- QMAKE_CFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION -- QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION -- QMAKE_CXXFLAGS_PRECOMPILE += $$QMAKE_CFLAGS_APPLICATION_EXTENSION -- QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION --} -- --macos { -- !isEmpty(QMAKE_APPLE_DEVICE_ARCHS) { -- # If the user has requested a specific set of architectures, -- # build all of those by default, but limited to only those. -- CONFIG -= only_active_arch -- } else { -- # Otherwise allow building all of the architectures available -- # in Qt, but only build the active arch (unless the user has -- # manually overridden this via CONFIG -= only_active_arch). -- QMAKE_APPLE_DEVICE_ARCHS = $$QT_ARCHS -- } --} -- --macx-xcode { -- qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO -- !isEmpty(QMAKE_PKGINFO_TYPEINFO): \ -- qmake_pkginfo_typeinfo.value = $$QMAKE_PKGINFO_TYPEINFO -- else: \ -- qmake_pkginfo_typeinfo.value = "????" -- QMAKE_MAC_XCODE_SETTINGS += qmake_pkginfo_typeinfo -- -- bundle_version = $$VERSION -- isEmpty(bundle_version): bundle_version = 1.0.0 -- -- l = $$split(bundle_version, '.') 0 0 # make sure there are at least three -- VER_MAJ = $$member(l, 0, 0) -- VER_MIN = $$member(l, 1, 1) -- VER_PAT = $$member(l, 2, 2) -- unset(l) -- -- qmake_full_version.name = QMAKE_FULL_VERSION -- qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} -- QMAKE_MAC_XCODE_SETTINGS += qmake_full_version -- -- qmake_short_version.name = QMAKE_SHORT_VERSION -- qmake_short_version.value = $${VER_MAJ}.$${VER_MIN} -- QMAKE_MAC_XCODE_SETTINGS += qmake_short_version -- -- !isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) { -- debug_information_format.name = DEBUG_INFORMATION_FORMAT -- debug_information_format.value = $$QMAKE_XCODE_DEBUG_INFORMATION_FORMAT -- debug_information_format.build = debug -- QMAKE_MAC_XCODE_SETTINGS += debug_information_format -- } -- -- QMAKE_XCODE_ARCHS = -- -- arch_device.name = "ARCHS[sdk=$${device.sdk}*]" -- arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS -- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS -- QMAKE_MAC_XCODE_SETTINGS += arch_device -- -- simulator { -- arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]" -- arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS -- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS -- QMAKE_MAC_XCODE_SETTINGS += arch_simulator -- } -- -- only_active_arch.name = ONLY_ACTIVE_ARCH -- only_active_arch.value = YES -- only_active_arch.build = debug -- QMAKE_MAC_XCODE_SETTINGS += only_active_arch --} else { -- device|!simulator: VALID_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS -- simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS -- VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS -- -- single_arch: VALID_ARCHS = $$first(VALID_ARCHS) -- -- macos { -- only_active_arch: DEFAULT_ARCHS = $$system("uname -m") -- else: DEFAULT_ARCHS = $$VALID_ARCHS -- } -- -- ARCHS = $(filter $(EXPORT_VALID_ARCHS), \ -- $(if $(ARCHS), $(ARCHS), \ -- $(if $(EXPORT_DEFAULT_ARCHS), $(EXPORT_DEFAULT_ARCHS), \ -- $(EXPORT_VALID_ARCHS)))) -- ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ARCHS), $(EXPORT_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch)) -- -- QMAKE_EXTRA_VARIABLES += VALID_ARCHS DEFAULT_ARCHS ARCHS ARCH_ARGS -- -- arch_flags = $(EXPORT_ARCH_ARGS) -- -- QMAKE_CFLAGS += $$arch_flags -- QMAKE_CXXFLAGS += $$arch_flags -- QMAKE_LFLAGS += $$arch_flags -- -- QMAKE_PCH_ARCHS = $$VALID_ARCHS -- -- macos: deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET -- ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET -- tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET -- watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET -- -- # If we're doing a simulator and device build, device and simulator -- # architectures use different paths and flags for the sysroot and -- # deployment target switch, so we must multiplex them across multiple -- # architectures using -Xarch. Otherwise we fall back to the simple path. -- # This is not strictly necessary, but results in cleaner command lines -- # and makes it easier for people to override EXPORT_VALID_ARCHS to limit -- # individual rules to a different set of architecture(s) from the overall -- # build (such as machtest in QtCore). -- simulator:device { -- QMAKE_XARCH_CFLAGS = -- QMAKE_XARCH_LFLAGS = -- QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS -- -- for (arch, VALID_ARCHS) { -- contains(VALID_SIMULATOR_ARCHS, $$arch) { -- sdk = $$simulator.sdk -- version_identifier = $$simulator.deployment_identifier -- } else { -- sdk = $$device.sdk -- version_identifier = $$device.deployment_identifier -- } -- -- version_min_flags = \ -- -Xarch_$${arch} \ -- -m$${version_identifier}-version-min=$$deployment_target -- QMAKE_XARCH_CFLAGS_$${arch} = $$version_min_flags \ -- -Xarch_$${arch} \ -- -isysroot$$xcodeSDKInfo(Path, $$sdk) -- QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \ -- -Xarch_$${arch} \ -- -isysroot$$xcodeSDKInfo(Path, $$sdk) -- -- QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch}) -- QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch}) -- -- QMAKE_EXTRA_VARIABLES += \ -- QMAKE_XARCH_CFLAGS_$${arch} \ -- QMAKE_XARCH_LFLAGS_$${arch} -- } -- -- QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) -- QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) -- QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS) -- } else { -- simulator { -- version_identifier = $$simulator.deployment_identifier -- sysroot_path = $$xcodeSDKInfo(Path, $$simulator.sdk) -- } else { -- version_identifier = $$device.deployment_identifier -- sysroot_path = $$xcodeSDKInfo(Path, $$device.sdk) -- } -- version_min_flag = -m$${version_identifier}-version-min=$$deployment_target -- QMAKE_CFLAGS += -isysroot $$sysroot_path $$version_min_flag -- QMAKE_CXXFLAGS += -isysroot $$sysroot_path $$version_min_flag -- QMAKE_LFLAGS += -isysroot $$sysroot_path $$version_min_flag -- } -- -- # Enable precompiled headers for multiple architectures -- QMAKE_CFLAGS_USE_PRECOMPILE = -- for (arch, VALID_ARCHS) { -- icc_pch_style: \ -- use_flag = "-pch-use " -- else: \ -- use_flag = -include -- -- # Only use Xarch with multi-arch, as the option confuses ccache -- count(VALID_ARCHS, 1, greaterThan): \ -- QMAKE_CFLAGS_USE_PRECOMPILE += \ -- -Xarch_$${arch} -- -- QMAKE_CFLAGS_USE_PRECOMPILE += \ -- $${use_flag}${QMAKE_PCH_OUTPUT_$${arch}} -- } -- icc_pch_style { -- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -include ${QMAKE_PCH_INPUT} -- QMAKE_CFLAGS_USE_PRECOMPILE = -- } else { -- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -- QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -- QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -- } -- -- QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT} --} -- --!equals(sdk_version, $$QMAKE_MAC_SDK_VERSION) { -- # Explicit SDK version has been set, respect that -- QMAKE_LFLAGS += -Wl,-sdk_version -Wl,$$sdk_version --} -- --cache(QMAKE_XCODE_DEVELOPER_PATH, stash) --!isEmpty(QMAKE_XCODE_VERSION): \ -- cache(QMAKE_XCODE_VERSION, stash) -- --QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix() -- --xcode_product_bundle_identifier_setting.name = PRODUCT_BUNDLE_IDENTIFIER --xcode_product_bundle_identifier_setting.value = $$QMAKE_TARGET_BUNDLE_PREFIX --isEmpty(xcode_product_bundle_identifier_setting.value): \ -- xcode_product_bundle_identifier_setting.value = "com.yourcompany" --xcode_product_bundle_target = $$QMAKE_BUNDLE --isEmpty(xcode_product_bundle_target): \ -- xcode_product_bundle_target = ${PRODUCT_NAME:rfc1034identifier} --xcode_product_bundle_identifier_setting.value = "$${xcode_product_bundle_identifier_setting.value}.$${xcode_product_bundle_target}" --QMAKE_MAC_XCODE_SETTINGS += xcode_product_bundle_identifier_setting -- - !macx-xcode { - generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode \"$(EXPORT__PRO_FILE_)\" $$QMAKE_ARGS - generate_xcode_project.target = xcodeproj -diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf -index 2c91ba6679..a6ab233825 100644 ---- a/mkspecs/features/mac/default_pre.prf -+++ b/mkspecs/features/mac/default_pre.prf -@@ -21,61 +21,3 @@ macos { - } - - load(default_pre) -- --isEmpty(QMAKE_XCODE_DEVELOPER_PATH) { -- # Get path of Xcode's Developer directory -- QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path 2>/dev/null") -- isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \ -- error("Xcode path is not set. Please use xcode-select to choose Xcode installation path.") -- -- # Make sure Xcode path is valid -- !exists($$QMAKE_XCODE_DEVELOPER_PATH): \ -- error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.") --} -- --isEmpty(QMAKE_XCODEBUILD_PATH): \ -- QMAKE_XCODEBUILD_PATH = $$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null") -- --!isEmpty(QMAKE_XCODEBUILD_PATH) { -- # Make sure Xcode is set up properly -- !system("/usr/bin/xcrun xcodebuild -license check 2>/dev/null"): \ -- error("Xcode not set up properly. You need to confirm the license agreement by running 'sudo xcrun xcodebuild -license accept'.") -- -- isEmpty(QMAKE_XCODE_VERSION) { -- # Extract Xcode version using xcodebuild -- xcode_version = $$system("/usr/bin/xcrun xcodebuild -version") -- QMAKE_XCODE_VERSION = $$member(xcode_version, 1) -- isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.") -- unset(xcode_version) -- } --} -- --isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) { -- QMAKE_XCODE_PREFERENCES_FILE = $$(HOME)/Library/Preferences/com.apple.dt.Xcode.plist -- exists($$QMAKE_XCODE_PREFERENCES_FILE): \ -- QMAKE_TARGET_BUNDLE_PREFIX = $$system("/usr/libexec/PlistBuddy -c 'print IDETemplateOptions:bundleIdentifierPrefix' $$QMAKE_XCODE_PREFERENCES_FILE 2>/dev/null") -- -- !isEmpty(_QMAKE_CACHE_):!isEmpty(QMAKE_TARGET_BUNDLE_PREFIX): \ -- cache(QMAKE_TARGET_BUNDLE_PREFIX) --} -- --QMAKE_ASSET_CATALOGS_APP_ICON = AppIcon -- --# Make the default debug info format for static debug builds --# DWARF instead of DWARF with dSYM. This cuts down build times --# for application debug builds significantly, as Xcode doesn't --# have to pull out all the DWARF info from the Qt static libs --# and put it into a dSYM file. We don't need that dSYM file in --# the first place, since the information is available in the --# object files inside the archives (static libraries). --macx-xcode:qtConfig(static): \ -- QMAKE_XCODE_DEBUG_INFORMATION_FORMAT = dwarf -- --# This variable is used by the xcode_dynamic_library_suffix --# feature, which allows Xcode to choose the Qt libraries to link to --# at build time, depending on the current Xcode SDK and configuration. --QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX -- --xcode_copy_phase_strip_setting.name = COPY_PHASE_STRIP --xcode_copy_phase_strip_setting.value = NO --QMAKE_MAC_XCODE_SETTINGS += xcode_copy_phase_strip_setting -diff --git a/mkspecs/features/mac/sdk.mk b/mkspecs/features/mac/sdk.mk ---- a/mkspecs/features/mac/sdk.mk -+++ b/mkspecs/features/mac/sdk.mk -@@ -1,27 +0,0 @@ -- --ifeq ($(QT_MAC_SDK_NO_VERSION_CHECK),) -- CHECK_SDK_COMMAND = /usr/bin/xcrun --sdk $(EXPORT_QMAKE_MAC_SDK) -show-sdk-version 2>/dev/null -- CURRENT_MAC_SDK_VERSION := $(shell DEVELOPER_DIR=$(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) $(CHECK_SDK_COMMAND)) -- ifneq ($(CURRENT_MAC_SDK_VERSION),$(EXPORT_QMAKE_MAC_SDK_VERSION)) -- # We don't want to complain about out of date SDK unless the target needs to be remade. -- # This covers use-cases such as running 'make check' after moving the build to a -- # computer without Xcode or with a different Xcode version. -- TARGET_UP_TO_DATE := $(shell QT_MAC_SDK_NO_VERSION_CHECK=1 $(MAKE) --question $(QMAKE_TARGET) && echo 1 || echo 0) -- ifeq ($(TARGET_UP_TO_DATE),0) -- ifneq ($(findstring missing DEVELOPER_DIR path,$(CURRENT_MAC_SDK_VERSION)),) -- $(info The developer dir $(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) is no longer valid.) -- else ifneq ($(findstring SDK "$(EXPORT_QMAKE_MAC_SDK)" cannot be located,$(CURRENT_MAC_SDK_VERSION)),) -- $(info The developer dir $(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) no longer contains the $(EXPORT_QMAKE_MAC_SDK_VERSION) platform SDK.) -- else ifneq ($(CURRENT_MAC_SDK_VERSION),) -- $(info The $(EXPORT_QMAKE_MAC_SDK) platform SDK has been changed from version $(EXPORT_QMAKE_MAC_SDK_VERSION) to version $(CURRENT_MAC_SDK_VERSION).) -- else -- $(info Unknown error resolving current platform SDK version.) -- endif -- $(info This requires a fresh build of your project. Please wipe the build directory) -- ifneq ($(EXPORT__QMAKE_STASH_),) -- $(info including the qmake cache in $(EXPORT__QMAKE_STASH_)) -- endif -- $(error ^) -- endif -- endif --endif -diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf -deleted file mode 100644 -index 3a9c2778bb..0000000000 ---- a/mkspecs/features/mac/sdk.prf -+++ /dev/null -@@ -1,61 +0,0 @@ -- --isEmpty(QMAKE_MAC_SDK): \ -- error("QMAKE_MAC_SDK must be set when using CONFIG += sdk.") -- --contains(QMAKE_MAC_SDK, .*/.*): \ -- error("QMAKE_MAC_SDK can only contain short-form SDK names (eg. macosx, iphoneos)") -- --defineReplace(xcodeSDKInfo) { -- info = $$1 -- equals(info, "Path"): \ -- infoarg = --show-sdk-path -- equals(info, "PlatformPath"): \ -- infoarg = --show-sdk-platform-path -- equals(info, "SDKVersion"): \ -- infoarg = --show-sdk-version -- sdk = $$2 -- isEmpty(sdk): \ -- sdk = $$QMAKE_MAC_SDK -- -- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) { -- QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$infoarg 2>/dev/null") -- # --show-sdk-platform-path won't work for Command Line Tools; this is fine -- # only used by the XCTest backend to testlib -- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(infoarg, "--show-sdk-platform-path")): \ -- error("Could not resolve SDK $$info for \'$$sdk\' using $$infoarg") -- cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info}) -- } -- -- return($$eval(QMAKE_MAC_SDK.$${sdk}.$${info})) --} -- --QMAKE_MAC_SDK_PATH = $$xcodeSDKInfo(Path) --QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath) --QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion) -- --isEmpty(QMAKE_EXPORT_INCDIR_OPENGL) { -- QMAKE_EXPORT_INCDIR_OPENGL = $$QMAKE_INCDIR_OPENGL -- sysrootified = -- for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val -- QMAKE_INCDIR_OPENGL = $$sysrootified --} -- --QMAKESPEC_NAME = $$basename(QMAKESPEC) -- --# Resolve SDK version of various tools --for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_ACTOOL QMAKE_LINK_C QMAKE_LINK_C_SHLIB)) { -- tool_variable = QMAKE_MAC_SDK.$${QMAKESPEC_NAME}.$${QMAKE_MAC_SDK}.$${tool} -- !isEmpty($$tool_variable) { -- $$tool = $$eval($$tool_variable) -- next() -- } -- -- value = $$eval($$tool) -- isEmpty(value): next() -- -- sysrooted = $$system("/usr/bin/xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value) 2>/dev/null") -- isEmpty(sysrooted): next() -- -- $$tool = $$sysrooted $$member(value, 1, -1) -- cache($$tool_variable, set stash, $$tool) --} -diff --git a/mkspecs/features/mac/toolchain.prf b/mkspecs/features/mac/toolchain.prf -deleted file mode 100644 -index df191eb13c..0000000000 ---- a/mkspecs/features/mac/toolchain.prf -+++ /dev/null -@@ -1,5 +0,0 @@ --# Ensure that we process sdk.prf first, as it will update QMAKE_CXX, --# which the default path determination uses. --sdk: load(sdk) -- --load(toolchain) diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0012-qtbase-tbd-frameworks.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0012-qtbase-tbd-frameworks.patch deleted file mode 100644 index 8a5939978a6b..000000000000 --- a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0012-qtbase-tbd-frameworks.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in -index 84dbbfebd4..615bfed124 100644 ---- a/src/gui/Qt5GuiConfigExtras.cmake.in -+++ b/src/gui/Qt5GuiConfigExtras.cmake.in -@@ -119,6 +119,10 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs) - if (NOT EXISTS "${Qt5Gui_${_cmake_lib_name}_LIBRARY}") - set(Qt5Gui_${_cmake_lib_name}_LIBRARY) - endif() -+ set(Qt5Gui_${_cmake_lib_name}_LIBRARY "${Qt5Gui_${_cmake_lib_name}_LIBRARY}/${_lib}.tbd") -+ if (NOT EXISTS "${Qt5Gui_${_cmake_lib_name}_LIBRARY}") -+ set(Qt5Gui_${_cmake_lib_name}_LIBRARY) -+ endif() - !!ENDIF - if (NOT Qt5Gui_${_cmake_lib_name}_LIBRARY) - # The above find_library call doesn\'t work for finding diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0014-aarch64-darwin.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0014-aarch64-darwin.patch deleted file mode 100644 index f0809f8f9a3f..000000000000 --- a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0014-aarch64-darwin.patch +++ /dev/null @@ -1,275 +0,0 @@ -From abc52460201bc5c7603505bb187138b0c59291aa Mon Sep 17 00:00:00 2001 -From: Mushroom -Date: Sun, 20 Dec 2020 00:11:41 +0000 -Subject: [PATCH] [QtBase] Split macOS platforms by architecture - -Currently macOS only has one platform, which forces the default arch to -x86_64. This patch splits the platforms by architecture, and defaults to -the same as the host. - -This stops M1-based macs from compiling x64 binaries by default, -instead making them compile native binaries. - -[ChangeLog][QtBase][Platform Specific Changes][OS X] Split macOS -platforms so it doesn't default to the x64 architecture every time - -Change-Id: I34891b107bb24f68371df1c8f087eb0ad5b5dd95 ---- - configure | 9 +++- - .../clang-macx-desktop.conf} | 8 ++-- - mkspecs/common/macx.conf | 1 - - .../Info.plist.app | 0 - .../Info.plist.dSYM.in | 0 - .../Info.plist.disable_highdpi | 0 - .../Info.plist.lib | 0 - mkspecs/macx-clang-arm64/qmake.conf | 7 ++++ - .../qplatformdefs.h | 0 - mkspecs/macx-clang-x64/Info.plist.app | 24 +++++++++++ - mkspecs/macx-clang-x64/Info.plist.dSYM.in | 18 ++++++++ - .../macx-clang-x64/Info.plist.disable_highdpi | 8 ++++ - mkspecs/macx-clang-x64/Info.plist.lib | 20 +++++++++ - mkspecs/macx-clang-x64/qmake.conf | 7 ++++ - mkspecs/macx-clang-x64/qplatformdefs.h | 41 +++++++++++++++++++ - 15 files changed, 137 insertions(+), 6 deletions(-) - rename mkspecs/{macx-clang/qmake.conf => common/clang-macx-desktop.conf} (83%) - rename mkspecs/{macx-clang => macx-clang-arm64}/Info.plist.app (100%) - rename mkspecs/{macx-clang => macx-clang-arm64}/Info.plist.dSYM.in (100%) - rename mkspecs/{macx-clang => macx-clang-arm64}/Info.plist.disable_highdpi (100%) - rename mkspecs/{macx-clang => macx-clang-arm64}/Info.plist.lib (100%) - create mode 100644 mkspecs/macx-clang-arm64/qmake.conf - rename mkspecs/{macx-clang => macx-clang-arm64}/qplatformdefs.h (100%) - create mode 100644 mkspecs/macx-clang-x64/Info.plist.app - create mode 100644 mkspecs/macx-clang-x64/Info.plist.dSYM.in - create mode 100644 mkspecs/macx-clang-x64/Info.plist.disable_highdpi - create mode 100644 mkspecs/macx-clang-x64/Info.plist.lib - create mode 100644 mkspecs/macx-clang-x64/qmake.conf - create mode 100644 mkspecs/macx-clang-x64/qplatformdefs.h - -diff --git a/configure b/configure -index b6c9b462f24..a86f2ceaa5b 100755 ---- a/configure -+++ b/configure -@@ -556,7 +556,14 @@ PLATFORM_NOTES= - if [ -z "$PLATFORM" ]; then - case "$UNAME_SYSTEM:$UNAME_RELEASE" in - Darwin:*) -- PLATFORM=macx-clang -+ case "$UNAME_MACHINE" in -+ arm64) -+ PLATFORM=macx-clang-arm64 -+ ;; -+ *) -+ PLATFORM=macx-clang-x64 -+ ;; -+ esac - ;; - AIX:*) - #PLATFORM=aix-g++ -diff --git a/mkspecs/macx-clang/qmake.conf b/mkspecs/common/clang-macx-desktop.conf -similarity index 83% -rename from mkspecs/macx-clang/qmake.conf -rename to mkspecs/common/clang-macx-desktop.conf -index 0cf1f31b60d..042319a2aa3 100644 ---- a/mkspecs/macx-clang/qmake.conf -+++ b/mkspecs/common/clang-macx-desktop.conf -@@ -24,9 +24,9 @@ QMAKE_LIBS_X11 = -lX11 -lXext -lm - QMAKE_LIBDIR_X11 = /opt/X11/lib - QMAKE_INCDIR_X11 = /opt/X11/include - --include(../common/macx.conf) --include(../common/gcc-base-mac.conf) --include(../common/clang.conf) --include(../common/clang-mac.conf) -+include(macx.conf) -+include(gcc-base-mac.conf) -+include(clang.conf) -+include(clang-mac.conf) - - load(qt_config) -diff --git a/mkspecs/macx-clang/Info.plist.app b/mkspecs/macx-clang-arm64/Info.plist.app -similarity index 100% -rename from mkspecs/macx-clang/Info.plist.app -rename to mkspecs/macx-clang-arm64/Info.plist.app -diff --git a/mkspecs/macx-clang/Info.plist.dSYM.in b/mkspecs/macx-clang-arm64/Info.plist.dSYM.in -similarity index 100% -rename from mkspecs/macx-clang/Info.plist.dSYM.in -rename to mkspecs/macx-clang-arm64/Info.plist.dSYM.in -diff --git a/mkspecs/macx-clang/Info.plist.disable_highdpi b/mkspecs/macx-clang-arm64/Info.plist.disable_highdpi -similarity index 100% -rename from mkspecs/macx-clang/Info.plist.disable_highdpi -rename to mkspecs/macx-clang-arm64/Info.plist.disable_highdpi -diff --git a/mkspecs/macx-clang/Info.plist.lib b/mkspecs/macx-clang-arm64/Info.plist.lib -similarity index 100% -rename from mkspecs/macx-clang/Info.plist.lib -rename to mkspecs/macx-clang-arm64/Info.plist.lib -diff --git a/mkspecs/macx-clang-arm64/qmake.conf b/mkspecs/macx-clang-arm64/qmake.conf -new file mode 100644 -index 00000000000..0cc2361e696 ---- /dev/null -+++ b/mkspecs/macx-clang-arm64/qmake.conf -@@ -0,0 +1,7 @@ -+# -+# qmake configuration for Clang on OS X (arm64) -+# -+ -+QMAKE_APPLE_DEVICE_ARCHS=arm64 -+ -+include(../common/clang-macx-desktop.conf) -diff --git a/mkspecs/macx-clang/qplatformdefs.h b/mkspecs/macx-clang-arm64/qplatformdefs.h -similarity index 100% -rename from mkspecs/macx-clang/qplatformdefs.h -rename to mkspecs/macx-clang-arm64/qplatformdefs.h -diff --git a/mkspecs/macx-clang-x64/Info.plist.app b/mkspecs/macx-clang-x64/Info.plist.app -new file mode 100644 -index 00000000000..fa592af0897 ---- /dev/null -+++ b/mkspecs/macx-clang-x64/Info.plist.app -@@ -0,0 +1,24 @@ -+ -+ -+ -+ -+ CFBundleExecutable -+ ${EXECUTABLE_NAME} -+ CFBundleIconFile -+ ${ASSETCATALOG_COMPILER_APPICON_NAME} -+ CFBundleIdentifier -+ ${PRODUCT_BUNDLE_IDENTIFIER} -+ CFBundlePackageType -+ APPL -+ CFBundleSignature -+ ${QMAKE_PKGINFO_TYPEINFO} -+ LSMinimumSystemVersion -+ ${MACOSX_DEPLOYMENT_TARGET} -+ NOTE -+ This file was generated by Qt/QMake. -+ NSPrincipalClass -+ NSApplication -+ NSSupportsAutomaticGraphicsSwitching -+ -+ -+ -diff --git a/mkspecs/macx-clang-x64/Info.plist.dSYM.in b/mkspecs/macx-clang-x64/Info.plist.dSYM.in -new file mode 100644 -index 00000000000..a8c8d0d4fb5 ---- /dev/null -+++ b/mkspecs/macx-clang-x64/Info.plist.dSYM.in -@@ -0,0 +1,18 @@ -+ -+ -+ -+ -+ CFBundleIdentifier -+ com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} -+ CFBundlePackageType -+ dSYM -+ CFBundleSignature -+ ???? -+!!IF !isEmpty(VERSION) -+ CFBundleShortVersionString -+ $${VER_MAJ}.$${VER_MIN} -+ CFBundleVersion -+ $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} -+!!ENDIF -+ -+ -diff --git a/mkspecs/macx-clang-x64/Info.plist.disable_highdpi b/mkspecs/macx-clang-x64/Info.plist.disable_highdpi -new file mode 100644 -index 00000000000..a9b89888ad4 ---- /dev/null -+++ b/mkspecs/macx-clang-x64/Info.plist.disable_highdpi -@@ -0,0 +1,8 @@ -+ -+ -+ -+ -+ NSHighResolutionCapable -+ NO -+ -+ -diff --git a/mkspecs/macx-clang-x64/Info.plist.lib b/mkspecs/macx-clang-x64/Info.plist.lib -new file mode 100644 -index 00000000000..34752ec40d9 ---- /dev/null -+++ b/mkspecs/macx-clang-x64/Info.plist.lib -@@ -0,0 +1,20 @@ -+ -+ -+ -+ -+ CFBundleExecutable -+ ${EXECUTABLE_NAME} -+ CFBundleIdentifier -+ ${PRODUCT_BUNDLE_IDENTIFIER} -+ CFBundlePackageType -+ FMWK -+ CFBundleShortVersionString -+ ${QMAKE_SHORT_VERSION} -+ CFBundleSignature -+ ${QMAKE_PKGINFO_TYPEINFO} -+ CFBundleVersion -+ ${QMAKE_FULL_VERSION} -+ NOTE -+ Please, do NOT change this file -- It was generated by Qt/QMake. -+ -+ -diff --git a/mkspecs/macx-clang-x64/qmake.conf b/mkspecs/macx-clang-x64/qmake.conf -new file mode 100644 -index 00000000000..1ac373b53b4 ---- /dev/null -+++ b/mkspecs/macx-clang-x64/qmake.conf -@@ -0,0 +1,7 @@ -+# -+# qmake configuration for Clang on OS X (arm64) -+# -+ -+QMAKE_APPLE_DEVICE_ARCHS=x86_64 -+ -+include(../common/clang-macx-desktop.conf) -diff --git a/mkspecs/macx-clang-x64/qplatformdefs.h b/mkspecs/macx-clang-x64/qplatformdefs.h -new file mode 100644 -index 00000000000..063491dd900 ---- /dev/null -+++ b/mkspecs/macx-clang-x64/qplatformdefs.h -@@ -0,0 +1,41 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2016 The Qt Company Ltd. -+** Contact: https://www.qt.io/licensing/ -+** -+** This file is part of the qmake spec of the Qt Toolkit. -+** -+** $QT_BEGIN_LICENSE:LGPL$ -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and The Qt Company. For licensing terms -+** and conditions see https://www.qt.io/terms-conditions. For further -+** information use the contact form at https://www.qt.io/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 3 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL3 included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 3 requirements -+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -+** -+** GNU General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU -+** General Public License version 2.0 or (at your option) the GNU General -+** Public license version 3 or any later version approved by the KDE Free -+** Qt Foundation. The licenses are as published by the Free Software -+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -+** included in the packaging of this file. Please review the following -+** information to ensure the GNU General Public License requirements will -+** be met: https://www.gnu.org/licenses/gpl-2.0.html and -+** https://www.gnu.org/licenses/gpl-3.0.html. -+** -+** $QT_END_LICENSE$ -+** -+****************************************************************************/ -+ -+#include "../common/mac/qplatformdefs.h" -+ diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 0dadaeeaf916..7f9b1461e3c5 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -146,13 +146,24 @@ stdenv.mkDerivation (finalAttrs: ({ patchShebangs ./bin '' + ( if stdenv.hostPlatform.isDarwin then '' + for file in \ + configure \ + mkspecs/features/mac/asset_catalogs.prf \ + mkspecs/features/mac/default_pre.prf \ + mkspecs/features/mac/sdk.mk \ + mkspecs/features/mac/sdk.prf + do + substituteInPlace "$file" \ + --replace-quiet /usr/bin/xcode-select '${lib.getExe' xcbuild "xcode-select"}' \ + --replace-quiet /usr/bin/xcrun '${lib.getExe' xcbuild "xcrun"}' \ + --replace-quiet /usr/libexec/PlistBuddy '${lib.getExe' xcbuild "PlistBuddy"}' + done + substituteInPlace configure \ - --replace-fail '/usr/bin/xcode-select' '${lib.getBin xcbuild}/bin/xcode-select' \ - --replace-fail '/usr/bin/xcrun' '${lib.getBin xcbuild}/bin/xcrun' \ - --replace-fail '/System/Library/Frameworks/Cocoa.framework' "$SDKROOT/System/Library/Frameworks/Cocoa.framework" - substituteInPlace ./mkspecs/common/mac.conf \ - --replace-fail "/System/Library/Frameworks/OpenGL.framework/" "$SDKROOT/System/Library/Frameworks/OpenGL.framework/" \ - --replace-fail "/System/Library/Frameworks/AGL.framework/" "$SDKROOT/System/Library/Frameworks/AGL.framework/" + --replace-fail /System/Library/Frameworks/Cocoa.framework "$SDKROOT/System/Library/Frameworks/Cocoa.framework" + + substituteInPlace mkspecs/common/macx.conf \ + --replace-fail 'CONFIG += ' 'CONFIG += no_default_rpath ' '' else lib.optionalString libGLSupported '' sed -i mkspecs/common/linux.conf \ -e "/^QMAKE_INCDIR_OPENGL/ s|$|${lib.getDev libGL}/include|" \ @@ -326,6 +337,7 @@ stdenv.mkDerivation (finalAttrs: ({ "-qt-freetype" "-qt-libpng" "-no-framework" + "-no-rpath" ] else [ "-rpath" ] ++ [ From 3be309eff11e2eb677199997cb653b1358ccd5fd Mon Sep 17 00:00:00 2001 From: Emily Date: Mon, 28 Oct 2024 18:59:35 +0000 Subject: [PATCH 164/252] libsForQt5.qtbase: use the macOS 13 SDK --- pkgs/development/libraries/qt-5/modules/qtbase.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 7f9b1461e3c5..0d2827a219ef 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -4,7 +4,7 @@ , coreutils, bison, flex, gdb, gperf, lndir, perl, pkg-config, python3 , which # darwin support -, darwinMinVersionHook, apple-sdk, apple-sdk_10_14, apple-sdk_14, xcbuild +, darwinMinVersionHook, apple-sdk, apple-sdk_10_14, apple-sdk_13, xcbuild , dbus, fontconfig, freetype, glib, harfbuzz, icu, libdrm, libX11, libXcomposite , libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng , libxcb @@ -38,12 +38,14 @@ let then "linux-generic-g++" else throw "Please add a qtPlatformCross entry for ${plat.config}"; - # Per https://doc.qt.io/qt-5/macos.html#supported-versions: deployment target = 10.13, build SDK = 14.x. + # Per https://doc.qt.io/qt-5/macos.html#supported-versions: deployment target = 10.13, build SDK = 13.x or 14.x. + # Despite advertising support for the macOS 14 SDK, the build system sets the maximum to 13 and complains + # about 14, so we just use that. # Note that Qt propagates the 10.14 SDK instead of the 10.13 SDK to make sure that applications linked to Qt # support automatic dark mode on x86_64-darwin (see: https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_macos_app). propagatedAppleSDK = if lib.versionOlder (lib.getVersion apple-sdk) "10.14" then apple-sdk_10_14 else apple-sdk; propagatedMinVersionHook = darwinMinVersionHook "10.13"; - buildAppleSDK = apple-sdk_14; + buildAppleSDK = apple-sdk_13; in stdenv.mkDerivation (finalAttrs: ({ From 38316856843f2d95aea429faec9357f0a5f122bb Mon Sep 17 00:00:00 2001 From: Emily Date: Mon, 28 Oct 2024 18:59:35 +0000 Subject: [PATCH 165/252] libsForQt5.qtbase: override the Darwin deployment target correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There might be a nicer way to do this, but I don’t understand qmake. --- pkgs/development/libraries/qt-5/modules/qtbase.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 0d2827a219ef..748d4d1e0386 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -44,7 +44,8 @@ let # Note that Qt propagates the 10.14 SDK instead of the 10.13 SDK to make sure that applications linked to Qt # support automatic dark mode on x86_64-darwin (see: https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_macos_app). propagatedAppleSDK = if lib.versionOlder (lib.getVersion apple-sdk) "10.14" then apple-sdk_10_14 else apple-sdk; - propagatedMinVersionHook = darwinMinVersionHook "10.13"; + deploymentTarget = "10.13"; + propagatedMinVersionHook = darwinMinVersionHook deploymentTarget; buildAppleSDK = apple-sdk_13; in @@ -165,7 +166,10 @@ stdenv.mkDerivation (finalAttrs: ({ --replace-fail /System/Library/Frameworks/Cocoa.framework "$SDKROOT/System/Library/Frameworks/Cocoa.framework" substituteInPlace mkspecs/common/macx.conf \ - --replace-fail 'CONFIG += ' 'CONFIG += no_default_rpath ' + --replace-fail 'CONFIG += ' 'CONFIG += no_default_rpath ' \ + --replace-fail \ + 'QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13' \ + 'QMAKE_MACOSX_DEPLOYMENT_TARGET = ${deploymentTarget}' '' else lib.optionalString libGLSupported '' sed -i mkspecs/common/linux.conf \ -e "/^QMAKE_INCDIR_OPENGL/ s|$|${lib.getDev libGL}/include|" \ From 951e05b4b794511edc00cae63f5a6f03d2b6f831 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Fri, 25 Oct 2024 19:51:07 +0200 Subject: [PATCH 166/252] serd: set license as ISC instead of MIT According to the top-level COPYING, ISC is the right license to use. --- pkgs/development/libraries/serd/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/serd/default.nix b/pkgs/development/libraries/serd/default.nix index 51e1f0264805..ab7002c2c586 100644 --- a/pkgs/development/libraries/serd/default.nix +++ b/pkgs/development/libraries/serd/default.nix @@ -51,12 +51,12 @@ stdenv.mkDerivation rec { ''; }; - meta = with lib; { + meta = { description = "Lightweight C library for RDF syntax which supports reading and writing Turtle and NTriples"; homepage = "https://drobilla.net/software/serd"; - license = licenses.mit; + license = lib.licenses.isc; maintainers = [ ]; mainProgram = "serdi"; - platforms = platforms.unix; + platforms = lib.platforms.unix; }; } From de26abe63b3401b943aa7003a31177a8caadc054 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Fri, 25 Oct 2024 19:52:04 +0200 Subject: [PATCH 167/252] serd: set myself as maintainer --- pkgs/development/libraries/serd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/serd/default.nix b/pkgs/development/libraries/serd/default.nix index ab7002c2c586..23accbcfbe6b 100644 --- a/pkgs/development/libraries/serd/default.nix +++ b/pkgs/development/libraries/serd/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { description = "Lightweight C library for RDF syntax which supports reading and writing Turtle and NTriples"; homepage = "https://drobilla.net/software/serd"; license = lib.licenses.isc; - maintainers = [ ]; + maintainers = with lib.maintainers; [ samueltardieu ]; mainProgram = "serdi"; platforms = lib.platforms.unix; }; From 607282c12a5d8b1db0da9ef35f5bb25f50e05f2b Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Fri, 25 Oct 2024 16:35:59 +0200 Subject: [PATCH 168/252] =?UTF-8?q?serd:=200.30.16=20=E2=86=92=200.32.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/libraries/serd/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/serd/default.nix b/pkgs/development/libraries/serd/default.nix index 23accbcfbe6b..fd556b40f1cb 100644 --- a/pkgs/development/libraries/serd/default.nix +++ b/pkgs/development/libraries/serd/default.nix @@ -8,18 +8,19 @@ , pkg-config , python3 , sphinx +, sphinxygen , writeScript }: stdenv.mkDerivation rec { pname = "serd"; - version = "0.30.16"; + version = "0.32.2"; outputs = [ "out" "dev" "doc" "man" ]; src = fetchurl { url = "https://download.drobilla.net/${pname}-${version}.tar.xz"; - hash = "sha256-9Q9IbaUZzdjQOyDJ5CQU5FkTP1okRBHY5jyu+NmskUY="; + hash = "sha256-333CyW8rod7P11bkWOBh3tfYFY0lVVTnaTSDrAljxWs="; }; nativeBuildInputs = [ @@ -30,6 +31,7 @@ stdenv.mkDerivation rec { pkg-config python3 sphinx + sphinxygen ]; postPatch = '' From 3cd9ca4ee169ec1f0fecbaf1e332e189ad4afc4c Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Fri, 25 Oct 2024 16:42:45 +0200 Subject: [PATCH 169/252] serd: reformat file --- pkgs/development/libraries/serd/default.nix | 32 ++++++++++++--------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/serd/default.nix b/pkgs/development/libraries/serd/default.nix index fd556b40f1cb..750591e0f2e2 100644 --- a/pkgs/development/libraries/serd/default.nix +++ b/pkgs/development/libraries/serd/default.nix @@ -1,22 +1,28 @@ -{ lib -, stdenv -, fetchurl -, doxygen -, mandoc -, meson -, ninja -, pkg-config -, python3 -, sphinx -, sphinxygen -, writeScript +{ + lib, + stdenv, + fetchurl, + doxygen, + mandoc, + meson, + ninja, + pkg-config, + python3, + sphinx, + sphinxygen, + writeScript, }: stdenv.mkDerivation rec { pname = "serd"; version = "0.32.2"; - outputs = [ "out" "dev" "doc" "man" ]; + outputs = [ + "out" + "dev" + "doc" + "man" + ]; src = fetchurl { url = "https://download.drobilla.net/${pname}-${version}.tar.xz"; From 47dc341f33e3a654f21c6467ae013eac5d088b80 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 29 Oct 2024 07:00:36 +0000 Subject: [PATCH 170/252] mercurial: 6.8.1 -> 6.8.2 --- pkgs/applications/version-management/mercurial/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/mercurial/default.nix b/pkgs/applications/version-management/mercurial/default.nix index 5a790ff3f4d3..fd41363e1650 100644 --- a/pkgs/applications/version-management/mercurial/default.nix +++ b/pkgs/applications/version-management/mercurial/default.nix @@ -21,11 +21,11 @@ let self = python3Packages.buildPythonApplication rec { pname = "mercurial${lib.optionalString fullBuild "-full"}"; - version = "6.8.1"; + version = "6.8.2"; src = fetchurl { url = "https://mercurial-scm.org/release/mercurial-${version}.tar.gz"; - hash = "sha256-Aw6Kem1ZDk6utAPuJWdWFc2A0jbzq4oLVtzIQYEViwU="; + hash = "sha256-qsYYEGdorR7ZdsP+fIZZ/smebwtTN+pupVT66EkMT04="; }; format = "other"; @@ -35,7 +35,7 @@ let cargoDeps = if rustSupport then rustPlatform.fetchCargoTarball { inherit src; name = "mercurial-${version}"; - hash = "sha256-i5AVyi9m7qLLubhV8fBhhZ6/RYOjMdwmv9Bek9pT/xo="; + hash = "sha256-/HjgGtjKfLLufEqyT7xHYIlC5xnVunYoA+H1xLS1bVw="; sourceRoot = "mercurial-${version}/rust"; } else null; cargoRoot = if rustSupport then "rust" else null; From 7e8b51b0971b93b409a7384b9b2a8a19a62300ba Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 29 Oct 2024 07:15:29 +0000 Subject: [PATCH 171/252] libopenmpt: 0.7.10 -> 0.7.11 Changes: https://lib.openmpt.org/libopenmpt/2024/10/26/releases-0.7.11-0.6.20-0.5.34-0.4.46/ --- 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 fe301ae859ba..327ce1100c88 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.7.10"; + version = "0.7.11"; outputs = [ "out" "dev" "bin" ]; src = fetchurl { url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz"; - hash = "sha256-CTcTwcECT08QxHeaZs6yr1H7fJCKnpn+uJLQQBkiC6E="; + hash = "sha256-U6eYuMbi4faV6K0F6ToMG1MZnlqpmBg3xBaWs3BSB2c="; }; enableParallelBuilding = true; From d08e607506d41a59fa49bcca7c6e870f5e330f14 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 29 Oct 2024 08:40:04 +0000 Subject: [PATCH 172/252] libimobiledevice-glue: 1.3.0 -> 1.3.1 --- pkgs/development/libraries/libimobiledevice-glue/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libimobiledevice-glue/default.nix b/pkgs/development/libraries/libimobiledevice-glue/default.nix index 13a2e83d0473..99eb6c3cede0 100644 --- a/pkgs/development/libraries/libimobiledevice-glue/default.nix +++ b/pkgs/development/libraries/libimobiledevice-glue/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "libimobiledevice-glue"; - version = "1.3.0"; + version = "1.3.1"; src = fetchFromGitHub { owner = "libimobiledevice"; repo = pname; rev = version; - hash = "sha256-+poCrn2YHeH8RQCfWDdnlmJB4Nf+unWUVwn7YwILHIs="; + hash = "sha256-Fu0zQIryESRaTGzDlAaewX9Yo2nPEeUxmcb3yPJLuSI="; }; preAutoreconf = '' From e24121ec205cef4cf69c15408ef57f95559f6f15 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Tue, 17 Sep 2024 21:55:33 +0200 Subject: [PATCH 173/252] postgresqlPackages: replace custom installPhase with buildPostgresqlExtension helper --- .../postgresql/buildPostgresqlExtension.nix | 129 ++++++++++++++++++ pkgs/servers/sql/postgresql/ext/age.nix | 12 +- .../servers/sql/postgresql/ext/anonymizer.nix | 15 +- .../postgresql/ext/apache_datasketches.nix | 31 +---- pkgs/servers/sql/postgresql/ext/citus.nix | 18 +-- .../servers/sql/postgresql/ext/cstore_fdw.nix | 13 +- pkgs/servers/sql/postgresql/ext/h3-pg.nix | 11 +- pkgs/servers/sql/postgresql/ext/hypopg.nix | 12 +- .../sql/postgresql/ext/jsonb_deep_sum.nix | 14 +- pkgs/servers/sql/postgresql/ext/lantern.nix | 14 +- pkgs/servers/sql/postgresql/ext/periods.nix | 12 +- .../sql/postgresql/ext/pg_auto_failover.nix | 13 +- pkgs/servers/sql/postgresql/ext/pg_bigm.nix | 12 +- pkgs/servers/sql/postgresql/ext/pg_cron.nix | 14 +- .../servers/sql/postgresql/ext/pg_ed25519.nix | 15 +- .../sql/postgresql/ext/pg_embedding.nix | 12 +- .../sql/postgresql/ext/pg_hint_plan.nix | 12 +- pkgs/servers/sql/postgresql/ext/pg_hll.nix | 12 +- pkgs/servers/sql/postgresql/ext/pg_ivm.nix | 12 +- .../sql/postgresql/ext/pg_libversion.nix | 14 +- pkgs/servers/sql/postgresql/ext/pg_net.nix | 14 +- .../servers/sql/postgresql/ext/pg_partman.nix | 15 +- .../sql/postgresql/ext/pg_rational.nix | 17 +-- .../sql/postgresql/ext/pg_relusage.nix | 12 +- pkgs/servers/sql/postgresql/ext/pg_repack.nix | 11 +- .../sql/postgresql/ext/pg_roaringbitmap.nix | 14 +- .../sql/postgresql/ext/pg_safeupdate.nix | 10 +- .../sql/postgresql/ext/pg_similarity.nix | 11 +- .../servers/sql/postgresql/ext/pg_squeeze.nix | 18 +-- pkgs/servers/sql/postgresql/ext/pg_topn.nix | 14 +- pkgs/servers/sql/postgresql/ext/pg_uuidv7.nix | 10 +- pkgs/servers/sql/postgresql/ext/pgaudit.nix | 12 +- pkgs/servers/sql/postgresql/ext/pgjwt.nix | 10 +- pkgs/servers/sql/postgresql/ext/pgmq.nix | 14 +- pkgs/servers/sql/postgresql/ext/pgroonga.nix | 16 +-- pkgs/servers/sql/postgresql/ext/pgrouting.nix | 12 +- pkgs/servers/sql/postgresql/ext/pgsodium.nix | 14 +- .../servers/sql/postgresql/ext/pgsql-http.nix | 12 +- pkgs/servers/sql/postgresql/ext/pgtap.nix | 7 +- pkgs/servers/sql/postgresql/ext/pgvector.nix | 12 +- .../sql/postgresql/ext/plpgsql_check.nix | 12 +- pkgs/servers/sql/postgresql/ext/plr.nix | 11 +- .../sql/postgresql/ext/plv8/default.nix | 17 +-- pkgs/servers/sql/postgresql/ext/postgis.nix | 29 ++-- pkgs/servers/sql/postgresql/ext/repmgr.nix | 14 +- pkgs/servers/sql/postgresql/ext/rum.nix | 11 +- pkgs/servers/sql/postgresql/ext/smlar.nix | 12 +- .../sql/postgresql/ext/system_stats.nix | 17 +-- pkgs/servers/sql/postgresql/ext/tds_fdw.nix | 13 +- .../sql/postgresql/ext/temporal_tables.nix | 12 +- .../sql/postgresql/ext/timescaledb.nix | 6 +- .../sql/postgresql/ext/tsearch_extras.nix | 11 +- pkgs/servers/sql/postgresql/ext/tsja.nix | 1 - pkgs/servers/sql/postgresql/ext/wal2json.nix | 10 +- pkgs/servers/sql/postgresql/generic.nix | 1 + 55 files changed, 261 insertions(+), 568 deletions(-) create mode 100644 pkgs/servers/sql/postgresql/buildPostgresqlExtension.nix diff --git a/pkgs/servers/sql/postgresql/buildPostgresqlExtension.nix b/pkgs/servers/sql/postgresql/buildPostgresqlExtension.nix new file mode 100644 index 000000000000..87847c368eba --- /dev/null +++ b/pkgs/servers/sql/postgresql/buildPostgresqlExtension.nix @@ -0,0 +1,129 @@ +# PostgreSQL's build system for extensions (PGXS) makes the following assumptions: +# - All extensions will be installed in the same prefix as PostgreSQL itself. +# - pg_config is able to return the correct paths for bindir/libdir/datadir etc. +# +# Both of those assumptions break with nix. Since each extension is a separate +# derivation, we need to put all its files into a different folder. At the same +# time, pg_config only points to the PostgreSQL derivation's paths. +# +# When building extensions, the paths provided by pg_config are used for two +# purposes: +# - To find postgres libs and headers and reference those paths via -L and -I flags. +# - To determine the correct install directory. +# +# The PGXS Makefiles also support an environment variable DESTDIR, which is added as +# a prefix to all install locations. This is primarily used for temporary installs +# while running the test suite. Since pg_config returns absolute paths to /nix/store +# for us, using DESTDIR will result in install locations of the form: +# $DESTIDR/nix/store//... +# +# In multiple iterations, the following approaches have been tried to work around all +# of this: +# 1. For a long time, all extensions in nixpkgs just overwrote the installPhase +# and moved the respective files to the correct location manually. This approach +# is not maintainable, because whenever upstream adds a new file, we'd have to +# make sure the file is correctly installed as well. Additionally, it makes adding +# a new extension harder than it should be. +# +# 2. A wrapper around pg_config could just replace the returned paths with paths to +# $out of currently building derivation, i.e. the extension. This works for install- +# ation, but breaks for any of the libs and headers the extension needs from postgres +# itself. +# +# 3. A variation of 2., but make the pg_config wrapper only return the changed paths +# during the installPahse. During configure and build, it would return the regular +# paths to the PostgreSQL derivation. This works better, but not for every case. +# Some extensions try to be smarter and search for the "postgres" binary to deduce +# the necessary paths from that. Those would still need special handling. +# +# 4. Use the fact that DESTDIR is prepended to every installation directory - and only +# there, to run a replacement of all Makefiles in postgres' lib/pgxs/ folder and +# all Makefiles in the extension's source. "$DESTDIR/$bindir" can be replaced with +# "$out/bin" etc. - thus mapping the installPhase directly into the right output. +# This works beautifully - for the majority of cases. But it doesn't work for +# some extensions that use CMake. And it doesn't work for some extensions that use +# custom variables instead of the default "bindir" and friends. +# +# 5. Just set DESTDIR to the extensions's output and then clean up afterward. This will +# result in paths like this: +# /nix/store//nix/store//... +# Directly after the installPhase, we'll move the files in the right folder. +# This seems to work consistently across all extensions we have in nixpkgs right now. +# Of course, it would break down for any extension that doesn't support DESTDIR - +# but that just means PGXS is not used either, so that's OK. +# +# This last approach is the one we're taking in this file. To make sure the removal of the +# nested nix/store happens immediately after the installPhase, before any other postInstall +# hooks run, this needs to be run in an override of `mkDerivation` and not in a setup hook. + +{ + lib, + stdenv, + postgresql, +}: + +args: + +let + buildPostgresqlExtension = finalAttrs: prevAttrs: { + buildInputs = [ postgresql ] ++ prevAttrs.buildInputs or [ ]; + + installFlags = [ + "DESTDIR=${placeholder "out"}" + ] ++ prevAttrs.installFlags or [ ]; + + postInstall = + '' + # DESTDIR + pg_config install the files into + # /nix/store//nix/store//... + # We'll now remove the /nix/store/ part: + if [[ -d "$out${postgresql}" ]]; then + cp -alt "$out" "$out${postgresql}"/* + rm -r "$out${postgresql}" + fi + + if [[ -d "$out${postgresql.dev}" ]]; then + mkdir -p "''${dev:-$out}" + cp -alt "''${dev:-$out}" "$out${postgresql.dev}"/* + rm -r "$out${postgresql.dev}" + fi + + if [[ -d "$out${postgresql.lib}" ]]; then + mkdir -p "''${lib:-$out}" + cp -alt "''${lib:-$out}" "$out${postgresql.lib}"/* + rm -r "$out${postgresql.lib}" + fi + + if [[ -d "$out${postgresql.doc}" ]]; then + mkdir -p "''${doc:-$out}" + cp -alt "''${doc:-$out}" "$out${postgresql.doc}"/* + rm -r "$out${postgresql.doc}" + fi + + if [[ -d "$out${postgresql.man}" ]]; then + mkdir -p "''${man:-$out}" + cp -alt "''${man:-$out}" "$out${postgresql.man}"/* + rm -r "$out${postgresql.man}" + fi + + # In some cases (postgis) parts of the install script + # actually work "OK", before we add DESTDIR, so some + # files end up in + # /nix/store//nix/store//... + if [[ -d "$out$out" ]]; then + cp -alt "$out" "$out$out"/* + rm -r "$out$out" + fi + + if [[ -d "$out/nix/store" ]]; then + if ! rmdir "$out/nix/store" "$out/nix"; then + find "$out/nix" + nixErrorLog 'Found left-overs in $out/nix/store, make sure to move them into $out properly.' + exit 1 + fi + fi + '' + + prevAttrs.postInstall or ""; + }; +in +stdenv.mkDerivation (lib.extends buildPostgresqlExtension (lib.toFunction args)) diff --git a/pkgs/servers/sql/postgresql/ext/age.nix b/pkgs/servers/sql/postgresql/ext/age.nix index 695a0093c225..a9f74bc76ec1 100644 --- a/pkgs/servers/sql/postgresql/ext/age.nix +++ b/pkgs/servers/sql/postgresql/ext/age.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, bison, fetchFromGitHub, flex, perl, postgresql }: +{ lib, stdenv, bison, fetchFromGitHub, flex, perl, postgresql, buildPostgresqlExtension }: let hashes = { @@ -11,7 +11,7 @@ let "12" = "sha256-JFNk17ESsIt20dwXrfBkQ5E6DbZzN/Q9eS6+WjCXGd4="; }; in -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "age"; version = "1.5.0-rc0"; @@ -22,20 +22,12 @@ stdenv.mkDerivation rec { hash = hashes.${lib.versions.major postgresql.version} or (throw "Source for Age is not available for ${postgresql.version}"); }; - buildInputs = [ postgresql ]; - makeFlags = [ "BISON=${bison}/bin/bison" "FLEX=${flex}/bin/flex" "PERL=${perl}/bin/perl" ]; - installPhase = '' - install -D -t $out/lib *${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension *.sql - install -D -t $out/share/postgresql/extension *.control - ''; - passthru.tests = stdenv.mkDerivation { inherit version src; diff --git a/pkgs/servers/sql/postgresql/ext/anonymizer.nix b/pkgs/servers/sql/postgresql/ext/anonymizer.nix index 4bb5aa544440..587879432436 100644 --- a/pkgs/servers/sql/postgresql/ext/anonymizer.nix +++ b/pkgs/servers/sql/postgresql/ext/anonymizer.nix @@ -1,23 +1,16 @@ -{ lib, stdenv, pg-dump-anon, postgresql, runtimeShell, jitSupport, llvm }: +{ lib, stdenv, pg-dump-anon, postgresql, runtimeShell, jitSupport, llvm, buildPostgresqlExtension }: -stdenv.mkDerivation (finalAttrs: { +buildPostgresqlExtension (finalAttrs: { pname = "postgresql_anonymizer"; inherit (pg-dump-anon) version src passthru; - buildInputs = [ postgresql ]; nativeBuildInputs = [ postgresql ] ++ lib.optional jitSupport llvm; strictDeps = true; - makeFlags = [ - "BINDIR=${placeholder "out"}/bin" - "datadir=${placeholder "out"}/share/postgresql" - "pkglibdir=${placeholder "out"}/lib" - "DESTDIR=" - ]; - - postInstall = '' + # Needs to be after postInstall, where removeNestedNixStore runs + preFixup = '' cat >$out/bin/pg_dump_anon.sh <<'EOF' #!${runtimeShell} echo "This script is deprecated by upstream. To use the new script," diff --git a/pkgs/servers/sql/postgresql/ext/apache_datasketches.nix b/pkgs/servers/sql/postgresql/ext/apache_datasketches.nix index af3df00fca64..68284da76c2f 100644 --- a/pkgs/servers/sql/postgresql/ext/apache_datasketches.nix +++ b/pkgs/servers/sql/postgresql/ext/apache_datasketches.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, postgresql, boost182, nixosTests }: +{ stdenv, lib, fetchFromGitHub, postgresql, boost182, nixosTests, buildPostgresqlExtension }: let version = "1.7.0"; @@ -20,7 +20,7 @@ let }; in -stdenv.mkDerivation { +buildPostgresqlExtension { pname = "apache_datasketches"; inherit version; @@ -28,7 +28,7 @@ stdenv.mkDerivation { sourceRoot = main_src.name; - buildInputs = [ postgresql boost182 ]; + buildInputs = [ boost182 ]; patchPhase = '' runHook prePatch @@ -36,31 +36,6 @@ stdenv.mkDerivation { runHook postPatch ''; - installPhase = '' - runHook preInstall - install -D -m 644 ./datasketches${postgresql.dlSuffix} -t $out/lib/ - cat \ - sql/datasketches_cpc_sketch.sql \ - sql/datasketches_kll_float_sketch.sql \ - sql/datasketches_kll_double_sketch.sql \ - sql/datasketches_theta_sketch.sql \ - sql/datasketches_frequent_strings_sketch.sql \ - sql/datasketches_hll_sketch.sql \ - sql/datasketches_aod_sketch.sql \ - sql/datasketches_req_float_sketch.sql \ - sql/datasketches_quantiles_double_sketch.sql \ - > sql/datasketches--${version}.sql - install -D -m 644 ./datasketches.control -t $out/share/postgresql/extension - install -D -m 644 \ - ./sql/datasketches--${version}.sql \ - ./sql/datasketches--1.3.0--1.4.0.sql \ - ./sql/datasketches--1.4.0--1.5.0.sql \ - ./sql/datasketches--1.5.0--1.6.0.sql \ - ./sql/datasketches--1.6.0--1.7.0.sql \ - -t $out/share/postgresql/extension - runHook postInstall - ''; - passthru.tests.apache_datasketches = nixosTests.apache_datasketches; meta = { diff --git a/pkgs/servers/sql/postgresql/ext/citus.nix b/pkgs/servers/sql/postgresql/ext/citus.nix index b4c08b4ceab1..98d79051ddf7 100644 --- a/pkgs/servers/sql/postgresql/ext/citus.nix +++ b/pkgs/servers/sql/postgresql/ext/citus.nix @@ -4,9 +4,10 @@ , fetchFromGitHub , lz4 , postgresql +, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "citus"; version = "12.1.2"; @@ -20,23 +21,8 @@ stdenv.mkDerivation rec { buildInputs = [ curl lz4 - postgresql ]; - installPhase = '' - runHook preInstall - - install -D -t $out/lib src/backend/columnar/citus_columnar${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension src/backend/columnar/build/sql/*.sql - install -D -t $out/share/postgresql/extension src/backend/columnar/*.control - - install -D -t $out/lib src/backend/distributed/citus${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension src/backend/distributed/build/sql/*.sql - install -D -t $out/share/postgresql/extension src/backend/distributed/*.control - - runHook postInstall - ''; - meta = with lib; { # "Our soft policy for Postgres version compatibility is to support Citus' # latest release with Postgres' 3 latest releases." diff --git a/pkgs/servers/sql/postgresql/ext/cstore_fdw.nix b/pkgs/servers/sql/postgresql/ext/cstore_fdw.nix index c9f01190c912..2236f815a823 100644 --- a/pkgs/servers/sql/postgresql/ext/cstore_fdw.nix +++ b/pkgs/servers/sql/postgresql/ext/cstore_fdw.nix @@ -1,11 +1,10 @@ -{ lib, stdenv, fetchFromGitHub, postgresql, protobufc }: +{ lib, stdenv, fetchFromGitHub, postgresql, protobufc, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "cstore_fdw"; version = "unstable-2022-03-08"; nativeBuildInputs = [ protobufc ]; - buildInputs = [ postgresql ]; src = fetchFromGitHub { owner = "citusdata"; @@ -14,14 +13,6 @@ stdenv.mkDerivation rec { sha256 = "sha256-02wcCqs8A5ZOZX080fgcNJTQrYQctnlwnA8+YPaRTZc="; }; - installPhase = '' - mkdir -p $out/{lib,share/postgresql/extension} - - cp *.so $out/lib - cp *.sql $out/share/postgresql/extension - cp *.control $out/share/postgresql/extension - ''; - meta = with lib; { broken = versionAtLeast postgresql.version "14"; description = "Columnar storage for PostgreSQL"; diff --git a/pkgs/servers/sql/postgresql/ext/h3-pg.nix b/pkgs/servers/sql/postgresql/ext/h3-pg.nix index 1a0c701c7702..ec73b97999c5 100644 --- a/pkgs/servers/sql/postgresql/ext/h3-pg.nix +++ b/pkgs/servers/sql/postgresql/ext/h3-pg.nix @@ -5,9 +5,10 @@ , h3_4 , postgresql , postgresqlTestExtension +, buildPostgresqlExtension }: -stdenv.mkDerivation (finalAttrs: { +buildPostgresqlExtension (finalAttrs: { pname = "h3-pg"; version = "4.1.3"; @@ -32,16 +33,8 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ h3_4 - postgresql ]; - installPhase = '' - install -D -t $out/lib h3/h3.so - install -D -t $out/share/postgresql/extension h3/h3-*.sql h3/h3.control - install -D -t $out/lib h3_postgis/h3_postgis.so - install -D -t $out/share/postgresql/extension h3_postgis/h3_postgis-*.sql h3_postgis/h3_postgis.control - ''; - passthru.tests.extension = postgresqlTestExtension { inherit (finalAttrs) finalPackage; withPackages = [ "postgis" ]; diff --git a/pkgs/servers/sql/postgresql/ext/hypopg.nix b/pkgs/servers/sql/postgresql/ext/hypopg.nix index 534a21bb6d69..3bc868a79f49 100644 --- a/pkgs/servers/sql/postgresql/ext/hypopg.nix +++ b/pkgs/servers/sql/postgresql/ext/hypopg.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, postgresql, gitUpdater }: +{ lib, stdenv, fetchFromGitHub, postgresql, gitUpdater, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "hypopg"; version = "1.4.1"; @@ -11,14 +11,6 @@ stdenv.mkDerivation rec { hash = "sha256-88uKPSnITRZ2VkelI56jZ9GWazG/Rn39QlyHKJKSKMM="; }; - buildInputs = [ postgresql ]; - - installPhase = '' - install -D -t $out/lib *${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension *.control - install -D -t $out/share/postgresql/extension *.sql - ''; - passthru = { updateScript = gitUpdater { ignoredVersions = "beta"; diff --git a/pkgs/servers/sql/postgresql/ext/jsonb_deep_sum.nix b/pkgs/servers/sql/postgresql/ext/jsonb_deep_sum.nix index 092212aa3de0..eb84ec54c028 100644 --- a/pkgs/servers/sql/postgresql/ext/jsonb_deep_sum.nix +++ b/pkgs/servers/sql/postgresql/ext/jsonb_deep_sum.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "jsonb_deep_sum"; version = "unstable-2021-12-24"; @@ -11,16 +11,6 @@ stdenv.mkDerivation rec { sha256 = "sha256-W1wNILAwTAjFPezq+grdRMA59KEnMZDz69n9xQUqdc0="; }; - buildInputs = [ postgresql ]; - - installPhase = '' - mkdir -p $out/{lib,share/postgresql/extension} - - cp *${postgresql.dlSuffix} $out/lib - cp *.sql $out/share/postgresql/extension - cp *.control $out/share/postgresql/extension - ''; - meta = with lib; { description = "PostgreSQL extension to easily add jsonb numeric"; homepage = "https://github.com/furstenheim/jsonb_deep_sum"; diff --git a/pkgs/servers/sql/postgresql/ext/lantern.nix b/pkgs/servers/sql/postgresql/ext/lantern.nix index 0138594cd105..07147be45c16 100644 --- a/pkgs/servers/sql/postgresql/ext/lantern.nix +++ b/pkgs/servers/sql/postgresql/ext/lantern.nix @@ -5,9 +5,10 @@ , openssl , postgresql , postgresqlTestExtension +, buildPostgresqlExtension }: -stdenv.mkDerivation (finalAttrs: { +buildPostgresqlExtension (finalAttrs: { pname = "postgresql-lantern"; version = "0.4.1"; @@ -29,19 +30,8 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ openssl - postgresql ]; - installPhase = '' - runHook preInstall - - install -D -t $out/lib lantern${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension lantern-*.sql - install -D -t $out/share/postgresql/extension lantern.control - - runHook postInstall - ''; - cmakeFlags = [ "-DBUILD_FOR_DISTRIBUTING=ON" "-S ../lantern_hnsw" diff --git a/pkgs/servers/sql/postgresql/ext/periods.nix b/pkgs/servers/sql/postgresql/ext/periods.nix index 422d6ddaf2b3..c5c0d4a8dc42 100644 --- a/pkgs/servers/sql/postgresql/ext/periods.nix +++ b/pkgs/servers/sql/postgresql/ext/periods.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "periods"; version = "1.2.2"; @@ -11,14 +11,6 @@ stdenv.mkDerivation rec { sha256 = "sha256-ezt+MtDqPM8OmJCD6oQTS644l+XHZoxuivq0PUIXOY8="; }; - buildInputs = [ postgresql ]; - - installPhase = '' - install -D -t $out/lib *${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension *.sql - install -D -t $out/share/postgresql/extension *.control - ''; - meta = with lib; { description = "PostgreSQL extension implementing SQL standard functionality for PERIODs and SYSTEM VERSIONING"; homepage = "https://github.com/xocolatl/periods"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix b/pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix index 74bf0b8eda64..45b8f9562bf2 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pg_auto_failover"; version = "2.1"; @@ -11,14 +11,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-OIWykfFbVskrkPG/zSmZtZjc+W956KSfIzK7f5QOqpI="; }; - buildInputs = postgresql.buildInputs ++ [ postgresql ]; - - installPhase = '' - install -D -t $out/bin src/bin/pg_autoctl/pg_autoctl - install -D -t $out/lib src/monitor/pgautofailover.so - install -D -t $out/share/postgresql/extension src/monitor/*.sql - install -D -t $out/share/postgresql/extension src/monitor/pgautofailover.control - ''; + buildInputs = postgresql.buildInputs; meta = with lib; { description = "PostgreSQL extension and service for automated failover and high-availability"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_bigm.nix b/pkgs/servers/sql/postgresql/ext/pg_bigm.nix index f47ce5694588..e7980e305bf3 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_bigm.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_bigm.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, postgresql }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pg_bigm"; version = "1.2-20200228"; @@ -19,16 +19,8 @@ stdenv.mkDerivation rec { }) ]; - buildInputs = [ postgresql ]; - makeFlags = [ "USE_PGXS=1" ]; - installPhase = '' - install -D -t $out/lib pg_bigm${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension *.sql - install -D -t $out/share/postgresql/extension *.control - ''; - meta = with lib; { description = "Text similarity measurement and index searching based on bigrams"; homepage = "https://pgbigm.osdn.jp/"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_cron.nix b/pkgs/servers/sql/postgresql/ext/pg_cron.nix index 3dea36f7e740..2fef4b7c22c3 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_cron.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_cron.nix @@ -1,11 +1,9 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pg_cron"; version = "1.6.4"; - buildInputs = [ postgresql ]; - src = fetchFromGitHub { owner = "citusdata"; repo = pname; @@ -13,14 +11,6 @@ stdenv.mkDerivation rec { hash = "sha256-t1DpFkPiSfdoGG2NgNT7g1lkvSooZoRoUrix6cBID40="; }; - installPhase = '' - mkdir -p $out/{lib,share/postgresql/extension} - - cp *${postgresql.dlSuffix} $out/lib - cp *.sql $out/share/postgresql/extension - cp *.control $out/share/postgresql/extension - ''; - meta = with lib; { description = "Run Cron jobs through PostgreSQL"; homepage = "https://github.com/citusdata/pg_cron"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_ed25519.nix b/pkgs/servers/sql/postgresql/ext/pg_ed25519.nix index 57bf1b62e15f..c815a02229e8 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_ed25519.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_ed25519.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitLab, postgresql }: +{ lib, stdenv, fetchFromGitLab, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pg_ed25519"; version = "0.2"; src = fetchFromGitLab { @@ -10,17 +10,6 @@ stdenv.mkDerivation rec { sha256 = "16w3qx3wj81bzfhydl2pjhn8b1jak6h7ja9wq1kc626g0siggqi0"; }; - buildInputs = [ postgresql ]; - - installPhase = '' - mkdir -p $out/bin # For buildEnv to setup proper symlinks. See #22653 - mkdir -p $out/{lib,share/postgresql/extension} - - cp *.so $out/lib - cp *.sql $out/share/postgresql/extension - cp *.control $out/share/postgresql/extension - ''; - meta = with lib; { description = "PostgreSQL extension for signing and verifying ed25519 signatures"; homepage = "https://gitlab.com/dwagin/pg_ed25519"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_embedding.nix b/pkgs/servers/sql/postgresql/ext/pg_embedding.nix index 5306a619038d..280032923717 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_embedding.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_embedding.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pg_embedding"; version = "0.3.6"; @@ -11,14 +11,6 @@ stdenv.mkDerivation rec { hash = "sha256-NTBxsQB8mR7e/CWwkCEyDiYhi3Nxl/aKgRBwqc0THcI="; }; - buildInputs = [ postgresql ]; - - installPhase = '' - install -D -t $out/lib *.so - install -D -t $out/share/postgresql/extension *.sql - install -D -t $out/share/postgresql/extension *.control - ''; - meta = with lib; { description = "PostgreSQL extension implementing the HNSW algorithm for vector similarity search"; homepage = "https://github.com/neondatabase/pg_embedding"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix b/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix index 8983acb3152a..db5c360196e2 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }: let source = { @@ -28,7 +28,7 @@ let }; }.${lib.versions.major postgresql.version} or (throw "Source for pg_hint_plan is not available for ${postgresql.version}"); in -stdenv.mkDerivation { +buildPostgresqlExtension { pname = "pg_hint_plan"; inherit (source) version; @@ -44,14 +44,6 @@ stdenv.mkDerivation { substituteInPlace Makefile --replace "LDFLAGS+=-Wl,--build-id" "" ''; - buildInputs = [ postgresql ]; - - installPhase = '' - install -D -t $out/lib pg_hint_plan${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension *.sql - install -D -t $out/share/postgresql/extension *.control - ''; - meta = with lib; { description = "Extension to tweak PostgreSQL execution plans using so-called 'hints' in SQL comments"; homepage = "https://github.com/ossc-db/pg_hint_plan"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_hll.nix b/pkgs/servers/sql/postgresql/ext/pg_hll.nix index a60601aef569..4a754bf81a9f 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_hll.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_hll.nix @@ -1,11 +1,9 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pg_hll"; version = "2.18"; - buildInputs = [ postgresql ]; - src = fetchFromGitHub { owner = "citusdata"; repo = "postgresql-hll"; @@ -13,12 +11,6 @@ stdenv.mkDerivation rec { hash = "sha256-Latdxph1Ura8yKEokEjalJ+/GY+pAKOT3GXjuLprj6c="; }; - installPhase = '' - install -D -t $out/lib hll${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension *.sql - install -D -t $out/share/postgresql/extension *.control - ''; - meta = with lib; { description = "HyperLogLog for PostgreSQL"; homepage = "https://github.com/citusdata/postgresql-hll"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_ivm.nix b/pkgs/servers/sql/postgresql/ext/pg_ivm.nix index fcae540d1356..3abf23077bb2 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_ivm.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_ivm.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pg_ivm"; version = "1.9"; @@ -11,14 +11,6 @@ stdenv.mkDerivation rec { hash = "sha256-Qcie7sbXcMbQkMoFIYBfttmvlYooESdSk2DyebHKPlk="; }; - buildInputs = [ postgresql ]; - - installPhase = '' - install -D -t $out/lib pg_ivm${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension *.sql - install -D -t $out/share/postgresql/extension *.control - ''; - meta = with lib; { description = "Materialized views with IVM (Incremental View Maintenance) for PostgreSQL"; homepage = "https://github.com/sraoss/pg_ivm"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_libversion.nix b/pkgs/servers/sql/postgresql/ext/pg_libversion.nix index b5c3ad6acab8..174a8ffc8993 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_libversion.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_libversion.nix @@ -5,9 +5,10 @@ , pkg-config , postgresql , libversion +, buildPostgresqlExtension }: -stdenv.mkDerivation (finalAttrs: { +buildPostgresqlExtension (finalAttrs: { pname = "pg_libversion"; version = "2.0.1"; @@ -23,20 +24,9 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ - postgresql libversion ]; - installPhase = '' - runHook preInstall - - install -D -t $out/lib libversion${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension *.sql - install -D -t $out/share/postgresql/extension *.control - - runHook postInstall - ''; - passthru.updateScript = gitUpdater { }; meta = with lib; { diff --git a/pkgs/servers/sql/postgresql/ext/pg_net.nix b/pkgs/servers/sql/postgresql/ext/pg_net.nix index a86f53eeef05..a4e0cb2f06c2 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_net.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_net.nix @@ -1,10 +1,10 @@ -{ lib, stdenv, fetchFromGitHub, curl, postgresql }: +{ lib, stdenv, fetchFromGitHub, curl, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pg_net"; version = "0.8.0"; - buildInputs = [ curl postgresql ]; + buildInputs = [ curl ]; src = fetchFromGitHub { owner = "supabase"; @@ -15,14 +15,6 @@ stdenv.mkDerivation rec { env.NIX_CFLAGS_COMPILE = "-Wno-error"; - installPhase = '' - mkdir -p $out/{lib,share/postgresql/extension} - - cp *${postgresql.dlSuffix} $out/lib - cp sql/*.sql $out/share/postgresql/extension - cp *.control $out/share/postgresql/extension - ''; - meta = with lib; { description = "Async networking for Postgres"; homepage = "https://github.com/supabase/pg_net"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_partman.nix b/pkgs/servers/sql/postgresql/ext/pg_partman.nix index 87ee50411b75..19c7efdf70f2 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_partman.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_partman.nix @@ -1,11 +1,9 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pg_partman"; version = "5.1.0"; - buildInputs = [ postgresql ]; - src = fetchFromGitHub { owner = "pgpartman"; repo = pname; @@ -13,15 +11,6 @@ stdenv.mkDerivation rec { sha256 = "sha256-GrVOJ5ywZMyqyDroYDLdKkXDdIJSDGhDfveO/ZvrmYs="; }; - installPhase = '' - mkdir -p $out/{lib,share/postgresql/extension} - - cp src/*${postgresql.dlSuffix} $out/lib - cp updates/* $out/share/postgresql/extension - cp -r sql/* $out/share/postgresql/extension - cp *.control $out/share/postgresql/extension - ''; - meta = with lib; { description = "Partition management extension for PostgreSQL"; homepage = "https://github.com/pgpartman/pg_partman"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_rational.nix b/pkgs/servers/sql/postgresql/ext/pg_rational.nix index df80ea49a541..084c51e7846e 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_rational.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_rational.nix @@ -2,9 +2,10 @@ , fetchFromGitHub , lib , postgresql +, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pg_rational"; version = "0.0.2"; @@ -15,20 +16,6 @@ stdenv.mkDerivation rec { sha256 = "sha256-Sp5wuX2nP3KGyWw7MFa11rI1CPIKIWBt8nvBSsASIEw="; }; - buildInputs = [ postgresql ]; - - installPhase = '' - runHook preInstall - - mkdir -p $out/{lib,share/postgresql/extension} - - cp *${postgresql.dlSuffix} $out/lib - cp *.sql $out/share/postgresql/extension - cp *.control $out/share/postgresql/extension - - runHook postInstall - ''; - meta = with lib; { description = "Precise fractional arithmetic for PostgreSQL"; homepage = "https://github.com/begriffs/pg_rational"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_relusage.nix b/pkgs/servers/sql/postgresql/ext/pg_relusage.nix index 1fe9fd3cac87..1dc879275ca7 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_relusage.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_relusage.nix @@ -1,11 +1,9 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pg_relusage"; version = "0.0.1"; - buildInputs = [ postgresql ]; - src = fetchFromGitHub { owner = "adept"; repo = pname; @@ -13,12 +11,6 @@ stdenv.mkDerivation rec { sha256 = "8hJNjQ9MaBk3J9a73l+yQMwMW/F2N8vr5PO2o+5GvYs="; }; - installPhase = '' - install -D -t $out/lib *${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension *.sql - install -D -t $out/share/postgresql/extension *.control - ''; - meta = with lib; { description = "pg_relusage extension for PostgreSQL: discover and log the relations used in your statements"; homepage = "https://github.com/adept/pg_relusage"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_repack.nix b/pkgs/servers/sql/postgresql/ext/pg_repack.nix index b251e9e752f6..ffad30742d23 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_repack.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_repack.nix @@ -4,13 +4,14 @@ , postgresql , postgresqlTestExtension , testers +, buildPostgresqlExtension }: -stdenv.mkDerivation (finalAttrs: { +buildPostgresqlExtension (finalAttrs: { pname = "pg_repack"; version = "1.5.0"; - buildInputs = postgresql.buildInputs ++ [ postgresql ]; + buildInputs = postgresql.buildInputs; src = fetchFromGitHub { owner = "reorg"; @@ -19,12 +20,6 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "sha256-do80phyMxwcRIkYyUt9z02z7byNQhK+pbSaCUmzG+4c="; }; - installPhase = '' - install -D bin/pg_repack -t $out/bin/ - install -D lib/pg_repack${postgresql.dlSuffix} -t $out/lib/ - install -D lib/{pg_repack--${finalAttrs.version}.sql,pg_repack.control} -t $out/share/postgresql/extension - ''; - passthru.tests = { version = testers.testVersion { package = finalAttrs.finalPackage; diff --git a/pkgs/servers/sql/postgresql/ext/pg_roaringbitmap.nix b/pkgs/servers/sql/postgresql/ext/pg_roaringbitmap.nix index 682275fbf15c..644548f4ed98 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_roaringbitmap.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_roaringbitmap.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestHook }: +{ lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestHook, buildPostgresqlExtension }: -stdenv.mkDerivation (finalAttrs: { +buildPostgresqlExtension (finalAttrs: { pname = "pg_roaringbitmap"; version = "0.5.4"; @@ -11,16 +11,6 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-E6vqawnsRsAIajGDgJcTUWV1H8GFFboTjhmVfemUGbs="; }; - buildInputs = [ - postgresql - ]; - - installPhase = '' - install -D -t $out/lib roaringbitmap${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension roaringbitmap-*.sql - install -D -t $out/share/postgresql/extension roaringbitmap.control - ''; - meta = with lib; { description = "RoaringBitmap extension for PostgreSQL"; homepage = "https://github.com/ChenHuajun/pg_roaringbitmap"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix b/pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix index 4aeec3e31f09..14d4db415923 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }: with { "12" = { @@ -27,12 +27,10 @@ with { }; }."${lib.versions.major postgresql.version}" or (throw "pg_safeupdate: version specification for pg ${postgresql.version} missing."); -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pg-safeupdate"; inherit version; - buildInputs = [ postgresql ]; - src = fetchFromGitHub { owner = "eradman"; repo = pname; @@ -40,10 +38,6 @@ stdenv.mkDerivation rec { inherit sha256; }; - installPhase = '' - install -D safeupdate${postgresql.dlSuffix} -t $out/lib - ''; - meta = with lib; { description = "Simple extension to PostgreSQL that requires criteria for UPDATE and DELETE"; homepage = "https://github.com/eradman/pg-safeupdate"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_similarity.nix b/pkgs/servers/sql/postgresql/ext/pg_similarity.nix index 8bcb8777c57b..4ec5bd83fc47 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_similarity.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_similarity.nix @@ -1,6 +1,6 @@ -{ stdenv, lib, fetchFromGitHub, fetchpatch, postgresql, unstableGitUpdater }: +{ stdenv, lib, fetchFromGitHub, fetchpatch, postgresql, unstableGitUpdater, buildPostgresqlExtension }: -stdenv.mkDerivation { +buildPostgresqlExtension { pname = "pg_similarity"; version = "1.0-unstable-2021-01-12"; @@ -21,15 +21,8 @@ stdenv.mkDerivation { }) ]; - buildInputs = [ postgresql ]; - makeFlags = [ "USE_PGXS=1" ]; - installPhase = '' - install -D pg_similarity${postgresql.dlSuffix} -t $out/lib/ - install -D ./{pg_similarity--unpackaged--1.0.sql,pg_similarity--1.0.sql,pg_similarity.control} -t $out/share/postgresql/extension - ''; - passthru.updateScript = unstableGitUpdater {}; meta = { diff --git a/pkgs/servers/sql/postgresql/ext/pg_squeeze.nix b/pkgs/servers/sql/postgresql/ext/pg_squeeze.nix index 7d03b21d989d..ba2f4443c557 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_squeeze.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_squeeze.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestExtension }: +{ lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestExtension, buildPostgresqlExtension }: -stdenv.mkDerivation (finalAttrs: { +buildPostgresqlExtension (finalAttrs: { pname = "pg_squeeze"; version = "1.7.0"; @@ -11,20 +11,6 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-Kh1wSOvV5Rd1CG/na3yzbWzvaR8SJ6wmTZOnM+lbgik="; }; - buildInputs = [ - postgresql - ]; - - installPhase = '' - runHook preInstall - - install -D -t $out/lib pg_squeeze${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension pg_squeeze-*.sql - install -D -t $out/share/postgresql/extension pg_squeeze.control - - runHook postInstall - ''; - passthru.tests.extension = postgresqlTestExtension { inherit (finalAttrs) finalPackage; postgresqlExtraSettings = '' diff --git a/pkgs/servers/sql/postgresql/ext/pg_topn.nix b/pkgs/servers/sql/postgresql/ext/pg_topn.nix index b210db910411..8c6aa60be32a 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_topn.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_topn.nix @@ -1,11 +1,9 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pg_topn"; version = "2.7.0"; - buildInputs = [ postgresql ]; - src = fetchFromGitHub { owner = "citusdata"; repo = "postgresql-topn"; @@ -13,14 +11,6 @@ stdenv.mkDerivation rec { sha256 = "sha256-lP6Iil/BUv4ga+co+oBpKv1FBqFuBGfNjueEolM6png="; }; - installPhase = '' - mkdir -p $out/{lib,share/postgresql/extension} - - cp *${postgresql.dlSuffix} $out/lib - cp *.sql $out/share/postgresql/extension - cp *.control $out/share/postgresql/extension - ''; - meta = with lib; { description = "Efficient querying of 'top values' for PostgreSQL"; homepage = "https://github.com/citusdata/postgresql-topn"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_uuidv7.nix b/pkgs/servers/sql/postgresql/ext/pg_uuidv7.nix index 80afe05db808..81a4e69015e2 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_uuidv7.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_uuidv7.nix @@ -2,14 +2,13 @@ , stdenv , fetchFromGitHub , postgresql +, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pg_uuidv7"; version = "1.5.0"; - buildInputs = [ postgresql ]; - src = fetchFromGitHub { owner = "fboulnois"; repo = "pg_uuidv7"; @@ -17,11 +16,6 @@ stdenv.mkDerivation rec { hash = "sha256-oVyRtjl3KsD3j96qvQb8bFLMhoWO81OudOL4wVXrjzI="; }; - installPhase = '' - install -D -t $out/lib pg_uuidv7${postgresql.dlSuffix} - install -D {sql/pg_uuidv7--${lib.versions.majorMinor version}.sql,pg_uuidv7.control} -t $out/share/postgresql/extension - ''; - meta = with lib; { description = "Tiny Postgres extension to create version 7 UUIDs"; homepage = "https://github.com/fboulnois/pg_uuidv7"; diff --git a/pkgs/servers/sql/postgresql/ext/pgaudit.nix b/pkgs/servers/sql/postgresql/ext/pgaudit.nix index 1079a13b2dfc..d50da6c7e282 100644 --- a/pkgs/servers/sql/postgresql/ext/pgaudit.nix +++ b/pkgs/servers/sql/postgresql/ext/pgaudit.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, libkrb5, openssl, postgresql }: +{ lib, stdenv, fetchFromGitHub, libkrb5, openssl, postgresql, buildPostgresqlExtension }: let source = { @@ -28,7 +28,7 @@ let }; }.${lib.versions.major postgresql.version} or (throw "Source for pgaudit is not available for ${postgresql.version}"); in -stdenv.mkDerivation { +buildPostgresqlExtension { pname = "pgaudit"; inherit (source) version; @@ -39,16 +39,10 @@ stdenv.mkDerivation { hash = source.hash; }; - buildInputs = [ libkrb5 openssl postgresql ]; + buildInputs = [ libkrb5 openssl ]; makeFlags = [ "USE_PGXS=1" ]; - installPhase = '' - install -D -t $out/lib pgaudit${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension *.sql - install -D -t $out/share/postgresql/extension *.control - ''; - meta = with lib; { description = "Open Source PostgreSQL Audit Logging"; homepage = "https://github.com/pgaudit/pgaudit"; diff --git a/pkgs/servers/sql/postgresql/ext/pgjwt.nix b/pkgs/servers/sql/postgresql/ext/pgjwt.nix index a90502c35a4e..c1582bda0002 100644 --- a/pkgs/servers/sql/postgresql/ext/pgjwt.nix +++ b/pkgs/servers/sql/postgresql/ext/pgjwt.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, postgresql, unstableGitUpdater, nixosTests, postgresqlTestExtension }: +{ lib, stdenv, fetchFromGitHub, postgresql, unstableGitUpdater, nixosTests, postgresqlTestExtension, buildPostgresqlExtension }: -stdenv.mkDerivation (finalAttrs: { +buildPostgresqlExtension (finalAttrs: { pname = "pgjwt"; version = "0-unstable-2023-03-02"; @@ -11,12 +11,6 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "sha256-nDZEDf5+sFc1HDcG2eBNQj+kGcdAYRXJseKi9oww+JU="; }; - dontBuild = true; - installPhase = '' - mkdir -p $out/share/postgresql/extension - cp pg*sql *.control $out/share/postgresql/extension - ''; - passthru.updateScript = unstableGitUpdater { }; passthru.tests = { diff --git a/pkgs/servers/sql/postgresql/ext/pgmq.nix b/pkgs/servers/sql/postgresql/ext/pgmq.nix index 2cbf3caa4333..8a5319efb66b 100644 --- a/pkgs/servers/sql/postgresql/ext/pgmq.nix +++ b/pkgs/servers/sql/postgresql/ext/pgmq.nix @@ -3,9 +3,10 @@ stdenv, fetchFromGitHub, postgresql, + buildPostgresqlExtension, }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pgmq"; version = "1.4.4"; @@ -20,17 +21,6 @@ stdenv.mkDerivation rec { dontConfigure = true; - buildInputs = [ postgresql ]; - - installPhase = '' - runHook preInstall - - install -D -t $out/share/postgresql/extension sql/*.sql - install -D -t $out/share/postgresql/extension *.control - - runHook postInstall - ''; - meta = { description = "Lightweight message queue like AWS SQS and RSMQ but on Postgres"; homepage = "https://tembo.io/pgmq"; diff --git a/pkgs/servers/sql/postgresql/ext/pgroonga.nix b/pkgs/servers/sql/postgresql/ext/pgroonga.nix index 3a7c9e237f98..3d855f5e1977 100644 --- a/pkgs/servers/sql/postgresql/ext/pgroonga.nix +++ b/pkgs/servers/sql/postgresql/ext/pgroonga.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchurl, pkg-config, postgresql, msgpack-c, groonga }: +{ lib, stdenv, fetchurl, pkg-config, postgresql, msgpack-c, groonga, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pgroonga"; version = "3.2.3"; @@ -10,23 +10,13 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ postgresql msgpack-c groonga ]; + buildInputs = [ msgpack-c groonga ]; makeFlags = [ "HAVE_MSGPACK=1" "MSGPACK_PACKAGE_NAME=msgpack-c" ]; - installPhase = '' - install -D pgroonga${postgresql.dlSuffix} -t $out/lib/ - install -D pgroonga.control -t $out/share/postgresql/extension - install -D data/pgroonga-*.sql -t $out/share/postgresql/extension - - install -D pgroonga_database${postgresql.dlSuffix} -t $out/lib/ - install -D pgroonga_database.control -t $out/share/postgresql/extension - install -D data/pgroonga_database-*.sql -t $out/share/postgresql/extension - ''; - meta = with lib; { description = "PostgreSQL extension to use Groonga as the index"; longDescription = '' diff --git a/pkgs/servers/sql/postgresql/ext/pgrouting.nix b/pkgs/servers/sql/postgresql/ext/pgrouting.nix index d67a21755a06..65bc5ee7c8c5 100644 --- a/pkgs/servers/sql/postgresql/ext/pgrouting.nix +++ b/pkgs/servers/sql/postgresql/ext/pgrouting.nix @@ -1,11 +1,11 @@ -{ lib, stdenv, fetchFromGitHub, postgresql, perl, cmake, boost }: +{ lib, stdenv, fetchFromGitHub, postgresql, perl, cmake, boost, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pgrouting"; version = "3.6.3"; nativeBuildInputs = [ cmake perl ]; - buildInputs = [ postgresql boost ]; + buildInputs = [ boost ]; src = fetchFromGitHub { owner = "pgRouting"; @@ -14,12 +14,6 @@ stdenv.mkDerivation rec { hash = "sha256-VCoapUM7Vh4W1DUE/gWQ9YIRLbw63XlOWsgajJW+XNU="; }; - installPhase = '' - install -D lib/*.so -t $out/lib - install -D sql/pgrouting--${version}.sql -t $out/share/postgresql/extension - install -D sql/common/pgrouting.control -t $out/share/postgresql/extension - ''; - meta = with lib; { description = "PostgreSQL/PostGIS extension that provides geospatial routing functionality"; homepage = "https://pgrouting.org/"; diff --git a/pkgs/servers/sql/postgresql/ext/pgsodium.nix b/pkgs/servers/sql/postgresql/ext/pgsodium.nix index 59ddfcd74c8c..9e72787c56ee 100644 --- a/pkgs/servers/sql/postgresql/ext/pgsodium.nix +++ b/pkgs/servers/sql/postgresql/ext/pgsodium.nix @@ -4,9 +4,10 @@ , libsodium , postgresql , postgresqlTestExtension +, buildPostgresqlExtension }: -stdenv.mkDerivation (finalAttrs: { +buildPostgresqlExtension (finalAttrs: { pname = "pgsodium"; version = "3.1.9"; @@ -19,20 +20,11 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ libsodium - postgresql ]; - installPhase = '' - runHook preInstall - - install -D -t $out/lib pgsodium${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension sql/pgsodium-*.sql - install -D -t $out/share/postgresql/extension pgsodium.control - + postInstall = '' install -D -t $out/share/pgsodium/getkey_scripts getkey_scripts/* ln -s $out/share/pgsodium/getkey_scripts/pgsodium_getkey_urandom.sh $out/share/postgresql/extension/pgsodium_getkey - - runHook postInstall ''; passthru.tests.extension = postgresqlTestExtension { diff --git a/pkgs/servers/sql/postgresql/ext/pgsql-http.nix b/pkgs/servers/sql/postgresql/ext/pgsql-http.nix index bfe9052acf58..c71e255cdb51 100644 --- a/pkgs/servers/sql/postgresql/ext/pgsql-http.nix +++ b/pkgs/servers/sql/postgresql/ext/pgsql-http.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, curl, postgresql }: +{ lib, stdenv, fetchFromGitHub, curl, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pgsql-http"; version = "1.6.0"; @@ -11,13 +11,7 @@ stdenv.mkDerivation rec { hash = "sha256-CPHfx7vhWfxkXsoKTzyFuTt47BPMvzi/pi1leGcuD60="; }; - buildInputs = [ curl postgresql ]; - - installPhase = '' - install -D -t $out/lib *${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension *.sql - install -D -t $out/share/postgresql/extension *.control - ''; + buildInputs = [ curl ]; meta = with lib; { description = "HTTP client for PostgreSQL, retrieve a web page from inside the database"; diff --git a/pkgs/servers/sql/postgresql/ext/pgtap.nix b/pkgs/servers/sql/postgresql/ext/pgtap.nix index 24ad1f610e8f..b09734c5f07d 100644 --- a/pkgs/servers/sql/postgresql/ext/pgtap.nix +++ b/pkgs/servers/sql/postgresql/ext/pgtap.nix @@ -1,5 +1,6 @@ { lib , stdenv +, buildPostgresqlExtension , fetchFromGitHub , perl , perlPackages @@ -8,7 +9,7 @@ , which }: -stdenv.mkDerivation (finalAttrs: { +buildPostgresqlExtension (finalAttrs: { pname = "pgtap"; version = "1.3.3"; @@ -21,10 +22,6 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ postgresql perl perlPackages.TAPParserSourceHandlerpgTAP which ]; - installPhase = '' - install -D {sql/pgtap--${finalAttrs.version}.sql,pgtap.control} -t $out/share/postgresql/extension - ''; - passthru.tests.extension = stdenv.mkDerivation { name = "pgtap-test"; dontUnpack = true; diff --git a/pkgs/servers/sql/postgresql/ext/pgvector.nix b/pkgs/servers/sql/postgresql/ext/pgvector.nix index 619c5e7ab24d..08db0762eddf 100644 --- a/pkgs/servers/sql/postgresql/ext/pgvector.nix +++ b/pkgs/servers/sql/postgresql/ext/pgvector.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "pgvector"; version = "0.6.2"; @@ -11,14 +11,6 @@ stdenv.mkDerivation rec { hash = "sha256-r+TpFJg6WrMn0L2B7RpmSRvw3XxpHzMRtpFWDCzLvgs="; }; - buildInputs = [ postgresql ]; - - installPhase = '' - install -D -t $out/lib vector${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension sql/vector-*.sql - install -D -t $out/share/postgresql/extension vector.control - ''; - meta = with lib; { description = "Open-source vector similarity search for PostgreSQL"; homepage = "https://github.com/pgvector/pgvector"; diff --git a/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix b/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix index e03a3bf51fe5..b5924fed6ec2 100644 --- a/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix +++ b/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestExtension }: +{ lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestExtension, buildPostgresqlExtension }: -stdenv.mkDerivation (finalAttrs: { +buildPostgresqlExtension (finalAttrs: { pname = "plpgsql-check"; version = "2.7.5"; @@ -11,14 +11,6 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-CD/G/wX6o+mC6gowlpFe1DdJWyh3cB9wxSsW2GXrENE="; }; - buildInputs = [ postgresql ]; - - installPhase = '' - install -D -t $out/lib *${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension *.sql - install -D -t $out/share/postgresql/extension *.control - ''; - passthru.tests.extension = postgresqlTestExtension { inherit (finalAttrs) finalPackage; sql = "CREATE EXTENSION plpgsql_check;"; diff --git a/pkgs/servers/sql/postgresql/ext/plr.nix b/pkgs/servers/sql/postgresql/ext/plr.nix index b30b59b86d2a..1c2266e7cfb6 100644 --- a/pkgs/servers/sql/postgresql/ext/plr.nix +++ b/pkgs/servers/sql/postgresql/ext/plr.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, R, postgresql }: +{ lib, stdenv, fetchFromGitHub, pkg-config, R, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "plr"; version = "8.4.7"; @@ -12,15 +12,10 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ R postgresql ]; + buildInputs = [ R ]; makeFlags = [ "USE_PGXS=1" ]; - installPhase = '' - install -D plr${postgresql.dlSuffix} -t $out/lib/ - install -D {plr--*.sql,plr.control} -t $out/share/postgresql/extension - ''; - meta = with lib; { description = "PL/R - R Procedural Language for PostgreSQL"; homepage = "https://github.com/postgres-plr/plr"; diff --git a/pkgs/servers/sql/postgresql/ext/plv8/default.nix b/pkgs/servers/sql/postgresql/ext/plv8/default.nix index 2c375babd464..e9a9195078ed 100644 --- a/pkgs/servers/sql/postgresql/ext/plv8/default.nix +++ b/pkgs/servers/sql/postgresql/ext/plv8/default.nix @@ -5,6 +5,7 @@ , perl , postgresql , jitSupport +, buildPostgresqlExtension # For test , runCommand , coreutils @@ -13,7 +14,7 @@ let libv8 = nodejs_20.libv8; -in stdenv.mkDerivation (finalAttrs: { +in buildPostgresqlExtension (finalAttrs: { pname = "plv8"; version = "3.2.3"; @@ -36,7 +37,6 @@ in stdenv.mkDerivation (finalAttrs: { buildInputs = [ libv8 - postgresql ]; buildFlags = [ "all" ]; @@ -48,11 +48,6 @@ in stdenv.mkDerivation (finalAttrs: { "V8_OUTDIR=${libv8}/lib" ]; - installFlags = [ - # PGXS only supports installing to postgresql prefix so we need to redirect this - "DESTDIR=${placeholder "out"}" - ]; - # No configure script. dontConfigure = true; @@ -60,14 +55,6 @@ in stdenv.mkDerivation (finalAttrs: { patchShebangs ./generate_upgrade.sh ''; - postInstall = '' - # Move the redirected to proper directory. - # There appear to be no references to the install directories - # so changing them does not cause issues. - mv "$out/nix/store"/*/* "$out" - rmdir "$out/nix/store"/* "$out/nix/store" "$out/nix" - ''; - passthru = { tests = let diff --git a/pkgs/servers/sql/postgresql/ext/postgis.nix b/pkgs/servers/sql/postgresql/ext/postgis.nix index aa62c778a3fd..569424b00d6a 100644 --- a/pkgs/servers/sql/postgresql/ext/postgis.nix +++ b/pkgs/servers/sql/postgresql/ext/postgis.nix @@ -21,12 +21,13 @@ nixosTests, jitSupport, llvm, + buildPostgresqlExtension, }: let gdal = gdalMinimal; in -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "postgis"; version = "3.5.0"; @@ -42,7 +43,6 @@ stdenv.mkDerivation rec { buildInputs = [ libxml2 - postgresql geos proj gdal @@ -68,20 +68,18 @@ stdenv.mkDerivation rec { # postgis config directory assumes /include /lib from the same root for json-c library env.NIX_LDFLAGS = "-L${lib.getLib json_c}/lib"; + setOutputFlags = false; preConfigure = '' sed -i 's@/usr/bin/file@${file}/bin/file@' configure - configureFlags="--datadir=$out/share/postgresql --datarootdir=$out/share/postgresql --bindir=$out/bin --docdir=$doc/share/doc/${pname} --with-gdalconfig=${gdal}/bin/gdal-config --with-jsondir=${json_c.dev} --disable-extension-upgrades-install" - - makeFlags="PERL=${perl}/bin/perl datadir=$out/share/postgresql pkglibdir=$out/lib bindir=$out/bin docdir=$doc/share/doc/${pname}" ''; + + configureFlags = [ + "--with-gdalconfig=${gdal}/bin/gdal-config" + "--with-jsondir=${json_c.dev}" + "--disable-extension-upgrades-install" + ]; + postConfigure = '' - sed -i "s|@mkdir -p \$(DESTDIR)\$(PGSQL_BINDIR)||g ; - s|\$(DESTDIR)\$(PGSQL_BINDIR)|$prefix/bin|g - " \ - "raster/loader/Makefile"; - sed -i "s|\$(DESTDIR)\$(PGSQL_BINDIR)|$prefix/bin|g - " \ - "raster/scripts/python/Makefile"; mkdir -p $out/bin # postgis' build system assumes it is being installed to the same place as postgresql, and looks @@ -89,12 +87,13 @@ stdenv.mkDerivation rec { ln -s ${postgresql}/bin/postgres $out/bin/postgres ''; + makeFlags = [ + "PERL=${perl}/bin/perl" + ]; + doCheck = stdenv.hostPlatform.isLinux; preCheck = '' - substituteInPlace regress/run_test.pl --replace-fail "/share/contrib/postgis" "$out/share/postgresql/contrib/postgis" - substituteInPlace regress/Makefile --replace-fail 's,\$$libdir,$(REGRESS_INSTALLDIR)/lib,g' "s,\\$\$libdir,$PWD/regress/00-regress-install$out/lib,g" \ - --replace-fail '$(REGRESS_INSTALLDIR)/share/contrib/postgis/*.sql' "$PWD/regress/00-regress-install$out/share/postgresql/contrib/postgis/*.sql" substituteInPlace doc/postgis-out.xml --replace-fail "http://docbook.org/xml/5.0/dtd/docbook.dtd" "${docbook5}/xml/dtd/docbook/docbookx.dtd" # The test suite hardcodes it to use /tmp. export PGIS_REG_TMPDIR="$TMPDIR/pgis_reg" diff --git a/pkgs/servers/sql/postgresql/ext/repmgr.nix b/pkgs/servers/sql/postgresql/ext/repmgr.nix index 728f3b348c69..c4203b42f362 100644 --- a/pkgs/servers/sql/postgresql/ext/repmgr.nix +++ b/pkgs/servers/sql/postgresql/ext/repmgr.nix @@ -5,9 +5,10 @@ , flex , curl , json_c +, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "repmgr"; version = "5.4.1"; @@ -20,16 +21,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ flex ]; - buildInputs = postgresql.buildInputs ++ [ postgresql curl json_c ]; - - installPhase = '' - mkdir -p $out/{bin,lib,share/postgresql/extension} - - cp repmgr{,d} $out/bin - cp *${postgresql.dlSuffix} $out/lib - cp *.sql $out/share/postgresql/extension - cp *.control $out/share/postgresql/extension - ''; + buildInputs = postgresql.buildInputs ++ [ curl json_c ]; meta = with lib; { homepage = "https://repmgr.org/"; diff --git a/pkgs/servers/sql/postgresql/ext/rum.nix b/pkgs/servers/sql/postgresql/ext/rum.nix index 629fddfcbb30..f681efd5b9df 100644 --- a/pkgs/servers/sql/postgresql/ext/rum.nix +++ b/pkgs/servers/sql/postgresql/ext/rum.nix @@ -4,9 +4,10 @@ fetchFromGitHub, postgresql, postgresqlTestHook, + buildPostgresqlExtension, }: -stdenv.mkDerivation (finalAttrs: { +buildPostgresqlExtension (finalAttrs: { pname = "rum"; version = "1.3.14"; @@ -17,16 +18,8 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-VsfpxQqRBu9bIAP+TfMRXd+B3hSjuhU2NsutocNiCt8="; }; - buildInputs = [ postgresql ]; - makeFlags = [ "USE_PGXS=1" ]; - installPhase = '' - install -D -t $out/lib *${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension *.control - install -D -t $out/share/postgresql/extension *.sql - ''; - passthru.tests.extension = stdenv.mkDerivation { inherit (finalAttrs) version; pname = "rum-test"; diff --git a/pkgs/servers/sql/postgresql/ext/smlar.nix b/pkgs/servers/sql/postgresql/ext/smlar.nix index 4188c3b9c99a..478abc1b0b9a 100644 --- a/pkgs/servers/sql/postgresql/ext/smlar.nix +++ b/pkgs/servers/sql/postgresql/ext/smlar.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchgit, postgresql }: +{ lib, stdenv, fetchgit, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "smlar-unstable"; version = "2021-11-08"; @@ -10,16 +10,8 @@ stdenv.mkDerivation rec { hash = "sha256-AC6w7uYw0OW70pQpWbK1A3rkCnMvTJzTCAdFiY3rO7A="; }; - buildInputs = [ postgresql ]; - makeFlags = [ "USE_PGXS=1" ]; - installPhase = '' - install -D -t $out/lib *.so - install -D -t $out/share/postgresql/extension *.sql - install -D -t $out/share/postgresql/extension *.control - ''; - meta = with lib; { description = "Compute similary of any one-dimensional arrays"; homepage = "http://sigaev.ru/git/gitweb.cgi?p=smlar.git"; diff --git a/pkgs/servers/sql/postgresql/ext/system_stats.nix b/pkgs/servers/sql/postgresql/ext/system_stats.nix index c1700fc0380d..7d6e26fa5118 100644 --- a/pkgs/servers/sql/postgresql/ext/system_stats.nix +++ b/pkgs/servers/sql/postgresql/ext/system_stats.nix @@ -3,13 +3,12 @@ lib, stdenv, postgresql, + buildPostgresqlExtension, }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "system_stats"; version = "3.2"; - buildInputs = [ postgresql ]; - src = fetchFromGitHub { owner = "EnterpriseDB"; repo = "system_stats"; @@ -17,18 +16,6 @@ stdenv.mkDerivation rec { hash = "sha256-/xXnui0S0ZjRw7P8kMAgttHVv8T41aOhM3pM8P0OTig="; }; - installPhase = '' - runHook preInstall - - mkdir -p $out/{lib,share/postgresql/extension} - - cp *${postgresql.dlSuffix} $out/lib - cp *.sql $out/share/postgresql/extension - cp *.control $out/share/postgresql/extension - - runHook postInstall - ''; - meta = with lib; { description = "A Postgres extension for exposing system metrics such as CPU, memory and disk information"; homepage = "https://github.com/EnterpriseDB/system_stats"; diff --git a/pkgs/servers/sql/postgresql/ext/tds_fdw.nix b/pkgs/servers/sql/postgresql/ext/tds_fdw.nix index 2dbf344fc624..97d5dec1566c 100644 --- a/pkgs/servers/sql/postgresql/ext/tds_fdw.nix +++ b/pkgs/servers/sql/postgresql/ext/tds_fdw.nix @@ -1,10 +1,10 @@ -{ lib, stdenv, fetchFromGitHub, postgresql, freetds, unstableGitUpdater }: +{ lib, stdenv, fetchFromGitHub, postgresql, freetds, unstableGitUpdater, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "tds_fdw"; version = "2.0.4"; - buildInputs = [ postgresql freetds ]; + buildInputs = [ freetds ]; src = fetchFromGitHub { owner = "tds-fdw"; @@ -13,13 +13,6 @@ stdenv.mkDerivation rec { hash = "sha256-ruelOHueaHx1royLPvDM8Abd1rQD62R4KXgtHY9qqTw="; }; - installPhase = '' - version="$(sed -En "s,^default_version *= *'([^']*)'.*,\1,p" tds_fdw.control)" - install -D tds_fdw${postgresql.dlSuffix} -t $out/lib - install -D sql/tds_fdw.sql "$out/share/postgresql/extension/tds_fdw--$version.sql" - install -D tds_fdw.control -t $out/share/postgresql/extension - ''; - meta = with lib; { description = "PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)"; homepage = "https://github.com/tds-fdw/tds_fdw"; diff --git a/pkgs/servers/sql/postgresql/ext/temporal_tables.nix b/pkgs/servers/sql/postgresql/ext/temporal_tables.nix index cb401829b242..0be3dd60db8d 100644 --- a/pkgs/servers/sql/postgresql/ext/temporal_tables.nix +++ b/pkgs/servers/sql/postgresql/ext/temporal_tables.nix @@ -1,11 +1,9 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "temporal_tables"; version = "1.2.2"; - buildInputs = [ postgresql ]; - src = fetchFromGitHub { owner = "arkhipov"; repo = "temporal_tables"; @@ -13,12 +11,6 @@ stdenv.mkDerivation rec { sha256 = "sha256-7+DCSPAPhsokWDq/5IXNhd7jY6FfzxxUjlsg/VJeD3k="; }; - installPhase = '' - install -D -t $out/lib temporal_tables${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension *.sql - install -D -t $out/share/postgresql/extension *.control - ''; - meta = with lib; { description = "Temporal Tables PostgreSQL Extension"; homepage = "https://github.com/arkhipov/temporal_tables"; diff --git a/pkgs/servers/sql/postgresql/ext/timescaledb.nix b/pkgs/servers/sql/postgresql/ext/timescaledb.nix index 60e14e922835..baa338d2d8c0 100644 --- a/pkgs/servers/sql/postgresql/ext/timescaledb.nix +++ b/pkgs/servers/sql/postgresql/ext/timescaledb.nix @@ -1,11 +1,11 @@ -{ lib, stdenv, fetchFromGitHub, cmake, postgresql, openssl, libkrb5, nixosTests, enableUnfree ? true }: +{ lib, stdenv, fetchFromGitHub, cmake, postgresql, openssl, libkrb5, nixosTests, enableUnfree ? true, buildPostgresqlExtension }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "timescaledb${lib.optionalString (!enableUnfree) "-apache"}"; version = "2.14.2"; nativeBuildInputs = [ cmake ]; - buildInputs = [ postgresql openssl libkrb5 ]; + buildInputs = [ openssl libkrb5 ]; src = fetchFromGitHub { owner = "timescale"; diff --git a/pkgs/servers/sql/postgresql/ext/tsearch_extras.nix b/pkgs/servers/sql/postgresql/ext/tsearch_extras.nix index b42095acd715..d1e1fe4741df 100644 --- a/pkgs/servers/sql/postgresql/ext/tsearch_extras.nix +++ b/pkgs/servers/sql/postgresql/ext/tsearch_extras.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }: -stdenv.mkDerivation { +buildPostgresqlExtension { pname = "tsearch-extras"; version = "0.4"; @@ -11,13 +11,6 @@ stdenv.mkDerivation { sha256 = "18j0saqblg3jhrz38splk173xjwdf32c67ymm18m8n5y94h8d2ba"; }; - buildInputs = [ postgresql ]; - - installPhase = '' - install -D tsearch_extras${postgresql.dlSuffix} -t $out/lib/ - install -D ./{tsearch_extras--1.0.sql,tsearch_extras.control} -t $out/share/postgresql/extension - ''; - meta = with lib; { description = "Provides a few PostgreSQL functions for a lower-level data full text search"; homepage = "https://github.com/zulip/tsearch_extras/"; diff --git a/pkgs/servers/sql/postgresql/ext/tsja.nix b/pkgs/servers/sql/postgresql/ext/tsja.nix index f0b9238f59ef..ed1aacca53d9 100644 --- a/pkgs/servers/sql/postgresql/ext/tsja.nix +++ b/pkgs/servers/sql/postgresql/ext/tsja.nix @@ -2,7 +2,6 @@ , fetchzip , nixosTests , stdenv - , mecab , postgresql }: diff --git a/pkgs/servers/sql/postgresql/ext/wal2json.nix b/pkgs/servers/sql/postgresql/ext/wal2json.nix index 4a1c9b18b13b..4df277e5e496 100644 --- a/pkgs/servers/sql/postgresql/ext/wal2json.nix +++ b/pkgs/servers/sql/postgresql/ext/wal2json.nix @@ -4,9 +4,10 @@ callPackage, fetchFromGitHub, postgresql, + buildPostgresqlExtension, }: -stdenv.mkDerivation rec { +buildPostgresqlExtension rec { pname = "wal2json"; version = "2.6"; @@ -17,15 +18,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-+QoACPCKiFfuT2lJfSUmgfzC5MXf75KpSoc2PzPxKyM="; }; - buildInputs = [ postgresql ]; - makeFlags = [ "USE_PGXS=1" ]; - installPhase = '' - install -D -t $out/lib *${postgresql.dlSuffix} - install -D -t $out/share/postgresql/extension sql/*.sql - ''; - passthru.tests.wal2json = lib.recurseIntoAttrs ( callPackage ../../../../../nixos/tests/postgresql-wal2json.nix { inherit (stdenv) system; diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index 57aa6a8144a0..0b37507e899b 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -289,6 +289,7 @@ let ''; installPhase = "touch $out"; } // extraArgs); + buildPostgresqlExtension = newSuper.callPackage ./buildPostgresqlExtension.nix {}; }; newSelf = self // scope; newSuper = { callPackage = newScope (scope // this.pkgs); }; From 629cfe1d2de0a9895dbb1ff09d3c6a34a1d196cb Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sun, 27 Oct 2024 19:05:08 +0100 Subject: [PATCH 174/252] sqlite: split man into man output, add documentation as doc The full sqlite documentation is now available in the `doc` output, and the manual is in `man`. --- pkgs/development/libraries/sqlite/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix index 63e2572614fa..df28ee6cb39b 100644 --- a/pkgs/development/libraries/sqlite/default.nix +++ b/pkgs/development/libraries/sqlite/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, zlib, readline, ncurses +{ lib, stdenv, fetchurl, unzip, zlib, readline, ncurses , updateAutotoolsGnuConfigScriptsHook # for tests @@ -24,11 +24,15 @@ stdenv.mkDerivation rec { url = "https://sqlite.org/2024/sqlite-autoconf-${archiveVersion version}.tar.gz"; hash = "sha256-Z9P+bSaObq3crjcn/OWPzI6cU4ab3Qegxh443fKWUHE="; }; + docsrc = fetchurl { + url = "https://sqlite.org/2024/sqlite-doc-${archiveVersion version}.zip"; + hash = "sha256-6WkTH5PKefvGTVdyShA1c1iBVVpSYA2+acaeq3LJ/NE="; + }; - outputs = [ "bin" "dev" "out" ]; + outputs = [ "bin" "dev" "man" "doc" "out" ]; separateDebugInfo = stdenv.hostPlatform.isLinux; - nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ]; + nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook unzip ]; buildInputs = [ zlib ] ++ lib.optionals interactive [ readline ncurses ]; # required for aarch64 but applied for all arches for simplicity @@ -82,6 +86,10 @@ stdenv.mkDerivation rec { postInstall = '' # Do not contaminate dependent libtool-based projects with sqlite dependencies. sed -i $out/lib/libsqlite3.la -e "s/dependency_libs=.*/dependency_libs='''/" + + mkdir -p $doc/share/doc + unzip $docsrc + mv sqlite-doc-${archiveVersion version} $doc/share/doc/sqlite ''; doCheck = false; # fails to link against tcl From 5e5aa9dd40d4d59d3245c66a1070172164a6f4a2 Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 29 Oct 2024 03:30:30 +0000 Subject: [PATCH 175/252] qt6Packages.qtbase: remove obsolete Darwin patch This is so satisfying to do. --- pkgs/development/libraries/qt-6/default.nix | 1 - .../libraries/qt-6/modules/qtbase.nix | 25 +- ...-qtbase-qmake-fix-mkspecs-for-darwin.patch | 469 ------------------ 3 files changed, 23 insertions(+), 472 deletions(-) delete mode 100644 pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch diff --git a/pkgs/development/libraries/qt-6/default.nix b/pkgs/development/libraries/qt-6/default.nix index e090744bc463..7159bc6ae055 100644 --- a/pkgs/development/libraries/qt-6/default.nix +++ b/pkgs/development/libraries/qt-6/default.nix @@ -54,7 +54,6 @@ let inherit (srcs.qtbase) src version; patches = [ ./patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch - ./patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch ./patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch ./patches/0004-qtbase-qt-cmake-always-use-cmake-from-path.patch ./patches/0005-qtbase-find-tools-in-PATH.patch diff --git a/pkgs/development/libraries/qt-6/modules/qtbase.nix b/pkgs/development/libraries/qt-6/modules/qtbase.nix index 78365891d6fb..d3754495d5be 100644 --- a/pkgs/development/libraries/qt-6/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -177,7 +177,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which cmake xmlstarlet ninja ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ moveBuildTree ]; - propagatedNativeBuildInputs = [ lndir ]; + propagatedNativeBuildInputs = [ lndir ] + # I’m not sure if this is necessary, but the macOS mkspecs stuff + # tries to call `xcrun xcodebuild`, so better safe than sorry. + ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; strictDeps = true; @@ -186,7 +189,24 @@ stdenv.mkDerivation rec { inherit patches; postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' - substituteInPlace cmake/QtPublicAppleHelpers.cmake --replace-fail "/usr/bin/xcrun" "${xcbuild}/bin/xcrun" + # TODO: Verify that this catches all the occurrences? + for file in \ + cmake/QtPublicAppleHelpers.cmake \ + mkspecs/features/mac/asset_catalogs.prf \ + mkspecs/features/mac/default_pre.prf \ + mkspecs/features/mac/sdk.mk \ + mkspecs/features/mac/sdk.prf \ + mkspecs/features/permissions.prf \ + src/corelib/Qt6CoreMacros.cmake + do + substituteInPlace "$file" \ + --replace-quiet /usr/bin/xcrun '${lib.getExe' xcbuild "xcrun"}' \ + --replace-quiet /usr/bin/xcode-select '${lib.getExe' xcbuild "xcode-select"}' \ + --replace-quiet /usr/libexec/PlistBuddy '${lib.getExe' xcbuild "PlistBuddy"}' + done + + substituteInPlace mkspecs/common/macx.conf \ + --replace-fail 'CONFIG += ' 'CONFIG += no_default_rpath ' ''; fix_qt_builtin_paths = ../hooks/fix-qt-builtin-paths.sh; @@ -211,6 +231,7 @@ stdenv.mkDerivation rec { "-DQT_FEATURE_journald=${if systemdSupport then "ON" else "OFF"}" "-DQT_FEATURE_vulkan=ON" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + "-DQT_FEATURE_rpath=OFF" # error: 'path' is unavailable: introduced in macOS 10.15 "-DQT_FEATURE_cxx17_filesystem=OFF" ] ++ lib.optionals isCrossBuild [ diff --git a/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch b/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch deleted file mode 100644 index fbe49379533b..000000000000 --- a/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch +++ /dev/null @@ -1,469 +0,0 @@ -diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf -index 61bea952b2..9909dae726 100644 ---- a/mkspecs/common/mac.conf -+++ b/mkspecs/common/mac.conf -@@ -23,7 +23,7 @@ QMAKE_INCDIR_OPENGL = \ - - QMAKE_FIX_RPATH = install_name_tool -id - --QMAKE_LFLAGS_RPATH = -Wl,-rpath, -+QMAKE_LFLAGS_RPATH = - QMAKE_LFLAGS_GCSECTIONS = -Wl,-dead_strip - - QMAKE_LFLAGS_REL_RPATH = -diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf -index 22c84d6473..4d46762bec 100644 ---- a/mkspecs/features/mac/default_post.prf -+++ b/mkspecs/features/mac/default_post.prf -@@ -15,278 +15,10 @@ contains(TEMPLATE, .*app) { - - QMAKE_EXTRA_INCLUDES += $$shell_quote($$PWD/sdk.mk) - } -- -- # Detect incompatible SDK versions -- # The CMake equivalent is in cmake/QtPublicAppleHelpers.cmake. -- -- isEmpty(QT_MAC_SDK_VERSION_MIN): \ -- QT_MAC_SDK_VERSION_MIN = $$QT_MAC_SDK_VERSION -- -- !versionAtLeast(QMAKE_MAC_SDK_VERSION, $$QT_MAC_SDK_VERSION_MIN): \ -- warning("Qt requires at least version $$QT_MAC_SDK_VERSION_MIN of the platform SDK," \ -- "you're building against version $${QMAKE_MAC_SDK_VERSION}. Please upgrade.") -- -- !isEmpty(QT_MAC_SDK_VERSION_MAX) { -- # For Qt developers only -- !isEmpty($$list($$(QT_MAC_SDK_NO_VERSION_CHECK))): \ -- CONFIG += sdk_no_version_check -- -- QMAKE_MAC_SDK_MAJOR_VERSION = $$replace(QMAKE_MAC_SDK_VERSION, "(\\d+)(\\.\\d+)(\\.\\d+)?", \\1) -- -- !sdk_no_version_check:!versionAtMost(QMAKE_MAC_SDK_MAJOR_VERSION, $$QT_MAC_SDK_VERSION_MAX) { -- warning("Qt has only been tested with version $$QT_MAC_SDK_VERSION_MAX"\ -- "of the platform SDK, you're using $${QMAKE_MAC_SDK_MAJOR_VERSION}.") -- warning("This is an unsupported configuration. You may experience build issues," \ -- "and by using") -- warning("the $$QMAKE_MAC_SDK_VERSION SDK you are opting in to new features" \ -- "that Qt has not been prepared for.") -- -- warning("Please downgrade the SDK you use to build your app to version" \ -- "$$QT_MAC_SDK_VERSION_MAX, or configure") -- warning("with CONFIG+=sdk_no_version_check when running qmake" \ -- "to silence this warning.") -- } -- } - } - - !no_objective_c:CONFIG += objective_c - --# Add the same default rpaths as Xcode does for new projects. --# This is especially important for iOS/tvOS/watchOS where no other option is possible. --!no_default_rpath { -- uikit: QMAKE_RPATHDIR += @executable_path/Frameworks -- else: QMAKE_RPATHDIR += @executable_path/../Frameworks -- equals(TEMPLATE, lib):!plugin:lib_bundle: QMAKE_RPATHDIR += @loader_path/Frameworks --} -- --# Don't pass -headerpad_max_install_names when using Bitcode. --# In that case the linker emits a warning stating that the flag is ignored when --# used with bitcode, for reasons that cannot be determined (rdar://problem/20748962). --# Using this flag is also unnecessary in practice on UIKit platforms since they --# are sandboxed, and only UIKit platforms support bitcode to begin with. --!bitcode: QMAKE_LFLAGS += $$QMAKE_LFLAGS_HEADERPAD -- --app_extension_api_only { -- QMAKE_CFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION -- QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION -- QMAKE_CXXFLAGS_PRECOMPILE += $$QMAKE_CFLAGS_APPLICATION_EXTENSION -- QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION --} -- --macos { -- !isEmpty(QMAKE_APPLE_DEVICE_ARCHS) { -- # If the user has requested a specific set of architectures, -- # build all of those by default, but limited to only those. -- CONFIG -= only_active_arch -- } else { -- # Otherwise allow building all of the architectures available -- # in Qt, but only build the active arch (unless the user has -- # manually overridden this via CONFIG -= only_active_arch). -- QMAKE_APPLE_DEVICE_ARCHS = $$QT_ARCHS -- } --} -- --macx-xcode { -- qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO -- !isEmpty(QMAKE_PKGINFO_TYPEINFO): \ -- qmake_pkginfo_typeinfo.value = $$QMAKE_PKGINFO_TYPEINFO -- else: \ -- qmake_pkginfo_typeinfo.value = "????" -- QMAKE_MAC_XCODE_SETTINGS += qmake_pkginfo_typeinfo -- -- bundle_version = $$VERSION -- isEmpty(bundle_version): bundle_version = 1.0.0 -- -- l = $$split(bundle_version, '.') 0 0 # make sure there are at least three -- VER_MAJ = $$member(l, 0, 0) -- VER_MIN = $$member(l, 1, 1) -- VER_PAT = $$member(l, 2, 2) -- unset(l) -- -- qmake_full_version.name = QMAKE_FULL_VERSION -- qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} -- QMAKE_MAC_XCODE_SETTINGS += qmake_full_version -- -- qmake_short_version.name = QMAKE_SHORT_VERSION -- qmake_short_version.value = $${VER_MAJ}.$${VER_MIN} -- QMAKE_MAC_XCODE_SETTINGS += qmake_short_version -- -- !isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) { -- debug_information_format.name = DEBUG_INFORMATION_FORMAT -- debug_information_format.value = $$QMAKE_XCODE_DEBUG_INFORMATION_FORMAT -- debug_information_format.build = debug -- QMAKE_MAC_XCODE_SETTINGS += debug_information_format -- } -- -- QMAKE_XCODE_ARCHS = -- -- !isEmpty(QMAKE_APPLE_DEVICE_ARCHS) { -- arch_device.name = "ARCHS[sdk=$${device.sdk}*]" -- arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS -- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS -- QMAKE_MAC_XCODE_SETTINGS += arch_device -- } -- -- ios:simulator { -- arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]" -- arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS -- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS -- QMAKE_MAC_XCODE_SETTINGS += arch_simulator -- } -- -- only_active_arch.name = ONLY_ACTIVE_ARCH -- only_active_arch.value = YES -- only_active_arch.build = debug -- QMAKE_MAC_XCODE_SETTINGS += only_active_arch --} else { -- device|!simulator: VALID_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS -- ios:simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS -- VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS -- -- single_arch: VALID_ARCHS = $$first(VALID_ARCHS) -- -- macos { -- only_active_arch: DEFAULT_ARCHS = $$system("uname -m") -- else: DEFAULT_ARCHS = $$VALID_ARCHS -- } -- -- ARCHS = $(filter $(EXPORT_VALID_ARCHS), \ -- $(if $(ARCHS), $(ARCHS), \ -- $(if $(EXPORT_DEFAULT_ARCHS), $(EXPORT_DEFAULT_ARCHS), \ -- $(EXPORT_VALID_ARCHS)))) -- ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ARCHS), $(EXPORT_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch)) -- -- QMAKE_EXTRA_VARIABLES += VALID_ARCHS DEFAULT_ARCHS ARCHS ARCH_ARGS -- -- arch_flags = $(EXPORT_ARCH_ARGS) -- -- QMAKE_CFLAGS += $$arch_flags -- QMAKE_CXXFLAGS += $$arch_flags -- QMAKE_LFLAGS += $$arch_flags -- -- QMAKE_PCH_ARCHS = $$VALID_ARCHS -- -- macos: deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET -- ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET -- tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET -- watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET -- -- # If we're doing a simulator and device build, device and simulator -- # architectures use different paths and flags for the sysroot and -- # deployment target switch, so we must multiplex them across multiple -- # architectures using -Xarch. Otherwise we fall back to the simple path. -- # This is not strictly necessary, but results in cleaner command lines -- # and makes it easier for people to override EXPORT_VALID_ARCHS to limit -- # individual rules to a different set of architecture(s) from the overall -- # build (such as machtest in QtCore). -- ios:simulator:device { -- QMAKE_XARCH_CFLAGS = -- QMAKE_XARCH_LFLAGS = -- QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS -- -- for (arch, VALID_ARCHS) { -- contains(VALID_SIMULATOR_ARCHS, $$arch) { -- sdk = $$simulator.sdk -- version_identifier = $$simulator.deployment_identifier -- platform_identifier = $$simulator.sdk -- } else { -- sdk = $$device.sdk -- version_identifier = $$device.deployment_identifier -- platform_identifier = $$device.sdk -- } -- -- version_min_flags = \ -- -Xarch_$${arch} \ -- -m$${version_identifier}-version-min=$$deployment_target -- QMAKE_XARCH_CFLAGS_$${arch} = $$version_min_flags \ -- -Xarch_$${arch} \ -- -isysroot$$xcodeSDKInfo(Path, $$sdk) -- QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \ -- -Xarch_$${arch} \ -- -isysroot$$xcodeSDKInfo(Path, $$sdk) -- -- QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch}) -- QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch}) -- -- QMAKE_EXTRA_VARIABLES += \ -- QMAKE_XARCH_CFLAGS_$${arch} \ -- QMAKE_XARCH_LFLAGS_$${arch} -- } -- -- QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) -- QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) -- QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS) -- } else { -- ios:simulator { -- version_identifier = $$simulator.deployment_identifier -- platform_identifier = $$simulator.sdk -- sysroot_path = $$xcodeSDKInfo(Path, $$simulator.sdk) -- } else { -- version_identifier = $$device.deployment_identifier -- platform_identifier = $$device.sdk -- sysroot_path = $$xcodeSDKInfo(Path, $$device.sdk) -- } -- QMAKE_CFLAGS += -isysroot $$sysroot_path -- QMAKE_CXXFLAGS += -isysroot $$sysroot_path -- QMAKE_LFLAGS += -isysroot $$sysroot_path -- -- !isEmpty(version_identifier):!isEmpty(deployment_target) { -- version_min_flag = -m$${version_identifier}-version-min=$$deployment_target -- QMAKE_CFLAGS += $$version_min_flag -- QMAKE_CXXFLAGS += $$version_min_flag -- QMAKE_LFLAGS += $$version_min_flag -- } -- } -- -- # Enable precompiled headers for multiple architectures -- QMAKE_CFLAGS_USE_PRECOMPILE = -- for (arch, VALID_ARCHS) { -- icc_pch_style: \ -- use_flag = "-pch-use " -- else: \ -- use_flag = -include -- -- # Only use Xarch with multi-arch, as the option confuses ccache -- count(VALID_ARCHS, 1, greaterThan): \ -- QMAKE_CFLAGS_USE_PRECOMPILE += \ -- -Xarch_$${arch} -- -- QMAKE_CFLAGS_USE_PRECOMPILE += \ -- $${use_flag}${QMAKE_PCH_OUTPUT_$${arch}} -- } -- icc_pch_style { -- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -include ${QMAKE_PCH_INPUT} -- QMAKE_CFLAGS_USE_PRECOMPILE = -- } else { -- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -- QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -- QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -- } -- -- QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT} --} -- --!equals(sdk_version, $$QMAKE_MAC_SDK_VERSION) { -- # Explicit SDK version has been set, respect that -- QMAKE_LFLAGS += -Wl,-sdk_version -Wl,$$sdk_version --} -- --cache(QMAKE_XCODE_DEVELOPER_PATH, stash) --!isEmpty(QMAKE_XCODE_VERSION): \ -- cache(QMAKE_XCODE_VERSION, stash) -- --QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix() -- --xcode_product_bundle_identifier_setting.name = PRODUCT_BUNDLE_IDENTIFIER --xcode_product_bundle_identifier_setting.value = $$QMAKE_TARGET_BUNDLE_PREFIX --isEmpty(xcode_product_bundle_identifier_setting.value): \ -- xcode_product_bundle_identifier_setting.value = "com.yourcompany" --xcode_product_bundle_target = $$QMAKE_BUNDLE --isEmpty(xcode_product_bundle_target): \ -- xcode_product_bundle_target = ${PRODUCT_NAME:rfc1034identifier} --xcode_product_bundle_identifier_setting.value = "$${xcode_product_bundle_identifier_setting.value}.$${xcode_product_bundle_target}" --QMAKE_MAC_XCODE_SETTINGS += xcode_product_bundle_identifier_setting -- - !macx-xcode { - generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode \"$(EXPORT__PRO_FILE_)\" $$QMAKE_ARGS - generate_xcode_project.target = xcodeproj -diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf -index e3534561a5..3b01424e67 100644 ---- a/mkspecs/features/mac/default_pre.prf -+++ b/mkspecs/features/mac/default_pre.prf -@@ -1,60 +1,2 @@ - CONFIG = asset_catalogs rez $$CONFIG - load(default_pre) -- --isEmpty(QMAKE_XCODE_DEVELOPER_PATH) { -- # Get path of Xcode's Developer directory -- QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path 2>/dev/null") -- isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \ -- error("Xcode path is not set. Please use xcode-select to choose Xcode installation path.") -- -- # Make sure Xcode path is valid -- !exists($$QMAKE_XCODE_DEVELOPER_PATH): \ -- error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.") --} -- --isEmpty(QMAKE_XCODEBUILD_PATH): \ -- QMAKE_XCODEBUILD_PATH = $$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null") -- --!isEmpty(QMAKE_XCODEBUILD_PATH) { -- # Make sure Xcode is set up properly -- !system("/usr/bin/xcrun xcodebuild -license check 2>/dev/null"): \ -- error("Xcode not set up properly. You need to confirm the license agreement by running 'sudo xcrun xcodebuild -license accept'.") -- -- isEmpty(QMAKE_XCODE_VERSION) { -- # Extract Xcode version using xcodebuild -- xcode_version = $$system("/usr/bin/xcrun xcodebuild -version") -- QMAKE_XCODE_VERSION = $$member(xcode_version, 1) -- isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.") -- unset(xcode_version) -- } --} -- --isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) { -- QMAKE_XCODE_PREFERENCES_FILE = $$(HOME)/Library/Preferences/com.apple.dt.Xcode.plist -- exists($$QMAKE_XCODE_PREFERENCES_FILE): \ -- QMAKE_TARGET_BUNDLE_PREFIX = $$system("/usr/libexec/PlistBuddy -c 'print IDETemplateOptions:bundleIdentifierPrefix' $$QMAKE_XCODE_PREFERENCES_FILE 2>/dev/null") -- -- !isEmpty(_QMAKE_CACHE_):!isEmpty(QMAKE_TARGET_BUNDLE_PREFIX): \ -- cache(QMAKE_TARGET_BUNDLE_PREFIX) --} -- --QMAKE_ASSET_CATALOGS_APP_ICON = AppIcon -- --# Make the default debug info format for static debug builds --# DWARF instead of DWARF with dSYM. This cuts down build times --# for application debug builds significantly, as Xcode doesn't --# have to pull out all the DWARF info from the Qt static libs --# and put it into a dSYM file. We don't need that dSYM file in --# the first place, since the information is available in the --# object files inside the archives (static libraries). --macx-xcode:qtConfig(static): \ -- QMAKE_XCODE_DEBUG_INFORMATION_FORMAT = dwarf -- --# This variable is used by the xcode_dynamic_library_suffix --# feature, which allows Xcode to choose the Qt libraries to link to --# at build time, depending on the current Xcode SDK and configuration. --QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX -- --xcode_copy_phase_strip_setting.name = COPY_PHASE_STRIP --xcode_copy_phase_strip_setting.value = NO --QMAKE_MAC_XCODE_SETTINGS += xcode_copy_phase_strip_setting -diff --git a/mkspecs/features/mac/sdk.mk b/mkspecs/features/mac/sdk.mk -index a32ceacb6c..e69de29bb2 100644 ---- a/mkspecs/features/mac/sdk.mk -+++ b/mkspecs/features/mac/sdk.mk -@@ -1,27 +0,0 @@ -- --ifeq ($(QT_MAC_SDK_NO_VERSION_CHECK),) -- CHECK_SDK_COMMAND = /usr/bin/xcrun --sdk $(EXPORT_QMAKE_MAC_SDK) -show-sdk-version 2>/dev/null -- CURRENT_MAC_SDK_VERSION := $(shell DEVELOPER_DIR=$(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) $(CHECK_SDK_COMMAND)) -- ifneq ($(CURRENT_MAC_SDK_VERSION),$(EXPORT_QMAKE_MAC_SDK_VERSION)) -- # We don't want to complain about out of date SDK unless the target needs to be remade. -- # This covers use-cases such as running 'make check' after moving the build to a -- # computer without Xcode or with a different Xcode version. -- TARGET_UP_TO_DATE := $(shell QT_MAC_SDK_NO_VERSION_CHECK=1 $(MAKE) --question $(QMAKE_TARGET) && echo 1 || echo 0) -- ifeq ($(TARGET_UP_TO_DATE),0) -- ifneq ($(findstring missing DEVELOPER_DIR path,$(CURRENT_MAC_SDK_VERSION)),) -- $(info The developer dir $(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) is no longer valid.) -- else ifneq ($(findstring SDK "$(EXPORT_QMAKE_MAC_SDK)" cannot be located,$(CURRENT_MAC_SDK_VERSION)),) -- $(info The developer dir $(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) no longer contains the $(EXPORT_QMAKE_MAC_SDK_VERSION) platform SDK.) -- else ifneq ($(CURRENT_MAC_SDK_VERSION),) -- $(info The $(EXPORT_QMAKE_MAC_SDK) platform SDK has been changed from version $(EXPORT_QMAKE_MAC_SDK_VERSION) to version $(CURRENT_MAC_SDK_VERSION).) -- else -- $(info Unknown error resolving current platform SDK version.) -- endif -- $(info This requires a fresh build of your project. Please wipe the build directory) -- ifneq ($(EXPORT__QMAKE_STASH_),) -- $(info including the qmake cache in $(EXPORT__QMAKE_STASH_)) -- endif -- $(error ^) -- endif -- endif --endif -diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf -index 3a9c2778bb..e69de29bb2 100644 ---- a/mkspecs/features/mac/sdk.prf -+++ b/mkspecs/features/mac/sdk.prf -@@ -1,61 +0,0 @@ -- --isEmpty(QMAKE_MAC_SDK): \ -- error("QMAKE_MAC_SDK must be set when using CONFIG += sdk.") -- --contains(QMAKE_MAC_SDK, .*/.*): \ -- error("QMAKE_MAC_SDK can only contain short-form SDK names (eg. macosx, iphoneos)") -- --defineReplace(xcodeSDKInfo) { -- info = $$1 -- equals(info, "Path"): \ -- infoarg = --show-sdk-path -- equals(info, "PlatformPath"): \ -- infoarg = --show-sdk-platform-path -- equals(info, "SDKVersion"): \ -- infoarg = --show-sdk-version -- sdk = $$2 -- isEmpty(sdk): \ -- sdk = $$QMAKE_MAC_SDK -- -- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) { -- QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$infoarg 2>/dev/null") -- # --show-sdk-platform-path won't work for Command Line Tools; this is fine -- # only used by the XCTest backend to testlib -- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(infoarg, "--show-sdk-platform-path")): \ -- error("Could not resolve SDK $$info for \'$$sdk\' using $$infoarg") -- cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info}) -- } -- -- return($$eval(QMAKE_MAC_SDK.$${sdk}.$${info})) --} -- --QMAKE_MAC_SDK_PATH = $$xcodeSDKInfo(Path) --QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath) --QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion) -- --isEmpty(QMAKE_EXPORT_INCDIR_OPENGL) { -- QMAKE_EXPORT_INCDIR_OPENGL = $$QMAKE_INCDIR_OPENGL -- sysrootified = -- for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val -- QMAKE_INCDIR_OPENGL = $$sysrootified --} -- --QMAKESPEC_NAME = $$basename(QMAKESPEC) -- --# Resolve SDK version of various tools --for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_ACTOOL QMAKE_LINK_C QMAKE_LINK_C_SHLIB)) { -- tool_variable = QMAKE_MAC_SDK.$${QMAKESPEC_NAME}.$${QMAKE_MAC_SDK}.$${tool} -- !isEmpty($$tool_variable) { -- $$tool = $$eval($$tool_variable) -- next() -- } -- -- value = $$eval($$tool) -- isEmpty(value): next() -- -- sysrooted = $$system("/usr/bin/xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value) 2>/dev/null") -- isEmpty(sysrooted): next() -- -- $$tool = $$sysrooted $$member(value, 1, -1) -- cache($$tool_variable, set stash, $$tool) --} -diff --git a/mkspecs/features/mac/toolchain.prf b/mkspecs/features/mac/toolchain.prf -index df191eb13c..e69de29bb2 100644 ---- a/mkspecs/features/mac/toolchain.prf -+++ b/mkspecs/features/mac/toolchain.prf -@@ -1,5 +0,0 @@ --# Ensure that we process sdk.prf first, as it will update QMAKE_CXX, --# which the default path determination uses. --sdk: load(sdk) -- --load(toolchain) From 2b2e4d03e3a1f5ab568e741e78cae179cbebd01d Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 29 Oct 2024 03:45:13 +0000 Subject: [PATCH 176/252] qt6Packages.qtbase: remove obsolete Darwin flags Our deployment target is higher than macOS 10.15 now, and it looks like upstream handle GSS correctly these days. --- pkgs/development/libraries/qt-6/modules/qtbase.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkgs/development/libraries/qt-6/modules/qtbase.nix b/pkgs/development/libraries/qt-6/modules/qtbase.nix index d3754495d5be..fd164b5e76f8 100644 --- a/pkgs/development/libraries/qt-6/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -232,19 +232,12 @@ stdenv.mkDerivation rec { "-DQT_FEATURE_vulkan=ON" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DQT_FEATURE_rpath=OFF" - # error: 'path' is unavailable: introduced in macOS 10.15 - "-DQT_FEATURE_cxx17_filesystem=OFF" ] ++ lib.optionals isCrossBuild [ "-DQT_HOST_PATH=${pkgsBuildBuild.qt6.qtbase}" "-DQt6HostInfo_DIR=${pkgsBuildBuild.qt6.qtbase}/lib/cmake/Qt6HostInfo" ] ++ lib.optional (qttranslations != null && !isCrossBuild) "-DINSTALL_TRANSLATIONSDIR=${qttranslations}/translations"; - env.NIX_LDFLAGS = toString (lib.optionals stdenv.hostPlatform.isDarwin [ - # Undefined symbols for architecture arm64: "___gss_c_nt_hostbased_service_oid_desc" - "-framework GSS" - ]); - env.NIX_CFLAGS_COMPILE = "-DNIXPKGS_QT_PLUGIN_PREFIX=\"${qtPluginPrefix}\""; outputs = [ "out" "dev" ]; From 05054bce8a1081fdb2ff9cc957e542d05dde7f59 Mon Sep 17 00:00:00 2001 From: Reno Dakota <170618376+paparodeo@users.noreply.github.com> Date: Mon, 28 Oct 2024 07:53:37 +0000 Subject: [PATCH 177/252] cdparanoia: fix darwin; add security patches patches are from macports and debian: - add patches to include files containing function prototypes on darwin - fix fprintf format error -- use "%s" buffer - check buffer for null before dereferencing - use labs for long - scan additional ides 4-9 --- .../applications/audio/cdparanoia/default.nix | 39 +++++++++++++------ pkgs/top-level/all-packages.nix | 5 +-- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/pkgs/applications/audio/cdparanoia/default.nix b/pkgs/applications/audio/cdparanoia/default.nix index bdeb8eec896d..3f15f90f5b78 100644 --- a/pkgs/applications/audio/cdparanoia/default.nix +++ b/pkgs/applications/audio/cdparanoia/default.nix @@ -1,6 +1,5 @@ { lib, stdenv, fetchurl, fetchpatch , updateAutotoolsGnuConfigScriptsHook, autoreconfHook -, IOKit, Carbon }: stdenv.mkDerivation rec { @@ -14,8 +13,8 @@ stdenv.mkDerivation rec { patches = lib.optionals stdenv.hostPlatform.isDarwin [ (fetchpatch { - url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/osx_interface.patch"; - sha256 = "0hq3lvfr0h1m3p0r33jij0s1aspiqlpy533rwv19zrfllb39qvr8"; + url = "https://github.com/macports/macports-ports/raw/c8e15973bc3c1e1ab371bc0ee2de14209e639f17/audio/cdparanoia/files/osx_interface.patch"; + hash = "sha256-9p4+9dRvqLHkpR0RWLQcNL1m7fb7L6r+c9Q2tt4jh0U="; # 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. @@ -23,13 +22,38 @@ stdenv.mkDerivation rec { }) (fetchurl { url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/patch-paranoia_paranoia.c.10.4.diff"; - sha256 = "17l2qhn8sh4jy6ryy5si6ll6dndcm0r537rlmk4a6a8vkn852vad"; + hash = "sha256-TW1RkJ0bKaPIrDSfUTKorNlmKDVRF++z8ZJAjSzEgp4="; + }) + # add missing include files needed for function prototypes + (fetchpatch { + url = "https://github.com/macports/macports-ports/raw/f210a6061bc53c746730a37922399c6de6d69cb7/audio/cdparanoia/files/fixing-include.patch"; + hash = "sha256-6a/u4b8/H/4XjyFup23xySgyAI9SMVMom4PLvH8KzhE="; }) ] ++ [ # Has to come after darwin patches ./fix_private_keyword.patch # Order does not matter ./configure.patch + # labs for long + (fetchpatch { + url = "https://github.com/macports/macports-ports/raw/f210a6061bc53c746730a37922399c6de6d69cb7/audio/cdparanoia/files/fixing-labs.patch"; + hash = "sha256-BMMQ5bbPP3eevuwWUVjQCtRBiWbkAHD+O0C0fp+BPaw="; + }) + # use "%s" for passing a buffer to fprintf + (fetchpatch { + url = "https://github.com/macports/macports-ports/raw/f210a6061bc53c746730a37922399c6de6d69cb7/audio/cdparanoia/files/fixing-fprintf.patch"; + hash = "sha256-2dJl16p+f5l3wxVOJhsuLiQ9a4prq7jsRZP8/ygEae4="; + }) + # add support for IDE4-9 + (fetchpatch { + url = "https://salsa.debian.org/optical-media-team/cdparanoia/-/raw/bbf353721834b3784ccc0fd54a36a6b25181f5a4/debian/patches/02-ide-devices.patch"; + hash = "sha256-S6OzftUIPPq9JHsoAE2K51ltsI1WkVaQrpgCjgm5AG4="; + }) + # check buffer is non-null before dereferencing + (fetchpatch { + url = "https://salsa.debian.org/optical-media-team/cdparanoia/-/raw/f7bab3024c5576da1fdb7497abbd6abc8959a98c/debian/patches/04-endian.patch"; + hash = "sha256-krfprwls0L3hsNfoj2j69J5k1RTKEQtzE0fLYG9EJKo="; + }) ] ++ lib.optional stdenv.hostPlatform.isMusl ./utils.patch; nativeBuildInputs = [ @@ -37,13 +61,6 @@ stdenv.mkDerivation rec { autoreconfHook ]; - propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ - Carbon - IOKit - ]; - - hardeningDisable = [ "format" ]; - # 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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e1608ead9b65..7a598edb3cd0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -28383,10 +28383,7 @@ with pkgs; cdparanoia = cdparanoiaIII; - cdparanoiaIII = callPackage ../applications/audio/cdparanoia { - inherit (darwin) IOKit; - inherit (darwin.apple_sdk.frameworks) Carbon; - }; + cdparanoiaIII = callPackage ../applications/audio/cdparanoia { }; celeste = callPackage ../applications/networking/sync/celeste { }; From b3f04cd54216082f2e6742c6cc7fa8bced5b8eb0 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Tue, 29 Oct 2024 22:15:10 +0100 Subject: [PATCH 178/252] xorg.xorgserver: 21.1.13 -> 21.1.14 Signed-off-by: Sefa Eyeoglu --- pkgs/servers/x11/xorg/default.nix | 6 +++--- pkgs/servers/x11/xorg/tarballs.list | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index e25f09c5f077..54d873eba040 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -4158,11 +4158,11 @@ self: with self; { # THIS IS A GENERATED FILE. DO NOT EDIT! xorgserver = callPackage ({ stdenv, pkg-config, fetchurl, xorgproto, openssl, libX11, libXau, libxcb, xcbutil, xcbutilwm, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, libXdmcp, libXfixes, libxkbfile, testers }: stdenv.mkDerivation (finalAttrs: { pname = "xorg-server"; - version = "21.1.13"; + version = "21.1.14"; builder = ./builder.sh; src = fetchurl { - url = "mirror://xorg/individual/xserver/xorg-server-21.1.13.tar.xz"; - sha256 = "033lvjihidc68v08izrr63va8jhkfmzcjg0d6rm26wizjkah4nml"; + url = "mirror://xorg/individual/xserver/xorg-server-21.1.14.tar.xz"; + sha256 = "0dgfajrnkr8d61z1fjn249s3q1pm23v9w2f1aqb7sx64pp7048cg"; }; hardeningDisable = [ "bindnow" "relro" ]; strictDeps = true; diff --git a/pkgs/servers/x11/xorg/tarballs.list b/pkgs/servers/x11/xorg/tarballs.list index 3e77aa833ec9..09652d05ca9a 100644 --- a/pkgs/servers/x11/xorg/tarballs.list +++ b/pkgs/servers/x11/xorg/tarballs.list @@ -218,4 +218,4 @@ mirror://xorg/individual/util/lndir-1.0.5.tar.xz mirror://xorg/individual/util/makedepend-1.0.9.tar.xz mirror://xorg/individual/util/util-macros-1.20.1.tar.xz mirror://xorg/individual/util/xorg-cf-files-1.0.8.tar.xz -mirror://xorg/individual/xserver/xorg-server-21.1.13.tar.xz +mirror://xorg/individual/xserver/xorg-server-21.1.14.tar.xz From 0e190616fa810e84b59539db4ca025222c1234d0 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 30 Oct 2024 10:50:30 +0000 Subject: [PATCH 179/252] libbpf: 1.4.6 -> 1.4.7 --- pkgs/os-specific/linux/libbpf/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/libbpf/default.nix b/pkgs/os-specific/linux/libbpf/default.nix index b5e4b22dabf0..8c8adfb5e124 100644 --- a/pkgs/os-specific/linux/libbpf/default.nix +++ b/pkgs/os-specific/linux/libbpf/default.nix @@ -14,13 +14,13 @@ stdenv.mkDerivation rec { pname = "libbpf"; - version = "1.4.6"; + version = "1.4.7"; src = fetchFromGitHub { owner = "libbpf"; repo = "libbpf"; rev = "v${version}"; - hash = "sha256-TGwGEYapanhp2RjnH6Mo+kQFmqFEX0LcAZTCk6SyIk8="; + hash = "sha256-iknPdJ1vJ5y1ncsHx+nAc6gmvJWbo1Wg6mFTfa2KDBM="; }; nativeBuildInputs = [ pkg-config ]; From 04a90ffde20f9d1dccd074382d2a2d17c26908b9 Mon Sep 17 00:00:00 2001 From: Sean Gillespie Date: Wed, 30 Oct 2024 12:00:45 -0400 Subject: [PATCH 180/252] ruby: fix cross build (#348566) --- pkgs/development/interpreters/ruby/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index ea270b3a7051..e9c464e59f34 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -216,7 +216,7 @@ let for makefile in $extMakefiles; do make -C "$(dirname "$makefile")" distclean done - find "$out/${finalAttrs.passthru.gemPath}" \( -name gem_make.out -o -name mkmf.log \) -delete + find "$out/${finalAttrs.passthru.gemPath}" \( -name gem_make.out -o -name mkmf.log -o -name exts.mk \) -delete # Bundler tries to create this directory mkdir -p $out/nix-support cat > $out/nix-support/setup-hook < Date: Wed, 16 Oct 2024 21:34:32 -0700 Subject: [PATCH 181/252] pkgsStatic.dtc: fix build --- pkgs/development/compilers/dtc/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/compilers/dtc/default.nix b/pkgs/development/compilers/dtc/default.nix index ed35bec87c06..e7a17cba66c8 100644 --- a/pkgs/development/compilers/dtc/default.nix +++ b/pkgs/development/compilers/dtc/default.nix @@ -1,5 +1,6 @@ { stdenv , lib +, fetchpatch2 , fetchzip , meson , ninja @@ -22,6 +23,14 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-Zl2bOGDJIe/bhMFNsy969JYCYqtXTOzgb+bbOlKqOco="; }; + patches = [ + (fetchpatch2 { + # https://github.com/dgibson/dtc/pull/141 + url = "https://github.com/dgibson/dtc/commit/56a7d0cb3be5f2f7604bc42299e24d13a39c72d8.patch"; + hash = "sha256-GmAyk/K2OolH/Z8SsgwCcq3/GOlFuSpnVPr7jsy8Cs0="; + }) + ]; + env.SETUPTOOLS_SCM_PRETEND_VERSION = finalAttrs.version; nativeBuildInputs = [ From beda46612acfdff1ca6bd2c2bf20b21290c43136 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Thu, 31 Oct 2024 11:59:18 +0100 Subject: [PATCH 182/252] serd: move to pkgs/by-name --- .../libraries/serd/default.nix => by-name/se/serd/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{development/libraries/serd/default.nix => by-name/se/serd/package.nix} (100%) diff --git a/pkgs/development/libraries/serd/default.nix b/pkgs/by-name/se/serd/package.nix similarity index 100% rename from pkgs/development/libraries/serd/default.nix rename to pkgs/by-name/se/serd/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 278248c00695..11d30b5a174f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22832,8 +22832,6 @@ with pkgs; seasocks = callPackage ../development/libraries/seasocks { }; - serd = callPackage ../development/libraries/serd { }; - serf = callPackage ../development/libraries/serf { }; sev-snp-measure = with python3Packages; toPythonApplication sev-snp-measure; From 4026e88664f772ce81584390588e149dd6871ad4 Mon Sep 17 00:00:00 2001 From: Steven Keuchel Date: Sat, 26 Oct 2024 11:28:53 +0200 Subject: [PATCH 183/252] rustc: use 1.82.0 binary to bootstrap rustc 1.82.0 Change the bootstrap on all platforms to use a version of the upstream binary that is equal to the version that is being built, instead of a binary of one version prior. This is necessary for the 1.82.0 release because on some platforms (https://github.com/rust-lang/rust/issues/129268) the 1.81.0 binary can not build the 1.82.0 source. Furthermore, upstream reported that their development process (now) usually involves building a release compiler with itself and that "the Rust compiler must be able to build itself". --- pkgs/development/compilers/rust/1_82.nix | 33 ++++++++++++------------ 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/pkgs/development/compilers/rust/1_82.nix b/pkgs/development/compilers/rust/1_82.nix index 12cfbb80b2fb..83bf096224f8 100644 --- a/pkgs/development/compilers/rust/1_82.nix +++ b/pkgs/development/compilers/rust/1_82.nix @@ -103,25 +103,26 @@ import ./default.nix else llvmPackages_18; - # Note: the version MUST be one version prior to the version we're - # building - bootstrapVersion = "1.81.0"; + # Note: the version MUST be the same version that we are building. Upstream + # ensures that each released compiler can compile itself: + # https://github.com/NixOS/nixpkgs/pull/351028#issuecomment-2438244363 + bootstrapVersion = "1.82.0"; # fetch hashes by running `print-hashes.sh ${bootstrapVersion}` bootstrapHashes = { - i686-unknown-linux-gnu = "0ab6ff2da7218220a2fb6e9538f5582c5d27448e91ff6ea2e296b2aee2b5e2d9"; - x86_64-unknown-linux-gnu = "4ca7c24e573dae2f382d8d266babfddc307155e1a0a4025f3bc11db58a6cab3e"; - x86_64-unknown-linux-musl = "2a0829c842425ab316a63adb0d604421be1c4df332388ac26d63aef47e857c12"; - arm-unknown-linux-gnueabihf = "0da7b4a3b760fa514ba5e1a731fd212f1d082468f118f19e852136a30d2c0253"; - armv7-unknown-linux-gnueabihf = "5a8d799a09cc605ea3a88dc43bd348bd6335847a0b71ba8e73b40968a0a7bf6f"; - aarch64-unknown-linux-gnu = "ef4da9c1ecd56bbbb36f42793524cce3062e6a823ae22cb679a945c075c7755b"; - aarch64-unknown-linux-musl = "fab9a1a69e61326399becab2571381b079ee42f2b648d862b0c3df05004dc864"; - x86_64-apple-darwin = "f74d8ad24cc3cbfb825da98a08d98319565e4d18ec2c3e9503bf0a33c81ba767"; - aarch64-apple-darwin = "60a41dea4ae0f4006325745a6400e6fdc3e08ad3f924fac06f04c238cf23f4ec"; - powerpc64le-unknown-linux-gnu = "bf98b27de08a2fd5a2202a2b621b02bfde2a6fde397df2a735d018aeffcdc5e2"; - riscv64gc-unknown-linux-gnu = "664e7a50c03848afc86d579a9cbf82cd0b2291a97776f7f81cee9bbf9fc1f648"; - s390x-unknown-linux-gnu = "e0450ff125cadd3813c7888f5ca42f78e68df13c212b12d5eac3325062632723"; - x86_64-unknown-freebsd = "b96ebbc043058eedebccd20f1d01e64f2241107665fe2336e6927966d8b9d8d3"; + i686-unknown-linux-gnu = "77b261fb3d9efa7fe39e87c024987495e03b647b6cb23a66b8e69aeb12a8be61"; + x86_64-unknown-linux-gnu = "0265c08ae997c4de965048a244605fb1f24a600bbe35047b811c638b8fcf676b"; + x86_64-unknown-linux-musl = "9dd781c64f71c1d3f854b0937eb751f19e8ebac1110e68e08b94223ad9b022ba"; + arm-unknown-linux-gnueabihf = "d6a2857d0ab8880c3bc691607b10b68fb2750eae35144e035a9a5eeef820b740"; + armv7-unknown-linux-gnueabihf = "eff9939c4b98c6ad91a759fa1a2ebdd81b4d05e47ac523218bf9d7093226589b"; + aarch64-unknown-linux-gnu = "d7db04fce65b5f73282941f3f1df5893be9810af17eb7c65b2e614461fe31a48"; + aarch64-unknown-linux-musl = "f061eabf0324805637c1e89e7d936365f705be1359699efbda59b637dbe9715f"; + x86_64-apple-darwin = "b1a289cabc523f259f65116a41374ac159d72fbbf6c373bd5e545c8e835ceb6a"; + aarch64-apple-darwin = "49b6d36b308addcfd21ae56c94957688338ba7b8985bff57fc626c8e1b32f62c"; + powerpc64le-unknown-linux-gnu = "44f3a1e70be33f91927ae8d89a11843a79b8b6124d62a9ddd9030a5275ebc923"; + riscv64gc-unknown-linux-gnu = "a72e8aa3fff374061ff90ada317a8d170c2a15eb079ddc828c97189179d3eebd"; + s390x-unknown-linux-gnu = "63760886a9b2de6cb38f75a236db358939d904e205e1e2bc9d96cec69e00ae83"; + x86_64-unknown-freebsd = "f7b51943dbed0af3387e3269c1767fee916fb22b8e7897b3594bf5e422403137"; }; selectRustPackage = pkgs: pkgs.rust_1_82; From 3c433c914456d4bca2eaf5b0a3e71bd20f20a6c5 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sat, 2 Nov 2024 00:27:38 +0800 Subject: [PATCH 184/252] elpa2nix: inline string-empty-p to support Emacs 26 Fixes https://github.com/NixOS/nixpkgs/issues/352907 --- pkgs/applications/editors/emacs/build-support/elpa2nix.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/emacs/build-support/elpa2nix.el b/pkgs/applications/editors/emacs/build-support/elpa2nix.el index b0b4ecedc360..97cf2fd58a06 100644 --- a/pkgs/applications/editors/emacs/build-support/elpa2nix.el +++ b/pkgs/applications/editors/emacs/build-support/elpa2nix.el @@ -34,9 +34,10 @@ The file can either be a tar file or an Emacs Lisp file." (let ((flag (getenv "turnCompilationWarningToError"))) (when (and flag - (not (string-empty-p flag))) + ;; we do not use `string-empty-p' because it requires subr-x in Emacs <= 26 + (not (string= flag ""))) (setq byte-compile-error-on-warn t))) (let ((flag (getenv "ignoreCompilationError"))) - (when (string-empty-p flag) + (when (string= flag "") (setq byte-compile-debug t))) From 933687c9a28a2525153dc24e04544035bff63aa0 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 1 Nov 2024 18:35:13 +0100 Subject: [PATCH 185/252] tdb: 1.4.10 -> 1.4.11 --- pkgs/development/libraries/tdb/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/tdb/default.nix b/pkgs/development/libraries/tdb/default.nix index c84ded6267e1..a42bb92cda13 100644 --- a/pkgs/development/libraries/tdb/default.nix +++ b/pkgs/development/libraries/tdb/default.nix @@ -7,17 +7,18 @@ , readline , libxslt , libxcrypt +, apple-sdk_11 , docbook-xsl-nons , docbook_xml_dtd_45 }: stdenv.mkDerivation rec { pname = "tdb"; - version = "1.4.10"; + version = "1.4.11"; src = fetchurl { url = "mirror://samba/tdb/${pname}-${version}.tar.gz"; - hash = "sha256-AjOOM8FsIcnilXHO9SPnaytwhjYlT28wxs8ZXUjGLa8="; + hash = "sha256-Toum2T84NWW70GG+Te7hUxgjLRu8ynIS8Y4X9Wu5dag="; }; nativeBuildInputs = [ @@ -33,6 +34,8 @@ stdenv.mkDerivation rec { python3 readline # required to build python libxcrypt + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + apple-sdk_11 ]; # otherwise the configure script fails with From 507c5dd2327ef9f5dd583ef83f37f9d8f638e74b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=A9tan=20Lepage?= <33058747+GaetanLepage@users.noreply.github.com> Date: Fri, 1 Nov 2024 23:01:38 +0100 Subject: [PATCH 186/252] neovim: remove uneffective substituteInPlace patches (#352855) --- pkgs/by-name/ne/neovim-unwrapped/package.nix | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/ne/neovim-unwrapped/package.nix b/pkgs/by-name/ne/neovim-unwrapped/package.nix index bc61215ad4e9..46d941a4e40b 100644 --- a/pkgs/by-name/ne/neovim-unwrapped/package.nix +++ b/pkgs/by-name/ne/neovim-unwrapped/package.nix @@ -185,16 +185,12 @@ stdenv.mkDerivation ( ]; # nvim --version output retains compilation flags and references to build tools - postPatch = - '' - substituteInPlace src/nvim/version.c --replace NVIM_VERSION_CFLAGS ""; - '' - + lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' - sed -i runtime/CMakeLists.txt \ - -e "s|\".*/bin/nvim|\${stdenv.hostPlatform.emulator buildPackages} &|g" - sed -i src/nvim/po/CMakeLists.txt \ - -e "s|\$ Date: Fri, 1 Nov 2024 06:54:11 +0000 Subject: [PATCH 187/252] libgit2: 1.8.3 -> 1.8.4 Changes: https://github.com/libgit2/libgit2/releases/tag/v1.8.4 --- pkgs/development/libraries/libgit2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libgit2/default.nix b/pkgs/development/libraries/libgit2/default.nix index 5e38abebd5ee..847894d06587 100644 --- a/pkgs/development/libraries/libgit2/default.nix +++ b/pkgs/development/libraries/libgit2/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "libgit2"; - version = "1.8.3"; + version = "1.8.4"; # also check the following packages for updates: python3Packages.pygit2 and libgit2-glib outputs = ["lib" "dev" "out"]; @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "libgit2"; repo = "libgit2"; rev = "v${finalAttrs.version}"; - hash = "sha256-ugVvXn9/ZXlJJQgh3zTBQYPGFrVDF3yxVynQyYzvXoY="; + hash = "sha256-AVhDq9nC2ccwFYJmejr0hmnyV4AxZLamuHktYPlkzUs="; }; cmakeFlags = [ From 7e7dce448e687f84aa1628ecc812adb919aaa072 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 2 Nov 2024 19:03:26 +0100 Subject: [PATCH 188/252] sphinx: disable racy test This one fails when tests are run with too many cores. Closes: #353176 --- pkgs/development/python-modules/sphinx/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/sphinx/default.nix b/pkgs/development/python-modules/sphinx/default.nix index dc79c8b664e5..f39899a2c5b6 100644 --- a/pkgs/development/python-modules/sphinx/default.nix +++ b/pkgs/development/python-modules/sphinx/default.nix @@ -115,6 +115,9 @@ buildPythonPackage rec { "test_class_alias_having_doccomment" "test_class_alias_for_imported_object_having_doccomment" "test_decorators" + # racy with too many threads + # https://github.com/NixOS/nixpkgs/issues/353176 + "test_document_toc_only" # Assertion error "test_gettext_literalblock_additional" # requires cython_0, but fails miserably on 3.11 From aaeeef5b6c7848a7569cb7a1f651550d0e5f8327 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 2 Nov 2024 15:49:04 +0100 Subject: [PATCH 189/252] stdenv: fix custom hardening settings when using `__structuredAttrs = true;` Replaces / Closes #353131 A while ago `postgresql` switched to using structured attrs[1]. In the PR it was reported that this made postgresql notably slower when importing SQL dumps[2]. After a bit of debugging it turned out that the hardening was entirely missing and the following combination of settings was the culprit: hardeningEnable = [ "pie" ]; __structuredAttrs = true; I.e. the combination of custom hardening settings and structured attrs. What happened here is that internally the default and enabled hardening flags get written into `NIX_HARDENING_ENABLE`. However, the value is a list and the setting is not in the `env` section. This means that in the structured-attrs case we get something like declare -ax NIX_HARDENING_ENABLE=([0]="bindnow" [1]="format" [2]="fortify" [3]="fortify3" [4]="pic" [5]="relro" [6]="stackprotector" [7]="strictoverflow" [8]="zerocallusedregs" [9]="pie") i.e. an actual array rather than a string with all hardening flags being space-separated which is what the hardening code of the cc-wrapper expects[3]. This only happens if `hardeningEnable` or `hardeningDisable` are explicitly set by a derivation: if none of those are set, `NIX_HARDENING_ENABLE` won't be set by `stdenv.mkDerivation` and the default hardening flags are configured by the setup hook of the cc-wrapper[4]. In other words, this _only_ applies to derivations that have both custom hardening settings _and_ `__structuredAttrs = true;`. All values of `NIX_HARDENING_ENABLE` are well-known, so we don't have to worry about escaping issues. Just forcing it to a string by concatenating the list everytime solves the issue without additional issues like eval errors when inheriting `env` from a structuredAttrs derivation[5]. The price we're paying is a full rebuild. [1] https://github.com/NixOS/nixpkgs/pull/294504 [2] https://github.com/NixOS/nixpkgs/pull/294504#issuecomment-2451482522 [3] https://github.com/NixOS/nixpkgs/blob/cf3e5d3744dc26c3498aa5dadfa0e078c632cede/pkgs/build-support/cc-wrapper/add-hardening.sh#L9 [4] https://github.com/NixOS/nixpkgs/blob/cf3e5d3744dc26c3498aa5dadfa0e078c632cede/pkgs/build-support/cc-wrapper/setup-hook.sh#L114 [5] https://github.com/NixOS/nixpkgs/pull/353131/commits/1e84a7fb95ba8770aca373efd95d1dc87ceef432 --- pkgs/stdenv/generic/make-derivation.nix | 2 +- pkgs/test/cc-wrapper/hardening.nix | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index b2b6576c4acd..d4d5ee46638a 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -413,7 +413,7 @@ else let enableParallelChecking = attrs.enableParallelChecking or true; enableParallelInstalling = attrs.enableParallelInstalling or true; } // optionalAttrs (hardeningDisable != [] || hardeningEnable != [] || stdenv.hostPlatform.isMusl) { - NIX_HARDENING_ENABLE = enabledHardeningOptions; + NIX_HARDENING_ENABLE = builtins.concatStringsSep " " enabledHardeningOptions; } // optionalAttrs (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform ? gcc.arch) { requiredSystemFeatures = attrs.requiredSystemFeatures or [] ++ [ "gccarch-${stdenv.hostPlatform.gcc.arch}" ]; } // optionalAttrs (stdenv.buildPlatform.isDarwin) ( diff --git a/pkgs/test/cc-wrapper/hardening.nix b/pkgs/test/cc-wrapper/hardening.nix index 270e9a2e8761..fb30d17841e3 100644 --- a/pkgs/test/cc-wrapper/hardening.nix +++ b/pkgs/test/cc-wrapper/hardening.nix @@ -178,6 +178,13 @@ in nameDrvAfterAttrName ({ ignorePie = false; }); + pieExplicitEnabledStructuredAttrs = brokenIf stdenv.hostPlatform.isStatic (checkTestBin (f2exampleWithStdEnv stdenv { + hardeningEnable = [ "pie" ]; + __structuredAttrs = true; + }) { + ignorePie = false; + }); + relROExplicitEnabled = checkTestBin (f2exampleWithStdEnv stdenv { hardeningEnable = [ "relro" ]; }) { From ed28ebdbb4de2cd110c7641716b140cd5522107b Mon Sep 17 00:00:00 2001 From: Emily Date: Sun, 3 Nov 2024 00:55:30 +0000 Subject: [PATCH 190/252] =?UTF-8?q?qt6Packages.*:=20don=E2=80=99t=20propag?= =?UTF-8?q?ate=20Darwin=20version=20inputs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/libraries/qt-6/default.nix | 14 ++++++-------- pkgs/development/libraries/qt-6/modules/qtbase.nix | 10 +++------- pkgs/development/libraries/qt-6/qtModule.nix | 4 ++-- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/pkgs/development/libraries/qt-6/default.nix b/pkgs/development/libraries/qt-6/default.nix index 7159bc6ae055..d306c3e430da 100644 --- a/pkgs/development/libraries/qt-6/default.nix +++ b/pkgs/development/libraries/qt-6/default.nix @@ -11,7 +11,6 @@ , libglvnd , darwin , apple-sdk_15 -, apple-sdk_12 , darwinMinVersionHook , buildPackages , python3 @@ -32,11 +31,10 @@ let }); # Per . - # This should reflect the lowest “Target Platform” and the - # highest “Build Environment”. - apple-sdk_qt = apple-sdk_15; - darwinDeploymentTargetDeps = [ - apple-sdk_12 + # This should reflect the highest “Build Environment” and the + # lowest “Target Platform”. + darwinVersionInputs = [ + apple-sdk_15 (darwinMinVersionHook "12.0") ]; in @@ -45,12 +43,12 @@ let inherit callPackage srcs; qtModule = callPackage ./qtModule.nix { - inherit apple-sdk_qt; + inherit darwinVersionInputs; }; qtbase = callPackage ./modules/qtbase.nix { withGtk3 = !stdenv.hostPlatform.isMinGW; - inherit apple-sdk_qt darwinDeploymentTargetDeps; + inherit darwinVersionInputs; inherit (srcs.qtbase) src version; patches = [ ./patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch diff --git a/pkgs/development/libraries/qt-6/modules/qtbase.nix b/pkgs/development/libraries/qt-6/modules/qtbase.nix index fd164b5e76f8..9df79ccc89be 100644 --- a/pkgs/development/libraries/qt-6/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -67,8 +67,7 @@ , unixODBCDrivers # darwin , moveBuildTree -, apple-sdk_qt -, darwinDeploymentTargetDeps +, darwinVersionInputs , xcbuild # mingw , pkgsBuildBuild @@ -155,8 +154,7 @@ stdenv.mkDerivation rec { xorg.libXtst xorg.xcbutilcursor libepoxy - ] ++ lib.optionals stdenv.hostPlatform.isDarwin darwinDeploymentTargetDeps - ++ lib.optionals libGLSupported [ + ] ++ lib.optionals libGLSupported [ libGL ] ++ lib.optionals stdenv.hostPlatform.isMinGW [ vulkan-headers @@ -167,9 +165,7 @@ stdenv.mkDerivation rec { at-spi2-core ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform libinput) [ libinput - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - apple-sdk_qt - ] + ] ++ lib.optionals stdenv.hostPlatform.isDarwin darwinVersionInputs ++ lib.optional withGtk3 gtk3 ++ lib.optional (libmysqlclient != null && !stdenv.hostPlatform.isMinGW) libmysqlclient ++ lib.optional (postgresql != null && lib.meta.availableOn stdenv.hostPlatform postgresql) postgresql; diff --git a/pkgs/development/libraries/qt-6/qtModule.nix b/pkgs/development/libraries/qt-6/qtModule.nix index 610649497ba8..8b09c8cb19b8 100644 --- a/pkgs/development/libraries/qt-6/qtModule.nix +++ b/pkgs/development/libraries/qt-6/qtModule.nix @@ -1,6 +1,6 @@ { lib , stdenv -, apple-sdk_qt +, darwinVersionInputs , cmake , ninja , perl @@ -22,7 +22,7 @@ stdenv.mkDerivation (args // { buildInputs = args.buildInputs or [ ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_qt ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin darwinVersionInputs; nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ moveBuildTree ]; propagatedBuildInputs = From 4e3c8f45a53fdbcccaf7bc250a7da50a14a21149 Mon Sep 17 00:00:00 2001 From: Emily Date: Sun, 3 Nov 2024 01:00:39 +0000 Subject: [PATCH 191/252] libsForQt5.*: consistently build with the macOS 13 SDK This was changed for `qtbase` in 3be309eff11e2eb677199997cb653b1358ccd5fd, but affects Qt WebEngine as well. --- pkgs/development/libraries/qt-5/modules/qtwebengine.nix | 5 ++--- pkgs/development/libraries/qt-5/qtModule.nix | 8 +++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index 18d9d7459feb..38ad37fc0364 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -20,7 +20,7 @@ , systemd , enableProprietaryCodecs ? true , gn -, apple-sdk_13, cctools, cups, bootstrap_cmds, xcbuild, writeScriptBin +, cctools, cups, bootstrap_cmds, xcbuild, writeScriptBin , ffmpeg ? null , lib, stdenv , version ? null @@ -51,8 +51,7 @@ let in -# Override the SDK because Qt WebEngine doesn’t seem to build using the 14.4 SDK. -(qtModule.override { apple-sdk_for_qt = apple-sdk_13; }) ({ +qtModule ({ pname = "qtwebengine"; nativeBuildInputs = [ bison flex git gperf ninja pkg-config (python.withPackages(ps: [ ps.html5lib ])) which gn nodejs diff --git a/pkgs/development/libraries/qt-5/qtModule.nix b/pkgs/development/libraries/qt-5/qtModule.nix index ee59ee76d9e9..10895ec07fd1 100644 --- a/pkgs/development/libraries/qt-5/qtModule.nix +++ b/pkgs/development/libraries/qt-5/qtModule.nix @@ -2,8 +2,8 @@ , stdenv , buildPackages , mkDerivation -, apple-sdk_14 -, apple-sdk_for_qt ? apple-sdk_14 +, apple-sdk_13 +, darwinMinVersionHook , perl , qmake , patches @@ -28,7 +28,9 @@ mkDerivation (args // { buildInputs = args.buildInputs or [ ] # Per https://doc.qt.io/qt-5/macos.html#supported-versions - ++ lib.optionals stdenv.isDarwin [ apple-sdk_for_qt ]; + ++ lib.optionals stdenv.isDarwin [ + apple-sdk_13 + ]; nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ From 8aaea3781cca59530315eafe70f3d65a03d72657 Mon Sep 17 00:00:00 2001 From: Emily Date: Sun, 3 Nov 2024 01:00:39 +0000 Subject: [PATCH 192/252] =?UTF-8?q?libsForQt5.*:=20don=E2=80=99t=20propaga?= =?UTF-8?q?te=20Darwin=20version=20inputs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../libraries/qt-5/modules/qtbase.nix | 20 ++++++++----------- pkgs/development/libraries/qt-5/qtModule.nix | 1 + 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 748d4d1e0386..eb3fc8af96d7 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -4,7 +4,7 @@ , coreutils, bison, flex, gdb, gperf, lndir, perl, pkg-config, python3 , which # darwin support -, darwinMinVersionHook, apple-sdk, apple-sdk_10_14, apple-sdk_13, xcbuild +, apple-sdk_13, darwinMinVersionHook, xcbuild , dbus, fontconfig, freetype, glib, harfbuzz, icu, libdrm, libX11, libXcomposite , libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng , libxcb @@ -41,12 +41,11 @@ let # Per https://doc.qt.io/qt-5/macos.html#supported-versions: deployment target = 10.13, build SDK = 13.x or 14.x. # Despite advertising support for the macOS 14 SDK, the build system sets the maximum to 13 and complains # about 14, so we just use that. - # Note that Qt propagates the 10.14 SDK instead of the 10.13 SDK to make sure that applications linked to Qt - # support automatic dark mode on x86_64-darwin (see: https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_macos_app). - propagatedAppleSDK = if lib.versionOlder (lib.getVersion apple-sdk) "10.14" then apple-sdk_10_14 else apple-sdk; deploymentTarget = "10.13"; - propagatedMinVersionHook = darwinMinVersionHook deploymentTarget; - buildAppleSDK = apple-sdk_13; + darwinVersionInputs = [ + apple-sdk_13 + (darwinMinVersionHook deploymentTarget) + ]; in stdenv.mkDerivation (finalAttrs: ({ @@ -63,11 +62,8 @@ stdenv.mkDerivation (finalAttrs: ({ # Image formats libjpeg libpng pcre2 - ] ++ ( - if stdenv.hostPlatform.isDarwin then [ - propagatedAppleSDK - propagatedMinVersionHook - ] else [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) ( + [ dbus glib udev # Text rendering @@ -87,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: ({ [ libinput ] ++ lib.optional withGtk3 gtk3 ) - ++ lib.optional stdenv.isDarwin buildAppleSDK + ++ lib.optional stdenv.isDarwin darwinVersionInputs ++ lib.optional developerBuild gdb ++ lib.optional (cups != null) cups ++ lib.optional (mysqlSupport) libmysqlclient diff --git a/pkgs/development/libraries/qt-5/qtModule.nix b/pkgs/development/libraries/qt-5/qtModule.nix index 10895ec07fd1..d3d810cbbf68 100644 --- a/pkgs/development/libraries/qt-5/qtModule.nix +++ b/pkgs/development/libraries/qt-5/qtModule.nix @@ -30,6 +30,7 @@ mkDerivation (args // { # Per https://doc.qt.io/qt-5/macos.html#supported-versions ++ lib.optionals stdenv.isDarwin [ apple-sdk_13 + (darwinMinVersionHook "10.13") ]; nativeBuildInputs = From fa8ce61acd0d057dd3859f9518d2545ecd1d52e8 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Thu, 31 Oct 2024 19:12:47 -0700 Subject: [PATCH 193/252] llvmPackages_19.compiler_rt: don't codesign The codesign binary is part of the bootstrapTools and is incompatible with the version required by the compiler_rt build. Remove find_program(.., codesign) from the cmake files to prevent the build from using and then breaking due to an incompatible codesign --- .../compilers/llvm/common/compiler-rt/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix index 9c634650dff2..30212e18bcaf 100644 --- a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix @@ -188,6 +188,13 @@ stdenv.mkDerivation ({ substituteInPlace ../libcxx/utils/merge_archives.py \ --replace-fail "import distutils.spawn" "from shutil import which as find_executable" \ --replace-fail "distutils.spawn." "" + '' + lib.optionalString (lib.versionAtLeast release_version "19") + # codesign in sigtool doesn't support the various options used by the build + # and is present in the bootstrap-tools. Removing find_program prevents the + # build from trying to use it and failing. + '' + substituteInPlace cmake/Modules/AddCompilerRT.cmake \ + --replace-fail 'find_program(CODESIGN codesign)' "" ''; # Hack around weird upsream RPATH bug From 0efe75ec20e0275a4b8de31aabd713613f56bfe7 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Thu, 31 Oct 2024 19:34:17 -0700 Subject: [PATCH 194/252] libffi: move label before .cfi_starproc after https://github.com/llvm/llvm-project/commit/0b0672773e8b2ed01ad3fce103f4d84becfdd1ed clang_19 will produce errors if the function label comes after .cfi_starproc. Vendor upstream commit https://github.com/libffi/libffi/commit/8308bed5b2423878aa20d7884a99cf2e30b8daf7 to fix the issue --- pkgs/development/libraries/libffi/default.nix | 3 ++ .../libffi/label-before-cfi_startproc.patch | 47 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/libraries/libffi/label-before-cfi_startproc.patch diff --git a/pkgs/development/libraries/libffi/default.nix b/pkgs/development/libraries/libffi/default.nix index 9293077b1aa7..021776ed3856 100644 --- a/pkgs/development/libraries/libffi/default.nix +++ b/pkgs/development/libraries/libffi/default.nix @@ -22,6 +22,9 @@ stdenv.mkDerivation (finalAttrs: { # cgit) that are needed here should be included directly in Nixpkgs as # files. patches = [ + # https://github.com/libffi/libffi/pull/857 + # function label needs to come before .cfi_startproc + ./label-before-cfi_startproc.patch ]; strictDeps = true; diff --git a/pkgs/development/libraries/libffi/label-before-cfi_startproc.patch b/pkgs/development/libraries/libffi/label-before-cfi_startproc.patch new file mode 100644 index 000000000000..379c670b4546 --- /dev/null +++ b/pkgs/development/libraries/libffi/label-before-cfi_startproc.patch @@ -0,0 +1,47 @@ +From 3065c530d3aa50c2b5ee9c01f88a9c0b61732805 Mon Sep 17 00:00:00 2001 +From: Ivan Tadeu Ferreira Antunes Filho +Date: Mon, 16 Sep 2024 16:10:39 -0400 +Subject: [PATCH] Move cfi_startproc after CNAME(label) + +This is a fix for https://github.com/libffi/libffi/issues/852: error: invalid CFI advance_loc expression on apple targets. + +The CFI for darwin arm64 was broken because the CNAME macro was being used after the +cfi_startproc macro. +--- + src/aarch64/sysv.S | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/aarch64/sysv.S b/src/aarch64/sysv.S +index 6a9a5611f..e83bc65de 100644 +--- a/src/aarch64/sysv.S ++++ b/src/aarch64/sysv.S +@@ -89,8 +89,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + x5 closure + */ + +- cfi_startproc + CNAME(ffi_call_SYSV): ++ cfi_startproc + BTI_C + PAC_CFI_WINDOW_SAVE + /* Sign the lr with x1 since that is the CFA which is the modifer used in auth instructions */ +@@ -348,8 +348,8 @@ CNAME(ffi_closure_SYSV_V): + #endif + + .align 4 +- cfi_startproc + CNAME(ffi_closure_SYSV): ++ cfi_startproc + BTI_C + SIGN_LR + PAC_CFI_WINDOW_SAVE +@@ -647,8 +647,8 @@ CNAME(ffi_go_closure_SYSV_V): + #endif + + .align 4 +- cfi_startproc + CNAME(ffi_go_closure_SYSV): ++ cfi_startproc + BTI_C + SIGN_LR_LINUX_ONLY + PAC_CFI_WINDOW_SAVE From f91487fa13dd5d5cd5ff95982e7c00cebb744f02 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Sat, 2 Nov 2024 00:08:21 -0700 Subject: [PATCH 195/252] ld64: fix build with llvm19 remove unused and incomplete function --- pkgs/by-name/ld/ld64/package.nix | 1 + .../remove-unused-and-incomplete-blob-clone.diff | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 pkgs/by-name/ld/ld64/remove-unused-and-incomplete-blob-clone.diff diff --git a/pkgs/by-name/ld/ld64/package.nix b/pkgs/by-name/ld/ld64/package.nix index d3dfe3b8b7e6..b050c2ac647b 100644 --- a/pkgs/by-name/ld/ld64/package.nix +++ b/pkgs/by-name/ld/ld64/package.nix @@ -128,6 +128,7 @@ stdenv.mkDerivation (finalAttrs: { ./0006-Add-libcd_is_blob_a_linker_signature-implementation.patch # Add OpenSSL implementation of CoreCrypto digest functions. Avoids use of private and non-free APIs. ./0007-Add-OpenSSL-based-CoreCrypto-digest-functions.patch + ./remove-unused-and-incomplete-blob-clone.diff ]; postPatch = '' diff --git a/pkgs/by-name/ld/ld64/remove-unused-and-incomplete-blob-clone.diff b/pkgs/by-name/ld/ld64/remove-unused-and-incomplete-blob-clone.diff new file mode 100644 index 000000000000..88dd4304f6f7 --- /dev/null +++ b/pkgs/by-name/ld/ld64/remove-unused-and-incomplete-blob-clone.diff @@ -0,0 +1,14 @@ +diff --git a/src/ld/code-sign-blobs/blob.h b/src/ld/code-sign-blobs/blob.h +index 19c63a9..1dfb380 100644 +--- a/src/ld/code-sign-blobs/blob.h ++++ b/src/ld/code-sign-blobs/blob.h +@@ -180,9 +180,6 @@ public: + return NULL; + } + +- BlobType *clone() const +- { assert(validateBlob()); return specific(this->BlobCore::clone()); } +- + static BlobType *readBlob(int fd) + { return specific(BlobCore::readBlob(fd, _magic, sizeof(BlobType), 0), true); } + From 0fc9787683e6fef5eaf1b6de5f1f2592c2ab0b19 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Sat, 2 Nov 2024 14:48:50 -0700 Subject: [PATCH 196/252] darwin.stdenv: add file to early stdenv stages file is part of the final stdenv and llvm_19 requires it for tests. add file to the path to the early stage stdenv's for the upcoming switch to llvm_19 --- pkgs/stdenv/darwin/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 60eca7f72de8..35ad94c41633 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -191,6 +191,7 @@ let shell = bash + "/bin/bash"; initialPath = [ bash + prevStage.file bootstrapTools ]; @@ -370,6 +371,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check ld64 = null; coreutils = null; + file = null; gnugrep = null; pbzx = null; @@ -416,6 +418,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check coreutils = bootstrapTools; cpio = bootstrapTools; + file = null; gnugrep = bootstrapTools; pbzx = bootstrapTools; From 1fb8dbc65a97ce88f6a23c09a8101fea41d0f2c6 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sun, 3 Nov 2024 03:24:58 +0100 Subject: [PATCH 197/252] libjpeg: drop freeimage from passthru tests --- pkgs/development/libraries/libjpeg-turbo/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index 7343dbcaaf4b..eb638d8c6e74 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -85,7 +85,6 @@ stdenv.mkDerivation (finalAttrs: { inherit dvgrab epeg - freeimage gd graphicsmagick imagemagick From 687371ab28358ca878a93f4ef4884bfecf0ac40c Mon Sep 17 00:00:00 2001 From: adisbladis Date: Sun, 3 Nov 2024 03:13:21 +0000 Subject: [PATCH 198/252] auto-patchelf: Don't use buildPythonApplication https://github.com/NixOS/nixpkgs/pull/340162 introduced `autoPatchelfHook` as it's own top-level attribute. This also made it use the Nixpkgs Python build infrastructure, which relies on dependency propagation, leaking Python as a dependency into many builds erroneously. This change uses a `withPackages` constructed environment instead, and manually patches the script shebangs, not triggering the `buildPython*` dependency propagation mechanism --- pkgs/by-name/au/auto-patchelf/package.nix | 27 ++++++++++++------- .../au/auto-patchelf/source/auto-patchelf.py | 5 +++- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/au/auto-patchelf/package.nix b/pkgs/by-name/au/auto-patchelf/package.nix index 5096c4fcf56a..adff3a5e40c0 100644 --- a/pkgs/by-name/au/auto-patchelf/package.nix +++ b/pkgs/by-name/au/auto-patchelf/package.nix @@ -1,18 +1,29 @@ { + stdenv, + python3, lib, - python3Packages, }: -python3Packages.buildPythonApplication { +let + pythonEnv = python3.withPackages (ps: [ ps.pyelftools ]); + +in +# Note: Not using python3Packages.buildPythonApplication because of dependency propagation. +stdenv.mkDerivation { pname = "auto-patchelf"; version = "0-unstable-2024-08-14"; - pyproject = false; + + buildInputs = [ pythonEnv ]; src = ./source; - dependencies = with python3Packages; [ - pyelftools - ]; + buildPhase = '' + runHook preBuild + + substituteInPlace auto-patchelf.py --replace-fail "@defaultBintools@" "$NIX_BINTOOLS" + + runHook postBuild + ''; installPhase = '' runHook preInstall @@ -22,10 +33,6 @@ python3Packages.buildPythonApplication { runHook postInstall ''; - makeWrapperArgs = [ - "--set DEFAULT_BINTOOLS $NIX_BINTOOLS" - ]; - meta = { description = "Automatically patch ELF binaries using patchelf"; mainProgram = "auto-patchelf"; diff --git a/pkgs/by-name/au/auto-patchelf/source/auto-patchelf.py b/pkgs/by-name/au/auto-patchelf/source/auto-patchelf.py index 938ea6310118..2a1090302ee9 100644 --- a/pkgs/by-name/au/auto-patchelf/source/auto-patchelf.py +++ b/pkgs/by-name/au/auto-patchelf/source/auto-patchelf.py @@ -21,6 +21,9 @@ from elftools.elf.elffile import ELFFile # type: ignore from elftools.elf.enums import ENUM_E_TYPE, ENUM_EI_OSABI # type: ignore +DEFAULT_BINTOOLS = "@defaultBintools@" + + @contextmanager def open_elf(path: Path) -> Iterator[ELFFile]: with path.open('rb') as stream: @@ -425,7 +428,7 @@ interpreter_arch: str = None # type: ignore libc_lib: Path = None # type: ignore if __name__ == "__main__": - nix_support = Path(os.environ.get('NIX_BINTOOLS', os.environ['DEFAULT_BINTOOLS'])) / 'nix-support' + nix_support = Path(os.environ.get('NIX_BINTOOLS', DEFAULT_BINTOOLS)) / 'nix-support' interpreter_path = Path((nix_support / 'dynamic-linker').read_text().strip()) libc_lib = Path((nix_support / 'orig-libc').read_text().strip()) / 'lib' From 285f0932e74da3f0536c7bf3f3673ec800d74857 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 31 Oct 2024 08:27:00 +0000 Subject: [PATCH 199/252] bubblewrap: 0.10.0 -> 0.11.0 --- pkgs/tools/admin/bubblewrap/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/admin/bubblewrap/default.nix b/pkgs/tools/admin/bubblewrap/default.nix index d45e0043e21f..e4a028cb5900 100644 --- a/pkgs/tools/admin/bubblewrap/default.nix +++ b/pkgs/tools/admin/bubblewrap/default.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation rec { pname = "bubblewrap"; - version = "0.10.0"; + version = "0.11.0"; src = fetchFromGitHub { owner = "containers"; repo = "bubblewrap"; rev = "v${version}"; - hash = "sha256-HYJoX7DnAwHCgxCzTYGJlc4RodbVP6hutK065AmGSl0="; + hash = "sha256-8IDMLQPeO576N1lizVudXUmTV6hNOiowjzRpEWBsZ+U="; }; postPatch = '' From d81b4fe176b1297e1d5aa75496fdcd6a52d235d1 Mon Sep 17 00:00:00 2001 From: Matteo Pacini Date: Sun, 3 Nov 2024 11:02:51 +0000 Subject: [PATCH 200/252] portaudio: use implicit apple-sdk pattern --- pkgs/development/libraries/portaudio/default.nix | 12 ++++-------- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/portaudio/default.nix b/pkgs/development/libraries/portaudio/default.nix index 9b06dea56b6b..e16562d85eb1 100644 --- a/pkgs/development/libraries/portaudio/default.nix +++ b/pkgs/development/libraries/portaudio/default.nix @@ -5,11 +5,7 @@ , libjack2 , pkg-config , which -, AudioUnit -, AudioToolbox -, CoreAudio -, CoreServices -, Carbon }: +}: stdenv.mkDerivation rec { pname = "portaudio"; @@ -22,14 +18,14 @@ stdenv.mkDerivation rec { strictDeps = true; nativeBuildInputs = [ pkg-config which ]; - buildInputs = [ libjack2 ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform alsa-lib) [ alsa-lib ]; + buildInputs = + [ libjack2 ] + ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform alsa-lib) [ alsa-lib ]; configureFlags = [ "--disable-mac-universal" "--enable-cxx" ]; env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=nullability-inferred-on-nested-type -Wno-error=nullability-completeness-on-arrays -Wno-error=implicit-const-int-float-conversion"; - propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AudioUnit AudioToolbox CoreAudio CoreServices Carbon ]; - # Disable parallel build as it fails as: # make: *** No rule to make target '../../../lib/libportaudio.la', # needed by 'libportaudiocpp.la'. Stop. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3c9b8b9567e7..d3bec8358ef8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22445,9 +22445,7 @@ with pkgs; popt = callPackage ../development/libraries/popt { }; - portaudio = callPackage ../development/libraries/portaudio { - inherit (darwin.apple_sdk.frameworks) AudioToolbox AudioUnit CoreAudio CoreServices Carbon; - }; + portaudio = callPackage ../development/libraries/portaudio { }; portmidi = callPackage ../development/libraries/portmidi { inherit (darwin.apple_sdk.frameworks) Carbon CoreAudio CoreFoundation CoreMIDI CoreServices; From e166c9bb94431551b3ac4c0674261144171e5775 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Fri, 1 Nov 2024 20:15:37 -0400 Subject: [PATCH 201/252] apple-sdk: only rewrite old SDK paths Rewriting SDK paths is only needed when a text-based stub is an umbrella framework that does not include the contents of the stubs for the libraries re-exported by the framework. This is only the case for older SDKs. Once macOS introduced the dyld cache (and removed system dylibs) in 11.0, all umbrella frameworks in the SDK include the contents of their re-exported stubs. While rewriting newer SDKs is mostly harmless, it breaks Zig, which tries to interpret the paths relative to the SDKROOT. --- pkgs/by-name/ap/apple-sdk/package.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ap/apple-sdk/package.nix b/pkgs/by-name/ap/apple-sdk/package.nix index 2fb57182001c..31017a6a9ae5 100644 --- a/pkgs/by-name/ap/apple-sdk/package.nix +++ b/pkgs/by-name/ap/apple-sdk/package.nix @@ -48,9 +48,13 @@ let (callPackage ./common/propagate-inputs.nix { }) (callPackage ./common/propagate-xcrun.nix { }) ] - ++ [ - # These have to happen last. + # Older SDKs do not include the libraries re-exported from umbrella frameworks in the umbrellas’ stubs, which causes + # link failures for those libraries unless their paths have been rewritten to point to the store. + ++ lib.optionals (lib.versionOlder sdkVersion "11.0") [ (callPackage ./common/rewrite-sdk-paths.nix { inherit sdkVersion; }) + ] + # This has to happen last. + ++ [ (callPackage ./common/run-build-phase-hooks.nix { }) ] ); From 19fd3f030da2876f86ffbd3d99f0b24b4a81ee14 Mon Sep 17 00:00:00 2001 From: Nicolas Benes Date: Sun, 3 Nov 2024 15:35:55 +0100 Subject: [PATCH 202/252] waf: 2.1.2 -> 2.1.3 https://gitlab.com/ita1024/waf/blob/waf-2.1.3/ChangeLog --- pkgs/by-name/wa/waf/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/wa/waf/package.nix b/pkgs/by-name/wa/waf/package.nix index 45ab6f7622db..75fb3d74c2a7 100644 --- a/pkgs/by-name/wa/waf/package.nix +++ b/pkgs/by-name/wa/waf/package.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "waf"; - version = "2.1.2"; + version = "2.1.3"; src = fetchFromGitLab { owner = "ita1024"; repo = "waf"; rev = "waf-${finalAttrs.version}"; - hash = "sha256-/7V+GA3YBhdaJkDlZ1k4IUYkgh0yuTG09G+frnnMoIw="; + hash = "sha256-7ujlE0brLFmET7tAy0/RTdDORUyr6keZ3OjvxBOC/BI="; }; nativeBuildInputs = [ @@ -70,7 +70,7 @@ stdenv.mkDerivation (finalAttrs: { meta = { homepage = "https://waf.io"; description = "Meta build system"; - changelog = "https://gitlab.com/ita1024/waf/blob/${finalAttrs.version}/ChangeLog"; + changelog = "https://gitlab.com/ita1024/waf/blob/waf-${finalAttrs.version}/ChangeLog"; license = lib.licenses.bsd3; mainProgram = "waf"; maintainers = with lib.maintainers; [ AndersonTorres ]; From 03524a85944df4da965439214cdde665cdf0ac0c Mon Sep 17 00:00:00 2001 From: Steven Keuchel Date: Sun, 3 Nov 2024 03:13:11 +0100 Subject: [PATCH 203/252] gssdp: fix cross compilation --- pkgs/development/libraries/gssdp/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gssdp/default.nix b/pkgs/development/libraries/gssdp/default.nix index e353edd59333..a838efc15a70 100644 --- a/pkgs/development/libraries/gssdp/default.nix +++ b/pkgs/development/libraries/gssdp/default.nix @@ -1,5 +1,6 @@ { stdenv , lib +, fetchpatch2 , fetchurl , meson , ninja @@ -21,13 +22,21 @@ stdenv.mkDerivation rec { version = "1.4.1"; outputs = [ "out" "dev" ] - ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ]; + ++ lib.optionals withIntrospection [ "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/gssdp/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; sha256 = "VySWVDV9PVGxQDFRaaJMBnHeeqUsb3XIxcmr1Ao1JSk="; }; + patches = [ + (fetchpatch2 { + # https://gitlab.gnome.org/GNOME/gssdp/-/merge_requests/11 + url = "https://gitlab.gnome.org/GNOME/gssdp/-/commit/db9d02c22005be7e5e81b43a3ab777250bd7b27b.diff"; + hash = "sha256-DJQrg6MhzpX8R0QaNnqdwA1+v8xncDU8jcX+I3scW1M="; + }) + ]; + strictDeps = true; depsBuildBuild = [ @@ -64,7 +73,7 @@ stdenv.mkDerivation rec { # Bail out! GLib-GIO-FATAL-CRITICAL: g_inet_address_to_string: assertion 'G_IS_INET_ADDRESS (address)' failed doCheck = !stdenv.hostPlatform.isDarwin; - postFixup = lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) '' + postFixup = lib.optionalString withIntrospection '' # Move developer documentation to devdoc output. # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. find -L "$out/share/doc" -type f -regex '.*\.devhelp2?' -print0 \ From a99d2b7d4fe9c5f12bd7d21f61aaa4f228bbc894 Mon Sep 17 00:00:00 2001 From: Anthony ROUSSEL Date: Thu, 12 Sep 2024 21:23:08 +0200 Subject: [PATCH 204/252] python312Packages.paste: use `pyproject = true` --- pkgs/development/python-modules/paste/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/paste/default.nix b/pkgs/development/python-modules/paste/default.nix index b7ac8fefb3a8..40a921726a67 100644 --- a/pkgs/development/python-modules/paste/default.nix +++ b/pkgs/development/python-modules/paste/default.nix @@ -11,12 +11,12 @@ buildPythonPackage rec { pname = "paste"; version = "3.10.1"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { - owner = "cdent"; + owner = "pasteorg"; repo = "paste"; rev = "refs/tags/${version}"; hash = "sha256-NY/h6hbpluEu1XAv3o4mqoG+l0LXfM1dw7+G0Rm1E4o="; @@ -26,7 +26,9 @@ buildPythonPackage rec { patchShebangs tests/cgiapp_data/ ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ setuptools six ]; @@ -43,7 +45,7 @@ buildPythonPackage rec { meta = with lib; { description = "Tools for using a Web Server Gateway Interface stack"; homepage = "https://pythonpaste.readthedocs.io/"; - changelog = "https://github.com/cdent/paste/blob/${version}/docs/news.txt"; + changelog = "https://github.com/pasteorg/paste/blob/${version}/docs/news.txt"; license = licenses.mit; maintainers = [ ]; }; From f9954062369e7426938a1bcb97ddaa354bbe47f1 Mon Sep 17 00:00:00 2001 From: Anthony ROUSSEL Date: Thu, 12 Sep 2024 21:24:28 +0200 Subject: [PATCH 205/252] python312Packages.pastedeploy: 3.0.1 -> 3.1 https://github.com/Pylons/pastedeploy/compare/3.0.1...3.1 --- .../python-modules/pastedeploy/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pastedeploy/default.nix b/pkgs/development/python-modules/pastedeploy/default.nix index a68134dfdc31..7d1eacb847e0 100644 --- a/pkgs/development/python-modules/pastedeploy/default.nix +++ b/pkgs/development/python-modules/pastedeploy/default.nix @@ -4,27 +4,30 @@ fetchFromGitHub, pytestCheckHook, pythonOlder, + setuptools, }: buildPythonPackage rec { pname = "pastedeploy"; - version = "3.0.1"; - format = "setuptools"; + version = "3.1"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "Pylons"; - repo = pname; + repo = "pastedeploy"; rev = "refs/tags/${version}"; hash = "sha256-8MNeOcYPEYAfghZN/K/1v/tAAdgz/fCvuVnBoru+81Q="; }; postPatch = '' substituteInPlace pytest.ini \ - --replace " --cov" "" + --replace-fail " --cov" "" ''; + build-system = [ setuptools ]; + nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "paste.deploy" ]; From 42f60c5c2a69f10b5be379ca1dd4b847020f16ef Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Wed, 30 Oct 2024 13:47:11 +0100 Subject: [PATCH 206/252] python3Packages.moto: add onny as maintainer --- pkgs/development/python-modules/moto/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/moto/default.nix b/pkgs/development/python-modules/moto/default.nix index 99a1f58beb1c..783898d7c88c 100644 --- a/pkgs/development/python-modules/moto/default.nix +++ b/pkgs/development/python-modules/moto/default.nix @@ -259,6 +259,6 @@ buildPythonPackage rec { homepage = "https://github.com/getmoto/moto"; changelog = "https://github.com/getmoto/moto/blob/${version}/CHANGELOG.md"; license = licenses.asl20; - maintainers = [ ]; + maintainers = with maintainers; [ onny ]; }; } From eb9cde0d3a9d5598459d77903da58c54ebfb9cf0 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Wed, 30 Oct 2024 13:47:53 +0100 Subject: [PATCH 207/252] python3Packages.moto: reformat --- pkgs/development/python-modules/moto/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/moto/default.nix b/pkgs/development/python-modules/moto/default.nix index 783898d7c88c..313624ea3e48 100644 --- a/pkgs/development/python-modules/moto/default.nix +++ b/pkgs/development/python-modules/moto/default.nix @@ -254,11 +254,11 @@ buildPythonPackage rec { "tests/test_cognitoidp/test_cognitoidp.py" ]; - meta = with lib; { - description = "Module to allow your tests to easily mock out AWS Services"; + meta = { + description = "Allows your tests to easily mock out AWS Services"; homepage = "https://github.com/getmoto/moto"; changelog = "https://github.com/getmoto/moto/blob/${version}/CHANGELOG.md"; - license = licenses.asl20; - maintainers = with maintainers; [ onny ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ onny ]; }; } From 583c82b1211b46c2e382cfcfd2d7d3940130d78c Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Wed, 30 Oct 2024 13:55:47 +0100 Subject: [PATCH 208/252] python3Packages.moto: 5.0.15 -> 5.0.18 --- pkgs/development/python-modules/moto/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/moto/default.nix b/pkgs/development/python-modules/moto/default.nix index 313624ea3e48..baad3e643030 100644 --- a/pkgs/development/python-modules/moto/default.nix +++ b/pkgs/development/python-modules/moto/default.nix @@ -37,14 +37,14 @@ buildPythonPackage rec { pname = "moto"; - version = "5.0.16"; + version = "5.0.18"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-9K+xdqlkzXpw2pvF4FPUMQlhTOPKsmBEvLtTYQQ13/Q="; + hash = "sha256-inrS9ToubMnbL/ZcDg1LXX54vAC4Jcnh/2zDlDceduk="; }; build-system = [ setuptools ]; From 18d48aa758d1109490e78139df7e6acc85bdc203 Mon Sep 17 00:00:00 2001 From: randomizedcoder Date: Sun, 3 Nov 2024 11:23:08 -0800 Subject: [PATCH 209/252] ffmpeg: add librist --- pkgs/development/libraries/ffmpeg/generic.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index f6f85b5b8e2a..9d765874e76c 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -101,6 +101,7 @@ , withQrencode ? withFullDeps && lib.versionAtLeast version "7" # QR encode generation , withQuirc ? withFullDeps && lib.versionAtLeast version "7" # QR decoding , withRav1e ? withFullDeps # AV1 encoder (focused on speed and safety) +, withRist ? withHeadlessDeps # Reliable Internet Stream Transport (RIST) protocol , withRtmp ? withFullDeps # RTMP[E] support , withRubberband ? withFullDeps && withGPL # Rubberband filter , withSamba ? withFullDeps && !stdenv.hostPlatform.isDarwin && withGPLv3 # Samba protocol @@ -276,6 +277,7 @@ , libplacebo_5 , libpulseaudio , libraw1394 +, librist , librsvg , libssh , libtensorflow @@ -642,6 +644,7 @@ stdenv.mkDerivation (finalAttrs: { (enableFeature withQuirc "libquirc") ] ++ [ (enableFeature withRav1e "librav1e") + (enableFeature withRist "librist") (enableFeature withRtmp "librtmp") (enableFeature withRubberband "librubberband") (enableFeature withSamba "libsmbclient") @@ -793,6 +796,7 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withQrencode [ qrencode ] ++ optionals withQuirc [ quirc ] ++ optionals withRav1e [ rav1e ] + ++ optionals withRist [ librist ] ++ optionals withRtmp [ rtmpdump ] ++ optionals withRubberband ([ rubberband ] ++ lib.optional stdenv.hostPlatform.isDarwin Accelerate) ++ optionals withSamba [ samba ] From 5a10946c77cdf0395f2bff82347a80199250fda0 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 4 Nov 2024 06:52:09 +0000 Subject: [PATCH 210/252] libvpx: 1.14.1 -> 1.15.0 Changes: https://chromium.googlesource.com/webm/libvpx/+/refs/tags/v1.15.0 --- pkgs/development/libraries/libvpx/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libvpx/default.nix b/pkgs/development/libraries/libvpx/default.nix index 4f6c91d65c71..4e6e6316d9ad 100644 --- a/pkgs/development/libraries/libvpx/default.nix +++ b/pkgs/development/libraries/libvpx/default.nix @@ -94,13 +94,13 @@ assert isCygwin -> unitTestsSupport && webmIOSupport && libyuvSupport; stdenv.mkDerivation rec { pname = "libvpx"; - version = "1.14.1"; + version = "1.15.0"; src = fetchFromGitHub { owner = "webmproject"; repo = pname; rev = "v${version}"; - hash = "sha256-Pfg7g4y/dqn2VKDQU1LnTJQSj1Tont9/8Je6ShDb2GQ="; + hash = "sha256-ewkx1okhpa05jn4DyN8pkl6UJoz4Ymw4jRe6GN1lWuA="; }; postPatch = '' From 9a023e536d952be7d83df05075a83abc4d0ec93b Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 4 Nov 2024 06:58:33 +0000 Subject: [PATCH 211/252] graphviz: 12.1.2 -> 12.2.0 Changes: https://gitlab.com/graphviz/graphviz/-/blob/12.2.0/CHANGELOG.md?ref_type=tags --- pkgs/tools/graphics/graphviz/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/graphics/graphviz/default.nix b/pkgs/tools/graphics/graphviz/default.nix index dbbe59e7468e..6baac4dc90d9 100644 --- a/pkgs/tools/graphics/graphviz/default.nix +++ b/pkgs/tools/graphics/graphviz/default.nix @@ -32,13 +32,13 @@ let in stdenv.mkDerivation rec { pname = "graphviz"; - version = "12.1.2"; + version = "12.2.0"; src = fetchFromGitLab { owner = "graphviz"; repo = "graphviz"; rev = version; - hash = "sha256-dRqGqnSGldr1Vb/wzR+jcuXCoAw35pTdm84wqJlA0mA="; + hash = "sha256-BSqCI9nIDjymPbCPWGFdWmqfyjuTkIsL1r0qv+Qjy10="; }; nativeBuildInputs = [ From e2210c0ebc861bd60710ea4008316297411d3d6a Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Sat, 27 Jan 2024 01:40:27 +0400 Subject: [PATCH 212/252] dhcpcd: 10.0.6 -> 10.1.0 This works around #291, halfway. --- pkgs/tools/networking/dhcpcd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/dhcpcd/default.nix b/pkgs/tools/networking/dhcpcd/default.nix index 5d5e4a0b32e2..2e0dbb90d63f 100644 --- a/pkgs/tools/networking/dhcpcd/default.nix +++ b/pkgs/tools/networking/dhcpcd/default.nix @@ -12,13 +12,13 @@ stdenv.mkDerivation rec { pname = "dhcpcd"; - version = "10.0.6"; + version = "10.1.0"; src = fetchFromGitHub { owner = "NetworkConfiguration"; repo = "dhcpcd"; rev = "v${version}"; - sha256 = "sha256-tNC5XCA8dShaTIff15mQz8v+YK9sZkRNLCX5qnlpxx4="; + sha256 = "sha256-Qtg9jOFMR/9oWJDmoNNcEAMxG6G1F187HF4MMBJIoTw="; }; nativeBuildInputs = [ pkg-config ]; From 5b136316aacadd0447dc24ba04c449d287ca8cea Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 31 Oct 2024 22:11:49 +0000 Subject: [PATCH 213/252] pkgsi686Linux.swtpm: pull upstream 64-bit file api fix Without the change the build of `pkgsi686Linux.swtpm` fails on filesystems with 64-bit inodes as: FAIL: test_parameters FAIL: test_swtpm_setup_file_backend FAIL: test_swtpm_setup_overwrite FAIL: test_tpm2_swtpm_setup_create_cert FAIL: test_tpm2_swtpm_setup_overwrite FAIL: test_swtpm_setup_create_cert FAIL: test_tpm2_parameters --- pkgs/tools/security/swtpm/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/tools/security/swtpm/default.nix b/pkgs/tools/security/swtpm/default.nix index 6b1bdb4c03ab..0332de516e8d 100644 --- a/pkgs/tools/security/swtpm/default.nix +++ b/pkgs/tools/security/swtpm/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , autoreconfHook , pkg-config , libtasn1, openssl, fuse, glib, libseccomp, json-glib @@ -25,6 +26,16 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-48/BOzGPoKr/BGEXFo3FXWr6ZoPB+ixZIvv78g6L294="; }; + patches = [ + # Enable 64-bit file API on 32-bit systems: + # https://github.com/stefanberger/swtpm/pull/941 + (fetchpatch { + name = "64-bit-file-api.patch"; + url = "https://github.com/stefanberger/swtpm/commit/599e2436d4f603ef7c83fad11d76b5546efabefc.patch"; + hash = "sha256-cS/BByOJeNNevQ1B3Ij1kykJwixVwGoikowx7j9gRmA="; + }) + ]; + nativeBuildInputs = [ pkg-config unixtools.netstat expect socat perl # for pod2man From bab7ef307cb11e2d2dc9b9ddf2d1de68f220ed45 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Tue, 10 Sep 2024 17:22:09 +0800 Subject: [PATCH 214/252] pythonImportsCheckHook: lint with ShellCheck --- .../python/hooks/python-imports-check-hook.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/python/hooks/python-imports-check-hook.sh b/pkgs/development/interpreters/python/hooks/python-imports-check-hook.sh index 2788a947fe95..c3c758d6a902 100644 --- a/pkgs/development/interpreters/python/hooks/python-imports-check-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-imports-check-hook.sh @@ -1,23 +1,28 @@ +# shellcheck shell=bash + # Setup hook for checking whether Python imports succeed echo "Sourcing python-imports-check-hook.sh" pythonImportsCheckPhase() { echo "Executing pythonImportsCheckPhase" - if [ -n "${pythonImportsCheck[*]-}" ]; then + if [[ -n "${pythonImportsCheck[*]-}" ]]; then echo "Check whether the following modules can be imported: ${pythonImportsCheck[*]}" # shellcheck disable=SC2154 pythonImportsCheckOutput="$out" - if [ -n "${python-}" ]; then + if [[ -n "${python-}" ]]; then echo "Using python specific output \$python for imports check" pythonImportsCheckOutput=$python fi export PYTHONPATH="$pythonImportsCheckOutput/@pythonSitePackages@:$PYTHONPATH" + # Python modules and namespaces names are Python identifiers, which must not contain spaces. + # See https://docs.python.org/3/reference/lexical_analysis.html + # shellcheck disable=SC2048,SC2086 (cd "$pythonImportsCheckOutput" && @pythonCheckInterpreter@ -c 'import sys; import importlib; list(map(lambda mod: importlib.import_module(mod), sys.argv[1:]))' ${pythonImportsCheck[*]}) fi } -if [ -z "${dontUsePythonImportsCheck-}" ]; then +if [[ -z "${dontUsePythonImportsCheck-}" ]]; then echo "Using pythonImportsCheckPhase" appendToVar preDistPhases pythonImportsCheckPhase fi From ccb418b69938ebdac9337baa9cdceeb43b3497cd Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Mon, 7 Oct 2024 07:42:31 +0800 Subject: [PATCH 215/252] pythonNamespacesHook: lint with ShellCheck --- .../python/hooks/python-namespaces-hook.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/development/interpreters/python/hooks/python-namespaces-hook.sh b/pkgs/development/interpreters/python/hooks/python-namespaces-hook.sh index 5c5b840e05c3..add56f5b6413 100644 --- a/pkgs/development/interpreters/python/hooks/python-namespaces-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-namespaces-hook.sh @@ -1,20 +1,26 @@ # Clean up __init__.py's found in namespace directories +# shellcheck shell=bash + echo "Sourcing python-namespaces-hook" pythonNamespacesHook() { echo "Executing pythonNamespacesHook" - for namespace in ${pythonNamespaces[@]}; do + # Python namespaces names are Python identifiers, which must not contain spaces. + # See https://docs.python.org/3/reference/lexical_analysis.html + # shellcheck disable=SC2048 + for namespace in ${pythonNamespaces[*]-}; do echo "Enforcing PEP420 namespace: ${namespace}" # split namespace into segments. "azure.mgmt" -> "azure mgmt" - IFS='.' read -ra pathSegments <<<$namespace + IFS='.' read -ra pathSegments <<<"$namespace" + # shellcheck disable=SC2154 constructedPath=$out/@pythonSitePackages@ # Need to remove the __init__.py at each namespace level # E.g `azure/__init__.py` and `azure/mgmt/__init__.py` # The __pycache__ entry also needs to be removed - for pathSegment in ${pathSegments[@]}; do + for pathSegment in "${pathSegments[@]}"; do constructedPath=${constructedPath}/${pathSegment} pathToRemove=${constructedPath}/__init__.py pycachePath=${constructedPath}/__pycache__/ @@ -30,9 +36,9 @@ pythonNamespacesHook() { # event of a "meta-package" package, which will just install # other packages, but not produce anything in site-packages # besides meta information - if [ -d "${constructedPath}/../" -a -z ${dontRemovePth-} ]; then + if [[ -d "${constructedPath}/../" ]] && [[ -z "${dontRemovePth-}" ]]; then # .pth files are located in the parent directory of a module - @findutils@/bin/find ${constructedPath}/../ -name '*-nspkg.pth' -exec rm -v "{}" + + @findutils@/bin/find "${constructedPath}/../" -name '*-nspkg.pth' -exec rm -v "{}" + fi # remove __pycache__/ entry, can be interpreter specific. E.g. __init__.cpython-38.pyc @@ -46,6 +52,6 @@ pythonNamespacesHook() { echo "Finished executing pythonNamespacesHook" } -if [ -z "${dontUsePythonNamespacesHook-}" -a -n "${pythonNamespaces-}" ]; then +if [[ -z "${dontUsePythonNamespacesHook-}" ]] && [[ -n "${pythonNamespaces-}" ]]; then postFixupHooks+=(pythonNamespacesHook) fi From e4f2f9dd22db433d54c9c3e25fc6cee6c3471d09 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Mon, 7 Oct 2024 07:46:08 +0800 Subject: [PATCH 216/252] pythonOutputDistHook: lint with ShellCheck --- .../interpreters/python/hooks/python-output-dist-hook.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/interpreters/python/hooks/python-output-dist-hook.sh b/pkgs/development/interpreters/python/hooks/python-output-dist-hook.sh index 8e4a15dc277f..be54b546cadb 100644 --- a/pkgs/development/interpreters/python/hooks/python-output-dist-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-output-dist-hook.sh @@ -1,9 +1,12 @@ # Setup hook for storing dist folder (wheels/sdists) in a separate output +# shellcheck shell=bash + echo "Sourcing python-catch-conflicts-hook.sh" pythonOutputDistPhase() { echo "Executing pythonOutputDistPhase" if [[ -d dist ]]; then + # shellcheck disable=SC2154 mv "dist" "$dist" else cat >&2 < Date: Mon, 7 Oct 2024 07:58:17 +0800 Subject: [PATCH 217/252] pythonRelaxDepsHook: handle attributes `__structuredAttrs`-agnostically Make the interation across pythonRelaxDeps and pythonRemoveDeps work regardless of __structuredAttrs. --- .../interpreters/python/hooks/python-relax-deps-hook.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh b/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh index 7da5c0b0ac27..cccb49313469 100644 --- a/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh @@ -42,13 +42,13 @@ _pythonRelaxDeps() { local -r metadata_file="$1" - if [[ -z "${pythonRelaxDeps:-}" ]] || [[ "$pythonRelaxDeps" == 0 ]]; then + if [[ -z "${pythonRelaxDeps[*]-}" ]] || [[ "$pythonRelaxDeps" == 0 ]]; then return elif [[ "$pythonRelaxDeps" == 1 ]]; then sed -i "$metadata_file" -r \ -e 's/(Requires-Dist: [a-zA-Z0-9_.-]+\s*(\[[^]]+\])?)[^;]*(;.*)?/\1\3/' else - for dep in $pythonRelaxDeps; do + for dep in ${pythonRelaxDeps[*]}; do sed -i "$metadata_file" -r \ -e "s/(Requires-Dist: $dep\s*(\[[^]]+\])?)[^;]*(;.*)?/\1\3/i" done @@ -58,13 +58,13 @@ _pythonRelaxDeps() { _pythonRemoveDeps() { local -r metadata_file="$1" - if [[ -z "${pythonRemoveDeps:-}" ]] || [[ "$pythonRemoveDeps" == 0 ]]; then + 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 + for dep in ${pythonRemoveDeps[*]-}; do sed -i "$metadata_file" \ -e "/Requires-Dist: $dep/d" done From 29c08adae171f1c273a0a15c00068205a9965bf2 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Mon, 7 Oct 2024 08:07:09 +0800 Subject: [PATCH 218/252] pythonRelaxDepsHook: lint with ShellCheck Ignore SC2164 at this moment, as it will be gone when adding `set -e`. --- .../interpreters/python/hooks/python-relax-deps-hook.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh b/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh index cccb49313469..9b5bd6f37ca9 100644 --- a/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh @@ -48,6 +48,7 @@ _pythonRelaxDeps() { sed -i "$metadata_file" -r \ -e 's/(Requires-Dist: [a-zA-Z0-9_.-]+\s*(\[[^]]+\])?)[^;]*(;.*)?/\1\3/' else + # shellcheck disable=SC2048 for dep in ${pythonRelaxDeps[*]}; do sed -i "$metadata_file" -r \ -e "s/(Requires-Dist: $dep\s*(\[[^]]+\])?)[^;]*(;.*)?/\1\3/i" @@ -64,6 +65,7 @@ _pythonRemoveDeps() { sed -i "$metadata_file" \ -e '/Requires-Dist:.*/d' else + # shellcheck disable=SC2048 for dep in ${pythonRemoveDeps[*]-}; do sed -i "$metadata_file" \ -e "/Requires-Dist: $dep/d" @@ -86,11 +88,14 @@ pythonRelaxDepsHook() { rm -rf "$wheel" # Using no quotes on purpose since we need to expand the glob from `$metadata_file` + # shellcheck disable=SC2086 _pythonRelaxDeps $metadata_file + # shellcheck disable=SC2086 _pythonRemoveDeps $metadata_file if (("${NIX_DEBUG:-0}" >= 1)); then echo "pythonRelaxDepsHook: resulting METADATA for '$wheel':" + # shellcheck disable=SC2086 cat $metadata_file fi From 65293f424779e4df5d892e955dd03cf8d0ed84b0 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Mon, 7 Oct 2024 08:15:32 +0800 Subject: [PATCH 219/252] pythonRemoveTestDirHook: lint with ShellCheck --- .../python/hooks/python-remove-tests-dir-hook.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/python/hooks/python-remove-tests-dir-hook.sh b/pkgs/development/interpreters/python/hooks/python-remove-tests-dir-hook.sh index ad9e3c07cf24..43c991b74469 100644 --- a/pkgs/development/interpreters/python/hooks/python-remove-tests-dir-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-remove-tests-dir-hook.sh @@ -1,11 +1,14 @@ # Clean up top-level tests directory in site-package installation. +# shellcheck shell=bash + echo "Sourcing python-remove-tests-dir-hook" pythonRemoveTestsDir() { echo "Executing pythonRemoveTestsDir" - rm -rf $out/@pythonSitePackages@/tests - rm -rf $out/@pythonSitePackages@/test + # shellcheck disable=SC2154 + rm -rf "$out/@pythonSitePackages@/tests" + rm -rf "$out/@pythonSitePackages@/test" echo "Finished executing pythonRemoveTestsDir" } From e32457af0c9de65a4d3f57afd8b4c238da65d07a Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Mon, 28 Oct 2024 03:54:02 +0800 Subject: [PATCH 220/252] setuptoolsRustHook: lint with ShellCheck --- .../interpreters/python/hooks/setuptools-rust-hook.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/interpreters/python/hooks/setuptools-rust-hook.sh b/pkgs/development/interpreters/python/hooks/setuptools-rust-hook.sh index 917c19ef9b31..5a0916f8acc4 100644 --- a/pkgs/development/interpreters/python/hooks/setuptools-rust-hook.sh +++ b/pkgs/development/interpreters/python/hooks/setuptools-rust-hook.sh @@ -1,3 +1,5 @@ +# shellcheck shell=bash + echo "Sourcing setuptools-rust-hook" setuptoolsRustSetup() { From 6597b74fea10a79f09ef3fbcf02620e238992845 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Tue, 29 Oct 2024 15:02:27 +0800 Subject: [PATCH 221/252] pypaBuildHook.tests: modernize --- .../interpreters/python/hooks/pypa-build-hook-test.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/interpreters/python/hooks/pypa-build-hook-test.nix b/pkgs/development/interpreters/python/hooks/pypa-build-hook-test.nix index 4153c21ca4f9..f862429d3987 100644 --- a/pkgs/development/interpreters/python/hooks/pypa-build-hook-test.nix +++ b/pkgs/development/interpreters/python/hooks/pypa-build-hook-test.nix @@ -10,9 +10,9 @@ ''; # the source of the example project projectSource = runCommand "my-project-source" {} '' - mkdir -p $out/src + mkdir -p $out/src/my_project cp ${pyprojectToml} $out/pyproject.toml - touch $out/src/__init__.py + touch $out/src/my_project/__init__.py ''; in # this build must never triger conflicts @@ -20,11 +20,13 @@ pname = "dont-propagate-conflicting-deps"; version = "0.0.0"; src = projectSource; - format = "pyproject"; - propagatedBuildInputs = [ + pyproject = true; + dependencies = [ # At least one dependency of `build` should be included here to # keep the test meaningful (mkConflict pythonOnBuildForHost.pkgs.tomli) + ]; + build-system = [ # setuptools is also needed to build the example project pythonOnBuildForHost.pkgs.setuptools ]; From b048be052ccff215e125b9fbef825f296dcbe599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 5 Nov 2024 08:11:12 +0100 Subject: [PATCH 222/252] Reapply "less: Fix withSecure regression" This reverts commit 6df0b10df6903be10245355ef35dd8435084bd95. This change was originally merged as PR #352298 but it got moved to staging here. --- pkgs/by-name/le/less/package.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkgs/by-name/le/less/package.nix b/pkgs/by-name/le/less/package.nix index ba57f5460ccd..452944aa9a75 100644 --- a/pkgs/by-name/le/less/package.nix +++ b/pkgs/by-name/le/less/package.nix @@ -1,6 +1,8 @@ { lib, fetchurl, + fetchpatch, + autoreconfHook, ncurses, pcre2, stdenv, @@ -22,6 +24,23 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-KBn1VWTYbVQqu+yv2C/2HoGaPuyWf6o2zT5o8VlqRLg="; }; + patches = [ + (fetchpatch { + # Fix configure parameters --with-secure=no and --without-secure. + url = "https://github.com/gwsw/less/commit/8fff6c56bfc833528b31ebdaee871f65fbe342b1.patch"; + hash = "sha256-XV5XufivNWWLGeIpaP04YQPWcxIUKYYEINdT+eEx+WA="; + includes = [ + "configure.ac" + ]; + }) + ]; + + # Need `autoreconfHook` since we patch `configure.ac`. + # TODO: Remove the `configure.ac` patch and `autoreconfHook` next release + nativeBuildInputs = [ + autoreconfHook + ]; + buildInputs = [ ncurses pcre2 From 7d1abc0fc5a6c07c1b8942f92c377a016be34174 Mon Sep 17 00:00:00 2001 From: Matteo Pacini Date: Tue, 5 Nov 2024 11:00:12 +0000 Subject: [PATCH 223/252] musescore: apple-sdk migration, removed portaudio override --- pkgs/applications/audio/musescore/default.nix | 22 ++++--------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/pkgs/applications/audio/musescore/default.nix b/pkgs/applications/audio/musescore/default.nix index 6f28bf98a1b1..100034b998e4 100644 --- a/pkgs/applications/audio/musescore/default.nix +++ b/pkgs/applications/audio/musescore/default.nix @@ -31,24 +31,10 @@ , qtnetworkauth , qttools , nixosTests -, darwin +, apple-sdk_11 }: -let - stdenv' = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; - # portaudio propagates Darwin frameworks. Rebuild it using the 11.0 stdenv - # from Qt and the 11.0 SDK frameworks. - portaudio' = if stdenv.hostPlatform.isDarwin then portaudio.override { - stdenv = stdenv'; - inherit (darwin.apple_sdk_11_0.frameworks) - AudioUnit - AudioToolbox - CoreAudio - CoreServices - Carbon - ; - } else portaudio; -in stdenv'.mkDerivation (finalAttrs: { +stdenv.mkDerivation (finalAttrs: { pname = "musescore"; version = "4.4.2"; @@ -129,7 +115,7 @@ in stdenv'.mkDerivation (finalAttrs: { libpulseaudio libsndfile libvorbis - portaudio' + portaudio portmidi flac libopusenc @@ -145,7 +131,7 @@ in stdenv'.mkDerivation (finalAttrs: { alsa-lib qtwayland ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.apple_sdk_11_0.frameworks.Cocoa + apple-sdk_11 ]; postInstall = '' From c8df66973b396186ced7e81f0dd3e475bf77d3b8 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 3 Nov 2024 12:11:35 -0500 Subject: [PATCH 224/252] xcbuild: look in system toolchain for binaries on `/usr/bin` Dropping `/usr/bin` from the search path of `xcrun` breaks running system binaries from dev shells. This approach looks them up while avoiding the recursive `xcrun` issue. --- pkgs/by-name/xc/xcbuild/package.nix | 4 +- .../Use-system-toolchain-for-usr-bin.patch | 80 +++++++++++++++++++ 2 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 pkgs/by-name/xc/xcbuild/patches/Use-system-toolchain-for-usr-bin.patch diff --git a/pkgs/by-name/xc/xcbuild/package.nix b/pkgs/by-name/xc/xcbuild/package.nix index 7b574aa91994..8b8571d4a039 100644 --- a/pkgs/by-name/xc/xcbuild/package.nix +++ b/pkgs/by-name/xc/xcbuild/package.nix @@ -80,8 +80,8 @@ stdenv.mkDerivation (finalAttrs: { patches = [ # Add missing header for `abort` ./patches/includes.patch - # Prevent xcrun from recursively invoking itself - ./patches/Avoid-fork-bomb-when-searching-system-paths.patch + # Prevent xcrun from recursively invoking itself but still find native toolchain binaries + ./patches/Use-system-toolchain-for-usr-bin.patch ]; prePatch = '' diff --git a/pkgs/by-name/xc/xcbuild/patches/Use-system-toolchain-for-usr-bin.patch b/pkgs/by-name/xc/xcbuild/patches/Use-system-toolchain-for-usr-bin.patch new file mode 100644 index 000000000000..9e8314235709 --- /dev/null +++ b/pkgs/by-name/xc/xcbuild/patches/Use-system-toolchain-for-usr-bin.patch @@ -0,0 +1,80 @@ +diff --git a/Libraries/xcsdk/Tools/xcrun.cpp b/Libraries/xcsdk/Tools/xcrun.cpp +index 9d6d4576d7..73aabc3d42 100644 +--- a/Libraries/xcsdk/Tools/xcrun.cpp ++++ b/Libraries/xcsdk/Tools/xcrun.cpp +@@ -23,10 +23,14 @@ + #include + #include + ++#include ++ + using libutil::DefaultFilesystem; + using libutil::Filesystem; + using libutil::FSUtil; + ++#define SYSTEM_DEVELOPER_DIR "/private/var/select/developer_dir" ++ + class Options { + private: + ext::optional _help; +@@ -398,6 +402,8 @@ + fprintf(stderr, "\n"); + } + ++ std::unordered_map environment = processContext->environmentVariables(); ++ + /* + * Collect search paths for the tool. + * Can be in toolchains, target (if one is provided), developer root, +@@ -408,10 +414,42 @@ + executablePaths.insert(executablePaths.end(), defaultExecutablePaths.begin(), defaultExecutablePaths.end()); + + /* ++ * Remove `/usr/bin` from the search paths to avoid infinite recursions from stubs that try to invoke `xcrun`. ++ */ ++ const auto originalSize = executablePaths.size(); ++ auto result = executablePaths.erase( ++ std::remove(executablePaths.begin(), executablePaths.end(), "/usr/bin"), ++ executablePaths.end() ++ ); ++ ++ /* + * Find the tool to execute. + */ + ext::optional executable = filesystem->findExecutable(*options.tool(), executablePaths); + if (!executable) { ++ /* ++ * However, check for the system developer dir and look there if the binaries can’t be found in the store. ++ * This is done only if a binary is not found in the store to ensure those always take priority. ++ * Fixes https://github.com/NixOS/nixpkgs/issues/353875. ++ */ ++ std::vector toolchainPaths = { }; ++ if (executablePaths.size() < originalSize && filesystem->exists(SYSTEM_DEVELOPER_DIR)) { ++ auto linkTarget = filesystem->readSymbolicLinkCanonical(SYSTEM_DEVELOPER_DIR); ++ if (linkTarget) { ++ auto usrBinPath = FSUtil::NormalizePath(*linkTarget + "/usr/bin"); ++ if (filesystem->exists(usrBinPath)) { ++ toolchainPaths.push_back(usrBinPath); ++ } ++ auto toolchainUsrBinPath = FSUtil::NormalizePath(*linkTarget + "/Toolchains/XcodeDefault.xctoolchain/usr/bin"); ++ if (filesystem->exists(toolchainUsrBinPath)) { ++ toolchainPaths.push_back(toolchainUsrBinPath); ++ } ++ } ++ } ++ executable = filesystem->findExecutable(*options.tool(), toolchainPaths); ++ } ++ ++ if (!executable) { + fprintf(stderr, "error: tool '%s' not found\n", options.tool()->c_str()); + return 1; + } +@@ -428,8 +466,6 @@ + } else { + /* Run is the default. */ + +- std::unordered_map environment = processContext->environmentVariables(); +- + if (target != nullptr) { + /* + * Update effective environment to include the target path. From 7ae8a1e519de8d316830a73f119c2e19234d7a58 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 3 Nov 2024 12:11:35 -0500 Subject: [PATCH 225/252] xcbuild: suppress warnings for unknown keys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Newer SDKs have keys that xcbuild doesn’t recognize. These warnings generate a lot of noise, especially when `xcrun` is used in an interactive session, so suppress them. --- pkgs/by-name/xc/xcbuild/package.nix | 2 + ...ork-bomb-when-searching-system-paths.patch | 47 ------------------- .../Suppress-unknown-key-warnings.patch | 26 ++++++++++ 3 files changed, 28 insertions(+), 47 deletions(-) delete mode 100644 pkgs/by-name/xc/xcbuild/patches/Avoid-fork-bomb-when-searching-system-paths.patch create mode 100644 pkgs/by-name/xc/xcbuild/patches/Suppress-unknown-key-warnings.patch diff --git a/pkgs/by-name/xc/xcbuild/package.nix b/pkgs/by-name/xc/xcbuild/package.nix index 8b8571d4a039..fc5e79830664 100644 --- a/pkgs/by-name/xc/xcbuild/package.nix +++ b/pkgs/by-name/xc/xcbuild/package.nix @@ -82,6 +82,8 @@ stdenv.mkDerivation (finalAttrs: { ./patches/includes.patch # Prevent xcrun from recursively invoking itself but still find native toolchain binaries ./patches/Use-system-toolchain-for-usr-bin.patch + # Suppress warnings due to newer SDKs with unknown keys + ./patches/Suppress-unknown-key-warnings.patch ]; prePatch = '' diff --git a/pkgs/by-name/xc/xcbuild/patches/Avoid-fork-bomb-when-searching-system-paths.patch b/pkgs/by-name/xc/xcbuild/patches/Avoid-fork-bomb-when-searching-system-paths.patch deleted file mode 100644 index bad8621e4b8c..000000000000 --- a/pkgs/by-name/xc/xcbuild/patches/Avoid-fork-bomb-when-searching-system-paths.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/Libraries/xcsdk/Tools/xcrun.cpp b/Libraries/xcsdk/Tools/xcrun.cpp -index 9d6d4576d7..7400267c2b 100644 ---- a/Libraries/xcsdk/Tools/xcrun.cpp -+++ b/Libraries/xcsdk/Tools/xcrun.cpp -@@ -23,6 +23,8 @@ - #include - #include - -+#include -+ - using libutil::DefaultFilesystem; - using libutil::Filesystem; - using libutil::FSUtil; -@@ -398,6 +400,8 @@ - fprintf(stderr, "\n"); - } - -+ std::unordered_map environment = processContext->environmentVariables(); -+ - /* - * Collect search paths for the tool. - * Can be in toolchains, target (if one is provided), developer root, -@@ -408,6 +412,15 @@ - executablePaths.insert(executablePaths.end(), defaultExecutablePaths.begin(), defaultExecutablePaths.end()); - - /* -+ * Don’t look for tools in `/usr/bin` because it can cause an infinite recursion when `xcrun` finds a shim -+ * that tries to invoke `xcrun` to run the tool. -+ */ -+ executablePaths.erase( -+ std::remove(executablePaths.begin(), executablePaths.end(), "/usr/bin"), -+ executablePaths.end() -+ ); -+ -+ /* - * Find the tool to execute. - */ - ext::optional executable = filesystem->findExecutable(*options.tool(), executablePaths); -@@ -428,8 +441,6 @@ - } else { - /* Run is the default. */ - -- std::unordered_map environment = processContext->environmentVariables(); -- - if (target != nullptr) { - /* - * Update effective environment to include the target path. diff --git a/pkgs/by-name/xc/xcbuild/patches/Suppress-unknown-key-warnings.patch b/pkgs/by-name/xc/xcbuild/patches/Suppress-unknown-key-warnings.patch new file mode 100644 index 000000000000..c101e9ca722e --- /dev/null +++ b/pkgs/by-name/xc/xcbuild/patches/Suppress-unknown-key-warnings.patch @@ -0,0 +1,26 @@ +diff --git a/Libraries/xcsdk/Sources/SDK/Product.cpp b/Libraries/xcsdk/Sources/SDK/Product.cpp +index f291d475c7..bc339f567c 100644 +--- a/Libraries/xcsdk/Sources/SDK/Product.cpp ++++ b/Libraries/xcsdk/Sources/SDK/Product.cpp +@@ -33,7 +33,7 @@ + auto PBV = unpack.cast ("ProductBuildVersion"); + auto PC = unpack.cast ("ProductCopyright"); + +- if (!unpack.complete(true)) { ++ if (!unpack.complete(false)) { + fprintf(stderr, "%s", unpack.errorText().c_str()); + } + +diff --git a/Libraries/xcsdk/Sources/SDK/Target.cpp b/Libraries/xcsdk/Sources/SDK/Target.cpp +index 523c1e4cbd..2197b1d6d1 100644 +--- a/Libraries/xcsdk/Sources/SDK/Target.cpp ++++ b/Libraries/xcsdk/Sources/SDK/Target.cpp +@@ -86,7 +86,7 @@ + /* Ignored: seems to be a typo. */ + (void)unpack.cast ("isBaseSDK"); + +- if (!unpack.complete(true)) { ++ if (!unpack.complete(false)) { + fprintf(stderr, "%s", unpack.errorText().c_str()); + } + From 17cc7a6f16065d96d3352aea749154ee401b53e3 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 6 Nov 2024 00:52:44 +0000 Subject: [PATCH 226/252] darwin.libutil: use bootstrap SDK --- .../darwin/apple-source-releases/libutil/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/apple-source-releases/libutil/package.nix b/pkgs/os-specific/darwin/apple-source-releases/libutil/package.nix index c783b1edfe56..95f35054e026 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libutil/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libutil/package.nix @@ -21,7 +21,7 @@ mkAppleDerivation { ]; buildInputs = [ - apple-sdk_14 + (apple-sdk_14.override { enableBootstrap = true; }) copyfile ]; From 877e3454bb9ffa10287f068742d05159c14b4574 Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 5 Nov 2024 17:13:16 +0000 Subject: [PATCH 227/252] apple-sdk: propagate the `darwin.libutil` library The SDK provides this without headers and apparently some things try to link to it. This should help increase compatibility with the native toolchain. --- pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix b/pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix index f4d80eed0b49..668ac586cb01 100644 --- a/pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix +++ b/pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix @@ -54,6 +54,8 @@ self: super: { libiconv darwin.libresolv darwin.libsbuf + # Shipped with the SDK only as a library with no headers + (lib.getLib darwin.libutil) # Required by some SDK headers cupsHeaders ] From ee802060b85f8e7d82af36de60a21320c9ec50a9 Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 5 Nov 2024 23:08:57 +0000 Subject: [PATCH 228/252] neovim-unwrapped: drop `darwin.libutil` dependency --- pkgs/by-name/ne/neovim-unwrapped/package.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/by-name/ne/neovim-unwrapped/package.nix b/pkgs/by-name/ne/neovim-unwrapped/package.nix index 46d941a4e40b..fb185d85f646 100644 --- a/pkgs/by-name/ne/neovim-unwrapped/package.nix +++ b/pkgs/by-name/ne/neovim-unwrapped/package.nix @@ -6,7 +6,6 @@ cmake, gettext, msgpack-c, - darwin, libuv, lua, pkg-config, @@ -145,7 +144,6 @@ stdenv.mkDerivation ( tree-sitter unibilium ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libutil ] ++ lib.optionals finalAttrs.finalPackage.doCheck [ glibcLocales procps From 22f2052ca1e7b7cfb4b090faa2d924c3e27e4742 Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 5 Nov 2024 23:11:31 +0000 Subject: [PATCH 229/252] python{27,39,310,311,312,313,314}: drop Darwin `libutil` patch --- .../python/cpython/2.7/default.nix | 4 ---- .../python/cpython/3.11/darwin-libutil.patch | 13 ----------- .../python/cpython/3.7/darwin-libutil.patch | 23 ------------------- .../interpreters/python/cpython/default.nix | 5 ---- 4 files changed, 45 deletions(-) delete mode 100644 pkgs/development/interpreters/python/cpython/3.11/darwin-libutil.patch delete mode 100644 pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 0d2ebd009731..7e926d682810 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -140,10 +140,6 @@ let ] ++ lib.optionals (x11Support && stdenv.hostPlatform.isDarwin) [ ./use-correct-tcl-tk-on-darwin.patch - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - # Fix darwin build https://bugs.python.org/issue34027 - ../3.7/darwin-libutil.patch - ] ++ lib.optionals stdenv.hostPlatform.isLinux [ # Disable the use of ldconfig in ctypes.util.find_library (since diff --git a/pkgs/development/interpreters/python/cpython/3.11/darwin-libutil.patch b/pkgs/development/interpreters/python/cpython/3.11/darwin-libutil.patch deleted file mode 100644 index 92b846be0002..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.11/darwin-libutil.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c -index 40229bce0f..3cc604930e 100644 ---- a/Modules/posixmodule.c -+++ b/Modules/posixmodule.c -@@ -7258,7 +7258,7 @@ os_sched_getaffinity_impl(PyObject *module, pid_t pid) - #ifdef HAVE_UTMP_H - #include - #endif /* HAVE_UTMP_H */ --#elif defined(HAVE_LIBUTIL_H) -+#elif defined(HAVE_LIBUTIL_H) && !defined(__APPLE__) - #include - #elif defined(HAVE_UTIL_H) - #include diff --git a/pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch b/pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch deleted file mode 100644 index 51e3cb6d7f11..000000000000 --- a/pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c -index c3682b4..16826c6 100644 ---- a/Modules/posixmodule.c -+++ b/Modules/posixmodule.c -@@ -5880,15 +5880,13 @@ error: - #if defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) || defined(HAVE_DEV_PTMX) - #ifdef HAVE_PTY_H - #include --#else -+#endif - #ifdef HAVE_LIBUTIL_H - #include --#else -+#endif - #ifdef HAVE_UTIL_H - #include --#endif /* HAVE_UTIL_H */ --#endif /* HAVE_LIBUTIL_H */ --#endif /* HAVE_PTY_H */ -+#endif - #ifdef HAVE_STROPTS_H - #include - #endif diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index f9da42de0b1c..20c7c0c145ef 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -271,11 +271,6 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { ] ++ optionals mimetypesSupport [ # Make the mimetypes module refer to the right file ./mimetypes.patch - ] ++ optionals (pythonAtLeast "3.7" && pythonOlder "3.11") [ - # Fix darwin build https://bugs.python.org/issue34027 - ./3.7/darwin-libutil.patch - ] ++ optionals (pythonAtLeast "3.11") [ - ./3.11/darwin-libutil.patch ] ++ optionals (pythonAtLeast "3.9" && pythonOlder "3.11" && stdenv.hostPlatform.isDarwin) [ # Stop checking for TCL/TK in global macOS locations ./3.9/darwin-tcl-tk.patch From c55530f978aaa224bc6d64f2f134f7fdbbedc42e Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Wed, 6 Nov 2024 09:10:17 +0100 Subject: [PATCH 230/252] curl: 8.10.1 -> 8.11.0 Signed-off-by: Sefa Eyeoglu --- pkgs/tools/networking/curl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index e64f0007c1cb..399101a21435 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -49,14 +49,14 @@ assert !((lib.count (x: x) [ gnutlsSupport opensslSupport wolfsslSupport rustlsS stdenv.mkDerivation (finalAttrs: { pname = "curl"; - version = "8.10.1"; + version = "8.11.0"; src = fetchurl { urls = [ "https://curl.haxx.se/download/curl-${finalAttrs.version}.tar.xz" "https://github.com/curl/curl/releases/download/curl-${builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version}/curl-${finalAttrs.version}.tar.xz" ]; - hash = "sha256-c6Sw6ZWWoJ+lkkpPt+S5lahf2g0YosAquc8TS+vOBO4="; + hash = "sha256-21nPDWccpuf1wsXsF3CEozp54EyX5xzxg6XN6iNQVOs="; }; # this could be accomplished by updateAutotoolsGnuConfigScriptsHook, but that causes infinite recursion From cee9a79a82a71cdd042b472b069ed1950ec11939 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 6 Nov 2024 18:58:59 +0000 Subject: [PATCH 231/252] mtm: drop `darwin.libutil` dependency --- pkgs/tools/misc/mtm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/mtm/default.nix b/pkgs/tools/misc/mtm/default.nix index 97d2c72d52be..8ecbc087894b 100644 --- a/pkgs/tools/misc/mtm/default.nix +++ b/pkgs/tools/misc/mtm/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, ncurses, darwin }: +{ lib, stdenv, fetchFromGitHub, ncurses }: stdenv.mkDerivation rec { pname = "mtm"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { sha256 = "0gibrvah059z37jvn1qs4b6kvd4ivk2mfihmcpgx1vz6yg70zghv"; }; - buildInputs = [ ncurses ] ++ lib.optionals stdenv.isDarwin [ darwin.libutil ]; + buildInputs = [ ncurses ]; makeFlags = [ "DESTDIR=${placeholder "out"}" "MANDIR=${placeholder "out"}/share/man/man1" ]; From 6c32a119a5f768a8678c0b9a2ff6433f8b879e0c Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 6 Nov 2024 18:59:47 +0000 Subject: [PATCH 232/252] eternal-terminal: drop `darwin.libutil` dependency --- pkgs/tools/networking/eternal-terminal/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/tools/networking/eternal-terminal/default.nix b/pkgs/tools/networking/eternal-terminal/default.nix index c580d02a794f..3096ea67840f 100644 --- a/pkgs/tools/networking/eternal-terminal/default.nix +++ b/pkgs/tools/networking/eternal-terminal/default.nix @@ -32,8 +32,6 @@ stdenv.mkDerivation rec { openssl protobuf zlib - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.libutil ]; preBuild = '' From c87f921f5066cc6d2bd4aa04688ab9ad2c47de09 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 6 Nov 2024 19:00:38 +0000 Subject: [PATCH 233/252] mg: drop `darwin.libutil` dependency --- pkgs/applications/editors/mg/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/mg/default.nix b/pkgs/applications/editors/mg/default.nix index 70f5dd604296..2b69571a9109 100644 --- a/pkgs/applications/editors/mg/default.nix +++ b/pkgs/applications/editors/mg/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, ncurses, buildPackages, darwin }: +{ lib, stdenv, fetchFromGitHub, pkg-config, ncurses, buildPackages }: stdenv.mkDerivation { pname = "mg"; @@ -25,7 +25,7 @@ stdenv.mkDerivation { ''; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ ncurses ] ++ lib.optional stdenv.isDarwin [ darwin.libutil ]; + buildInputs = [ ncurses ]; meta = with lib; { description = "Micro GNU/emacs, a portable version of the mg maintained by the OpenBSD team"; From ec62a8ee9dd48f29e3982b14eba72e5f0a9b61f1 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 6 Nov 2024 19:04:10 +0000 Subject: [PATCH 234/252] chibi: drop `darwin.libutil` dependency --- pkgs/development/interpreters/chibi/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/chibi/default.nix b/pkgs/development/interpreters/chibi/default.nix index 09ffa3ca2128..9cdd21a6b955 100644 --- a/pkgs/development/interpreters/chibi/default.nix +++ b/pkgs/development/interpreters/chibi/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, makeWrapper, darwin }: +{ lib, stdenv, fetchFromGitHub, makeWrapper }: stdenv.mkDerivation rec { version = "0.11"; @@ -13,8 +13,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; - buildInputs = lib.optional stdenv.hostPlatform.isDarwin darwin.libutil; - installPhase = '' make install PREFIX="$out" ''; From 3602fc321de115df5d441cb2d2bc3bec2a84ef04 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 6 Nov 2024 19:06:49 +0000 Subject: [PATCH 235/252] abduco: drop `darwin.libutil` dependency --- pkgs/tools/misc/abduco/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkgs/tools/misc/abduco/default.nix b/pkgs/tools/misc/abduco/default.nix index 1f454d40bc85..eef5fe0df344 100644 --- a/pkgs/tools/misc/abduco/default.nix +++ b/pkgs/tools/misc/abduco/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchpatch, fetchzip, writeText, darwin, conf ? null }: +{ lib, stdenv, fetchpatch, fetchzip, writeText, conf ? null }: let rev = "8c32909a159aaa9484c82b71f05b7a73321eb491"; @@ -21,10 +21,6 @@ stdenv.mkDerivation { installFlags = [ "install-completion" ]; CFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-D_DARWIN_C_SOURCE"; - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.libutil - ]; - patches = [ # https://github.com/martanne/abduco/pull/22 (fetchpatch { From 7eb779860dafba203b048a56c0ee29ed5fb4303b Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Mon, 4 Nov 2024 10:13:20 -0800 Subject: [PATCH 236/252] llvmPackages_19.libclc: use unwrapped clang only The build requires an unwrapped clang due to passing in --arch flags. However, for c++ it doesn't pass in --arch and requires standard headers so which requires the wrapped compiler. --- pkgs/development/compilers/llvm/common/libclc.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/common/libclc.nix b/pkgs/development/compilers/llvm/common/libclc.nix index c24fc6e3b4c0..d20e6877019b 100644 --- a/pkgs/development/compilers/llvm/common/libclc.nix +++ b/pkgs/development/compilers/llvm/common/libclc.nix @@ -17,6 +17,14 @@ let spirv-llvm-translator = buildPackages.spirv-llvm-translator.override { inherit (buildLlvmTools) llvm; }; + + # The build requires an unwrapped clang but wrapped clang++ thus we need to + # split the unwrapped clang out to prevent the build from finding the + # unwrapped clang++ + clang-only = runCommand "clang-only" { } '' + mkdir -p "$out"/bin + ln -s "${lib.getExe' buildLlvmTools.clang.cc "clang"}" "$out"/bin + ''; in stdenv.mkDerivation rec { pname = "libclc"; @@ -78,7 +86,7 @@ stdenv.mkDerivation rec { python3 ] ++ lib.optional (lib.versionAtLeast release_version "19") [ - buildLlvmTools.clang.cc + clang-only buildLlvmTools.llvm spirv-llvm-translator ]; From 1ab5205fbbfa29497a53b71f2fdf8ba12e0fe641 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Tue, 5 Nov 2024 22:49:32 -0800 Subject: [PATCH 237/252] llvmPackages_19.bolt: upstream patch to fix darwin build https://github.com/llvm/llvm-project/commit/5909979869edca359bcbca74042c2939d900680e --- pkgs/development/compilers/llvm/common/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/compilers/llvm/common/default.nix b/pkgs/development/compilers/llvm/common/default.nix index eaba6f45edfe..fd818bb49a74 100644 --- a/pkgs/development/compilers/llvm/common/default.nix +++ b/pkgs/development/compilers/llvm/common/default.nix @@ -947,6 +947,10 @@ let url = "https://github.com/llvm/llvm-project/commit/abc2eae68290c453e1899a94eccc4ed5ea3b69c1.patch"; hash = "sha256-oxCxOjhi5BhNBEraWalEwa1rS3Mx9CuQgRVZ2hrbd7M="; }) + (fetchpatch { + url = "https://github.com/llvm/llvm-project/commit/5909979869edca359bcbca74042c2939d900680e.patch"; + hash = "sha256-l4rQHYbblEADBXaZIdqTG0sZzH4fEQvYiqhLYNZDMa8="; + }) ]; }; } From 3cd45d08ee502f9de7391f59d60fa13c106c5838 Mon Sep 17 00:00:00 2001 From: Reno Dakota <170618376+paparodeo@users.noreply.github.com> Date: Fri, 1 Nov 2024 03:42:29 +0000 Subject: [PATCH 238/252] llvmPackages_19: 19.1.1 -> 19.1.3 https://github.com/llvm/llvm-project/releases/tag/llvmorg-19.1.3 --- pkgs/development/compilers/llvm/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/default.nix b/pkgs/development/compilers/llvm/default.nix index 4d52e48d8775..24a028e77974 100644 --- a/pkgs/development/compilers/llvm/default.nix +++ b/pkgs/development/compilers/llvm/default.nix @@ -28,7 +28,7 @@ let "16.0.6".officialRelease.sha256 = "sha256-fspqSReX+VD+Nl/Cfq+tDcdPtnQPV1IRopNDfd5VtUs="; "17.0.6".officialRelease.sha256 = "sha256-8MEDLLhocshmxoEBRSKlJ/GzJ8nfuzQ8qn0X/vLA+ag="; "18.1.8".officialRelease.sha256 = "sha256-iiZKMRo/WxJaBXct9GdAcAT3cz9d9pnAcO1mmR6oPNE="; - "19.1.1".officialRelease.sha256 = "sha256-xTo44+vH1Bz49fEl4bIpU3eIgQtFuBTGbgU7mzeY33s="; + "19.1.3".officialRelease.sha256 = "sha256-NUx01eJNsYMlk+8mtlf10isIqhK8zBmqaOTjuFqMNRQ="; "20.0.0-git".gitRelease = { rev = "0e8555d4dbfdfeddc01dc2ecf9a9b6e804f7b645"; rev-version = "20.0.0-unstable-2024-10-07"; From 67cf25d7f4a5f7e234fed3dd273d4d21641de3a0 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 6 Nov 2024 19:08:09 +0000 Subject: [PATCH 239/252] apbs: drop unnecessary Darwin dependencies --- pkgs/applications/science/chemistry/apbs/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/applications/science/chemistry/apbs/default.nix b/pkgs/applications/science/chemistry/apbs/default.nix index 87cd5fed1373..bb8ba7afeff3 100644 --- a/pkgs/applications/science/chemistry/apbs/default.nix +++ b/pkgs/applications/science/chemistry/apbs/default.nix @@ -7,8 +7,6 @@ , suitesparse , python3 , libintl -, libiconv -, darwin }: let # this is a fork version of fetk (http://www.fetk.org/) @@ -87,8 +85,6 @@ stdenv.mkDerivation (finalAttrs: { python3 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libintl - libiconv - darwin.libutil ]; cmakeFlags = [ From 1b080335df4b69cd23231aae445897759787faff Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 6 Nov 2024 19:08:58 +0000 Subject: [PATCH 240/252] uhdm: drop `darwin.libutil` dependency --- pkgs/applications/science/logic/uhdm/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/applications/science/logic/uhdm/default.nix b/pkgs/applications/science/logic/uhdm/default.nix index eb078d482732..72b55ffbcd7a 100644 --- a/pkgs/applications/science/logic/uhdm/default.nix +++ b/pkgs/applications/science/logic/uhdm/default.nix @@ -5,7 +5,6 @@ , python3 , capnproto , gtest -, darwin }: stdenv.mkDerivation (finalAttrs: { @@ -29,8 +28,6 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ capnproto - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.libutil ]; cmakeFlags = [ From 81a67492e9ee7e46028823f8b8fcc703373197c6 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 6 Nov 2024 19:09:34 +0000 Subject: [PATCH 241/252] surelog: drop `darwin.libutil` dependency --- pkgs/applications/science/logic/surelog/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/applications/science/logic/surelog/default.nix b/pkgs/applications/science/logic/surelog/default.nix index 595a3e168040..0d795611b95a 100644 --- a/pkgs/applications/science/logic/surelog/default.nix +++ b/pkgs/applications/science/logic/surelog/default.nix @@ -12,7 +12,6 @@ , antlr4 , capnproto , nlohmann_json -, darwin }: stdenv.mkDerivation (finalAttrs: { @@ -46,7 +45,7 @@ stdenv.mkDerivation (finalAttrs: { capnproto antlr4.runtime.cpp nlohmann_json - ] ++ lib.optional stdenv.isDarwin [ darwin.libutil ]; + ]; cmakeFlags = [ "-DSURELOG_USE_HOST_CAPNP=On" From d1e72625646d84fd1781ef818e5619ccfddcfafb Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 6 Nov 2024 19:10:31 +0000 Subject: [PATCH 242/252] pypy{27,39,310}: drop `darwin.libutil` dependency --- pkgs/development/interpreters/python/pypy/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/python/pypy/default.nix b/pkgs/development/interpreters/python/pypy/default.nix index b850c79be87a..795bceede768 100644 --- a/pkgs/development/interpreters/python/pypy/default.nix +++ b/pkgs/development/interpreters/python/pypy/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, substituteAll, fetchurl , zlibSupport ? true, zlib -, bzip2, pkg-config, libffi, darwin +, bzip2, pkg-config, libffi , sqlite, openssl, ncurses, python, expat, tcl, tk, tclPackages, libX11 , gdbm, db, xz, python-setup-hook , optimizationLevel ? "jit", boehmgc @@ -63,8 +63,6 @@ in with passthru; stdenv.mkDerivation rec { zlib ] ++ lib.optionals (lib.any (l: l == optimizationLevel) [ "0" "1" "2" "3"]) [ boehmgc - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.libutil ]; # Remove bootstrap python from closure From 7863b8cf18a5a895c85d3b22cc2e8b6007596380 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 6 Nov 2024 19:11:14 +0000 Subject: [PATCH 243/252] netbsd.install: drop `darwin.libutil` dependency --- pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix index b179544eaee3..84934b592171 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix @@ -11,7 +11,6 @@ groff, compatIfNeeded, fts, - darwin, stdenv, }: @@ -44,8 +43,7 @@ mkDerivation { # fts header is needed. glibc already has this header, but musl doesn't, # so make sure pkgsMusl.netbsd.install still builds in case you want to # remove it! - ++ [ fts ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libutil ]; + ++ [ fts ]; installPhase = '' runHook preInstall From 6bcccb6a8d8c3d0072ac4e166abb52c73fbd3643 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 6 Nov 2024 19:13:18 +0000 Subject: [PATCH 244/252] fnc: drop `darwin.libutil` dependency --- pkgs/applications/version-management/fnc/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/version-management/fnc/default.nix b/pkgs/applications/version-management/fnc/default.nix index 293fb563af60..b0bae95ba9d1 100644 --- a/pkgs/applications/version-management/fnc/default.nix +++ b/pkgs/applications/version-management/fnc/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, stdenv, zlib, ncurses, libiconv, darwin }: +{ lib, fetchurl, stdenv, zlib, ncurses, libiconv }: stdenv.mkDerivation (finalAttrs: { pname = "fnc"; @@ -9,9 +9,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-npS+sOxF0S/9TuFjtEFlev0HpIOsaP6zmcfopPNUehk="; }; - buildInputs = [ libiconv ncurses zlib ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.libutil - ]; + buildInputs = [ libiconv ncurses zlib ]; makeFlags = [ "PREFIX=$(out)" ]; From 5af01c33cd74f9d5fb4781025f9befd7a95ff451 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 6 Nov 2024 19:14:09 +0000 Subject: [PATCH 245/252] fnc: set minimum version for Darwin --- pkgs/applications/version-management/fnc/default.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/version-management/fnc/default.nix b/pkgs/applications/version-management/fnc/default.nix index b0bae95ba9d1..71682501b28f 100644 --- a/pkgs/applications/version-management/fnc/default.nix +++ b/pkgs/applications/version-management/fnc/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, stdenv, zlib, ncurses, libiconv }: +{ lib, fetchurl, stdenv, zlib, ncurses, libiconv, apple-sdk_11, darwinMinVersionHook }: stdenv.mkDerivation (finalAttrs: { pname = "fnc"; @@ -9,16 +9,13 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-npS+sOxF0S/9TuFjtEFlev0HpIOsaP6zmcfopPNUehk="; }; - buildInputs = [ libiconv ncurses zlib ]; + buildInputs = [ libiconv ncurses zlib apple-sdk_11 (darwinMinVersionHook "11.0") ]; makeFlags = [ "PREFIX=$(out)" ]; env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ # Needed with GCC 12 "-Wno-error=maybe-uninitialized" - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - # error: 'strtonum' is only available on macOS 11.0 or newer - "-Wno-error=unguarded-availability-new" ]); preInstall = '' From 59da82bf02fa2adc654482e464b0aaf79d4d5d6b Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 6 Nov 2024 19:17:50 +0000 Subject: [PATCH 246/252] macvim: drop `darwin.libutil` dependency --- pkgs/applications/editors/vim/macvim.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/applications/editors/vim/macvim.nix b/pkgs/applications/editors/vim/macvim.nix index 2005eef7b6fe..23aa24ff9b6d 100644 --- a/pkgs/applications/editors/vim/macvim.nix +++ b/pkgs/applications/editors/vim/macvim.nix @@ -139,7 +139,6 @@ stdenv.mkDerivation (finalAttrs: { # Xcode project or pass it as a flag to xcodebuild as well. postConfigure = '' substituteInPlace src/auto/config.mk \ - --replace "PERL_CFLAGS${"\t"}=" "PERL_CFLAGS${"\t"}= -I${darwin.libutil}/include" \ --replace " -L${stdenv.cc.libc}/lib" "" \ --replace " -L${darwin.libobjc}/lib" "" \ --replace " -L${darwin.libunwind}/lib" "" \ From 9bf6e33999fd2409b443f1a5ba85b36a880dcc15 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 6 Nov 2024 19:05:11 +0000 Subject: [PATCH 247/252] libuv: clarify `darwin.libutil` dependency --- pkgs/development/libraries/libuv/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libuv/default.nix b/pkgs/development/libraries/libuv/default.nix index 7f9aac48e725..181462dc39dd 100644 --- a/pkgs/development/libraries/libuv/default.nix +++ b/pkgs/development/libraries/libuv/default.nix @@ -87,7 +87,11 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ automake autoconf libtool pkg-config ]; - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.libutil ]; + # This is part of the Darwin bootstrap, so we don’t always get + # `libutil.dylib` automatically propagated through the SDK. + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ + (lib.getLib darwin.libutil) + ]; preConfigure = '' LIBTOOLIZE=libtoolize ./autogen.sh From 514bd9d7401af2e744d1cee8d41a410d1d5fda3f Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:30:52 +1000 Subject: [PATCH 248/252] go_1_23: 1.23.2 -> 1.23.3 Changelog: https://go.dev/doc/devel/release#go1.23 --- pkgs/development/compilers/go/1.23.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/go/1.23.nix b/pkgs/development/compilers/go/1.23.nix index 229d19ff06e7..14a80eae8046 100644 --- a/pkgs/development/compilers/go/1.23.nix +++ b/pkgs/development/compilers/go/1.23.nix @@ -46,11 +46,11 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "go"; - version = "1.23.2"; + version = "1.23.3"; src = fetchurl { url = "https://go.dev/dl/go${finalAttrs.version}.src.tar.gz"; - hash = "sha256-NpMBYqk99BfZC9IsbhTa/0cFuqwrAkGO3aZxzfqc0H8="; + hash = "sha256-jWp3MySHVXxq+iQhExtQ+D20rjxXnDvHLmcO4faWhZk="; }; strictDeps = true; From f144fc5b96af309f1c50f540be0208568e33bf1f Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 7 Nov 2024 02:34:54 +0000 Subject: [PATCH 249/252] mpdecimal: use absolute library install names on Darwin Closes: #354088 --- pkgs/development/libraries/mpdecimal/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mpdecimal/default.nix b/pkgs/development/libraries/mpdecimal/default.nix index 1041100f9f8e..82643b197109 100644 --- a/pkgs/development/libraries/mpdecimal/default.nix +++ b/pkgs/development/libraries/mpdecimal/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, updateAutotoolsGnuConfigScriptsHook }: +{ lib, stdenv, fetchurl, autoreconfHook }: stdenv.mkDerivation rec { pname = "mpdecimal"; @@ -10,10 +10,16 @@ stdenv.mkDerivation rec { hash = "sha256-lCRFwyRbInMP1Bpnp8XCMdEcsbmTa5wPdjNPt9C0Row="; }; - nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ]; + nativeBuildInputs = [ autoreconfHook ]; configureFlags = [ "LD=${stdenv.cc.targetPrefix}cc" ]; + postPatch = '' + # Use absolute library install names on Darwin. + substituteInPlace configure.ac \ + --replace-fail '-install_name @rpath/' "-install_name $out/lib/" + ''; + postInstall = '' mkdir -p $cxx/lib mv $out/lib/*c++* $cxx/lib From cb37e29e3c52e3473770cadb1a241cb190b908e9 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 7 Nov 2024 07:02:24 +0000 Subject: [PATCH 250/252] expat: 2.6.3 -> 2.6.4 Changes: https://github.com/libexpat/libexpat/blob/R_2_6_4/expat/Changes --- 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 83284ff64fc5..7d49962cbdb7 100644 --- a/pkgs/development/libraries/expat/default.nix +++ b/pkgs/development/libraries/expat/default.nix @@ -17,7 +17,7 @@ # files. let - version = "2.6.3"; + version = "2.6.4"; tag = "R_${lib.replaceStrings ["."] ["_"] version}"; in stdenv.mkDerivation (finalAttrs: { @@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = with finalAttrs; "https://github.com/libexpat/libexpat/releases/download/${tag}/${pname}-${version}.tar.xz"; - hash = "sha256-J02yVKaXm95arUBHY6cElWlA5GWEPyqb2e168i4sDvw="; + hash = "sha256-ppVina4EcFWzfVCg/0d20dRdCkyELPTM7hWEQfVf9+4="; }; strictDeps = true; From dc697d618e81a7667a759c1b8362c8e5179ffeb2 Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 7 Nov 2024 10:13:15 +0300 Subject: [PATCH 251/252] mesa: 24.2.5 -> 24.2.6 Diff: https://gitlab.freedesktop.org/mesa/mesa/-/compare/mesa-24.2.5...mesa-24.2.6 Changelog: https://docs.mesa3d.org/relnotes/24.2.6.html --- pkgs/development/libraries/mesa/common.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mesa/common.nix b/pkgs/development/libraries/mesa/common.nix index b7c90f36db74..6c349d679871 100644 --- a/pkgs/development/libraries/mesa/common.nix +++ b/pkgs/development/libraries/mesa/common.nix @@ -5,14 +5,14 @@ # nix build .#legacyPackages.x86_64-darwin.mesa .#legacyPackages.aarch64-darwin.mesa rec { pname = "mesa"; - version = "24.2.5"; + version = "24.2.6"; src = fetchFromGitLab { domain = "gitlab.freedesktop.org"; owner = "mesa"; repo = "mesa"; rev = "mesa-${version}"; - hash = "sha256-GghJVjR9NrlNLAd8c1lG8E6/WECqO+Ti3F6JRMgd2jQ="; + hash = "sha256-yoX2DvinzqrG+rekiqO/iG6F6Zn63WC+ZaathimxO1g="; }; meta = { From 2a61b919d2d3f397f6878eee8091a2459757cc1d Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 7 Nov 2024 07:26:53 +0000 Subject: [PATCH 252/252] darwin.copyfile: use a bootstrap SDK This is required to avoid an infinite recursion via `darwin.libutil` on `x86_64-darwin`. --- .../darwin/apple-source-releases/copyfile/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/apple-source-releases/copyfile/package.nix b/pkgs/os-specific/darwin/apple-source-releases/copyfile/package.nix index 29b41f60b054..3382128b0e91 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/copyfile/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/copyfile/package.nix @@ -91,7 +91,7 @@ mkAppleDerivation { env.NIX_CFLAGS_COMPILE = "-I${privateHeaders}/include"; buildInputs = lib.optionals (lib.versionOlder (lib.getVersion apple-sdk) "10.13") [ - apple-sdk_10_13 + (apple-sdk_10_13.override { enableBootstrap = true; }) ]; meta.description = "Darwin file copying library";