From 6edbb14e811f09063beea8fd4e2fb8e32457f5bc Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Wed, 2 Jun 2021 01:23:06 +0200 Subject: [PATCH 01/36] unbound: remove references to compile-time dependencies in outputs Previously unbound dev dependencies would leak into the unbound binary through the embedded configure flags string in the binary. Before this commit `unbound -V` would list something like this: > Version 1.13.1 > Configure line: --disable-static --prefix=/nix/store/1892sms7ciiki99jra4qhmwysaipv1qz-unbound-1.13.1 --bindir=/nix/store/1892sms7ciiki99jra4qhmwysaipv1qz-unbound-1.13.1/bin --sbindir=/nix/store/1892sms7ciiki99jra4qhmwysaipv1qz-unbound-1.13.1/sbin --includedir=/nix/store/1892sms7ciiki99jra4qhmwysaipv1qz-unbound-1.13.1/include --oldincludedir=/nix/store/1892sms7ciiki99jra4qhmwysaipv1qz-unbound-1.13.1/include --mandir=/nix/store/n4kgsi87dxjm2ifpllh31grfcg7q3n8x-unbound-1.13.1-man/share/man --infodir=/nix/store/1892sms7ciiki99jra4qhmwysaipv1qz-unbound-1.13.1/share/info --docdir=/nix/store/1892sms7ciiki99jra4qhmwysaipv1qz-unbound-1.13.1/share/doc/unbound --libdir=/nix/store/ncpggv4bmdh22y6108qrdvnid6rqamlz-unbound-1.13.1-lib/lib --libexecdir=/nix/store/ncpggv4bmdh22y6108qrdvnid6rqamlz-unbound-1.13.1-lib/libexec --localedir=/nix/store/ncpggv4bmdh22y6108qrdvnid6rqamlz-unbound-1.13.1-lib/share/locale --with-ssl=/nix/store/dndqy1r8h0kcnd55895czs8lrpv8xqf4-openssl-1.1.1k-dev --with-libexpat=/nix/store/x5kjng6iha7kcdm3p12fxfvzg09wizwc-expat-2.2.10-dev --with-libevent=/nix/store/89i6mpzp1n866i86y07pxka1a58v4s1a-libevent-2.1.12-dev --localstatedir=/var --sysconfdir=/etc --sbindir=${out}/bin --with-rootkey-file=/nix/store/gyz4nxg9s1faqkhaqbasdxzldm8zial8-dns-root-data-2019-01-11/root.key --enable-pie --enable-relro-now > Linked libs: libevent 2.1.12-stable (it uses epoll), OpenSSL 1.1.1k 25 Mar 2021 > Linked modules: dns64 respip validator iterator After this commit: > Version 1.13.1 > Configure line: --disable-static --prefix=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-unbound-1.13.1 --bindir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-unbound-1.13.1/bin --sbindir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-unbound-1.13.1/sbin --includedir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-unbound-1.13.1/include --oldincludedir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-unbound-1.13.1/include --mandir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-unbound-1.13.1-man/share/man --infodir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-unbound-1.13.1/share/info --docdir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-unbound-1.13.1/share/doc/unbound --libdir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-unbound-1.13.1-lib/lib --libexecdir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-unbound-1.13.1-lib/libexec --localedir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-unbound-1.13.1-lib/share/locale --with-ssl=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-1.1.1k-dev --with-libexpat=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.10-dev --with-libevent=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libevent-2.1.12-dev --localstatedir=/var --sysconfdir=/etc --sbindir=${out}/bin --with-rootkey-file=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-dns-root-data-2019-01-11/root.key --enable-pie --enable-relro-now > Linked libs: libevent 2.1.12-stable (it uses epoll), OpenSSL 1.1.1k 25 Mar 2021 > Linked modules: dns64 respip validator iterator Notice: All the paths are now invalid and thus do not produce a reference in the output binaries. This removes a total of 2MiB from the closure of unbound. --- pkgs/tools/networking/unbound/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index a0c774fb7341..2e31fadba377 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -59,6 +59,13 @@ stdenv.mkDerivation rec { "--with-libnghttp2=${libnghttp2.dev}" ]; + # Remove references to compile-time dependencies that are included in the configure flags + postConfigure = let + inherit (builtins) storeDir; + in '' + sed -E '/CONFCMDLINE/ s;${storeDir}/[a-z0-9]{32}-;${storeDir}/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-;g' -i config.h + ''; + installFlags = [ "configfile=\${out}/etc/unbound/unbound.conf" ]; postInstall = '' From 615f760af5c1e2def83b14b8be19de93eb897cab Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 9 Jul 2021 19:57:04 +0000 Subject: [PATCH 02/36] git-chglog: 0.14.2 -> 0.15.0 --- .../version-management/git-and-tools/git-chglog/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/git-chglog/default.nix b/pkgs/applications/version-management/git-and-tools/git-chglog/default.nix index 8ec57f2e69e8..19de4b28bfea 100644 --- a/pkgs/applications/version-management/git-and-tools/git-chglog/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-chglog/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "git-chglog"; - version = "0.14.2"; + version = "0.15.0"; src = fetchFromGitHub { owner = "git-chglog"; repo = "git-chglog"; rev = "v${version}"; - sha256 = "124bqywkj37gv61fswgrg528bf3rjqms1664x22lkn0sqh22zyv1"; + sha256 = "sha256-BiTnPCgymfpPxuy0i8u7JbpbEBeaSIJaikjwsPSA3qc="; }; - vendorSha256 = "09zjypmcc3ra7sw81q1pbbrlpxxp4k00p1cfkrrih8wvb25z89h5"; + vendorSha256 = "sha256-jIq+oacyT71m78iMZwWOBsBVAY/WxgyH9zRr8GiMGTU="; buildFlagsArray = [ "-ldflags= -s -w -X=main.Version=v${version}" ]; From 1207e7581f7bb863d0789c980930464d92d221cb Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Tue, 20 Jul 2021 15:41:36 -0400 Subject: [PATCH 03/36] kernel: enable MOUSE_PS2_VMMOUSE Turns VMware guest mouse support on in the kernel. This is needed for running Wayland and non-root X in a VMWare guest. In a pre-Wayland world the `xf86-input-vmmouse` userspace driver would have handled this for us. This allows the mouse to properly work in a vmware guest (for example it can now leave the vmware window). See: https://github.com/vmware/open-vm-tools/issues/528 --- pkgs/os-specific/linux/kernel/common-config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 355e653c8eae..74aca29c9a3d 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -790,6 +790,7 @@ let MODVERSIONS = whenOlder "4.9" yes; MOUSE_ELAN_I2C_SMBUS = yes; MOUSE_PS2_ELANTECH = yes; # Elantech PS/2 protocol extension + MOUSE_PS2_VMMOUSE = yes; MTRR_SANITIZER = yes; NET_FC = yes; # Fibre Channel driver support # GPIO on Intel Bay Trail, for some Chromebook internal eMMC disks From ccd81415321f84f67c145b11bd8848aaf5ba6df5 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 20 Jul 2021 23:38:42 +0000 Subject: [PATCH 04/36] gpxsee: 9.2 -> 9.3 --- pkgs/applications/misc/gpxsee/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/gpxsee/default.nix b/pkgs/applications/misc/gpxsee/default.nix index a2280e8bb012..0803fadc2a41 100644 --- a/pkgs/applications/misc/gpxsee/default.nix +++ b/pkgs/applications/misc/gpxsee/default.nix @@ -2,13 +2,13 @@ mkDerivation rec { pname = "gpxsee"; - version = "9.2"; + version = "9.3"; src = fetchFromGitHub { owner = "tumic0"; repo = "GPXSee"; rev = version; - sha256 = "sha256-pU02Eaq6tB7X6EPOo8YAyryJRbSV3KebQv8VELxXaBw="; + sha256 = "sha256-h/OWYzZkouhTC7j8HIOt94DHwNyhbkYGoy3wUYrh0O8="; }; patches = (substituteAll { From afb3563bdcdd0654ebcabd2046b0c82ef19a2783 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Thu, 3 Jun 2021 20:26:32 +0200 Subject: [PATCH 05/36] qt5: don't use dontUseXcbuild in qtwebengine dontUseXcbuild was dropped in 0534ceac816cb708434b126e38e98b925516498a --- pkgs/development/libraries/qt-5/modules/qtwebengine.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index 729c5f388f99..e60ae2082f4a 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -220,7 +220,6 @@ qtModule { dontUseNinjaBuild = true; dontUseNinjaInstall = true; - dontUseXcbuild = true; postInstall = lib.optionalString stdenv.isLinux '' cat > $out/libexec/qt.conf < Date: Thu, 3 Jun 2021 20:21:38 +0200 Subject: [PATCH 06/36] qt5: use xcbuild on darwin, cleanup --- .../libraries/qt-5/modules/qtbase.nix | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 0d0bef342b02..4291390c72ca 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -5,7 +5,7 @@ coreutils, bison, flex, gdb, gperf, lndir, perl, pkg-config, python3, which, # darwin support - darwin, libiconv, + darwin, libiconv, xcbuild, dbus, fontconfig, freetype, glib, harfbuzz, icu, libX11, libXcomposite, libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng, @@ -90,7 +90,8 @@ stdenv.mkDerivation { ++ lib.optional (postgresql != null) postgresql; nativeBuildInputs = - [ bison flex gperf lndir perl pkg-config which ]; + [ bison flex gperf lndir perl pkg-config which ] + ++ lib.optionals stdenv.isDarwin [ xcbuild ]; propagatedNativeBuildInputs = [ lndir ]; @@ -131,22 +132,16 @@ stdenv.mkDerivation { then '' sed -i \ - -e 's|! /usr/bin/xcode-select --print-path >/dev/null 2>&1;|false;|' \ - -e 's|! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1;|false;|' \ - -e 's|sysroot=$(/usr/bin/xcodebuild -sdk $sdk -version Path 2>/dev/null)|sysroot=/nonsense|' \ - -e 's|sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null)|sysroot=/nonsense|' \ + -e 's|/usr/bin/xcode-select|xcode-select|' \ + -e 's|/usr/bin/xcrun|xcrun|' \ + -e 's|/usr/bin/xcodebuild|xcodebuild|' \ -e 's|QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`|QMAKE_CXX="clang++"\nQMAKE_CONF_COMPILER="clang++"|' \ - -e 's|XCRUN=`/usr/bin/xcrun -sdk macosx clang -v 2>&1`|XCRUN="clang -v 2>&1"|' \ - -e 's#sdk_val=$(/usr/bin/xcrun -sdk $sdk -find $(echo $val | cut -d \x27 \x27 -f 1))##' \ - -e 's#val=$(echo $sdk_val $(echo $val | cut -s -d \x27 \x27 -f 2-))##' \ ./configure substituteInPlace ./mkspecs/common/mac.conf \ --replace "/System/Library/Frameworks/OpenGL.framework/" "${darwin.apple_sdk.frameworks.OpenGL}/Library/Frameworks/OpenGL.framework/" substituteInPlace ./mkspecs/common/mac.conf \ --replace "/System/Library/Frameworks/AGL.framework/" "${darwin.apple_sdk.frameworks.AGL}/Library/Frameworks/AGL.framework/" '' - # Note on the above: \x27 is a way if including a single-quote - # character in the sed string arguments. else lib.optionalString libGLSupported '' From cebd3e9576589df1b7ea8daf293947471257a7b6 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 24 Jul 2021 13:00:24 +0000 Subject: [PATCH 07/36] libidn2: 2.3.1 -> 2.3.2 --- pkgs/development/libraries/libidn2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libidn2/default.nix b/pkgs/development/libraries/libidn2/default.nix index b1d234476c4b..2b5434e723aa 100644 --- a/pkgs/development/libraries/libidn2/default.nix +++ b/pkgs/development/libraries/libidn2/default.nix @@ -9,11 +9,11 @@ with lib; stdenv.mkDerivation rec { pname = "libidn2"; - version = "2.3.1"; + version = "2.3.2"; src = fetchurl { url = "mirror://gnu/gnu/libidn/${pname}-${version}.tar.gz"; - sha256 = "sha256-ivaElDg2uLU5ZdX1tnFO8TwmyR6qNs59JC49IfXUDy0="; + sha256 = "sha256-dpQM1Od46Ak1eanRlbJf/16Tbp3GJCBoUotDenZ2T5E="; }; outputs = [ "bin" "dev" "out" "info" "devdoc" ]; From 8726184b8a793ab45b22b6afeb98742acb0b35d1 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 24 Jul 2021 13:10:42 +0000 Subject: [PATCH 08/36] libedit: 20210522-3.1 -> 20210714-3.1 --- pkgs/development/libraries/libedit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libedit/default.nix b/pkgs/development/libraries/libedit/default.nix index daf0f2928416..35efdc781d46 100644 --- a/pkgs/development/libraries/libedit/default.nix +++ b/pkgs/development/libraries/libedit/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "libedit"; - version = "20210522-3.1"; + version = "20210714-3.1"; src = fetchurl { url = "https://thrysoee.dk/editline/${pname}-${version}.tar.gz"; - sha256 = "sha256-AiC8IEfpJ8DBmE7197TrKpRppbe/ErpXPKOyPKAru28="; + sha256 = "sha256-MCO0mK1ZP9d0WuOyCrrVRt5Qa2e4+7VXljfKaauC28k="; }; outputs = [ "out" "dev" ]; From ebc065c77b3f24ad8cfbbc2288253c75434d4967 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 24 Jul 2021 18:23:58 +0000 Subject: [PATCH 09/36] gdu: 5.3.0 -> 5.4.0 --- pkgs/tools/system/gdu/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/gdu/default.nix b/pkgs/tools/system/gdu/default.nix index c50b2a4c84ea..1925477a970a 100644 --- a/pkgs/tools/system/gdu/default.nix +++ b/pkgs/tools/system/gdu/default.nix @@ -7,13 +7,13 @@ buildGoModule rec { pname = "gdu"; - version = "5.3.0"; + version = "5.4.0"; src = fetchFromGitHub { owner = "dundee"; repo = pname; rev = "v${version}"; - sha256 = "sha256-hf5jTEAN5oOPg2PaAlYjIDMYcwXkaFAqPtWTwZV98N0="; + sha256 = "sha256-1ITVDJvO2VGIWRU7HtxLo/bNQhldgXgpMmpRR3dIOxM="; }; vendorSha256 = "sha256-9W1K01PJ+tRLSJ0L7NGHXT5w5oHmlBkT8kwnOLOzSCc="; From 8dfa2b2ef165901ca8da8bbacb16ac15320a6675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 24 Jul 2021 18:23:26 +0200 Subject: [PATCH 10/36] pythonPackages.python-dateutil: 2.8.1 -> 2.8.2 https://github.com/dateutil/dateutil/releases/tag/2.8.2 --- pkgs/development/python-modules/dateutil/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/dateutil/default.nix b/pkgs/development/python-modules/dateutil/default.nix index e71a532a806d..d263414b4a26 100644 --- a/pkgs/development/python-modules/dateutil/default.nix +++ b/pkgs/development/python-modules/dateutil/default.nix @@ -7,11 +7,11 @@ buildPythonPackage rec { pname = "python-dateutil"; - version = "2.8.1"; + version = "2.8.2"; src = fetchPypi { inherit pname version; - sha256 = "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"; + sha256 = "sha256-ASPKzBYnrhnd88J6XeW9Z+5FhvvdZEDZdI+Ku0g9PoY="; }; nativeBuildInputs = [ setuptools-scm ]; From 135fa1bce1bcfe44a565bf51b74a6ac89d9f4238 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 9 Jul 2021 12:10:18 +0000 Subject: [PATCH 11/36] bctoolbox: 4.5.20 -> 5.0.0 --- pkgs/development/libraries/bctoolbox/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/bctoolbox/default.nix b/pkgs/development/libraries/bctoolbox/default.nix index 1a42211b9393..c1d2813a4f2a 100644 --- a/pkgs/development/libraries/bctoolbox/default.nix +++ b/pkgs/development/libraries/bctoolbox/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { pname = "bctoolbox"; - version = "4.5.20"; + version = "5.0.0"; nativeBuildInputs = [ cmake bcunit ]; buildInputs = [ mbedtls ]; @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { group = "BC"; repo = pname; rev = version; - sha256 = "sha256-n/S0G7dGaDWWsvOITceITmWUNpebcHMedkLTklxGjQg="; + sha256 = "sha256-/jv59ZeELfP7PokzthvZNL4FS3tyzRmCHp4I/Lp8BJM="; }; # Do not build static libraries From 8396837579e46a4342e82cf21ded097cefda3ee9 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 7 Jun 2021 01:28:13 +0000 Subject: [PATCH 12/36] faustPhysicalModeling: 2.20.2 -> 2.30.5 --- pkgs/applications/audio/faustPhysicalModeling/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/faustPhysicalModeling/default.nix b/pkgs/applications/audio/faustPhysicalModeling/default.nix index f55cee957c77..6f827cea9564 100644 --- a/pkgs/applications/audio/faustPhysicalModeling/default.nix +++ b/pkgs/applications/audio/faustPhysicalModeling/default.nix @@ -1,13 +1,13 @@ { stdenv, lib, fetchFromGitHub, faust2jaqt, faust2lv2 }: stdenv.mkDerivation rec { pname = "faustPhysicalModeling"; - version = "2.20.2"; + version = "2.30.5"; src = fetchFromGitHub { owner = "grame-cncm"; repo = "faust"; rev = version; - sha256 = "1mm93ba26b7q69hvabzalg30dh8pl858nj4m2bb57pznnp09lq9a"; + sha256 = "sha256-hfpMeUhv6FC9lnPCfdWnAFCaKiteplyrS/o3Lf7cQY4="; }; buildInputs = [ faust2jaqt faust2lv2 ]; From 2a21f96a6d4b67c2efbcc88f6d115de30d0202a6 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 28 May 2021 13:00:52 +0000 Subject: [PATCH 13/36] exodus: 21.1.29 -> 21.5.25 --- pkgs/applications/blockchains/exodus/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/blockchains/exodus/default.nix b/pkgs/applications/blockchains/exodus/default.nix index 08eeac760c0f..442683946244 100644 --- a/pkgs/applications/blockchains/exodus/default.nix +++ b/pkgs/applications/blockchains/exodus/default.nix @@ -4,11 +4,11 @@ cups, vivaldi-ffmpeg-codecs, libpulseaudio, at-spi2-core, libxkbcommon, mesa }: stdenv.mkDerivation rec { pname = "exodus"; - version = "21.1.29"; + version = "21.5.25"; src = fetchurl { url = "https://downloads.exodus.io/releases/${pname}-linux-x64-${version}.zip"; - sha256 = "sha256-Qdiyjutzt8r1tIfcW7/AtSuOpf1Un5TeHoeZx5uQthM="; + sha256 = "sha256-2EIElhQGA0UprPF2pdIfYM9SWYIteD+kH+rupjxCiz4="; }; sourceRoot = "."; From f3861727159d7a05ba46aa346f101389463f41e9 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 26 Jul 2021 01:36:12 +0000 Subject: [PATCH 14/36] at-spi2-core: 2.40.2 -> 2.40.3 --- pkgs/development/libraries/at-spi2-core/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/at-spi2-core/default.nix b/pkgs/development/libraries/at-spi2-core/default.nix index 515c60c985a7..8413ae597f77 100644 --- a/pkgs/development/libraries/at-spi2-core/default.nix +++ b/pkgs/development/libraries/at-spi2-core/default.nix @@ -21,11 +21,11 @@ stdenv.mkDerivation rec { pname = "at-spi2-core"; - version = "2.40.2"; + version = "2.40.3"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "RNwXr5Q7D9GWxhweA7bBZpYDhcrpbMtelb3v/7aEn5g="; + sha256 = "5Jg3wq0w1x4fKcqOCWilS5UDAnL3/0C4m0iWhlPzelw="; }; outputs = [ "out" "dev" ]; From 6042dd28cfba1dc948b5d601052c8ecd1584cd91 Mon Sep 17 00:00:00 2001 From: Jamie McClymont Date: Tue, 27 Jul 2021 20:07:06 +1200 Subject: [PATCH 15/36] libgpgerror: fix cross-compilation Backporting a fix (merged upstream but no release cut) for shell quoting issues --- .../libraries/libgpg-error/default.nix | 4 + .../fix-1.42-cross-compilation.patch | 142 ++++++++++++++++++ 2 files changed, 146 insertions(+) create mode 100644 pkgs/development/libraries/libgpg-error/fix-1.42-cross-compilation.patch diff --git a/pkgs/development/libraries/libgpg-error/default.nix b/pkgs/development/libraries/libgpg-error/default.nix index 7490995e6611..e46e25593365 100644 --- a/pkgs/development/libraries/libgpg-error/default.nix +++ b/pkgs/development/libraries/libgpg-error/default.nix @@ -24,6 +24,10 @@ in stdenv.mkDerivation (rec { sha256 = "sha256-/AfnD2xhX4xPWQqON6m43S4soelAj45gRZxnRSuSXiM="; }; + # 1.42 breaks (some?) cross-compilation (e.g. x86_64 -> aarch64). + # Backporting this fix (merged in upstream master but no release cut) by David Michael https://dev.gnupg.org/rE33593864cd54143db594c4237bba41e14179061c + patches = [ ./fix-1.42-cross-compilation.patch ]; + postPatch = '' sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure '' + lib.optionalString (stdenv.hostPlatform.isAarch32 && stdenv.buildPlatform != stdenv.hostPlatform) '' diff --git a/pkgs/development/libraries/libgpg-error/fix-1.42-cross-compilation.patch b/pkgs/development/libraries/libgpg-error/fix-1.42-cross-compilation.patch new file mode 100644 index 000000000000..6c3099f72144 --- /dev/null +++ b/pkgs/development/libraries/libgpg-error/fix-1.42-cross-compilation.patch @@ -0,0 +1,142 @@ +diff --git a/src/gen-lock-obj.sh b/src/gen-lock-obj.sh +index a710f0c..258eec6 100755 +--- a/src/gen-lock-obj.sh ++++ b/src/gen-lock-obj.sh +@@ -1,136 +1,136 @@ + #! /bin/sh + # + # gen-lock-obj.sh - Build tool to construct the lock object. + # + # Copyright (C) 2020, 2021 g10 Code GmbH + # + # This file is part of libgpg-error. + # + # libgpg-error is free software; you can redistribute it and/or + # modify it under the terms of the GNU Lesser General Public License + # as published by the Free Software Foundation; either version 2.1 of + # the License, or (at your option) any later version. + # + # libgpg-error is distributed in the hope that it will be useful, but + # WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + # Lesser General Public License for more details. + # + # You should have received a copy of the GNU Lesser General Public + # License along with this program; if not, see . + # + + # + # Following variables should be defined to invoke this script + # + # CC + # OBJDUMP + # AWK + # ac_ext + # ac_object + # host + # LOCK_ABI_VERSION + # + # An example: + # + # LOCK_ABI_VERSION=1 host=x86_64-pc-linux-gnu host_alias=x86_64-linux-gnu \ + # CC=$host_alias-gcc OBJDUMP=$host_alias-objdump ac_ext=c ac_objext=o \ + # AWK=gawk ./gen-lock-obj.sh + # + +-if test -n `echo -n`; then ++if test -n "`echo -n`"; then + ECHO_C='\c' + ECHO_N='' + else + ECHO_C='' + ECHO_N='-n' + fi + + if test "$1" = --disable-threads; then + cat <conftest.$ac_ext + #include + pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; + EOF + + if $CC -c conftest.$ac_ext; then : + ac_mtx_size=$($OBJDUMP -j .bss -t conftest.$ac_objext \ + | $AWK $AWK_OPTION ' + /mtx$/ { mtx_size = int("0x" $5) } + END { print mtx_size }') + else + echo "Can't determine mutex size" + exit 1 + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + cat < Date: Mon, 26 Jul 2021 11:45:04 +0200 Subject: [PATCH 16/36] qtbase: format, cleanup, remove darwin from inputs --- .../libraries/qt-5/5.12/default.nix | 92 ++-- .../libraries/qt-5/5.14/default.nix | 94 ++-- .../libraries/qt-5/5.15/default.nix | 114 +++-- .../libraries/qt-5/modules/qtbase.nix | 469 ++++++++---------- .../libraries/qt-5/modules/qtdeclarative.nix | 2 - .../libraries/qt-5/modules/qtmultimedia.nix | 21 +- .../libraries/qt-5/modules/qtserialport.nix | 6 +- .../libraries/qt-5/modules/qttools.nix | 11 +- .../libraries/qt-5/modules/qtwebengine.nix | 141 +++--- .../libraries/qt-5/modules/qtwebkit.nix | 47 +- .../libraries/qt-5/modules/qtwebview.nix | 12 +- pkgs/top-level/all-packages.nix | 30 +- 12 files changed, 492 insertions(+), 547 deletions(-) diff --git a/pkgs/development/libraries/qt-5/5.12/default.nix b/pkgs/development/libraries/qt-5/5.12/default.nix index 77b8c3f525a2..680debc164f7 100644 --- a/pkgs/development/libraries/qt-5/5.12/default.nix +++ b/pkgs/development/libraries/qt-5/5.12/default.nix @@ -14,21 +14,18 @@ top-level attribute to `top-level/all-packages.nix`. */ -{ - newScope, - lib, stdenv, fetchurl, fetchpatch, fetchFromGitHub, makeSetupHook, makeWrapper, - bison, cups ? null, harfbuzz, libGL, perl, - gstreamer, gst-plugins-base, gtk3, dconf, - llvmPackages_5, +{ newScope +, lib, stdenv, fetchurl, fetchpatch, fetchFromGitHub, makeSetupHook, makeWrapper +, bison, cups ? null, harfbuzz, libGL, perl +, gstreamer, gst-plugins-base, gtk3, dconf +, llvmPackages_5, darwin # options - developerBuild ? false, - decryptSslTraffic ? false, - debug ? false, +, developerBuild ? false +, decryptSslTraffic ? false +, debug ? false }: -with lib; - let qtCompatVersion = srcs.qtbase.version; @@ -50,31 +47,30 @@ let }; patches = { - qtbase = - [ - ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch - ./qtbase.patch.d/0002-qtbase-mac.patch - ./qtbase.patch.d/0013-define-kiosurfacesuccess.patch + qtbase = [ + ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch + ./qtbase.patch.d/0002-qtbase-mac.patch + ./qtbase.patch.d/0013-define-kiosurfacesuccess.patch - # Patch framework detection to support X.framework/X.tbd, - # extending the current support for X.framework/X. - ./qtbase.patch.d/0015-qtbase-tbd-frameworks.patch + # Patch framework detection to support X.framework/X.tbd, + # extending the current support for X.framework/X. + ./qtbase.patch.d/0015-qtbase-tbd-frameworks.patch - ./qtbase.patch.d/0003-qtbase-mkspecs.patch - ./qtbase.patch.d/0004-qtbase-replace-libdir.patch - ./qtbase.patch.d/0005-qtbase-cmake.patch - ./qtbase.patch.d/0006-qtbase-gtk3.patch - ./qtbase.patch.d/0007-qtbase-xcursor.patch - ./qtbase.patch.d/0008-qtbase-xcompose.patch - ./qtbase.patch.d/0009-qtbase-tzdir.patch - ./qtbase.patch.d/0010-qtbase-qtpluginpath.patch - ./qtbase.patch.d/0011-qtbase-assert.patch - ./qtbase.patch.d/0012-fix-header_module.patch + ./qtbase.patch.d/0003-qtbase-mkspecs.patch + ./qtbase.patch.d/0004-qtbase-replace-libdir.patch + ./qtbase.patch.d/0005-qtbase-cmake.patch + ./qtbase.patch.d/0006-qtbase-gtk3.patch + ./qtbase.patch.d/0007-qtbase-xcursor.patch + ./qtbase.patch.d/0008-qtbase-xcompose.patch + ./qtbase.patch.d/0009-qtbase-tzdir.patch + ./qtbase.patch.d/0010-qtbase-qtpluginpath.patch + ./qtbase.patch.d/0011-qtbase-assert.patch + ./qtbase.patch.d/0012-fix-header_module.patch - # Ensure -I${includedir} is added to Cflags in pkg-config files. - # See https://github.com/NixOS/nixpkgs/issues/52457 - ./qtbase.patch.d/0014-qtbase-pkg-config.patch - ]; + # Ensure -I${includedir} is added to Cflags in pkg-config files. + # See https://github.com/NixOS/nixpkgs/issues/52457 + ./qtbase.patch.d/0014-qtbase-pkg-config.patch + ]; qtdeclarative = [ ./qtdeclarative.patch ]; qtlocation = [ ./qtlocation-gcc-9.patch ]; qtscript = [ ./qtscript.patch ]; @@ -143,6 +139,9 @@ let inherit bison cups harfbuzz libGL; withGtk3 = true; inherit dconf gtk3; inherit debug developerBuild decryptSslTraffic; + inherit (darwin.apple_sdk.frameworks) AGL AppKit ApplicationServices Carbon Cocoa CoreAudio CoreBluetooth + CoreLocation CoreServices DiskArbitration Foundation OpenGL MetalKit IOKit; + inherit (darwin) libobjc; }; qtcharts = callPackage ../modules/qtcharts.nix {}; @@ -173,11 +172,21 @@ let qtvirtualkeyboard = callPackage ../modules/qtvirtualkeyboard.nix {}; qtwayland = callPackage ../modules/qtwayland.nix {}; qtwebchannel = callPackage ../modules/qtwebchannel.nix {}; - qtwebengine = callPackage ../modules/qtwebengine.nix {}; + qtwebengine = callPackage ../modules/qtwebengine.nix { + inherit (darwin) cctools libobjc libunwind xnu; + inherit (darwin.apple_sdk.libs) sandbox; + inherit (darwin.apple_sdk.frameworks) ApplicationServices AVFoundation Foundation ForceFeedback GameController AppKit + ImageCaptureCore CoreBluetooth IOBluetooth CoreWLAN Quartz Cocoa LocalAuthentication; + }; qtwebglplugin = callPackage ../modules/qtwebglplugin.nix {}; - qtwebkit = callPackage ../modules/qtwebkit.nix {}; + qtwebkit = callPackage ../modules/qtwebkit.nix { + inherit (darwin) ICU; + inherit (darwin.apple_sdk.frameworks) OpenGL; + }; qtwebsockets = callPackage ../modules/qtwebsockets.nix {}; - qtwebview = callPackage ../modules/qtwebview.nix {}; + qtwebview = callPackage ../modules/qtwebview.nix { + inherit (darwin.apple_sdk.frameworks) CoreFoundation WebKit; + }; qtx11extras = callPackage ../modules/qtx11extras.nix {}; qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {}; @@ -188,8 +197,8 @@ let qtscript qtsensors qtserialport qtsvg qttools qttranslations qtvirtualkeyboard qtwebchannel qtwebengine qtwebkit qtwebsockets qtwebview qtx11extras qtxmlpatterns - ] ++ optional (!stdenv.isDarwin) qtwayland - ++ optional (stdenv.isDarwin) qtmacextras); + ] ++ lib.optional (!stdenv.isDarwin) qtwayland + ++ lib.optional (stdenv.isDarwin) qtmacextras); qmake = makeSetupHook { deps = [ self.qtbase.dev ]; @@ -200,12 +209,11 @@ let } ../hooks/qmake-hook.sh; wrapQtAppsHook = makeSetupHook { - deps = - [ self.qtbase.dev makeWrapper ] - ++ optional stdenv.isLinux self.qtwayland.dev; + deps = [ self.qtbase.dev makeWrapper ] + ++ lib.optional stdenv.isLinux self.qtwayland.dev; } ../hooks/wrap-qt-apps-hook.sh; }; - self = makeScope newScope addPackages; + self = lib.makeScope newScope addPackages; in self diff --git a/pkgs/development/libraries/qt-5/5.14/default.nix b/pkgs/development/libraries/qt-5/5.14/default.nix index 02b170e0eb17..eaf7998047f0 100644 --- a/pkgs/development/libraries/qt-5/5.14/default.nix +++ b/pkgs/development/libraries/qt-5/5.14/default.nix @@ -14,21 +14,18 @@ top-level attribute to `top-level/all-packages.nix`. */ -{ - newScope, - lib, stdenv, fetchurl, fetchpatch, fetchFromGitHub, makeSetupHook, makeWrapper, - bison, cups ? null, harfbuzz, libGL, perl, - gstreamer, gst-plugins-base, gtk3, dconf, - llvmPackages_5, +{ newScope +, lib, stdenv, fetchurl, fetchpatch, fetchFromGitHub, makeSetupHook, makeWrapper +, bison, cups ? null, harfbuzz, libGL, perl +, gstreamer, gst-plugins-base, gtk3, dconf +, llvmPackages_5, darwin # options - developerBuild ? false, - decryptSslTraffic ? false, - debug ? false, +, developerBuild ? false +, decryptSslTraffic ? false +, debug ? false }: -with lib; - let qtCompatVersion = srcs.qtbase.version; @@ -51,29 +48,27 @@ let }; patches = { - qtbase = - optionals stdenv.isDarwin [ - ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch + qtbase = lib.optionals stdenv.isDarwin [ + ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch - # Downgrade minimal required SDK to 10.12 - ./qtbase.patch.d/0013-define-kiosurfacesuccess.patch - ./qtbase.patch.d/qtbase-sdk-10.12-mac.patch + # Downgrade minimal required SDK to 10.12 + ./qtbase.patch.d/0013-define-kiosurfacesuccess.patch + ./qtbase.patch.d/qtbase-sdk-10.12-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/0003-qtbase-mkspecs.patch - ./qtbase.patch.d/0004-qtbase-replace-libdir.patch - ./qtbase.patch.d/0005-qtbase-cmake.patch - ./qtbase.patch.d/0006-qtbase-gtk3.patch - ./qtbase.patch.d/0007-qtbase-xcursor.patch - ./qtbase.patch.d/0008-qtbase-tzdir.patch - ./qtbase.patch.d/0009-qtbase-qtpluginpath.patch - ./qtbase.patch.d/0010-qtbase-assert.patch - ./qtbase.patch.d/0011-fix-header_module.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/0003-qtbase-mkspecs.patch + ./qtbase.patch.d/0004-qtbase-replace-libdir.patch + ./qtbase.patch.d/0005-qtbase-cmake.patch + ./qtbase.patch.d/0006-qtbase-gtk3.patch + ./qtbase.patch.d/0007-qtbase-xcursor.patch + ./qtbase.patch.d/0008-qtbase-tzdir.patch + ./qtbase.patch.d/0009-qtbase-qtpluginpath.patch + ./qtbase.patch.d/0010-qtbase-assert.patch + ./qtbase.patch.d/0011-fix-header_module.patch + ]; qtdeclarative = [ ./qtdeclarative.patch ]; qtlocation = [ ./qtlocation-gcc-9.patch ]; qtscript = [ ./qtscript.patch ]; @@ -103,8 +98,7 @@ let stripLen = 1; extraPrefix = "src/3rdparty/"; }) - ] - ++ optional stdenv.isDarwin ./qtwebengine-darwin-no-platform-check.patch; + ] ++ lib.optional stdenv.isDarwin ./qtwebengine-darwin-no-platform-check.patch; qtwebkit = [ (fetchpatch { name = "qtwebkit-bison-3.7-build.patch"; @@ -118,7 +112,7 @@ let }) ./qtwebkit.patch ./qtwebkit-icu68.patch - ] ++ optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ ./qtwebkit-darwin-no-readline.patch ./qtwebkit-darwin-no-qos-classes.patch ]; @@ -157,6 +151,9 @@ let inherit bison cups harfbuzz libGL; withGtk3 = true; inherit dconf gtk3; inherit debug developerBuild decryptSslTraffic; + inherit (darwin.apple_sdk.frameworks) AGL AppKit ApplicationServices Carbon Cocoa CoreAudio CoreBluetooth + CoreLocation CoreServices DiskArbitration Foundation OpenGL MetalKit IOKit; + inherit (darwin) libobjc; }; qtcharts = callPackage ../modules/qtcharts.nix {}; @@ -185,11 +182,21 @@ let qtvirtualkeyboard = callPackage ../modules/qtvirtualkeyboard.nix {}; qtwayland = callPackage ../modules/qtwayland.nix {}; qtwebchannel = callPackage ../modules/qtwebchannel.nix {}; - qtwebengine = callPackage ../modules/qtwebengine.nix {}; + qtwebengine = callPackage ../modules/qtwebengine.nix { + inherit (darwin) cctools libobjc libunwind xnu; + inherit (darwin.apple_sdk.libs) sandbox; + inherit (darwin.apple_sdk.frameworks) ApplicationServices AVFoundation Foundation ForceFeedback GameController AppKit + ImageCaptureCore CoreBluetooth IOBluetooth CoreWLAN Quartz Cocoa LocalAuthentication; + }; qtwebglplugin = callPackage ../modules/qtwebglplugin.nix {}; - qtwebkit = callPackage ../modules/qtwebkit.nix {}; + qtwebkit = callPackage ../modules/qtwebkit.nix { + inherit (darwin) ICU; + inherit (darwin.apple_sdk.frameworks) OpenGL; + }; qtwebsockets = callPackage ../modules/qtwebsockets.nix {}; - qtwebview = callPackage ../modules/qtwebview.nix {}; + qtwebview = callPackage ../modules/qtwebview.nix { + inherit (darwin.apple_sdk.frameworks) CoreFoundation WebKit; + }; qtx11extras = callPackage ../modules/qtx11extras.nix {}; qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {}; @@ -200,8 +207,8 @@ let qtscript qtsensors qtserialport qtsvg qttools qttranslations qtvirtualkeyboard qtwebchannel qtwebengine qtwebkit qtwebsockets qtwebview qtx11extras qtxmlpatterns - ] ++ optional (!stdenv.isDarwin) qtwayland - ++ optional (stdenv.isDarwin) qtmacextras); + ] ++ lib.optional (!stdenv.isDarwin) qtwayland + ++ lib.optional (stdenv.isDarwin) qtmacextras); qmake = makeSetupHook { deps = [ self.qtbase.dev ]; @@ -212,12 +219,11 @@ let } ../hooks/qmake-hook.sh; wrapQtAppsHook = makeSetupHook { - deps = - [ self.qtbase.dev makeWrapper ] - ++ optional stdenv.isLinux self.qtwayland.dev; + deps = [ self.qtbase.dev makeWrapper ] + ++ lib.optional stdenv.isLinux self.qtwayland.dev; } ../hooks/wrap-qt-apps-hook.sh; }; - self = makeScope newScope addPackages; + self = lib.makeScope newScope addPackages; in self diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index 1bd1b5633509..b078a696d9c7 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -14,21 +14,18 @@ top-level attribute to `top-level/all-packages.nix`. */ -{ - newScope, - lib, stdenv, fetchurl, fetchpatch, fetchgit, fetchFromGitHub, makeSetupHook, makeWrapper, - bison, cups ? null, harfbuzz, libGL, perl, - gstreamer, gst-plugins-base, gtk3, dconf, - llvmPackages_5, +{ newScope +, lib, stdenv, fetchurl, fetchgit, fetchpatch, fetchFromGitHub, makeSetupHook, makeWrapper +, bison, cups ? null, harfbuzz, libGL, perl +, gstreamer, gst-plugins-base, gtk3, dconf +, llvmPackages_5, darwin # options - developerBuild ? false, - decryptSslTraffic ? false, - debug ? false, +, developerBuild ? false +, decryptSslTraffic ? false +, debug ? false }: -with lib; - let qtCompatVersion = srcs.qtbase.version; @@ -67,7 +64,7 @@ let inherit rev branchName; fetchSubmodules = true; leaveDotGit = true; - name = "qtwebengine-${substring 0 7 rev}.tar.gz"; + name = "qtwebengine-${lib.substring 0 7 rev}.tar.gz"; postFetch = '' # remove submodule .git directory rm -rf $out/src/3rdparty/.git @@ -87,40 +84,38 @@ let }; patches = { - qtbase = - optionals stdenv.isDarwin [ - ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch + qtbase = lib.optionals stdenv.isDarwin [ + ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch - # Downgrade minimal required SDK to 10.12 - ./qtbase.patch.d/0013-define-kiosurfacesuccess.patch - ./qtbase.patch.d/macos-sdk-10.12/0001-Revert-QCocoaDrag-set-image-only-on-the-first-drag-i.patch - ./qtbase.patch.d/macos-sdk-10.12/0002-Revert-QCocoaDrag-drag-make-sure-clipboard-is-ours-a.patch - ./qtbase.patch.d/macos-sdk-10.12/0003-Revert-QCocoaDrag-maybeDragMultipleItems-fix-erroneo.patch - ./qtbase.patch.d/macos-sdk-10.12/0004-Revert-QCocoaDrag-avoid-using-the-deprecated-API-if-.patch - ./qtbase.patch.d/macos-sdk-10.12/0005-Revert-macOS-Fix-use-of-deprecated-NSOffState.patch - ./qtbase.patch.d/macos-sdk-10.12/0006-git-checkout-v5.15.0-src-plugins-platforms-cocoa-qco.patch - ./qtbase.patch.d/qtbase-sdk-10.12-mac.patch + # Downgrade minimal required SDK to 10.12 + ./qtbase.patch.d/0013-define-kiosurfacesuccess.patch + ./qtbase.patch.d/macos-sdk-10.12/0001-Revert-QCocoaDrag-set-image-only-on-the-first-drag-i.patch + ./qtbase.patch.d/macos-sdk-10.12/0002-Revert-QCocoaDrag-drag-make-sure-clipboard-is-ours-a.patch + ./qtbase.patch.d/macos-sdk-10.12/0003-Revert-QCocoaDrag-maybeDragMultipleItems-fix-erroneo.patch + ./qtbase.patch.d/macos-sdk-10.12/0004-Revert-QCocoaDrag-avoid-using-the-deprecated-API-if-.patch + ./qtbase.patch.d/macos-sdk-10.12/0005-Revert-macOS-Fix-use-of-deprecated-NSOffState.patch + ./qtbase.patch.d/macos-sdk-10.12/0006-git-checkout-v5.15.0-src-plugins-platforms-cocoa-qco.patch + ./qtbase.patch.d/qtbase-sdk-10.12-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/0003-qtbase-mkspecs.patch - ./qtbase.patch.d/0004-qtbase-replace-libdir.patch - ./qtbase.patch.d/0005-qtbase-cmake.patch - ./qtbase.patch.d/0006-qtbase-gtk3.patch - ./qtbase.patch.d/0007-qtbase-xcursor.patch - ./qtbase.patch.d/0008-qtbase-tzdir.patch - ./qtbase.patch.d/0009-qtbase-qtpluginpath.patch - ./qtbase.patch.d/0010-qtbase-assert.patch - ./qtbase.patch.d/0011-fix-header_module.patch - (fetchpatch { # This can be removed when https://codereview.qt-project.org/c/qt/qtbase/+/339323 is included in an release. - name = "0014-gcc11-compat.patch"; - url = "https://codereview.qt-project.org/gitweb?p=qt/qtbase.git;a=patch;h=049e14870c13235cd066758f29c42dc96c1ccdf8"; - sha256 = "1cb2hwi859hds0fa2cbap014qaa7mah9p0rcxcm2cvj2ybl33qfc"; - }) - ]; + # 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/0003-qtbase-mkspecs.patch + ./qtbase.patch.d/0004-qtbase-replace-libdir.patch + ./qtbase.patch.d/0005-qtbase-cmake.patch + ./qtbase.patch.d/0006-qtbase-gtk3.patch + ./qtbase.patch.d/0007-qtbase-xcursor.patch + ./qtbase.patch.d/0008-qtbase-tzdir.patch + ./qtbase.patch.d/0009-qtbase-qtpluginpath.patch + ./qtbase.patch.d/0010-qtbase-assert.patch + ./qtbase.patch.d/0011-fix-header_module.patch + (fetchpatch { # This can be removed when https://codereview.qt-project.org/c/qt/qtbase/+/339323 is included in an release. + name = "0014-gcc11-compat.patch"; + url = "https://codereview.qt-project.org/gitweb?p=qt/qtbase.git;a=patch;h=049e14870c13235cd066758f29c42dc96c1ccdf8"; + sha256 = "1cb2hwi859hds0fa2cbap014qaa7mah9p0rcxcm2cvj2ybl33qfc"; + }) + ]; qtdeclarative = [ ./qtdeclarative.patch ]; qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; @@ -136,7 +131,7 @@ let name = "qtwebengine-everywhere-src-5.15.5-_1904652.patch"; sha256 = "01q7hagq0ysii1jnrh5adm97vdm9cis592xr6im7accyw6hgcn7b"; }) - ] ++ optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ ./qtwebengine-darwin-no-platform-check.patch ./qtwebengine-mac-dont-set-dsymutil-path.patch ]; @@ -153,7 +148,7 @@ let }) ./qtwebkit.patch ./qtwebkit-icu68.patch - ] ++ optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ ./qtwebkit-darwin-no-readline.patch ./qtwebkit-darwin-no-qos-classes.patch ]; @@ -191,6 +186,9 @@ let inherit bison cups harfbuzz libGL; withGtk3 = true; inherit dconf gtk3; inherit developerBuild decryptSslTraffic; + inherit (darwin.apple_sdk.frameworks) AGL AppKit ApplicationServices Carbon Cocoa CoreAudio CoreBluetooth + CoreLocation CoreServices DiskArbitration Foundation OpenGL MetalKit IOKit; + inherit (darwin) libobjc; }; qtcharts = callPackage ../modules/qtcharts.nix {}; @@ -222,11 +220,20 @@ let qtwebchannel = callPackage ../modules/qtwebchannel.nix {}; qtwebengine = callPackage ../modules/qtwebengine.nix { inherit (srcs.qtwebengine) version; + inherit (darwin) cctools libobjc libunwind xnu; + inherit (darwin.apple_sdk.libs) sandbox; + inherit (darwin.apple_sdk.frameworks) ApplicationServices AVFoundation Foundation ForceFeedback GameController AppKit + ImageCaptureCore CoreBluetooth IOBluetooth CoreWLAN Quartz Cocoa LocalAuthentication; }; qtwebglplugin = callPackage ../modules/qtwebglplugin.nix {}; - qtwebkit = callPackage ../modules/qtwebkit.nix {}; + qtwebkit = callPackage ../modules/qtwebkit.nix { + inherit (darwin) ICU; + inherit (darwin.apple_sdk.frameworks) OpenGL; + }; qtwebsockets = callPackage ../modules/qtwebsockets.nix {}; - qtwebview = callPackage ../modules/qtwebview.nix {}; + qtwebview = callPackage ../modules/qtwebview.nix { + inherit (darwin.apple_sdk.frameworks) CoreFoundation WebKit; + }; qtx11extras = callPackage ../modules/qtx11extras.nix {}; qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {}; @@ -237,8 +244,8 @@ let qtscript qtsensors qtserialport qtsvg qttools qttranslations qtvirtualkeyboard qtwebchannel qtwebengine qtwebkit qtwebsockets qtwebview qtx11extras qtxmlpatterns - ] ++ optional (!stdenv.isDarwin) qtwayland - ++ optional (stdenv.isDarwin) qtmacextras); + ] ++ lib.optional (!stdenv.isDarwin) qtwayland + ++ lib.optional (stdenv.isDarwin) qtmacextras); qmake = makeSetupHook { deps = [ self.qtbase.dev ]; @@ -249,12 +256,11 @@ let } ../hooks/qmake-hook.sh; wrapQtAppsHook = makeSetupHook { - deps = - [ self.qtbase.dev makeWrapper ] - ++ optional stdenv.isLinux self.qtwayland.dev; + deps = [ self.qtbase.dev makeWrapper ] + ++ lib.optional stdenv.isLinux self.qtwayland.dev; } ../hooks/wrap-qt-apps-hook.sh; }; - self = makeScope newScope addPackages; + self = lib.makeScope newScope addPackages; in self diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 4291390c72ca..04a89558c3d0 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -1,30 +1,30 @@ -{ - stdenv, lib, - src, patches, version, qtCompatVersion, +{ stdenv, lib +, src, patches, version, qtCompatVersion - coreutils, bison, flex, gdb, gperf, lndir, perl, pkg-config, python3, - which, +, coreutils, bison, flex, gdb, gperf, lndir, perl, pkg-config, python3 +, which # darwin support - darwin, libiconv, xcbuild, +, libiconv, libobjc, xcbuild, AGL, AppKit, ApplicationServices, Carbon, Cocoa, CoreAudio, CoreBluetooth +, CoreLocation, CoreServices, DiskArbitration, Foundation, OpenGL, MetalKit, IOKit - dbus, fontconfig, freetype, glib, harfbuzz, icu, libX11, libXcomposite, - libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng, - libxcb, libxkbcommon, libxml2, libxslt, openssl, pcre16, pcre2, sqlite, udev, - xcbutil, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, xcbutilwm, - zlib, +, dbus, fontconfig, freetype, glib, harfbuzz, icu, libX11, libXcomposite +, libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng +, libxcb, libxkbcommon, libxml2, libxslt, openssl, pcre16, pcre2, sqlite, udev +, xcbutil, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, xcbutilwm +, zlib # optional dependencies - cups ? null, libmysqlclient ? null, postgresql ? null, - withGtk3 ? false, dconf ? null, gtk3 ? null, +, cups ? null, libmysqlclient ? null, postgresql ? null +, withGtk3 ? false, dconf ? null, gtk3 ? null # options - libGLSupported ? !stdenv.isDarwin, - libGL, - buildExamples ? false, - buildTests ? false, - debug ? false, - developerBuild ? false, - decryptSslTraffic ? false +, libGLSupported ? !stdenv.isDarwin +, libGL +, buildExamples ? false +, buildTests ? false +, debug ? false +, developerBuild ? false +, decryptSslTraffic ? false }: assert withGtk3 -> dconf != null; @@ -32,53 +32,43 @@ assert withGtk3 -> gtk3 != null; let compareVersion = v: builtins.compareVersions version v; - qmakeCacheName = - if compareVersion "5.12.4" < 0 then ".qmake.cache" else ".qmake.stash"; + qmakeCacheName = if compareVersion "5.12.4" < 0 then ".qmake.cache" else ".qmake.stash"; debugSymbols = debug || developerBuild; in stdenv.mkDerivation { - - name = "qtbase-${version}"; + pname = "qtbase"; inherit qtCompatVersion src version; debug = debugSymbols; - propagatedBuildInputs = - [ - libxml2 libxslt openssl sqlite zlib + propagatedBuildInputs = [ + libxml2 libxslt openssl sqlite zlib + + # Text rendering + harfbuzz icu + + # Image formats + libjpeg libpng + (if compareVersion "5.9.0" < 0 then pcre16 else pcre2) + ] ++ ( + if stdenv.isDarwin then [ + # TODO: move to buildInputs, this should not be propagated. + AGL AppKit ApplicationServices Carbon Cocoa CoreAudio CoreBluetooth + CoreLocation CoreServices DiskArbitration Foundation OpenGL + libobjc libiconv MetalKit IOKit + ] else [ + dbus glib udev # Text rendering - harfbuzz icu + fontconfig freetype - # Image formats - libjpeg libpng - (if compareVersion "5.9.0" < 0 then pcre16 else pcre2) - ] - ++ ( - if stdenv.isDarwin - then with darwin.apple_sdk.frameworks; - [ - # TODO: move to buildInputs, this should not be propagated. - AGL AppKit ApplicationServices Carbon Cocoa CoreAudio CoreBluetooth - CoreLocation CoreServices DiskArbitration Foundation OpenGL - darwin.libobjc libiconv MetalKit IOKit - ] - else - [ - dbus glib udev + # X11 libs + libX11 libXcomposite libXext libXi libXrender libxcb libxkbcommon xcbutil + xcbutilimage xcbutilkeysyms xcbutilrenderutil xcbutilwm + ] ++ lib.optional libGLSupported libGL + ); - # Text rendering - fontconfig freetype - - # X11 libs - libX11 libXcomposite libXext libXi libXrender libxcb libxkbcommon xcbutil - xcbutilimage xcbutilkeysyms xcbutilrenderutil xcbutilwm - ] - ++ lib.optional libGLSupported libGL - ); - - buildInputs = - [ python3 ] + buildInputs = [ python3 ] ++ lib.optionals (!stdenv.isDarwin) ( [ libinput ] @@ -89,8 +79,7 @@ stdenv.mkDerivation { ++ lib.optional (libmysqlclient != null) libmysqlclient ++ lib.optional (postgresql != null) postgresql; - nativeBuildInputs = - [ bison flex gperf lndir perl pkg-config which ] + nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which ] ++ lib.optionals stdenv.isDarwin [ xcbuild ]; propagatedNativeBuildInputs = [ lndir ]; @@ -108,53 +97,42 @@ stdenv.mkDerivation { . ${../hooks/fix-qmake-libtool.sh} ''; - postPatch = + postPatch = '' + for prf in qml_plugin.prf qt_plugin.prf qt_docs.prf qml_module.prf create_cmake.prf; do + substituteInPlace "mkspecs/features/$prf" \ + --subst-var qtPluginPrefix \ + --subst-var qtQmlPrefix \ + --subst-var qtDocPrefix + done + + substituteInPlace configure --replace /bin/pwd pwd + substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls + sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i mkspecs/*/*.conf + + sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5Config.cmake.in + sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5CoreMacros.cmake + sed -i 's/NO_DEFAULT_PATH//' src/gui/Qt5GuiConfigExtras.cmake.in + sed -i '/PATHS.*NO_DEFAULT_PATH/ d' mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in + '' + ( + if stdenv.isDarwin then '' + sed -i \ + -e 's|/usr/bin/xcode-select|xcode-select|' \ + -e 's|/usr/bin/xcrun|xcrun|' \ + -e 's|/usr/bin/xcodebuild|xcodebuild|' \ + -e 's|QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`|QMAKE_CXX="clang++"\nQMAKE_CONF_COMPILER="clang++"|' \ + ./configure + substituteInPlace ./mkspecs/common/mac.conf \ + --replace "/System/Library/Frameworks/OpenGL.framework/" "${OpenGL}/Library/Frameworks/OpenGL.framework/" \ + --replace "/System/Library/Frameworks/AGL.framework/" "${AGL}/Library/Frameworks/AGL.framework/" + '' else lib.optionalString libGLSupported '' + sed -i mkspecs/common/linux.conf \ + -e "/^QMAKE_INCDIR_OPENGL/ s|$|${libGL.dev or libGL}/include|" \ + -e "/^QMAKE_LIBDIR_OPENGL/ s|$|${libGL.out}/lib|" + '' + lib.optionalString (stdenv.hostPlatform.isx86_32 && stdenv.cc.isGNU) '' + sed -i mkspecs/common/gcc-base-unix.conf \ + -e "/^QMAKE_LFLAGS_SHLIB/ s/-shared/-shared -static-libgcc/" '' - for prf in qml_plugin.prf qt_plugin.prf qt_docs.prf qml_module.prf create_cmake.prf; do - substituteInPlace "mkspecs/features/$prf" \ - --subst-var qtPluginPrefix \ - --subst-var qtQmlPrefix \ - --subst-var qtDocPrefix - done - - substituteInPlace configure --replace /bin/pwd pwd - substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls - sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i mkspecs/*/*.conf - - sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5Config.cmake.in - sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5CoreMacros.cmake - sed -i 's/NO_DEFAULT_PATH//' src/gui/Qt5GuiConfigExtras.cmake.in - sed -i '/PATHS.*NO_DEFAULT_PATH/ d' mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in - '' - - + ( - if stdenv.isDarwin - then - '' - sed -i \ - -e 's|/usr/bin/xcode-select|xcode-select|' \ - -e 's|/usr/bin/xcrun|xcrun|' \ - -e 's|/usr/bin/xcodebuild|xcodebuild|' \ - -e 's|QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`|QMAKE_CXX="clang++"\nQMAKE_CONF_COMPILER="clang++"|' \ - ./configure - substituteInPlace ./mkspecs/common/mac.conf \ - --replace "/System/Library/Frameworks/OpenGL.framework/" "${darwin.apple_sdk.frameworks.OpenGL}/Library/Frameworks/OpenGL.framework/" - substituteInPlace ./mkspecs/common/mac.conf \ - --replace "/System/Library/Frameworks/AGL.framework/" "${darwin.apple_sdk.frameworks.AGL}/Library/Frameworks/AGL.framework/" - '' - else - lib.optionalString libGLSupported - '' - sed -i mkspecs/common/linux.conf \ - -e "/^QMAKE_INCDIR_OPENGL/ s|$|${libGL.dev or libGL}/include|" \ - -e "/^QMAKE_LIBDIR_OPENGL/ s|$|${libGL.out}/lib|" - '' + - lib.optionalString (stdenv.hostPlatform.isx86_32 && stdenv.cc.isGNU) - '' - sed -i mkspecs/common/gcc-base-unix.conf \ - -e "/^QMAKE_LFLAGS_SHLIB/ s/-shared/-shared -static-libgcc/" - '' - ); + ); qtPluginPrefix = "lib/qt-${qtCompatVersion}/plugins"; qtQmlPrefix = "lib/qt-${qtCompatVersion}/qml"; @@ -213,153 +191,128 @@ stdenv.mkDerivation { PSQL_LIBS = lib.optionalString (postgresql != null) "-L${postgresql.lib}/lib -lpq"; # TODO Remove obsolete and useless flags once the build will be totally mastered - configureFlags = - [ - "-plugindir $(out)/$(qtPluginPrefix)" - "-qmldir $(out)/$(qtQmlPrefix)" - "-docdir $(out)/$(qtDocPrefix)" + configureFlags = [ + "-plugindir $(out)/$(qtPluginPrefix)" + "-qmldir $(out)/$(qtQmlPrefix)" + "-docdir $(out)/$(qtDocPrefix)" - "-verbose" - "-confirm-license" - "-opensource" + "-verbose" + "-confirm-license" + "-opensource" - "-release" - "-shared" - "-accessibility" - "-optimized-qmake" - "-strip" - "-system-proxies" - "-pkg-config" + "-release" + "-shared" + "-accessibility" + "-optimized-qmake" + "-strip" + "-system-proxies" + "-pkg-config" - "-gui" - "-widgets" - "-opengl desktop" - "-icu" - "-L" "${icu.out}/lib" - "-I" "${icu.dev}/include" - "-pch" - ] - ++ lib.optional debugSymbols "-debug" - ++ lib.optionals (compareVersion "5.11.0" < 0) - [ - "-qml-debug" - ] - ++ lib.optionals (compareVersion "5.9.0" < 0) - [ - "-c++11" - "-no-reduce-relocations" - ] - ++ lib.optionals developerBuild [ - "-developer-build" - "-no-warnings-are-errors" + "-gui" + "-widgets" + "-opengl desktop" + "-icu" + "-L" "${icu.out}/lib" + "-I" "${icu.dev}/include" + "-pch" + ] ++ lib.optional debugSymbols "-debug" + ++ lib.optionals (compareVersion "5.11.0" < 0) [ + "-qml-debug" + ] ++ lib.optionals (compareVersion "5.9.0" < 0) [ + "-c++11" + "-no-reduce-relocations" + ] ++ lib.optionals developerBuild [ + "-developer-build" + "-no-warnings-are-errors" + ] ++ (if (!stdenv.hostPlatform.isx86_64) then [ + "-no-sse2" + ] else lib.optionals (compareVersion "5.9.0" >= 0) [ + "-sse2" + "${lib.optionalString (!stdenv.hostPlatform.sse3Support) "-no"}-sse3" + "${lib.optionalString (!stdenv.hostPlatform.ssse3Support) "-no"}-ssse3" + "${lib.optionalString (!stdenv.hostPlatform.sse4_1Support) "-no"}-sse4.1" + "${lib.optionalString (!stdenv.hostPlatform.sse4_2Support) "-no"}-sse4.2" + "${lib.optionalString (!stdenv.hostPlatform.avxSupport) "-no"}-avx" + "${lib.optionalString (!stdenv.hostPlatform.avx2Support) "-no"}-avx2" ] + ) ++ [ + "-no-mips_dsp" + "-no-mips_dspr2" + ] ++ [ + "-system-zlib" + "-L" "${zlib.out}/lib" + "-I" "${zlib.dev}/include" + "-system-libjpeg" + "-L" "${libjpeg.out}/lib" + "-I" "${libjpeg.dev}/include" + "-system-harfbuzz" + "-L" "${harfbuzz.out}/lib" + "-I" "${harfbuzz.dev}/include" + "-system-pcre" + "-openssl-linked" + "-L" "${openssl.out}/lib" + "-I" "${openssl.dev}/include" + "-system-sqlite" + ''-${if libmysqlclient != null then "plugin" else "no"}-sql-mysql'' + ''-${if postgresql != null then "plugin" else "no"}-sql-psql'' + + "-make libs" + "-make tools" + ''-${lib.optionalString (!buildExamples) "no"}make examples'' + ''-${lib.optionalString (!buildTests) "no"}make tests'' + ] ++ lib.optional (compareVersion "5.15.0" < 0) "-v" ++ ( - if (!stdenv.hostPlatform.isx86_64) then [ - "-no-sse2" - ] else if (compareVersion "5.9.0" >= 0) then [ - "-sse2" - "${if stdenv.hostPlatform.sse3Support then "" else "-no"}-sse3" - "${if stdenv.hostPlatform.ssse3Support then "" else "-no"}-ssse3" - "${if stdenv.hostPlatform.sse4_1Support then "" else "-no"}-sse4.1" - "${if stdenv.hostPlatform.sse4_2Support then "" else "-no"}-sse4.2" - "${if stdenv.hostPlatform.avxSupport then "" else "-no"}-avx" - "${if stdenv.hostPlatform.avx2Support then "" else "-no"}-avx2" - ] else [ - ] - ) - ++ [ - "-no-mips_dsp" - "-no-mips_dspr2" + if stdenv.isDarwin then [ + "-platform macx-clang" + "-no-fontconfig" + "-qt-freetype" + "-qt-libpng" + "-no-framework" + ] else [ + "-${lib.optionalString (compareVersion "5.9.0" < 0) "no-"}rpath" + ] ++ lib.optional (compareVersion "5.15.0" < 0) "-system-xcb" + ++ [ + "-xcb" + "-qpa xcb" + "-L" "${libX11.out}/lib" + "-I" "${libX11.out}/include" + "-L" "${libXext.out}/lib" + "-I" "${libXext.out}/include" + "-L" "${libXrender.out}/lib" + "-I" "${libXrender.out}/include" + + "-libinput" + + ''-${lib.optionalString (cups == null) "no-"}cups'' + "-dbus-linked" + "-glib" + ] ++ lib.optional (compareVersion "5.15.0" < 0) "-system-libjpeg" + ++ [ + "-system-libpng" + ] ++ lib.optional withGtk3 "-gtk" + ++ lib.optional (compareVersion "5.9.0" >= 0) "-inotify" + ++ lib.optionals (compareVersion "5.10.0" >= 0) [ + # Without these, Qt stops working on kernels < 3.17. See: + # https://github.com/NixOS/nixpkgs/issues/38832 + "-no-feature-renameat2" + "-no-feature-getentropy" + ] ++ lib.optionals (compareVersion "5.12.1" < 0) [ + # use -xkbcommon and -xkbcommon-evdev for versions before 5.12.1 + "-system-xkbcommon" + "-xkbcommon-evdev" + ] ++ lib.optionals (cups != null) [ + "-L" "${cups.lib}/lib" + "-I" "${cups.dev}/include" + ] ++ lib.optionals (libmysqlclient != null) [ + "-L" "${libmysqlclient}/lib" + "-I" "${libmysqlclient}/include" ] + ); - ++ [ - "-system-zlib" - "-L" "${zlib.out}/lib" - "-I" "${zlib.dev}/include" - "-system-libjpeg" - "-L" "${libjpeg.out}/lib" - "-I" "${libjpeg.dev}/include" - "-system-harfbuzz" - "-L" "${harfbuzz.out}/lib" - "-I" "${harfbuzz.dev}/include" - "-system-pcre" - "-openssl-linked" - "-L" "${openssl.out}/lib" - "-I" "${openssl.dev}/include" - "-system-sqlite" - ''-${if libmysqlclient != null then "plugin" else "no"}-sql-mysql'' - ''-${if postgresql != null then "plugin" else "no"}-sql-psql'' - - "-make libs" - "-make tools" - ''-${lib.optionalString (!buildExamples) "no"}make examples'' - ''-${lib.optionalString (!buildTests) "no"}make tests'' - ] - ++ lib.optional (compareVersion "5.15.0" < 0) "-v" - - ++ ( - if stdenv.isDarwin - then - [ - "-platform macx-clang" - "-no-fontconfig" - "-qt-freetype" - "-qt-libpng" - "-no-framework" - ] - else - [ - "-${lib.optionalString (compareVersion "5.9.0" < 0) "no-"}rpath" - ] - ++ lib.optional (compareVersion "5.15.0" < 0) "-system-xcb" - ++ [ - "-xcb" - "-qpa xcb" - "-L" "${libX11.out}/lib" - "-I" "${libX11.out}/include" - "-L" "${libXext.out}/lib" - "-I" "${libXext.out}/include" - "-L" "${libXrender.out}/lib" - "-I" "${libXrender.out}/include" - - "-libinput" - - ''-${lib.optionalString (cups == null) "no-"}cups'' - "-dbus-linked" - "-glib" - ] - ++ lib.optional (compareVersion "5.15.0" < 0) "-system-libjpeg" - ++ [ - "-system-libpng" - ] - ++ lib.optional withGtk3 "-gtk" - ++ lib.optional (compareVersion "5.9.0" >= 0) "-inotify" - ++ lib.optionals (compareVersion "5.10.0" >= 0) [ - # Without these, Qt stops working on kernels < 3.17. See: - # https://github.com/NixOS/nixpkgs/issues/38832 - "-no-feature-renameat2" - "-no-feature-getentropy" - ] - ++ lib.optionals (compareVersion "5.12.1" < 0) [ - # use -xkbcommon and -xkbcommon-evdev for versions before 5.12.1 - "-system-xkbcommon" - "-xkbcommon-evdev" - ] - ++ lib.optionals (cups != null) [ - "-L" "${cups.lib}/lib" - "-I" "${cups.dev}/include" - ] - ++ lib.optionals (libmysqlclient != null) [ - "-L" "${libmysqlclient}/lib" - "-I" "${libmysqlclient}/include" - ] - ); - - postInstall = - # Move selected outputs. - '' - moveToOutput "mkspecs" "$dev" - ''; + # Move selected outputs. + postInstall = '' + moveToOutput "mkspecs" "$dev" + ''; devTools = [ "bin/fixqt4headers.pl" @@ -373,35 +326,27 @@ stdenv.mkDerivation { "bin/uic" ]; - postFixup = + postFixup = '' # Don't retain build-time dependencies like gdb. - '' - sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri - '' - - + '' - fixQtModulePaths "''${!outputDev}/mkspecs/modules" - fixQtBuiltinPaths "''${!outputDev}" '*.pr?' - '' + sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri + fixQtModulePaths "''${!outputDev}/mkspecs/modules" + fixQtBuiltinPaths "''${!outputDev}" '*.pr?' # Move development tools to $dev - + '' - moveQtDevTools - moveToOutput bin "$dev" - '' + moveQtDevTools + moveToOutput bin "$dev" # fixup .pc file (where to find 'moc' etc.) - + '' - sed -i "$dev/lib/pkgconfig/Qt5Core.pc" \ - -e "/^host_bins=/ c host_bins=$dev/bin" - ''; + sed -i "$dev/lib/pkgconfig/Qt5Core.pc" \ + -e "/^host_bins=/ c host_bins=$dev/bin" + ''; dontStrip = debugSymbols; setupHook = ../hooks/qtbase-setup-hook.sh; meta = with lib; { - homepage = "http://www.qt.io"; + homepage = "https://www.qt.io/"; description = "A cross-platform application framework for C++"; license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ]; maintainers = with maintainers; [ qknight ttuegel periklis bkchr ]; diff --git a/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix b/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix index 97248ca18076..89f2672c26dd 100644 --- a/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix +++ b/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix @@ -1,7 +1,5 @@ { qtModule, lib, python3, qtbase, qtsvg }: -with lib; - qtModule { pname = "qtdeclarative"; qtInputs = [ qtbase qtsvg ]; diff --git a/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix b/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix index 0d2d565fe7ae..baf5c30e73c4 100644 --- a/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix +++ b/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix @@ -1,17 +1,24 @@ -{ qtModule, lib, stdenv, qtbase, qtdeclarative, pkg-config -, alsa-lib, gstreamer, gst-plugins-base, libpulseaudio, wayland +{ qtModule +, lib +, stdenv +, qtbase +, qtdeclarative +, pkg-config +, alsa-lib +, gstreamer +, gst-plugins-base +, libpulseaudio +, wayland }: -with lib; - qtModule { pname = "qtmultimedia"; qtInputs = [ qtbase qtdeclarative ]; nativeBuildInputs = [ pkg-config ]; buildInputs = [ gstreamer gst-plugins-base libpulseaudio ] - ++ optional (stdenv.isLinux) alsa-lib - ++ optional (versionAtLeast qtbase.version "5.14.0" && stdenv.isLinux) wayland; + ++ lib.optional (stdenv.isLinux) alsa-lib + ++ lib.optional (lib.versionAtLeast qtbase.version "5.14.0" && stdenv.isLinux) wayland; outputs = [ "bin" "dev" "out" ]; qmakeFlags = [ "GST_VERSION=1.0" ]; - NIX_LDFLAGS = optionalString (stdenv.isDarwin) "-lobjc"; + NIX_LDFLAGS = lib.optionalString (stdenv.isDarwin) "-lobjc"; } diff --git a/pkgs/development/libraries/qt-5/modules/qtserialport.nix b/pkgs/development/libraries/qt-5/modules/qtserialport.nix index caeaedbcf3d5..89d96eb29124 100644 --- a/pkgs/development/libraries/qt-5/modules/qtserialport.nix +++ b/pkgs/development/libraries/qt-5/modules/qtserialport.nix @@ -1,11 +1,7 @@ { qtModule, stdenv, lib, qtbase, systemd }: -let inherit (lib) getLib optional; in - qtModule { pname = "qtserialport"; qtInputs = [ qtbase ]; - NIX_CFLAGS_COMPILE = - optional stdenv.isLinux - ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"''; + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isLinux "-DNIXPKGS_LIBUDEV=\"${lib.getLib systemd}/lib/libudev\""; } diff --git a/pkgs/development/libraries/qt-5/modules/qttools.nix b/pkgs/development/libraries/qt-5/modules/qttools.nix index 437ec6cef743..27008f6714ed 100644 --- a/pkgs/development/libraries/qt-5/modules/qttools.nix +++ b/pkgs/development/libraries/qt-5/modules/qttools.nix @@ -1,7 +1,5 @@ { qtModule, stdenv, lib, qtbase, qtdeclarative }: -with lib; - qtModule { pname = "qttools"; qtInputs = [ qtbase qtdeclarative ]; @@ -10,9 +8,9 @@ qtModule { # fixQtBuiltinPaths overwrites a builtin path we should keep postPatch = '' sed -i "src/linguist/linguist.pro" \ - -e '/^cmake_linguist_config_version_file.input =/ s|$$\[QT_HOST_DATA.*\]|${getDev qtbase}|' + -e '/^cmake_linguist_config_version_file.input =/ s|$$\[QT_HOST_DATA.*\]|${lib.getDev qtbase}|' sed -i "src/qtattributionsscanner/qtattributionsscanner.pro" \ - -e '/^cmake_qattributionsscanner_config_version_file.input =/ s|$$\[QT_HOST_DATA.*\]|${getDev qtbase}|' + -e '/^cmake_qattributionsscanner_config_version_file.input =/ s|$$\[QT_HOST_DATA.*\]|${lib.getDev qtbase}|' ''; devTools = [ @@ -34,12 +32,11 @@ qtModule { "bin/qthelpconverter" "bin/lprodump" "bin/qdistancefieldgenerator" - ] ++ optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ "bin/macdeployqt" ]; - NIX_CFLAGS_COMPILE = - lib.optional stdenv.isDarwin ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"''; + NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"''; setupHook = ../hooks/qttools-setup-hook.sh; } diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index e60ae2082f4a..36e6eb6a226e 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -15,21 +15,22 @@ , pipewire_0_2 , enableProprietaryCodecs ? true , gn -, cups, darwin, openbsm, runCommand, xcbuild, writeScriptBin +, cctools, libobjc, libunwind, sandbox, xnu +, ApplicationServices, AVFoundation, Foundation, ForceFeedback, GameController, AppKit +, ImageCaptureCore, CoreBluetooth, IOBluetooth, CoreWLAN, Quartz, Cocoa, LocalAuthentication +, cups, openbsm, runCommand, xcbuild, writeScriptBin , ffmpeg ? null , lib, stdenv, fetchpatch , version ? null , qtCompatVersion }: -with lib; - qtModule { pname = "qtwebengine"; qtInputs = [ qtdeclarative qtquickcontrols qtlocation qtwebchannel ]; nativeBuildInputs = [ bison coreutils flex git gperf ninja pkg-config python2 which gn nodejs - ] ++ optional stdenv.isDarwin xcbuild; + ] ++ lib.optional stdenv.isDarwin xcbuild; doCheck = true; outputs = [ "bin" "dev" "out" ]; @@ -42,66 +43,65 @@ qtModule { # which cannot be set at the same time as -Wformat-security hardeningDisable = [ "format" ]; - postPatch = - '' - # Patch Chromium build tools - ( - cd src/3rdparty/chromium; + postPatch = '' + # Patch Chromium build tools + ( + cd src/3rdparty/chromium; - # Manually fix unsupported shebangs - substituteInPlace third_party/harfbuzz-ng/src/src/update-unicode-tables.make \ - --replace "/usr/bin/env -S make -f" "/usr/bin/make -f" || true + # Manually fix unsupported shebangs + substituteInPlace third_party/harfbuzz-ng/src/src/update-unicode-tables.make \ + --replace "/usr/bin/env -S make -f" "/usr/bin/make -f" || true - patchShebangs . - ) - '' - # Prevent Chromium build script from making the path to `clang` relative to - # the build directory. `clang_base_path` is the value of `QMAKE_CLANG_DIR` - # from `src/core/config/mac_osx.pri`. - + optionalString stdenv.isDarwin '' - substituteInPlace ./src/3rdparty/chromium/build/toolchain/mac/BUILD.gn \ - --replace 'prefix = rebase_path("$clang_base_path/bin/", root_build_dir)' 'prefix = "$clang_base_path/bin/"' - '' - # Patch library paths in Qt sources - + '' - sed -i \ - -e "s,QLibraryInfo::location(QLibraryInfo::DataPath),QLatin1String(\"$out\"),g" \ - -e "s,QLibraryInfo::location(QLibraryInfo::TranslationsPath),QLatin1String(\"$out/translations\"),g" \ - -e "s,QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath),QLatin1String(\"$out/libexec\"),g" \ - src/core/web_engine_library_info.cpp - '' - # Patch library paths in Chromium sources - + optionalString (!stdenv.isDarwin) '' - sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${lib.getLib systemd}/lib/\1!' \ - src/3rdparty/chromium/device/udev_linux/udev?_loader.cc + # TODO: be more precise + patchShebangs . + ) + '' + # Prevent Chromium build script from making the path to `clang` relative to + # the build directory. `clang_base_path` is the value of `QMAKE_CLANG_DIR` + # from `src/core/config/mac_osx.pri`. + + lib.optionalString stdenv.isDarwin '' + substituteInPlace ./src/3rdparty/chromium/build/toolchain/mac/BUILD.gn \ + --replace 'prefix = rebase_path("$clang_base_path/bin/", root_build_dir)' 'prefix = "$clang_base_path/bin/"' + '' + # Patch library paths in Qt sources + + '' + sed -i \ + -e "s,QLibraryInfo::location(QLibraryInfo::DataPath),QLatin1String(\"$out\"),g" \ + -e "s,QLibraryInfo::location(QLibraryInfo::TranslationsPath),QLatin1String(\"$out/translations\"),g" \ + -e "s,QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath),QLatin1String(\"$out/libexec\"),g" \ + src/core/web_engine_library_info.cpp + '' + # Patch library paths in Chromium sources + + lib.optionalString (!stdenv.isDarwin) '' + sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${lib.getLib systemd}/lib/\1!' \ + src/3rdparty/chromium/device/udev_linux/udev?_loader.cc - sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \ - src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc - '' - + optionalString stdenv.isDarwin ( - (if (lib.versionAtLeast qtCompatVersion "5.14") then '' - substituteInPlace src/buildtools/config/mac_osx.pri \ - --replace 'QMAKE_CLANG_DIR = "/usr"' 'QMAKE_CLANG_DIR = "${stdenv.cc}"' - '' else '' - substituteInPlace src/core/config/mac_osx.pri \ - --replace 'QMAKE_CLANG_DIR = "/usr"' 'QMAKE_CLANG_DIR = "${stdenv.cc}"' - '') - # Following is required to prevent a build error: - # ninja: error: '/nix/store/z8z04p0ph48w22rqzx7ql67gy8cyvidi-SDKs/MacOSX10.12.sdk/usr/include/mach/exc.defs', needed by 'gen/third_party/crashpad/crashpad/util/mach/excUser.c', missing and no known rule to make it - + '' - substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/BUILD.gn \ - --replace '$sysroot/usr' "${darwin.xnu}" - '' - # Apple has some secret stuff they don't share with OpenBSM - + (if (lib.versionAtLeast qtCompatVersion "5.14") then '' - substituteInPlace src/3rdparty/chromium/base/mac/mach_port_rendezvous.cc \ - --replace "audit_token_to_pid(request.trailer.msgh_audit)" "request.trailer.msgh_audit.val[5]" - substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/mach/mach_message.cc \ - --replace "audit_token_to_pid(audit_trailer->msgh_audit)" "audit_trailer->msgh_audit.val[5]" - '' else '' - substituteInPlace src/3rdparty/chromium/base/mac/mach_port_broker.mm \ - --replace "audit_token_to_pid(msg.trailer.msgh_audit)" "msg.trailer.msgh_audit.val[5]" - '')); + sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \ + src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc + '' + lib.optionalString stdenv.isDarwin ( + (if (lib.versionAtLeast qtCompatVersion "5.14") then '' + substituteInPlace src/buildtools/config/mac_osx.pri \ + --replace 'QMAKE_CLANG_DIR = "/usr"' 'QMAKE_CLANG_DIR = "${stdenv.cc}"' + '' else '' + substituteInPlace src/core/config/mac_osx.pri \ + --replace 'QMAKE_CLANG_DIR = "/usr"' 'QMAKE_CLANG_DIR = "${stdenv.cc}"' + '') + # Following is required to prevent a build error: + # ninja: error: '/nix/store/z8z04p0ph48w22rqzx7ql67gy8cyvidi-SDKs/MacOSX10.12.sdk/usr/include/mach/exc.defs', needed by 'gen/third_party/crashpad/crashpad/util/mach/excUser.c', missing and no known rule to make it + + '' + substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/BUILD.gn \ + --replace '$sysroot/usr' "${xnu}" + '' + # Apple has some secret stuff they don't share with OpenBSM + + (if (lib.versionAtLeast qtCompatVersion "5.14") then '' + substituteInPlace src/3rdparty/chromium/base/mac/mach_port_rendezvous.cc \ + --replace "audit_token_to_pid(request.trailer.msgh_audit)" "request.trailer.msgh_audit.val[5]" + substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/mach/mach_message.cc \ + --replace "audit_token_to_pid(audit_trailer->msgh_audit)" "audit_trailer->msgh_audit.val[5]" + '' else '' + substituteInPlace src/3rdparty/chromium/base/mac/mach_port_broker.mm \ + --replace "audit_token_to_pid(msg.trailer.msgh_audit)" "msg.trailer.msgh_audit.val[5]" + '')); NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ # with gcc8, -Wclass-memaccess became part of -Wall and this exceeds the logging limit @@ -134,8 +134,8 @@ qtModule { ''; qmakeFlags = [ "--" "-system-ffmpeg" ] - ++ optional (stdenv.isLinux && (lib.versionAtLeast qtCompatVersion "5.15")) "-webengine-webrtc-pipewire" - ++ optional enableProprietaryCodecs "-proprietary-codecs"; + ++ lib.optional (stdenv.isLinux && (lib.versionAtLeast qtCompatVersion "5.15")) "-webengine-webrtc-pipewire" + ++ lib.optional enableProprietaryCodecs "-proprietary-codecs"; propagatedBuildInputs = [ # Image formats @@ -152,7 +152,7 @@ qtModule { libevent ffmpeg - ] ++ optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.isDarwin) [ dbus zlib minizip snappy nss protobuf jsoncpp # Audio formats @@ -168,14 +168,14 @@ qtModule { xorg.xrandr libXScrnSaver libXcursor libXrandr xorg.libpciaccess libXtst xorg.libXcomposite xorg.libXdamage libdrm - ] ++ optionals (stdenv.isLinux && (lib.versionAtLeast qtCompatVersion "5.15")) [ + ] ++ lib.optionals (stdenv.isLinux && (lib.versionAtLeast qtCompatVersion "5.15")) [ # Pipewire pipewire_0_2 ] # FIXME These dependencies shouldn't be needed but can't find a way # around it. Chromium pulls this in while bootstrapping GN. - ++ lib.optionals stdenv.isDarwin (with darwin; with apple_sdk.frameworks; [ + ++ lib.optionals stdenv.isDarwin [ libobjc cctools @@ -196,11 +196,11 @@ qtModule { openbsm libunwind - ]); + ]; - buildInputs = optionals stdenv.isDarwin (with darwin; [ + buildInputs = lib.optionals stdenv.isDarwin [ cups - apple_sdk.libs.sandbox + sandbox # `sw_vers` is used by `src/3rdparty/chromium/build/config/mac/sdk_info.py` # to get some information about the host platform. @@ -216,7 +216,7 @@ qtModule { shift done '') - ]); + ]; dontUseNinjaBuild = true; dontUseNinjaInstall = true; @@ -240,5 +240,4 @@ qtModule { # This build takes a long time; particularly on slow architectures timeout = 24 * 3600; }; - } diff --git a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix index e2dd0d4b19c7..dc9f5ccb9eb2 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix @@ -3,15 +3,15 @@ , fontconfig, libwebp, libxml2, libxslt , sqlite, systemd, glib, gst_all_1, cmake , bison, flex, gdb, gperf, perl, pkg-config, python2, ruby -, darwin +, ICU, OpenGL }: let - inherit (lib) optional optionals getDev getLib; hyphen = stdenv.mkDerivation rec { - name = "hyphen-2.8.8"; + pname = "hyphen"; + version = "2.8.8"; src = fetchurl { - url = "http://dev-www.libreoffice.org/src/5ade6ae2a99bc1e9e57031ca88d36dad-${name}.tar.gz"; + url = "http://dev-www.libreoffice.org/src/5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-${version}.tar.gz"; sha256 = "304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705"; }; postPatch = '' @@ -24,19 +24,19 @@ in qtModule { pname = "qtwebkit"; qtInputs = [ qtbase qtdeclarative qtlocation qtsensors ] - ++ optional (stdenv.isDarwin && lib.versionAtLeast qtbase.version "5.9.0") qtmultimedia - ++ optional usingAnnulenWebkitFork qtwebchannel; + ++ lib.optional (stdenv.isDarwin && lib.versionAtLeast qtbase.version "5.9.0") qtmultimedia + ++ lib.optional usingAnnulenWebkitFork qtwebchannel; buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ] - ++ optionals (stdenv.isDarwin) (with darwin; with apple_sdk.frameworks; [ ICU OpenGL ]) - ++ optional usingAnnulenWebkitFork hyphen; + ++ lib.optionals stdenv.isDarwin [ ICU OpenGL ] + ++ lib.optional usingAnnulenWebkitFork hyphen; nativeBuildInputs = [ bison flex gdb gperf perl pkg-config python2 ruby - ] ++ optional usingAnnulenWebkitFork cmake; + ] ++ lib.optional usingAnnulenWebkitFork cmake; - cmakeFlags = optionals usingAnnulenWebkitFork ([ "-DPORT=Qt" ] - ++ optionals stdenv.isDarwin [ - "-DQt5Multimedia_DIR=${getDev qtmultimedia}/lib/cmake/Qt5Multimedia" - "-DQt5MultimediaWidgets_DIR=${getDev qtmultimedia}/lib/cmake/Qt5MultimediaWidgets" + cmakeFlags = lib.optionals usingAnnulenWebkitFork ([ "-DPORT=Qt" ] + ++ lib.optionals stdenv.isDarwin [ + "-DQt5Multimedia_DIR=${lib.getDev qtmultimedia}/lib/cmake/Qt5Multimedia" + "-DQt5MultimediaWidgets_DIR=${lib.getDev qtmultimedia}/lib/cmake/Qt5MultimediaWidgets" "-DMACOS_FORCE_SYSTEM_XML_LIBRARIES=OFF" ]); @@ -50,19 +50,22 @@ qtModule { ''; NIX_CFLAGS_COMPILE = [ - # with gcc7 this warning blows the log over Hydra's limit - "-Wno-expansion-to-defined" - ] - # with gcc8, -Wclass-memaccess became part of -Wall and this too exceeds the logging limit - ++ optional stdenv.cc.isGNU "-Wno-class-memaccess" - # with clang this warning blows the log over Hydra's limit - ++ optional stdenv.isDarwin "-Wno-inconsistent-missing-override" - ++ optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"''; + # with gcc7 this warning blows the log over Hydra's limit + "-Wno-expansion-to-defined" + ] + # with gcc8, -Wclass-memaccess became part of -Wall and this too exceeds the logging limit + ++ lib.optional stdenv.cc.isGNU "-Wno-class-memaccess" + # with clang this warning blows the log over Hydra's limit + ++ lib.optional stdenv.isDarwin "-Wno-inconsistent-missing-override" + ++ lib.optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${lib.getLib systemd}/lib/libudev"''; doCheck = false; # fails 13 out of 13 tests (ctest) # Hack to avoid TMPDIR in RPATHs. - preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" ''; + preFixup = '' + rm -rf "$(pwd)" + mkdir "$(pwd)" + ''; meta = { maintainers = with lib.maintainers; [ abbradar periklis ]; diff --git a/pkgs/development/libraries/qt-5/modules/qtwebview.nix b/pkgs/development/libraries/qt-5/modules/qtwebview.nix index 1df8ef866389..14f7937a2e24 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebview.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebview.nix @@ -1,14 +1,12 @@ -{ darwin, lib, stdenv, qtModule, qtdeclarative, qtwebengine }: - -with lib; +{ lib, stdenv, qtModule, qtdeclarative, qtwebengine, CoreFoundation, WebKit }: qtModule { pname = "qtwebview"; qtInputs = [ qtdeclarative qtwebengine ]; - buildInputs = optional (stdenv.isDarwin) [ - darwin.apple_sdk.frameworks.CoreFoundation - darwin.apple_sdk.frameworks.WebKit + buildInputs = lib.optional stdenv.isDarwin [ + CoreFoundation + WebKit ]; outputs = [ "out" "dev" "bin" ]; - NIX_LDFLAGS = optionalString stdenv.isDarwin "-framework CoreFoundation -framework WebKit"; + NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework CoreFoundation -framework WebKit"; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f5dcf82861d6..b99974103d8b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18050,45 +18050,27 @@ in (import ../development/libraries/qt-5/5.12) { inherit newScope; inherit lib stdenv fetchurl fetchpatch fetchFromGitHub makeSetupHook makeWrapper; - inherit bison; - inherit cups; - inherit dconf; - inherit harfbuzz; - inherit libGL; - inherit perl; - inherit gtk3; + inherit bison cups dconf harfbuzz libGL perl gtk3; inherit (gst_all_1) gstreamer gst-plugins-base; - inherit llvmPackages_5; + inherit llvmPackages_5 darwin; }); qt514 = recurseIntoAttrs (makeOverridable (import ../development/libraries/qt-5/5.14) { inherit newScope; inherit lib stdenv fetchurl fetchpatch fetchFromGitHub makeSetupHook makeWrapper; - inherit bison; - inherit cups; - inherit dconf; - inherit harfbuzz; - inherit libGL; - inherit perl; - inherit gtk3; + inherit bison cups dconf harfbuzz libGL perl gtk3; inherit (gst_all_1) gstreamer gst-plugins-base; - inherit llvmPackages_5; + inherit llvmPackages_5 darwin; }); qt515 = recurseIntoAttrs (makeOverridable (import ../development/libraries/qt-5/5.15) { inherit newScope; inherit lib stdenv fetchurl fetchpatch fetchgit fetchFromGitHub makeSetupHook makeWrapper; - inherit bison; - inherit cups; - inherit dconf; - inherit harfbuzz; - inherit libGL; - inherit perl; - inherit gtk3; + inherit bison cups dconf harfbuzz libGL perl gtk3; inherit (gst_all_1) gstreamer gst-plugins-base; - inherit llvmPackages_5; + inherit llvmPackages_5 darwin; }); libsForQt512 = recurseIntoAttrs (import ./qt5-packages.nix { From 051fcdbe8b4070f4e6796cb5c27b0cc4456d2863 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 27 Jul 2021 16:21:24 +0200 Subject: [PATCH 17/36] tools/{security/system}: replace name with pname&version --- pkgs/tools/security/apg/default.nix | 6 ++++-- pkgs/tools/security/ccrypt/default.nix | 7 ++++--- pkgs/tools/security/chaps/default.nix | 18 +++++++++--------- pkgs/tools/security/dirmngr/default.nix | 5 +++-- pkgs/tools/security/hologram/default.nix | 3 ++- pkgs/tools/security/mbox/default.nix | 3 ++- pkgs/tools/security/meo/default.nix | 3 ++- pkgs/tools/security/mkrand/default.nix | 7 ++++--- pkgs/tools/security/mktemp/default.nix | 7 ++++--- pkgs/tools/security/munge/default.nix | 5 +++-- pkgs/tools/security/pamtester/default.nix | 5 +++-- pkgs/tools/security/pwgen/default.nix | 7 ++++--- pkgs/tools/security/super/default.nix | 7 ++++--- pkgs/tools/system/acct/default.nix | 5 +++-- pkgs/tools/system/actkbd/default.nix | 5 +++-- pkgs/tools/system/bar/default.nix | 7 ++++--- pkgs/tools/system/cron/default.nix | 8 +++++--- pkgs/tools/system/dcfldd/default.nix | 5 +++-- pkgs/tools/system/ddrescue/default.nix | 5 +++-- pkgs/tools/system/ddrescueview/default.nix | 1 - pkgs/tools/system/dog/default.nix | 7 ++++--- pkgs/tools/system/fdisk/default.nix | 5 +++-- pkgs/tools/system/gdmap/default.nix | 5 +++-- pkgs/tools/system/gt5/default.nix | 5 +++-- pkgs/tools/system/idle3tools/default.nix | 7 ++++--- pkgs/tools/system/incron/default.nix | 5 +++-- pkgs/tools/system/ipmitool/default.nix | 6 +++--- pkgs/tools/system/loadwatch/default.nix | 3 ++- pkgs/tools/system/localtime/default.nix | 3 ++- pkgs/tools/system/mcron/default.nix | 5 +++-- pkgs/tools/system/monit/default.nix | 5 +++-- pkgs/tools/system/opencl-info/default.nix | 3 ++- pkgs/tools/system/pciutils/default.nix | 5 +++-- pkgs/tools/system/rowhammer-test/default.nix | 3 ++- pkgs/tools/system/safecopy/default.nix | 5 +++-- pkgs/tools/system/sg3_utils/default.nix | 5 +++-- 36 files changed, 115 insertions(+), 81 deletions(-) diff --git a/pkgs/tools/security/apg/default.nix b/pkgs/tools/security/apg/default.nix index a185c09bda69..cfcadd75740f 100644 --- a/pkgs/tools/security/apg/default.nix +++ b/pkgs/tools/security/apg/default.nix @@ -1,8 +1,10 @@ { lib, stdenv, fetchurl, openssl }: stdenv.mkDerivation rec { - name = "apg-2.3.0b"; + pname = "apg"; + version = "2.3.0b"; + src = fetchurl { - url = "http://www.adel.nursat.kz/apg/download/${name}.tar.gz"; + url = "http://www.adel.nursat.kz/apg/download/apg-${version}.tar.gz"; sha256 = "14lbq81xrcsmpk1b9qmqyz7n6ypf08zcxvcvp6f7ybcyf0lj1rfi"; }; configurePhase = '' diff --git a/pkgs/tools/security/ccrypt/default.nix b/pkgs/tools/security/ccrypt/default.nix index bf5f26f7044f..2972fc9ae55f 100644 --- a/pkgs/tools/security/ccrypt/default.nix +++ b/pkgs/tools/security/ccrypt/default.nix @@ -1,10 +1,11 @@ {lib, stdenv, fetchurl, perl}: -stdenv.mkDerivation { - name = "ccrypt-1.11"; +stdenv.mkDerivation rec { + pname = "ccrypt"; + version = "1.11"; src = fetchurl { - url = "mirror://sourceforge/ccrypt/ccrypt-1.11.tar.gz"; + url = "mirror://sourceforge/ccrypt/ccrypt-${version}.tar.gz"; sha256 = "0kx4a5mhmp73ljknl2lcccmw9z3f5y8lqw0ghaymzvln1984g75i"; }; diff --git a/pkgs/tools/security/chaps/default.nix b/pkgs/tools/security/chaps/default.nix index 2f89c3ea5858..13ac6d67febf 100644 --- a/pkgs/tools/security/chaps/default.nix +++ b/pkgs/tools/security/chaps/default.nix @@ -23,7 +23,7 @@ let in stdenv.mkDerivation rec { - name = "chaps-0.42-6812"; + pname = "chaps"; version = "0.42-6812"; src = fetchFromGitHub { @@ -59,25 +59,25 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/bin - cp ${name}/out/chapsd $out/bin/. - cp ${name}/out/chaps_client $out/bin/. + cp ${pname}-${version}/out/chapsd $out/bin/. + cp ${pname}-${version}/out/chaps_client $out/bin/. mkdir -p $out/lib - cp ${name}/out/libchaps.so.* $out/lib/. + cp ${pname}-${version}/out/libchaps.so.* $out/lib/. mkdir -p $out/lib/security - cp ${name}/out/pam_chaps.so $out/lib/security/. + cp ${pname}-${version}/out/pam_chaps.so $out/lib/security/. mkdir -p $out/include - cp -r ${name}/out/chaps $out/include/. + cp -r ${pname}-${version}/out/chaps $out/include/. mkdir -p $out/etc/dbus-1/system.d - cp ${name}/out/org.chromium.Chaps.conf $out/etc/dbus-1/system.d/. + cp ${pname}-${version}/out/org.chromium.Chaps.conf $out/etc/dbus-1/system.d/. mkdir -p $out/etc/dbus-1/system-services - cp ${name}/platform2/chaps/org.chromium.Chaps.service $out/etc/dbus-1/system-services/. + cp ${pname}-${version}/platform2/chaps/org.chromium.Chaps.service $out/etc/dbus-1/system-services/. mkdir -p $out/usr/share/pam-configs/chaps mkdir -p $out/usr/share/man/man8 - cp ${name}/man/* $out/usr/share/man/man8/. + cp ${pname}-${version}/man/* $out/usr/share/man/man8/. ''; meta = with lib; { diff --git a/pkgs/tools/security/dirmngr/default.nix b/pkgs/tools/security/dirmngr/default.nix index cab059ca33ea..3e45759c51d2 100644 --- a/pkgs/tools/security/dirmngr/default.nix +++ b/pkgs/tools/security/dirmngr/default.nix @@ -2,9 +2,10 @@ , libiconv}: stdenv.mkDerivation rec { - name = "dirmngr-1.1.1"; + pname = "dirmngr"; + version = "1.1.1"; src = fetchurl { - url = "mirror://gnupg/dirmngr/${name}.tar.bz2"; + url = "mirror://gnupg/dirmngr/dirmngr-${version}.tar.bz2"; sha256 = "1zz6m87ca55nq5f59hzm6qs48d37h93il881y7d0rf2d6660na6j"; }; buildInputs = [ libgpgerror libgcrypt libassuan libksba diff --git a/pkgs/tools/security/hologram/default.nix b/pkgs/tools/security/hologram/default.nix index ca4666d9f07f..c4e90bd94bb2 100644 --- a/pkgs/tools/security/hologram/default.nix +++ b/pkgs/tools/security/hologram/default.nix @@ -1,7 +1,8 @@ { lib, buildGoPackage, fetchFromGitHub }: buildGoPackage rec { - name = "hologram-2018-03-19"; + pname = "hologram"; + version = "2018-03-19"; rev = "a7bab58642b530edb75b9cf6c1d834c85822ceac"; src = fetchFromGitHub { diff --git a/pkgs/tools/security/mbox/default.nix b/pkgs/tools/security/mbox/default.nix index dd73e1624c7d..d7a303a3672f 100644 --- a/pkgs/tools/security/mbox/default.nix +++ b/pkgs/tools/security/mbox/default.nix @@ -1,7 +1,8 @@ { lib, stdenv, fetchFromGitHub, openssl, which }: stdenv.mkDerivation { - name = "mbox-20140526"; + pname = "mbox"; + version = "20140526"; src = fetchFromGitHub { owner = "tsgates"; diff --git a/pkgs/tools/security/meo/default.nix b/pkgs/tools/security/meo/default.nix index 05aa8323cc91..4b96f2b42c23 100644 --- a/pkgs/tools/security/meo/default.nix +++ b/pkgs/tools/security/meo/default.nix @@ -1,7 +1,8 @@ { lib, stdenv, fetchhg, openssl, pcre-cpp, qt4, boost, pkcs11helper }: stdenv.mkDerivation { - name = "meo-20121113"; + pname = "meo"; + version = "20121113"; src = fetchhg { url = "http://oss.stamfest.net/hg/meo"; diff --git a/pkgs/tools/security/mkrand/default.nix b/pkgs/tools/security/mkrand/default.nix index 59b48f1881d2..21c9586cd6c3 100644 --- a/pkgs/tools/security/mkrand/default.nix +++ b/pkgs/tools/security/mkrand/default.nix @@ -1,10 +1,11 @@ { lib, stdenv, fetchurl }: -stdenv.mkDerivation { - name = "mkrand-0.1.0"; +stdenv.mkDerivation rec { + pname = "mkrand"; + version = "0.1.0"; src = fetchurl { - url = "https://github.com/mknight-tag/MKRAND/releases/download/v0.1.0/mkrand-0.1.0.tar.gz"; + url = "https://github.com/mknight-tag/MKRAND/releases/download/v${version}/mkrand-${version}.tar.gz"; sha256 = "1irwyv2j5c3606k3qbq77yrd65y27rcq3jdlp295rz875q8iq9fs"; }; diff --git a/pkgs/tools/security/mktemp/default.nix b/pkgs/tools/security/mktemp/default.nix index dc3f2a8904bc..02be5103cbf6 100644 --- a/pkgs/tools/security/mktemp/default.nix +++ b/pkgs/tools/security/mktemp/default.nix @@ -1,7 +1,8 @@ { lib, stdenv, fetchurl, groff }: -stdenv.mkDerivation { - name = "mktemp-1.7"; +stdenv.mkDerivation rec { + pname = "mktemp"; + version = "1.7"; # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds. NROFF = "${groff}/bin/nroff"; @@ -12,7 +13,7 @@ stdenv.mkDerivation { ''; src = fetchurl { - url = "ftp://ftp.mktemp.org/pub/mktemp/mktemp-1.7.tar.gz"; + url = "ftp://ftp.mktemp.org/pub/mktemp/mktemp-${version}.tar.gz"; sha256 = "0x969152znxxjbj7387xb38waslr4yv6bnj5jmhb4rpqxphvk54f"; }; diff --git a/pkgs/tools/security/munge/default.nix b/pkgs/tools/security/munge/default.nix index 0462db8859c9..01e208958a50 100644 --- a/pkgs/tools/security/munge/default.nix +++ b/pkgs/tools/security/munge/default.nix @@ -1,12 +1,13 @@ { lib, stdenv, fetchFromGitHub, autoreconfHook, gawk, gnused, libgcrypt, zlib, bzip2 }: stdenv.mkDerivation rec { - name = "munge-0.5.14"; + pname = "munge"; + version = "0.5.14"; src = fetchFromGitHub { owner = "dun"; repo = "munge"; - rev = name; + rev = "${pname}-${version}"; sha256 = "15h805rwcb9f89dyrkxfclzs41n3ff8x7cc1dbvs8mb0ds682c4j"; }; diff --git a/pkgs/tools/security/pamtester/default.nix b/pkgs/tools/security/pamtester/default.nix index 1944e5187d21..face92a00af3 100644 --- a/pkgs/tools/security/pamtester/default.nix +++ b/pkgs/tools/security/pamtester/default.nix @@ -1,10 +1,11 @@ { lib, stdenv, fetchurl, pam }: stdenv.mkDerivation rec { - name = "pamtester-0.1.2"; + pname = "pamtester"; + version = "0.1.2"; src = fetchurl { - url = "mirror://sourceforge/pamtester/${name}.tar.gz"; + url = "mirror://sourceforge/pamtester/pamtester-${version}.tar.gz"; sha256 = "1mdj1wj0adcnx354fs17928yn2xfr1hj5mfraq282dagi873sqw3"; }; diff --git a/pkgs/tools/security/pwgen/default.nix b/pkgs/tools/security/pwgen/default.nix index c84b9472e96f..fc410f19843b 100644 --- a/pkgs/tools/security/pwgen/default.nix +++ b/pkgs/tools/security/pwgen/default.nix @@ -1,9 +1,10 @@ {lib, stdenv, fetchurl, autoreconfHook}: -stdenv.mkDerivation { - name = "pwgen-2.08"; +stdenv.mkDerivation rec { + pname = "pwgen"; + version = "2.08"; src = fetchurl { - url = "https://github.com/tytso/pwgen/archive/v2.08.tar.gz"; + url = "https://github.com/tytso/pwgen/archive/v${version}.tar.gz"; sha256 = "8d6e94f28655e61d6126290e3eafad4d17d7fba0d0d354239522a740a270bb2f"; }; diff --git a/pkgs/tools/security/super/default.nix b/pkgs/tools/security/super/default.nix index f8e78c66979f..d87580975f19 100644 --- a/pkgs/tools/security/super/default.nix +++ b/pkgs/tools/security/super/default.nix @@ -1,11 +1,12 @@ { lib, stdenv, fetchurl, fetchpatch }: stdenv.mkDerivation rec { - name = "super-3.30.0"; + pname = "super"; + version = "3.30.0"; src = fetchurl { - name = "${name}.tar.gz"; - url = "https://www.ucolick.org/~will/RUE/super/${name}-tar.gz"; + name = "super-${version}.tar.gz"; + url = "https://www.ucolick.org/~will/RUE/super/super-${version}-tar.gz"; sha256 = "0k476f83w7f45y9jpyxwr00ikv1vhjiq0c26fgjch9hnv18icvwy"; }; diff --git a/pkgs/tools/system/acct/default.nix b/pkgs/tools/system/acct/default.nix index fbe396f1fdf4..9a363eb8706e 100644 --- a/pkgs/tools/system/acct/default.nix +++ b/pkgs/tools/system/acct/default.nix @@ -1,10 +1,11 @@ { fetchurl, lib, stdenv }: stdenv.mkDerivation rec { - name = "acct-6.6.4"; + pname = "acct"; + version = "6.6.4"; src = fetchurl { - url = "mirror://gnu/acct/${name}.tar.gz"; + url = "mirror://gnu/acct/acct-${version}.tar.gz"; sha256 = "0gv6m8giazshvgpvwbng98chpas09myyfw1zr2y7hqxib0mvy5ac"; }; diff --git a/pkgs/tools/system/actkbd/default.nix b/pkgs/tools/system/actkbd/default.nix index ac2fb338d3d2..61be7e5a4a92 100644 --- a/pkgs/tools/system/actkbd/default.nix +++ b/pkgs/tools/system/actkbd/default.nix @@ -1,10 +1,11 @@ { fetchurl, lib, stdenv }: stdenv.mkDerivation rec { - name = "actkbd-0.2.8"; + pname = "actkbd"; + version = "0.2.8"; src = fetchurl { - url = "http://users.softlab.ece.ntua.gr/~thkala/projects/actkbd/files/${name}.tar.bz2"; + url = "http://users.softlab.ece.ntua.gr/~thkala/projects/actkbd/files/actkbd-${version}.tar.bz2"; sha256 = "1ipb7k5q7k7p54is96ij2n74jfa6xc0llb9lpjwxhsqviqxn9slm"; }; diff --git a/pkgs/tools/system/bar/default.nix b/pkgs/tools/system/bar/default.nix index 79bb3f79a998..ddea8881ca70 100644 --- a/pkgs/tools/system/bar/default.nix +++ b/pkgs/tools/system/bar/default.nix @@ -1,10 +1,11 @@ { lib, stdenv, fetchurl }: -stdenv.mkDerivation { - name = "bar-1.11.1"; +stdenv.mkDerivation rec { + pname = "bar"; + version = "1.11.1"; src = fetchurl { - url = "mirror://sourceforge/project/clpbar/clpbar/bar-1.11.1/bar_1.11.1.tar.gz"; + url = "mirror://sourceforge/project/clpbar/clpbar/bar-${version}/bar_${version}.tar.gz"; sha256 = "00v5cb6vzizyyhflgr62d3k8dqc0rg6wdgfyyk11c0s0r32mw3zs"; }; diff --git a/pkgs/tools/system/cron/default.nix b/pkgs/tools/system/cron/default.nix index d1b8d2d6afd9..8f8421781e36 100644 --- a/pkgs/tools/system/cron/default.nix +++ b/pkgs/tools/system/cron/default.nix @@ -1,9 +1,11 @@ {lib, stdenv, fetchurl, vim, sendmailPath ? "/usr/sbin/sendmail"}: -stdenv.mkDerivation { - name = "cron-4.1"; +stdenv.mkDerivation rec { + pname = "cron"; + version = "4.1"; + src = fetchurl { - url = "ftp://ftp.isc.org/isc/cron/cron_4.1.shar"; + url = "ftp://ftp.isc.org/isc/cron/cron_${version}.shar"; sha256 = "16n3dras4b1jh7g958nz1k54pl9pg5fwb3fvjln8z67varvq6if4"; }; diff --git a/pkgs/tools/system/dcfldd/default.nix b/pkgs/tools/system/dcfldd/default.nix index e5d5026e6290..7dc6e1fc1237 100644 --- a/pkgs/tools/system/dcfldd/default.nix +++ b/pkgs/tools/system/dcfldd/default.nix @@ -1,10 +1,11 @@ { lib, stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "dcfldd-1.3.4-1"; + pname = "dcfldd"; + version = "1.3.4-1"; src = fetchurl { - url = "mirror://sourceforge/dcfldd/${name}.tar.gz"; + url = "mirror://sourceforge/dcfldd/dcfldd-${version}.tar.gz"; sha256 = "1y6mwsvm75f5jzxsjjk0yhf8xnpmz6y8qvcxfandavx59lc3l57m"; }; diff --git a/pkgs/tools/system/ddrescue/default.nix b/pkgs/tools/system/ddrescue/default.nix index 7e96a4c01f7c..6191947ac32f 100644 --- a/pkgs/tools/system/ddrescue/default.nix +++ b/pkgs/tools/system/ddrescue/default.nix @@ -3,10 +3,11 @@ }: stdenv.mkDerivation rec { - name = "ddrescue-1.25"; + pname = "ddrescue"; + version = "1.25"; src = fetchurl { - url = "mirror://gnu/ddrescue/${name}.tar.lz"; + url = "mirror://gnu/ddrescue/ddrescue-${version}.tar.lz"; sha256 = "0qqh38izl5ppap9a5izf3hijh94k65s3zbfkczd4b7x04syqwlyf"; }; diff --git a/pkgs/tools/system/ddrescueview/default.nix b/pkgs/tools/system/ddrescueview/default.nix index 6c8e9c56cdc9..41b28e6fca0d 100644 --- a/pkgs/tools/system/ddrescueview/default.nix +++ b/pkgs/tools/system/ddrescueview/default.nix @@ -6,7 +6,6 @@ let in stdenv.mkDerivation rec { pname = "ddrescueview"; version = "${versionBase}${versionSuffix}"; - name = "ddrescueview-0.4alpha4"; src = fetchurl { name = "ddrescueview-${versionBase}${versionSuffix}.tar.xz"; diff --git a/pkgs/tools/system/dog/default.nix b/pkgs/tools/system/dog/default.nix index 94a6b34ff53e..4073034a9b92 100644 --- a/pkgs/tools/system/dog/default.nix +++ b/pkgs/tools/system/dog/default.nix @@ -1,10 +1,11 @@ {lib, stdenv, fetchurl}: -stdenv.mkDerivation { - name = "dog-1.7"; +stdenv.mkDerivation rec { + pname = "dog"; + version = "1.7"; src = fetchurl { - url = "http://archive.debian.org/debian/pool/main/d/dog/dog_1.7.orig.tar.gz"; + url = "http://archive.debian.org/debian/pool/main/d/dog/dog_${version}.orig.tar.gz"; sha256 = "3ef25907ec5d1dfb0df94c9388c020b593fbe162d7aaa9bd08f35d2a125af056"; }; diff --git a/pkgs/tools/system/fdisk/default.nix b/pkgs/tools/system/fdisk/default.nix index 4ad654783dfc..e12fedd6eec9 100644 --- a/pkgs/tools/system/fdisk/default.nix +++ b/pkgs/tools/system/fdisk/default.nix @@ -1,10 +1,11 @@ { fetchurl, lib, stdenv, parted, libuuid, gettext, guile }: stdenv.mkDerivation rec { - name = "gnufdisk-2.0.0a"; # .0a1 seems broken, see https://lists.gnu.org/archive/html/bug-fdisk/2012-09/msg00000.html + pname = "gnufdisk"; + version = "2.0.0a"; # .0a1 seems broken, see https://lists.gnu.org/archive/html/bug-fdisk/2012-09/msg00000.html src = fetchurl { - url = "mirror://gnu/fdisk/${name}.tar.gz"; + url = "mirror://gnu/fdisk/gnufdisk-${version}.tar.gz"; sha256 = "04nd7civ561x2lwcmxhsqbprml3178jfc58fy1v7hzqg5k4nbhy3"; }; diff --git a/pkgs/tools/system/gdmap/default.nix b/pkgs/tools/system/gdmap/default.nix index d9c639ab1c41..5fc242d533b8 100644 --- a/pkgs/tools/system/gdmap/default.nix +++ b/pkgs/tools/system/gdmap/default.nix @@ -1,10 +1,11 @@ { lib, stdenv, fetchurl, gtk2, pkg-config, libxml2, intltool, gettext }: stdenv.mkDerivation rec { - name = "gdmap-0.8.1"; + pname = "gdmap"; + version = "0.8.1"; src = fetchurl { - url = "mirror://sourceforge/gdmap/${name}.tar.gz"; + url = "mirror://sourceforge/gdmap/gdmap-${version}.tar.gz"; sha256 = "0nr8l88cg19zj585hczj8v73yh21k7j13xivhlzl8jdk0j0cj052"; }; diff --git a/pkgs/tools/system/gt5/default.nix b/pkgs/tools/system/gt5/default.nix index 374bcf0e3146..15b658c9916b 100644 --- a/pkgs/tools/system/gt5/default.nix +++ b/pkgs/tools/system/gt5/default.nix @@ -1,10 +1,11 @@ {lib, stdenv, fetchurl}: stdenv.mkDerivation rec { - name = "gt5-1.4.0"; + pname = "gt5"; + version = "1.4.0"; src = fetchurl { - url = "mirror://sourceforge/gt5/${name}.tar.gz"; + url = "mirror://sourceforge/gt5/gt5-${version}.tar.gz"; sha256 = "0gm0gzyp4d9rxqddbaskbz5zvmlhyr4nyb5x9g7x4abyyxqjlnkq"; }; diff --git a/pkgs/tools/system/idle3tools/default.nix b/pkgs/tools/system/idle3tools/default.nix index 5e9796396a9c..f4de055a60a8 100644 --- a/pkgs/tools/system/idle3tools/default.nix +++ b/pkgs/tools/system/idle3tools/default.nix @@ -1,10 +1,11 @@ {lib, stdenv, fetchurl}: -stdenv.mkDerivation { - name = "idle3-tools-0.9.1"; +stdenv.mkDerivation rec { + pname = "idle3-tools"; + version = "0.9.1"; src = fetchurl { - url = "mirror://sourceforge/idle3-tools/idle3-tools-0.9.1.tgz"; + url = "mirror://sourceforge/idle3-tools/idle3-tools-${version}.tgz"; sha256 = "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"; }; diff --git a/pkgs/tools/system/incron/default.nix b/pkgs/tools/system/incron/default.nix index 2df4acba9b58..cc986d453569 100644 --- a/pkgs/tools/system/incron/default.nix +++ b/pkgs/tools/system/incron/default.nix @@ -1,11 +1,12 @@ { lib, stdenv, fetchFromGitHub, bash }: stdenv.mkDerivation rec { - name = "incron-0.5.12"; + pname = "incron"; + version = "0.5.12"; src = fetchFromGitHub { owner = "ar-"; repo = "incron"; - rev = name; + rev = "${pname}-${version}"; sha256 = "11d5f98cjafiv9h9zzzrw2s06s2fvdg8gp64km7mdprd2xmy6dih"; }; diff --git a/pkgs/tools/system/ipmitool/default.nix b/pkgs/tools/system/ipmitool/default.nix index e7d6130ffa60..416fab94ddc9 100644 --- a/pkgs/tools/system/ipmitool/default.nix +++ b/pkgs/tools/system/ipmitool/default.nix @@ -1,14 +1,14 @@ { stdenv, lib, fetchurl, openssl, fetchpatch, static ? stdenv.hostPlatform.isStatic }: let - pkgname = "ipmitool"; + pname = "ipmitool"; version = "1.8.18"; in stdenv.mkDerivation { - name = "${pkgname}-${version}"; + inherit pname version; src = fetchurl { - url = "mirror://sourceforge/${pkgname}/${pkgname}-${version}.tar.gz"; + url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz"; sha256 = "0kfh8ny35rvwxwah4yv91a05qwpx74b5slq2lhrh71wz572va93m"; }; diff --git a/pkgs/tools/system/loadwatch/default.nix b/pkgs/tools/system/loadwatch/default.nix index 80f808214bc1..722e5a9afde1 100644 --- a/pkgs/tools/system/loadwatch/default.nix +++ b/pkgs/tools/system/loadwatch/default.nix @@ -1,7 +1,8 @@ { lib, stdenv, fetchgit, ... }: stdenv.mkDerivation { - name = "loadwatch-1.1-1-g6d2544c"; + pname = "loadwatch"; + version = "1.1-1-g6d2544c"; src = fetchgit { url = "git://woffs.de/git/fd/loadwatch.git"; sha256 = "1bhw5ywvhyb6snidsnllfpdi1migy73wg2gchhsfbcpm8aaz9c9b"; diff --git a/pkgs/tools/system/localtime/default.nix b/pkgs/tools/system/localtime/default.nix index 798e3b3e8831..4c12c9eb27da 100644 --- a/pkgs/tools/system/localtime/default.nix +++ b/pkgs/tools/system/localtime/default.nix @@ -1,7 +1,8 @@ { lib, fetchFromGitHub, buildGoPackage, m4 }: buildGoPackage rec { - name = "localtime-2017-11-07"; + pname = "localtime"; + version = "2017-11-07"; src = fetchFromGitHub { owner = "Stebalien"; diff --git a/pkgs/tools/system/mcron/default.nix b/pkgs/tools/system/mcron/default.nix index b8175b51483d..485df4231ecf 100644 --- a/pkgs/tools/system/mcron/default.nix +++ b/pkgs/tools/system/mcron/default.nix @@ -1,10 +1,11 @@ { fetchurl, lib, stdenv, guile, which, ed, libtool }: stdenv.mkDerivation rec { - name = "mcron-1.0.6"; + pname = "mcron"; + version = "1.0.6"; src = fetchurl { - url = "mirror://gnu/mcron/${name}.tar.gz"; + url = "mirror://gnu/mcron/mcron-${version}.tar.gz"; sha256 = "0yvrfzzdy2m7fbqkr61fw01wd9r2jpnbyabxhcsfivgxywknl0fy"; }; diff --git a/pkgs/tools/system/monit/default.nix b/pkgs/tools/system/monit/default.nix index 8a2a3406c3e8..9e176677c761 100644 --- a/pkgs/tools/system/monit/default.nix +++ b/pkgs/tools/system/monit/default.nix @@ -6,10 +6,11 @@ }: stdenv.mkDerivation rec { - name = "monit-5.27.2"; + pname = "monit"; + version = "5.27.2"; src = fetchurl { - url = "${meta.homepage}dist/${name}.tar.gz"; + url = "${meta.homepage}dist/monit-${version}.tar.gz"; sha256 = "sha256-2ICceNXcHtenujKlpVxRFIVRMsxNpIBfjTqvjPRuqkw="; }; diff --git a/pkgs/tools/system/opencl-info/default.nix b/pkgs/tools/system/opencl-info/default.nix index d5fd86f231ab..173de5f607fe 100644 --- a/pkgs/tools/system/opencl-info/default.nix +++ b/pkgs/tools/system/opencl-info/default.nix @@ -1,7 +1,8 @@ { lib, stdenv, fetchFromGitHub, opencl-clhpp, ocl-icd }: stdenv.mkDerivation { - name = "opencl-info-2014-02-21"; + pname = "opencl-info"; + version = "2014-02-21"; src = fetchFromGitHub { owner = "marchv"; diff --git a/pkgs/tools/system/pciutils/default.nix b/pkgs/tools/system/pciutils/default.nix index 8c017c42d7a3..95fd4f52c393 100644 --- a/pkgs/tools/system/pciutils/default.nix +++ b/pkgs/tools/system/pciutils/default.nix @@ -5,10 +5,11 @@ }: stdenv.mkDerivation rec { - name = "pciutils-3.7.0"; # with release-date database + pname = "pciutils"; + version = "3.7.0"; # with release-date database src = fetchurl { - url = "mirror://kernel/software/utils/pciutils/${name}.tar.xz"; + url = "mirror://kernel/software/utils/pciutils/pciutils-${version}.tar.xz"; sha256 = "1ss0rnfsx8gvqjxaji4mvbhf9xyih4cadmgadbwwv8mnx1xvjh4x"; }; diff --git a/pkgs/tools/system/rowhammer-test/default.nix b/pkgs/tools/system/rowhammer-test/default.nix index 9afb1933e17f..685697f861ff 100644 --- a/pkgs/tools/system/rowhammer-test/default.nix +++ b/pkgs/tools/system/rowhammer-test/default.nix @@ -1,7 +1,8 @@ { lib, stdenv, fetchFromGitHub }: stdenv.mkDerivation { - name = "rowhammer-test-20150811"; + pname = "rowhammer-test"; + version = "20150811"; src = fetchFromGitHub { owner = "google"; diff --git a/pkgs/tools/system/safecopy/default.nix b/pkgs/tools/system/safecopy/default.nix index 5533c9a57ff5..1c0bedff474e 100644 --- a/pkgs/tools/system/safecopy/default.nix +++ b/pkgs/tools/system/safecopy/default.nix @@ -1,10 +1,11 @@ { lib, stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "safecopy-1.7"; + pname = "safecopy"; + version = "1.7"; src = fetchurl { - url = "mirror://sourceforge/project/safecopy/safecopy/${name}/${name}.tar.gz"; + url = "mirror://sourceforge/project/safecopy/safecopy/safecopy-${version}/safecopy-${version}.tar.gz"; sha256 = "1zf4kk9r8za9pn4hzy1y3j02vrhl1rxfk5adyfq0w0k48xfyvys2"; }; diff --git a/pkgs/tools/system/sg3_utils/default.nix b/pkgs/tools/system/sg3_utils/default.nix index d0084e1f4d8a..31c58bbbaafb 100644 --- a/pkgs/tools/system/sg3_utils/default.nix +++ b/pkgs/tools/system/sg3_utils/default.nix @@ -1,10 +1,11 @@ { lib, stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "sg3_utils-1.45"; + pname = "sg3_utils"; + version = "1.45"; src = fetchurl { - url = "http://sg.danny.cz/sg/p/${name}.tgz"; + url = "http://sg.danny.cz/sg/p/sg3_utils-${version}.tgz"; sha256 = "0qasc3qm4i8swjfaywiwpgz76gdxqvm47qycxgmprbsjmxqwk1qb"; }; From 0901dfb214d23c485f85a58f450d5d83409ffc61 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 24 Jul 2021 21:56:01 +0000 Subject: [PATCH 18/36] stdenv/setup: force libtool to skip dep checks When we "fix" libtool, we empty out its system library path to avoid it discovering libraries in e.g. /usr when the sandbox is disabled. But this also means that the checks libtool does to make sure it can find the libraries its supposed to be linking to won't work. On Linux and Darwin, this isn't a problem, because libtool doesn't actually perform any checks, but it is on at least NetBSD and Cygwin[1]. So, we force libtool not to do these checks on any platform, bringing the more exotic platforms into line with the existing behaviour on Linux and Darwin. Without this change, lots of library packages produce warnings like this in their build output on the platforms with checks by default: *** Warning: linker path does not have real file for library -lz. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have *** because I did check the linker path looking for a file starting *** with libz but no candidates were found. (...for regex pattern test) *** The inter-library dependencies that have been dropped here will be *** automatically added whenever a program is linked with this library *** or is declared to -dlopen it. And dependent packages break because libtool doesn't link their transitive dependencies. So making this change fixes _lots_ of packages on those platforms. [1]: https://git.savannah.gnu.org/cgit/libtool.git/tree/m4/libtool.m4?id=544fc0e2c2a03129a540aebef41ad32bfb5c06b8#n3445 --- pkgs/stdenv/generic/setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 2a1e0cfc6de3..ec5a5e6dcb9d 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -975,6 +975,7 @@ configurePhase() { fi if [ -z "${dontFixLibtool:-}" ]; then + export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}" local i find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do echo "fixing libtool script $i" From 9857ee54713d950a7d863518a3061dfb3230e994 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 27 Jul 2021 23:02:17 +0200 Subject: [PATCH 19/36] gawk: replace name with pname&version --- pkgs/tools/text/gawk/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index b7eb00ee5944..fd746ca117e8 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -19,10 +19,11 @@ let inherit (lib) optional; in stdenv.mkDerivation rec { - name = "gawk-5.1.0"; + pname = "gawk"; + version = "5.1.0"; src = fetchurl { - url = "mirror://gnu/gawk/${name}.tar.xz"; + url = "mirror://gnu/gawk/gawk-${version}.tar.xz"; sha256 = "1gc2cccqy1x1bf6rhwlmd8q7dz7gnam6nwgl38bxapv6qm5flpyg"; }; From f97fb96ea06132a8a5be528d2151216c8de772e4 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 28 Jul 2021 23:49:42 +0200 Subject: [PATCH 20/36] python3Packages.scipy: fix build on aarch64-darwin by disabling stack-protector essentially the same fix as we used for openmpi in https://github.com/NixOS/nixpkgs/pull/128606 --- .../python-modules/scipy/default.nix | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index 19fa8e507281..7a9643aa7d24 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -1,4 +1,15 @@ -{lib, fetchPypi, python, buildPythonPackage, gfortran, nose, pytest, pytest-xdist, numpy, pybind11 }: +{ lib +, stdenv +, fetchPypi +, python +, buildPythonPackage +, gfortran +, nose +, pytest +, pytest-xdist +, numpy +, pybind11 +}: buildPythonPackage rec { pname = "scipy"; @@ -30,6 +41,17 @@ buildPythonPackage rec { ln -s ${numpy.cfg} site.cfg ''; + + # disable stackprotector on aarch64-darwin for now + # + # build error: + # + # /private/tmp/nix-build-python3.9-scipy-1.6.3.drv-0/ccDEsw5U.s:109:15: error: index must be an integer in range [-256, 255]. + # + # ldr x0, [x0, ___stack_chk_guard];momd + # + hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ]; + checkPhase = '' runHook preCheck pushd dist From b2a9951e485cc41a8a440397b807eb08a84d0f18 Mon Sep 17 00:00:00 2001 From: Maxine Aubrey Date: Wed, 28 Jul 2021 19:29:19 +0200 Subject: [PATCH 21/36] networkmanager: 1.32.4 -> 1.32.6 --- pkgs/tools/networking/networkmanager/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/networkmanager/default.nix b/pkgs/tools/networking/networkmanager/default.nix index 94d9dff1f849..63c52a337103 100644 --- a/pkgs/tools/networking/networkmanager/default.nix +++ b/pkgs/tools/networking/networkmanager/default.nix @@ -54,11 +54,11 @@ let in stdenv.mkDerivation rec { pname = "networkmanager"; - version = "1.32.4"; + version = "1.32.6"; src = fetchurl { url = "mirror://gnome/sources/NetworkManager/${lib.versions.majorMinor version}/NetworkManager-${version}.tar.xz"; - sha256 = "sha256-Kay9QceLfvh/+I/sU2DR6vi1tvy5BVXXORq8XjaSMVg="; + sha256 = "sha256-PSdGBR87MylArCk1TgFpEVnUZ4PXL9IyvTbpgijOWgk="; }; outputs = [ "out" "dev" "devdoc" "man" "doc" ]; From 69762341e4a233beaadb12e0962585ecf8446c3f Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 27 Jul 2021 20:43:38 +0200 Subject: [PATCH 22/36] gnupatch: replace name with pname&version --- pkgs/tools/text/gnupatch/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/text/gnupatch/default.nix b/pkgs/tools/text/gnupatch/default.nix index 97d3136e7e72..8d8fa7d0a8ba 100644 --- a/pkgs/tools/text/gnupatch/default.nix +++ b/pkgs/tools/text/gnupatch/default.nix @@ -3,10 +3,11 @@ }: stdenv.mkDerivation rec { - name = "patch-2.7.6"; + pname = "patch"; + version = "2.7.6"; src = fetchurl { - url = "mirror://gnu/patch/${name}.tar.xz"; + url = "mirror://gnu/patch/patch-${version}.tar.xz"; sha256 = "1zfqy4rdcy279vwn2z1kbv19dcfw25d2aqy9nzvdkq5bjzd0nqdc"; }; From 46306d2971bae52201aa8acb8ad694ee1ce523e4 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 27 Jul 2021 06:17:00 +0000 Subject: [PATCH 23/36] automake: 1.16.3 -> 1.16.4 --- pkgs/development/tools/misc/automake/automake-1.16.x.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/automake/automake-1.16.x.nix b/pkgs/development/tools/misc/automake/automake-1.16.x.nix index 48f01f8d0f67..588e9053adb0 100644 --- a/pkgs/development/tools/misc/automake/automake-1.16.x.nix +++ b/pkgs/development/tools/misc/automake/automake-1.16.x.nix @@ -1,11 +1,11 @@ { lib, stdenv, fetchurl, perl, autoconf }: stdenv.mkDerivation rec { - name = "automake-1.16.3"; + name = "automake-1.16.4"; src = fetchurl { url = "mirror://gnu/automake/${name}.tar.xz"; - sha256 = "0fmz2fhmzcpacnprl5msphvaflwiy0hvpgmqlgfny72ddijzfazz"; + sha256 = "sha256-gPrMCYhaV+bUnQaXLArhCJxfqPTUx8/luupY5QhfE20="; }; nativeBuildInputs = [ autoconf perl ]; From caf6816da79bfa18ee50776c755ec57404aa54a6 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 26 Jul 2021 22:18:23 +0200 Subject: [PATCH 24/36] aspell: fix buffer overflow in objstack Fixes: CVE-2019-25051 --- pkgs/development/libraries/aspell/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/aspell/default.nix b/pkgs/development/libraries/aspell/default.nix index 01acced98f6f..777bad1e5a53 100644 --- a/pkgs/development/libraries/aspell/default.nix +++ b/pkgs/development/libraries/aspell/default.nix @@ -23,7 +23,14 @@ stdenv.mkDerivation rec { sha256 = "1wi60ankalmh8ds7nplz434jd7j94gdvbahdwsr539rlad8pxdzr"; }; - patches = lib.optional searchNixProfiles ./data-dirs-from-nix-profiles.patch; + patches = [ + (fetchpatch { + # objstack: assert that the alloc size will fit within a chunk + name = "CVE-2019-25051.patch"; + url = "https://github.com/gnuaspell/aspell/commit/0718b375425aad8e54e1150313b862e4c6fd324a.patch"; + sha256 = "03z259xrk41x3j190gaprf3mqysyfgh3a04rjmch3h625vj95x39"; + }) + ] ++ lib.optional searchNixProfiles ./data-dirs-from-nix-profiles.patch; postPatch = '' patch interfaces/cc/aspell.h < ${./clang.patch} From d4aeb9634a64be5979422c9add366fc648d04f83 Mon Sep 17 00:00:00 2001 From: Joerie de Gram Date: Sun, 25 Jul 2021 14:46:24 +0200 Subject: [PATCH 25/36] libffi: 3.3 -> 3.4.2 --- pkgs/development/libraries/libffi/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libffi/default.nix b/pkgs/development/libraries/libffi/default.nix index 48611dffb069..7909b7abc4ff 100644 --- a/pkgs/development/libraries/libffi/default.nix +++ b/pkgs/development/libraries/libffi/default.nix @@ -10,11 +10,11 @@ stdenv.mkDerivation rec { pname = "libffi"; - version = "3.3"; + version = "3.4.2"; src = fetchurl { - url = "https://sourceware.org/pub/libffi/${pname}-${version}.tar.gz"; - sha256 = "0mi0cpf8aa40ljjmzxb7im6dbj45bb0kllcd09xgmp834y9agyvj"; + url = "https://github.com/libffi/libffi/releases/download/v${version}/${pname}-${version}.tar.gz"; + sha256 = "081nx7wpzds168jbr59m34n6s3lyiq6r8zggvqxvlslsc4hvf3sl"; }; patches = []; From ea0b0b7d1261929faeecd68da1cfa6fb4cd81702 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 24 Jul 2021 14:04:18 +0000 Subject: [PATCH 26/36] libidn: 1.37 -> 1.38 --- pkgs/development/libraries/libidn/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libidn/default.nix b/pkgs/development/libraries/libidn/default.nix index 15d7ca33025d..e47bb070a36e 100644 --- a/pkgs/development/libraries/libidn/default.nix +++ b/pkgs/development/libraries/libidn/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "libidn"; - version = "1.37"; + version = "1.38"; src = fetchurl { url = "mirror://gnu/libidn/${pname}-${version}.tar.gz"; - sha256 = "1hljls9rkilh04dwiwg388wk8djkac8idijrdysqq2nqbh6rg3iw"; + sha256 = "sha256-3gC4QPdXzTuxTdmiDVk2RzI13cugbUvC2oBGVLi78PY="; }; outputs = [ "bin" "dev" "out" "info" "devdoc" ]; From 29bbaa1489e3e3ca79ae8a27f13316e399a0a564 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Tue, 20 Jul 2021 18:25:09 +0200 Subject: [PATCH 27/36] cmake: 3.19.7 -> 3.21.0 Also removing a comment that instructs maintainers to cross-check the hash with one that is posted upstream, because as @lilyball reasoned: "I'm not really sure what the benefit of comparing the hash is; if the download is tampered with, the hash is served from the same site and would presumably be tampered with as well, and the download is done over https and declares its Content-Length so there's no risk of truncation (which would cause the file to fail to unpack anyway)" --- .../cmake/application-services.patch | 26 +++++++++---------- .../tools/build-managers/cmake/default.nix | 5 ++-- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/pkgs/development/tools/build-managers/cmake/application-services.patch b/pkgs/development/tools/build-managers/cmake/application-services.patch index f64e220eb29b..7c77336b41be 100644 --- a/pkgs/development/tools/build-managers/cmake/application-services.patch +++ b/pkgs/development/tools/build-managers/cmake/application-services.patch @@ -1,8 +1,8 @@ diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt -index 1b6bb00d4c..487114daa8 100644 +index 9a18184fd3..278d146dd1 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt -@@ -893,7 +893,6 @@ endif() +@@ -933,7 +933,6 @@ endif() # On Apple we need CoreFoundation and CoreServices if(APPLE) target_link_libraries(CMakeLib "-framework CoreFoundation") @@ -11,27 +11,25 @@ index 1b6bb00d4c..487114daa8 100644 if(WIN32 AND NOT UNIX) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx -index a5ce5d18f4..3d6838ce82 100644 +index 77403b076a..d5aac95e1e 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx -@@ -43,11 +43,10 @@ - - struct cmLinkImplementation; +@@ -49,10 +49,6 @@ struct cmLinkImplementation; #if !defined(CMAKE_BOOTSTRAP) && defined(__APPLE__) --# define HAVE_APPLICATION_SERVICES --# include -+# include + # include +-# if !TARGET_OS_IPHONE +-# define HAVE_APPLICATION_SERVICES +-# include +-# endif #endif - - #if !defined(CMAKE_BOOTSTRAP) - # include "cmXMLParser.h" + #if !defined(CMAKE_BOOTSTRAP) diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt -index bfcaf30bb7..1da540aee5 100644 +index 79452ffff6..a848731b7e 100644 --- a/Utilities/cmlibarchive/CMakeLists.txt +++ b/Utilities/cmlibarchive/CMakeLists.txt -@@ -2007,11 +2007,6 @@ IF(ENABLE_TEST) +@@ -2013,11 +2013,6 @@ IF(ENABLE_TEST) ENDIF(ENABLE_TEST) ENDIF() diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 2de586f97cbf..0bbf7a47f878 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -16,12 +16,11 @@ stdenv.mkDerivation rec { + lib.optionalString isBootstrap "-boot" + lib.optionalString useNcurses "-cursesUI" + lib.optionalString withQt5 "-qt5UI"; - version = "3.19.7"; + version = "3.21.0"; src = fetchurl { url = "https://cmake.org/files/v${lib.versions.majorMinor version}/cmake-${version}.tar.gz"; - # compare with https://cmake.org/files/v${lib.versions.majorMinor version}/cmake-${version}-SHA-256.txt - sha256 = "sha256-WKFfDVagr8zDzFNxI0/Oc/zGyPnb13XYmOUQuDF1WI4="; + sha256 = "sha256-SkLVZEmlH004CatNO2H9SpakaeViZuiWzhAJtXaL0qs="; }; patches = [ From 380301fe4ae8d038ad5177e6346d29d7c387cd38 Mon Sep 17 00:00:00 2001 From: Mike Purvis Date: Thu, 15 Jul 2021 08:55:49 -0400 Subject: [PATCH 28/36] gtest: 1.10.0 -> 1.11.0 --- pkgs/development/libraries/gtest/default.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/gtest/default.nix b/pkgs/development/libraries/gtest/default.nix index d15ce77213ca..ffe85538684d 100644 --- a/pkgs/development/libraries/gtest/default.nix +++ b/pkgs/development/libraries/gtest/default.nix @@ -1,8 +1,8 @@ -{ lib, stdenv, cmake, ninja, fetchFromGitHub, fetchpatch }: +{ lib, stdenv, cmake, ninja, fetchFromGitHub }: stdenv.mkDerivation rec { pname = "gtest"; - version = "1.10.0"; + version = "1.11.0"; outputs = [ "out" "dev" ]; @@ -10,16 +10,11 @@ stdenv.mkDerivation rec { owner = "google"; repo = "googletest"; rev = "release-${version}"; - sha256 = "1zbmab9295scgg4z2vclgfgjchfjailjnvzc6f5x9jvlsdi3dpwz"; + hash = "sha256-SjlJxushfry13RGA7BCjYC9oZqV4z6x8dOiHfl/wpF0="; }; patches = [ ./fix-cmake-config-includedir.patch - (fetchpatch { - name = "fix-pkgconfig-paths.patch"; - url = "https://github.com/google/googletest/commit/5126ff48d9ac54828d1947d1423a5ef2a8efee3b.patch"; - sha256 = "sha256-TBvECU/9nuvwjsCjWJP2b6DNy+FYnHIFZeuVW7g++JE="; - }) ]; nativeBuildInputs = [ cmake ninja ]; From 364bb239ab417d7b06556812643e265fc5fe81fa Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 29 Jul 2021 10:53:43 +0200 Subject: [PATCH 29/36] mesa: 21.1.5 -> 21.1.6 --- pkgs/development/libraries/mesa/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index a23d02c29e4b..fad8050e9752 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -31,7 +31,7 @@ with lib; let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "21.1.5"; + version = "21.1.6"; branch = versions.major version; self = stdenv.mkDerivation { @@ -45,7 +45,7 @@ self = stdenv.mkDerivation { "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" ]; - sha256 = "0vbn40azh7izrxvb15c51z3lfcb9zas2v1wc4z9cxvja0y9p4b02"; + sha256 = "0dwyk7cxlwna24ap23i8i92a2qcc6xhp16i03zzakpqiz4i03jxi"; }; prePatch = "patchShebangs ."; From af1211ebc2d0ace416412c1aca5ba9ef030ba866 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Mon, 7 Jun 2021 16:33:08 +0200 Subject: [PATCH 30/36] p11-kit: 0.23.22 -> 0.24.0 --- pkgs/development/libraries/p11-kit/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/p11-kit/default.nix b/pkgs/development/libraries/p11-kit/default.nix index 5e99c644ebef..681b60e16de4 100644 --- a/pkgs/development/libraries/p11-kit/default.nix +++ b/pkgs/development/libraries/p11-kit/default.nix @@ -1,16 +1,16 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, which +{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, which , gettext, libffi, libiconv, libtasn1 }: stdenv.mkDerivation rec { pname = "p11-kit"; - version = "0.23.22"; + version = "0.24.0"; src = fetchFromGitHub { owner = "p11-glue"; repo = pname; rev = version; - sha256 = "sha256-erWqElJr0iESNUk9EZiJRmSMYhns8GxuFLNw7mIIIWs="; + sha256 = "sha256-jvUzOhMvbq05SxQ+kjKQHDDMzNwo4U6nFHu3JjygJHw="; }; outputs = [ "out" "dev"]; From d5fde7feb6a9f9eec920d2926d6acc5587225fb5 Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Sat, 1 May 2021 13:38:07 +0200 Subject: [PATCH 31/36] lvm2: Remove dependency on thin-provisioning-tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit thin-provisioning-tools has a _huge_ closure size (hundreds of megabytes) and the only reference in the output of the lvm2 package is a _comment_ in the etc/lvm.conf The lvm2 package thus does not seem to depend on thin-provisoning-tools in any way. Reverts 9326a89910434f96b3af4dd7758614e0143735e2 thin provisoning is broken with or without this change: https://github.com/NixOS/nixpkgs/issues/15516 A proper fix is here: https://github.com/NixOS/nixpkgs/pull/46541 References: $ nix why-depends nixpkgs#lvm2 nixpkgs#thin-provisioning-tools /nix/store/n7zwwxi0ihjks7qk9bq5lbkniligfcqc-lvm2-2.03.11 └───etc/lvm.conf: …_check_executable = "/nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-prov> → /nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-provisioning-tools-0.9.0 $ ag thin-provisioning-tools --search-binary etc/lvm.conf 1093: # (See package device-mapper-persistent-data or thin-provisioning-tools) 1095: # thin_check_executable = "/nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-provisioning-tools-0.9.0/bin/thin_check" 1100: # (See package device-mapper-persistent-data or thin-provisioning-tools) 1102: # thin_dump_executable = "/nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-provisioning-tools-0.9.0/bin/thin_dump" 1108: # (See package device-mapper-persistent-data or thin-provisioning-tools) 1110: # thin_repair_executable = "/nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-provisioning-tools-0.9.0/bin/thin_repair" 1155: # (See package device-mapper-persistent-data or thin-provisioning-tools) 1157: # cache_check_executable = "/nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-provisioning-tools-0.9.0/bin/cache_check" 1162: # (See package device-mapper-persistent-data or thin-provisioning-tools) 1164: # cache_dump_executable = "/nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-provisioning-tools-0.9.0/bin/cache_dump" 1170: # (See package device-mapper-persistent-data or thin-provisioning-tools) 1172: # cache_repair_executable = "/nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-provisioning-tools-0.9.0/bin/cache_repair" --- pkgs/os-specific/linux/lvm2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/lvm2/default.nix b/pkgs/os-specific/linux/lvm2/default.nix index d822ceed714c..2e52e49639e2 100644 --- a/pkgs/os-specific/linux/lvm2/default.nix +++ b/pkgs/os-specific/linux/lvm2/default.nix @@ -4,7 +4,7 @@ , pkg-config , util-linux , libuuid -, thin-provisioning-tools, libaio +, libaio , enableCmdlib ? false , enableDmeventd ? false , udev ? null @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ udev libuuid thin-provisioning-tools libaio ]; + buildInputs = [ udev libuuid libaio ]; configureFlags = [ "--disable-readline" From bd57a30d1ba907783e73fe1d887bf62b8a7c1760 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Fri, 30 Jul 2021 10:20:18 +0200 Subject: [PATCH 32/36] Revert "cmake: 3.19.7 -> 3.21.0" cmake on darwin now depends on the SystemConfiguration framework. Support for this has not yet been added to our bootstrapping. We need to decide how to go further. As this is blocking staging-next it is reverted. This reverts commit 29bbaa1489e3e3ca79ae8a27f13316e399a0a564. --- .../cmake/application-services.patch | 26 ++++++++++--------- .../tools/build-managers/cmake/default.nix | 5 ++-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/pkgs/development/tools/build-managers/cmake/application-services.patch b/pkgs/development/tools/build-managers/cmake/application-services.patch index 7c77336b41be..f64e220eb29b 100644 --- a/pkgs/development/tools/build-managers/cmake/application-services.patch +++ b/pkgs/development/tools/build-managers/cmake/application-services.patch @@ -1,8 +1,8 @@ diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt -index 9a18184fd3..278d146dd1 100644 +index 1b6bb00d4c..487114daa8 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt -@@ -933,7 +933,6 @@ endif() +@@ -893,7 +893,6 @@ endif() # On Apple we need CoreFoundation and CoreServices if(APPLE) target_link_libraries(CMakeLib "-framework CoreFoundation") @@ -11,25 +11,27 @@ index 9a18184fd3..278d146dd1 100644 if(WIN32 AND NOT UNIX) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx -index 77403b076a..d5aac95e1e 100644 +index a5ce5d18f4..3d6838ce82 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx -@@ -49,10 +49,6 @@ struct cmLinkImplementation; +@@ -43,11 +43,10 @@ + + struct cmLinkImplementation; #if !defined(CMAKE_BOOTSTRAP) && defined(__APPLE__) - # include --# if !TARGET_OS_IPHONE --# define HAVE_APPLICATION_SERVICES --# include --# endif +-# define HAVE_APPLICATION_SERVICES +-# include ++# include #endif - + #if !defined(CMAKE_BOOTSTRAP) + # include "cmXMLParser.h" + diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt -index 79452ffff6..a848731b7e 100644 +index bfcaf30bb7..1da540aee5 100644 --- a/Utilities/cmlibarchive/CMakeLists.txt +++ b/Utilities/cmlibarchive/CMakeLists.txt -@@ -2013,11 +2013,6 @@ IF(ENABLE_TEST) +@@ -2007,11 +2007,6 @@ IF(ENABLE_TEST) ENDIF(ENABLE_TEST) ENDIF() diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 0bbf7a47f878..2de586f97cbf 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -16,11 +16,12 @@ stdenv.mkDerivation rec { + lib.optionalString isBootstrap "-boot" + lib.optionalString useNcurses "-cursesUI" + lib.optionalString withQt5 "-qt5UI"; - version = "3.21.0"; + version = "3.19.7"; src = fetchurl { url = "https://cmake.org/files/v${lib.versions.majorMinor version}/cmake-${version}.tar.gz"; - sha256 = "sha256-SkLVZEmlH004CatNO2H9SpakaeViZuiWzhAJtXaL0qs="; + # compare with https://cmake.org/files/v${lib.versions.majorMinor version}/cmake-${version}-SHA-256.txt + sha256 = "sha256-WKFfDVagr8zDzFNxI0/Oc/zGyPnb13XYmOUQuDF1WI4="; }; patches = [ From e591a6235d95318ad67c03d666dc8788c65025fc Mon Sep 17 00:00:00 2001 From: Frederik Ramcke <757280+EggBaconAndSpam@users.noreply.github.com> Date: Thu, 29 Jul 2021 14:48:00 +0200 Subject: [PATCH 33/36] cairo: add patch for CVE-2020-35492 (PR: #131949) --- pkgs/development/libraries/cairo/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix index f18a7e94f069..414194acb830 100644 --- a/pkgs/development/libraries/cairo/default.nix +++ b/pkgs/development/libraries/cairo/default.nix @@ -42,6 +42,16 @@ in stdenv.mkDerivation rec { url = "https://gitlab.freedesktop.org/cairo/cairo/commit/5e34c5a9640e49dcc29e6b954c4187cfc838dbd1.patch"; sha256 = "yCwsDUY7efVvOZkA6a0bPS+RrVc8Yk9bfPwWHeOjq5o="; }) + + # Fixes CVE-2020-35492; see https://github.com/NixOS/nixpkgs/issues/120364. + # CVE information: https://nvd.nist.gov/vuln/detail/CVE-2020-35492 + # Upstream PR: https://gitlab.freedesktop.org/cairo/cairo/merge_requests/85 + (fetchpatch { + name = "CVE-2020-35492.patch"; + includes = [ "src/cairo-image-compositor.c" ]; + url = "https://github.com/freedesktop/cairo/commit/78266cc8c0f7a595cfe8f3b694bfb9bcc3700b38.patch"; + sha256 = "048nzfz7rkgqb9xs0dfs56qdw7ckkxr87nbj3p0qziqdq4nb6wki"; + }) ] ++ optionals stdenv.hostPlatform.isDarwin [ # Workaround https://gitlab.freedesktop.org/cairo/cairo/-/issues/121 ./skip-configure-stderr-check.patch From d7b8d5e15a5740892193dc956f5916a1ccbbf255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 11 Aug 2021 23:14:15 +0200 Subject: [PATCH 34/36] Revert "automake: 1.16.3 -> 1.16.4" This reverts commit 46306d2971bae52201aa8acb8ad694ee1ce523e4. --- pkgs/development/tools/misc/automake/automake-1.16.x.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/automake/automake-1.16.x.nix b/pkgs/development/tools/misc/automake/automake-1.16.x.nix index 588e9053adb0..042aff09a5fc 100644 --- a/pkgs/development/tools/misc/automake/automake-1.16.x.nix +++ b/pkgs/development/tools/misc/automake/automake-1.16.x.nix @@ -1,11 +1,12 @@ { lib, stdenv, fetchurl, perl, autoconf }: stdenv.mkDerivation rec { - name = "automake-1.16.4"; + # When updating, beware of https://github.com/NixOS/nixpkgs/pull/131928#issuecomment-896614165 + name = "automake-1.16.3"; src = fetchurl { url = "mirror://gnu/automake/${name}.tar.xz"; - sha256 = "sha256-gPrMCYhaV+bUnQaXLArhCJxfqPTUx8/luupY5QhfE20="; + sha256 = "0fmz2fhmzcpacnprl5msphvaflwiy0hvpgmqlgfny72ddijzfazz"; }; nativeBuildInputs = [ autoconf perl ]; From f5db95a96aef57c945d4741c2134104da1026b7d Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 12 Aug 2021 11:46:02 +0000 Subject: [PATCH 35/36] mesa: 21.1.6 -> 21.1.7 --- pkgs/development/libraries/mesa/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index fad8050e9752..876a3c015a0d 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -31,7 +31,7 @@ with lib; let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "21.1.6"; + version = "21.1.7"; branch = versions.major version; self = stdenv.mkDerivation { @@ -45,7 +45,7 @@ self = stdenv.mkDerivation { "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" ]; - sha256 = "0dwyk7cxlwna24ap23i8i92a2qcc6xhp16i03zzakpqiz4i03jxi"; + sha256 = "1fx7nfvh1drfa6vv34j7ma944qbs014b0jwlbgqlnbjgcl87rrp9"; }; prePatch = "patchShebangs ."; From c05fbdb06848718be97fe92b3ba7cca0c293f744 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Fri, 13 Aug 2021 14:23:09 -0700 Subject: [PATCH 36/36] libffi: disable new static trampolines feature --- pkgs/development/libraries/libffi/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/libffi/default.nix b/pkgs/development/libraries/libffi/default.nix index 7909b7abc4ff..4332f43c5afb 100644 --- a/pkgs/development/libraries/libffi/default.nix +++ b/pkgs/development/libraries/libffi/default.nix @@ -24,6 +24,12 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-gcc-arch=generic" # no detection of -march= or -mtune= "--enable-pax_emutramp" + + # Causes issues in downstream packages which misuse ffi_closure_alloc + # Reenable once these issues are fixed and merged: + # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6155 + # https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/283 + "--disable-exec-static-tramp" ]; preCheck = ''