From 71b05eccaaf4dad1f01b13832cb0d692b8e1e761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Sat, 6 Aug 2022 11:49:27 +0200 Subject: [PATCH 001/318] darwin.cctools: 949.0.1 -> 973.0.1 --- .../darwin/cctools/darwin-no-memstream.patch | 21 ++++ pkgs/os-specific/darwin/cctools/port.nix | 115 +++++++++++++++--- 2 files changed, 116 insertions(+), 20 deletions(-) create mode 100644 pkgs/os-specific/darwin/cctools/darwin-no-memstream.patch diff --git a/pkgs/os-specific/darwin/cctools/darwin-no-memstream.patch b/pkgs/os-specific/darwin/cctools/darwin-no-memstream.patch new file mode 100644 index 0000000000000..bb8a4ad68f3b2 --- /dev/null +++ b/pkgs/os-specific/darwin/cctools/darwin-no-memstream.patch @@ -0,0 +1,21 @@ +MacOS SDKs before 10.13 don't support open_memstream. This is already replaced +by a runtime check in cctools-port, but because we build with SDK 10.12 by +default, linking still fails for us. Disable it entirely here. + +--- a/cctools/include/stuff/diagnostics.h ++++ b/cctools/include/stuff/diagnostics.h +@@ -60,13 +60,6 @@ void diagnostics_log_msg(enum diagnostic_level level, const char* message); + */ + void diagnostics_write(void); + +-#if defined(__APPLE__ ) && defined(__has_builtin) +-# if __has_builtin(__builtin_available) +-# define HAVE_OPENMEMSTREAM_RUNTIME __builtin_available(macOS 10.13, *) +-# endif +-#endif +-#ifndef HAVE_OPENMEMSTREAM_RUNTIME +-# define HAVE_OPENMEMSTREAM_RUNTIME 1 +-#endif ++#define HAVE_OPENMEMSTREAM_RUNTIME 0 + + #endif /* diagnostics_h */ diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index bace6f0689d9e..3c48c3ebc0c46 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -19,13 +19,17 @@ assert (!stdenv.hostPlatform.isDarwin) -> maloader != null; stdenv.mkDerivation { pname = "${targetPrefix}cctools-port"; - version = "949.0.1"; + version = "973.0.1"; src = fetchFromGitHub { owner = "tpoechtrager"; repo = "cctools-port"; - rev = "43f32a4c61b5ba7fde011e816136c550b1b3146f"; - sha256 = "10yc5smiczzm62q6ijqccc58bwmfhc897f3bwa5i9j98csqsjj0k"; + # This is the commit before: https://github.com/tpoechtrager/cctools-port/pull/114 + # That specific change causes trouble for us (see the PR discussion), but + # is also currently the last commit on master at the time of writing, so we + # can just go back one step. + rev = "457dc6ddf5244ebf94f28e924e3a971f1566bd66"; + sha256 = "0ns12q7vg9yand4dmdsps1917cavfbw67yl5q7bm6kb4ia5kkx13"; }; outputs = [ "out" "dev" "man" ]; @@ -35,7 +39,11 @@ stdenv.mkDerivation { ++ lib.optionals stdenv.isDarwin [ libobjc ] ++ lib.optional enableTapiSupport libtapi; - patches = [ ./ld-ignore-rpath-link.patch ./ld-rpath-nonfinal.patch ]; + patches = [ + ./ld-ignore-rpath-link.patch + ./ld-rpath-nonfinal.patch + ] + ++ lib.optional stdenv.isDarwin ./darwin-no-memstream.patch; __propagatedImpureHostDeps = [ # As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them @@ -64,32 +72,99 @@ stdenv.mkDerivation { --replace "-isystem /usr/local/include -isystem /usr/pkg/include" "" \ --replace "-L/usr/local/lib" "" \ - substituteInPlace cctools/include/Makefile \ - --replace "/bin/" "" + # Appears to use new libdispatch API not available in macOS SDK 10.12. + substituteInPlace cctools/ld64/src/ld/libcodedirectory.c \ + --replace "#define LIBCD_PARALLEL 1" "" patchShebangs tools sed -i -e 's/which/type -P/' tools/*.sh - # Workaround for https://www.sourceware.org/bugzilla/show_bug.cgi?id=11157 - cat > cctools/include/unistd.h < Date: Sun, 3 Apr 2022 16:45:27 +0100 Subject: [PATCH 002/318] postgresql_10: remove ahead of 22.11 release, because it will go EOL 2022-11-10 --- pkgs/servers/sql/postgresql/default.nix | 20 ++++---------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 1 - 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index 364f574250bdf..72f70bae26837 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -21,7 +21,6 @@ let }: let atLeast = lib.versionAtLeast version; - icuEnabled = atLeast "10"; lz4Enabled = atLeast "14"; in stdenv.mkDerivation rec { @@ -39,14 +38,13 @@ let setOutputFlags = false; # $out retains configureFlags :-/ buildInputs = - [ zlib readline openssl libxml2 ] - ++ lib.optionals icuEnabled [ icu ] + [ zlib readline openssl libxml2 icu ] ++ lib.optionals lz4Enabled [ lz4 ] ++ lib.optionals enableSystemd [ systemd ] ++ lib.optionals gssSupport [ libkrb5 ] ++ lib.optionals (!stdenv.isDarwin) [ libossp_uuid ]; - nativeBuildInputs = [ makeWrapper ] ++ lib.optionals icuEnabled [ pkg-config ]; + nativeBuildInputs = [ makeWrapper pkg-config ]; enableParallelBuilding = !stdenv.isDarwin; @@ -62,14 +60,14 @@ let configureFlags = [ "--with-openssl" "--with-libxml" + "--with-icu" "--sysconfdir=/etc" "--libdir=$(lib)/lib" "--with-system-tzdata=${tzdata}/share/zoneinfo" "--enable-debug" (lib.optionalString enableSystemd "--with-systemd") (if stdenv.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid") - ] ++ lib.optionals icuEnabled [ "--with-icu" ] - ++ lib.optionals lz4Enabled [ "--with-lz4" ] + ] ++ lib.optionals lz4Enabled [ "--with-lz4" ] ++ lib.optionals gssSupport [ "--with-gssapi" ] ++ lib.optionals stdenv.hostPlatform.isRiscV [ "--disable-spinlocks" ]; @@ -200,16 +198,6 @@ let in self: { - postgresql_10 = self.callPackage generic { - version = "10.22"; - psqlSchema = "10.0"; # should be 10, but changing it is invasive - hash = "sha256-lVl3VVxp3xpk9EuB1KGYfrdKu9GHBXn1rZ2UYTPdjk0="; - this = self.postgresql_10; - thisAttr = "postgresql_10"; - inherit self; - icu = self.icu67; - }; - postgresql_11 = self.callPackage generic { version = "11.17"; psqlSchema = "11.1"; # should be 11, but changing it is invasive diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index a270cfe72c435..6eb7ac65cfb59 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1129,6 +1129,7 @@ mapAliases ({ # postgresql postgresql96 = postgresql_9_6; postgresql_9_6 = throw "postgresql_9_6 has been removed from nixpkgs, as this version is no longer supported by upstream"; # Added 2021-12-03 + postgresql_10 = throw "postgresql_10 has been removed from nixpkgs, as this version went EOL on 2022-11-10"; # Added 2022-08-01 # postgresql plugins cstore_fdw = postgresqlPackages.cstore_fdw; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0a5513f2de417..57789c3349e73 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23072,7 +23072,6 @@ with pkgs; timescaledb-tune = callPackage ../development/tools/database/timescaledb-tune { }; inherit (import ../servers/sql/postgresql pkgs) - postgresql_10 postgresql_11 postgresql_12 postgresql_13 From 817ca3699e94419f8050ef863c023b346103e2cf Mon Sep 17 00:00:00 2001 From: ajs124 Date: Sun, 3 Apr 2022 16:46:15 +0100 Subject: [PATCH 003/318] treewide: change postgresql_10 in documentation and examples to postgresql_14 --- .../doc/manual/administration/declarative-containers.section.md | 2 +- nixos/doc/manual/configuration/config-file.section.md | 2 +- .../from_md/administration/declarative-containers.section.xml | 2 +- nixos/doc/manual/from_md/configuration/config-file.section.xml | 2 +- nixos/modules/virtualisation/nixos-containers.nix | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/doc/manual/administration/declarative-containers.section.md b/nixos/doc/manual/administration/declarative-containers.section.md index 00fd244bb91fb..eaa50d3c663d4 100644 --- a/nixos/doc/manual/administration/declarative-containers.section.md +++ b/nixos/doc/manual/administration/declarative-containers.section.md @@ -9,7 +9,7 @@ containers.database = { config = { config, pkgs, ... }: { services.postgresql.enable = true; - services.postgresql.package = pkgs.postgresql_10; + services.postgresql.package = pkgs.postgresql_14; }; }; ``` diff --git a/nixos/doc/manual/configuration/config-file.section.md b/nixos/doc/manual/configuration/config-file.section.md index f21ba113bf8c6..efd231fd1f4e4 100644 --- a/nixos/doc/manual/configuration/config-file.section.md +++ b/nixos/doc/manual/configuration/config-file.section.md @@ -166,7 +166,7 @@ Packages pkgs.emacs ]; - services.postgresql.package = pkgs.postgresql_10; + services.postgresql.package = pkgs.postgresql_14; ``` The latter option definition changes the default PostgreSQL package diff --git a/nixos/doc/manual/from_md/administration/declarative-containers.section.xml b/nixos/doc/manual/from_md/administration/declarative-containers.section.xml index b8179dca1f8bd..4831c9c74e848 100644 --- a/nixos/doc/manual/from_md/administration/declarative-containers.section.xml +++ b/nixos/doc/manual/from_md/administration/declarative-containers.section.xml @@ -11,7 +11,7 @@ containers.database = { config = { config, pkgs, ... }: { services.postgresql.enable = true; - services.postgresql.package = pkgs.postgresql_10; + services.postgresql.package = pkgs.postgresql_14; }; }; diff --git a/nixos/doc/manual/from_md/configuration/config-file.section.xml b/nixos/doc/manual/from_md/configuration/config-file.section.xml index 952c6e6003021..9792116eb08d5 100644 --- a/nixos/doc/manual/from_md/configuration/config-file.section.xml +++ b/nixos/doc/manual/from_md/configuration/config-file.section.xml @@ -217,7 +217,7 @@ environment.systemPackages = pkgs.emacs ]; -services.postgresql.package = pkgs.postgresql_10; +services.postgresql.package = pkgs.postgresql_14; The latter option definition changes the default PostgreSQL diff --git a/nixos/modules/virtualisation/nixos-containers.nix b/nixos/modules/virtualisation/nixos-containers.nix index 1285563c64634..b331f0d93b83b 100644 --- a/nixos/modules/virtualisation/nixos-containers.nix +++ b/nixos/modules/virtualisation/nixos-containers.nix @@ -720,7 +720,7 @@ in { config = { config, pkgs, ... }: { services.postgresql.enable = true; - services.postgresql.package = pkgs.postgresql_10; + services.postgresql.package = pkgs.postgresql_14; system.stateVersion = "21.05"; }; From fb91bfc380dfe36ceb07960abeeae8f934c2c986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Wed, 10 Aug 2022 22:11:15 +0200 Subject: [PATCH 004/318] compiler-rt: build builtins on darwin The missing xcrun meant builtins were missing from darwin. This apparently wasn't an issue until now, but is in projects using `@available` checks. (The ARM64 hack was apparently the previous solution to fixing broken SDK detection.) --- .../compilers/llvm/11/compiler-rt/default.nix | 12 ++++----- .../compilers/llvm/12/compiler-rt/default.nix | 11 ++++---- .../compilers/llvm/13/compiler-rt/default.nix | 15 +++++------ .../compilers/llvm/14/compiler-rt/default.nix | 15 +++++------ .../darwin-plistbuddy-workaround.patch | 25 +++++++++++++++++++ .../llvm/git/compiler-rt/default.nix | 15 +++++------ 6 files changed, 61 insertions(+), 32 deletions(-) create mode 100644 pkgs/development/compilers/llvm/common/compiler-rt/darwin-plistbuddy-workaround.patch diff --git a/pkgs/development/compilers/llvm/11/compiler-rt/default.nix b/pkgs/development/compilers/llvm/11/compiler-rt/default.nix index 4968c8bcfbd8e..74c566763f6ac 100644 --- a/pkgs/development/compilers/llvm/11/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/11/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, libllvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, xcbuild, libllvm, libcxxabi }: let @@ -15,7 +15,8 @@ stdenv.mkDerivation { inherit version; src = fetch "compiler-rt" "0x1j8ngf1zj63wlnns9vlibafq48qcm72p4jpaxkmkb4qw0grwfy"; - nativeBuildInputs = [ cmake python3 libllvm.dev ]; + nativeBuildInputs = [ cmake python3 libllvm.dev ] + ++ lib.optional stdenv.isDarwin xcbuild.xcrun; NIX_CFLAGS_COMPILE = [ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" @@ -59,8 +60,9 @@ stdenv.mkDerivation { # extra `/`. ./normalize-var.patch ../../common/compiler-rt/libsanitizer-no-cyclades-11.patch - ] ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch; - + ../../common/compiler-rt/darwin-plistbuddy-workaround.patch + ./armv7l.patch + ]; preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' cmakeFlagsArray+=("-DCMAKE_LIPO=$(command -v ${stdenv.cc.targetPrefix}lipo)") @@ -75,8 +77,6 @@ stdenv.mkDerivation { substituteInPlace cmake/builtin-config-ix.cmake \ --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)' '' + lib.optionalString stdenv.isDarwin '' - substituteInPlace cmake/builtin-config-ix.cmake \ - --replace 'foreach(arch ''${ARM64})' 'foreach(arch)' substituteInPlace cmake/config-ix.cmake \ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' '' + lib.optionalString (useLLVM) '' diff --git a/pkgs/development/compilers/llvm/12/compiler-rt/default.nix b/pkgs/development/compilers/llvm/12/compiler-rt/default.nix index d1497e6db1e34..1ac4b2afec184 100644 --- a/pkgs/development/compilers/llvm/12/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/12/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, libllvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, xcbuild, libllvm, libcxxabi }: let @@ -14,7 +14,8 @@ stdenv.mkDerivation { inherit version; src = fetch "compiler-rt" "1950rg294izdwkaasi7yjrmadc9mzdd5paf0q63jjcq2m3rdbj5l"; - nativeBuildInputs = [ cmake python3 libllvm.dev ]; + nativeBuildInputs = [ cmake python3 libllvm.dev ] + ++ lib.optional stdenv.isDarwin xcbuild.xcrun; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ @@ -59,7 +60,9 @@ stdenv.mkDerivation { # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the # extra `/`. ./normalize-var.patch - ] ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch; + ../../common/compiler-rt/darwin-plistbuddy-workaround.patch + ./armv7l.patch + ]; # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra @@ -70,8 +73,6 @@ stdenv.mkDerivation { substituteInPlace cmake/builtin-config-ix.cmake \ --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)' '' + lib.optionalString stdenv.isDarwin '' - substituteInPlace cmake/builtin-config-ix.cmake \ - --replace 'set(ARM64 arm64 arm64e)' 'set(ARM64)' substituteInPlace cmake/config-ix.cmake \ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' '' + lib.optionalString (useLLVM) '' diff --git a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix index 7b9312eecf247..82b7ac048c755 100644 --- a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, src, cmake, python3, libllvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, src, cmake, python3, xcbuild, libllvm, libcxxabi }: let @@ -16,7 +16,8 @@ stdenv.mkDerivation { inherit src; sourceRoot = "source/compiler-rt"; - nativeBuildInputs = [ cmake python3 libllvm.dev ]; + nativeBuildInputs = [ cmake python3 libllvm.dev ] + ++ lib.optional stdenv.isDarwin xcbuild.xcrun; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ @@ -62,9 +63,11 @@ stdenv.mkDerivation { # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the # extra `/`. ./normalize-var.patch - ] # Prevent a compilation error on darwin - ++ lib.optional stdenv.hostPlatform.isDarwin ./darwin-targetconditionals.patch - ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch; + # Prevent a compilation error on darwin + ./darwin-targetconditionals.patch + ../../common/compiler-rt/darwin-plistbuddy-workaround.patch + ./armv7l.patch + ]; # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra @@ -75,8 +78,6 @@ stdenv.mkDerivation { substituteInPlace cmake/builtin-config-ix.cmake \ --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)' '' + lib.optionalString stdenv.isDarwin '' - substituteInPlace cmake/builtin-config-ix.cmake \ - --replace 'set(ARM64 arm64 arm64e)' 'set(ARM64)' substituteInPlace cmake/config-ix.cmake \ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' '' + lib.optionalString (useLLVM) '' diff --git a/pkgs/development/compilers/llvm/14/compiler-rt/default.nix b/pkgs/development/compilers/llvm/14/compiler-rt/default.nix index cc1a8dc0481f7..aa5bbad23e515 100644 --- a/pkgs/development/compilers/llvm/14/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/14/compiler-rt/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, llvm_meta, version , monorepoSrc, runCommand -, cmake, python3, libllvm, libcxxabi +, cmake, python3, xcbuild, libllvm, libcxxabi }: let @@ -26,7 +26,8 @@ stdenv.mkDerivation { inherit src; sourceRoot = "${src.name}/${baseName}"; - nativeBuildInputs = [ cmake python3 libllvm.dev ]; + nativeBuildInputs = [ cmake python3 libllvm.dev ] + ++ lib.optional stdenv.isDarwin xcbuild.xcrun; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ @@ -72,9 +73,11 @@ stdenv.mkDerivation { # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the # extra `/`. ./normalize-var.patch - ] # Prevent a compilation error on darwin - ++ lib.optional stdenv.hostPlatform.isDarwin ./darwin-targetconditionals.patch - ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch; + # Prevent a compilation error on darwin + ./darwin-targetconditionals.patch + ../../common/compiler-rt/darwin-plistbuddy-workaround.patch + ./armv7l.patch + ]; # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra @@ -85,8 +88,6 @@ stdenv.mkDerivation { substituteInPlace cmake/builtin-config-ix.cmake \ --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)' '' + lib.optionalString stdenv.isDarwin '' - substituteInPlace cmake/builtin-config-ix.cmake \ - --replace 'set(ARM64 arm64 arm64e)' 'set(ARM64)' substituteInPlace cmake/config-ix.cmake \ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' '' + lib.optionalString (useLLVM) '' diff --git a/pkgs/development/compilers/llvm/common/compiler-rt/darwin-plistbuddy-workaround.patch b/pkgs/development/compilers/llvm/common/compiler-rt/darwin-plistbuddy-workaround.patch new file mode 100644 index 0000000000000..dae8b3a690ac3 --- /dev/null +++ b/pkgs/development/compilers/llvm/common/compiler-rt/darwin-plistbuddy-workaround.patch @@ -0,0 +1,25 @@ +CMake tries to read a list field from SDKSettings.plist, but the output of +xcbuild PlistBuddy is incompatible with Apple's. (Plus we don't want it in our +dependencies.) + +Simply assume ARM64 is supported by the SDK. We already limit the actual archs +we build for by setting DARWIN_osx_BUILTIN_ARCHS explicitely. + +--- a/cmake/builtin-config-ix.cmake ++++ b/cmake/builtin-config-ix.cmake +@@ -97,14 +97,7 @@ if(APPLE) + set(DARWIN_osx_BUILTIN_MIN_VER 10.5) + set(DARWIN_osx_BUILTIN_MIN_VER_FLAG + -mmacosx-version-min=${DARWIN_osx_BUILTIN_MIN_VER}) +- set(DARWIN_osx_BUILTIN_ALL_POSSIBLE_ARCHS ${X86} ${X86_64}) +- # Add support for arm64 macOS if available in SDK. +- foreach(arch ${ARM64}) +- sdk_has_arch_support(${DARWIN_osx_SYSROOT} macosx ${arch} MACOS_ARM_SUPPORT) +- if (MACOS_ARM_SUPPORT) +- list(APPEND DARWIN_osx_BUILTIN_ALL_POSSIBLE_ARCHS ${arch}) +- endif() +- endforeach(arch) ++ set(DARWIN_osx_BUILTIN_ALL_POSSIBLE_ARCHS ${X86} ${X86_64} ${ARM64}) + + if(COMPILER_RT_ENABLE_IOS) + list(APPEND DARWIN_EMBEDDED_PLATFORMS ios) diff --git a/pkgs/development/compilers/llvm/git/compiler-rt/default.nix b/pkgs/development/compilers/llvm/git/compiler-rt/default.nix index cc1a8dc0481f7..aa5bbad23e515 100644 --- a/pkgs/development/compilers/llvm/git/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/git/compiler-rt/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, llvm_meta, version , monorepoSrc, runCommand -, cmake, python3, libllvm, libcxxabi +, cmake, python3, xcbuild, libllvm, libcxxabi }: let @@ -26,7 +26,8 @@ stdenv.mkDerivation { inherit src; sourceRoot = "${src.name}/${baseName}"; - nativeBuildInputs = [ cmake python3 libllvm.dev ]; + nativeBuildInputs = [ cmake python3 libllvm.dev ] + ++ lib.optional stdenv.isDarwin xcbuild.xcrun; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ @@ -72,9 +73,11 @@ stdenv.mkDerivation { # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the # extra `/`. ./normalize-var.patch - ] # Prevent a compilation error on darwin - ++ lib.optional stdenv.hostPlatform.isDarwin ./darwin-targetconditionals.patch - ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch; + # Prevent a compilation error on darwin + ./darwin-targetconditionals.patch + ../../common/compiler-rt/darwin-plistbuddy-workaround.patch + ./armv7l.patch + ]; # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra @@ -85,8 +88,6 @@ stdenv.mkDerivation { substituteInPlace cmake/builtin-config-ix.cmake \ --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)' '' + lib.optionalString stdenv.isDarwin '' - substituteInPlace cmake/builtin-config-ix.cmake \ - --replace 'set(ARM64 arm64 arm64e)' 'set(ARM64)' substituteInPlace cmake/config-ix.cmake \ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' '' + lib.optionalString (useLLVM) '' From 96e4a0f05c413f98664349ef94d1391d0b4a0176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Tue, 9 Aug 2022 12:17:47 +0200 Subject: [PATCH 005/318] libcxxabi: remove link with build libcxxabi --- .../compilers/llvm/10/libcxxabi/default.nix | 12 +++++++++++- .../compilers/llvm/11/libcxxabi/default.nix | 12 +++++++++++- .../compilers/llvm/12/libcxxabi/default.nix | 12 +++++++++++- .../compilers/llvm/13/libcxxabi/default.nix | 12 +++++++++++- .../compilers/llvm/14/libcxxabi/default.nix | 13 ++++++++++++- .../compilers/llvm/5/libcxxabi/default.nix | 12 +++++++++++- .../compilers/llvm/6/libcxxabi/default.nix | 12 +++++++++++- .../compilers/llvm/7/libcxxabi/default.nix | 12 +++++++++++- .../compilers/llvm/8/libcxxabi/default.nix | 12 +++++++++++- .../compilers/llvm/9/libcxxabi/default.nix | 12 +++++++++++- .../compilers/llvm/git/libcxxabi/default.nix | 12 +++++++++++- 11 files changed, 122 insertions(+), 11 deletions(-) diff --git a/pkgs/development/compilers/llvm/10/libcxxabi/default.nix b/pkgs/development/compilers/llvm/10/libcxxabi/default.nix index 482ced8e0c3fc..c61f48485580f 100644 --- a/pkgs/development/compilers/llvm/10/libcxxabi/default.nix +++ b/pkgs/development/compilers/llvm/10/libcxxabi/default.nix @@ -42,11 +42,21 @@ stdenv.mkDerivation { preInstall = lib.optionalString stdenv.isDarwin '' for file in lib/*.dylib; do + # Fix up the install name. Preserve the basename, just replace the path. + installName="$out/lib/$(basename $(otool -D $file | tail -n 1))" + # this should be done in CMake, but having trouble figuring out # the magic combination of necessary CMake variables # if you fancy a try, take a look at # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling - install_name_tool -id $out/$file $file + ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file + + # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes + # libcxxabi to sometimes link against a different version of itself. + # Here we simply make that second reference point to ourselves. + for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do + ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file + done done ''; diff --git a/pkgs/development/compilers/llvm/11/libcxxabi/default.nix b/pkgs/development/compilers/llvm/11/libcxxabi/default.nix index 6c4ca925ab116..2359820dddecd 100644 --- a/pkgs/development/compilers/llvm/11/libcxxabi/default.nix +++ b/pkgs/development/compilers/llvm/11/libcxxabi/default.nix @@ -46,11 +46,21 @@ stdenv.mkDerivation { preInstall = lib.optionalString stdenv.isDarwin '' for file in lib/*.dylib; do + # Fix up the install name. Preserve the basename, just replace the path. + installName="$out/lib/$(basename $(otool -D $file | tail -n 1))" + # this should be done in CMake, but having trouble figuring out # the magic combination of necessary CMake variables # if you fancy a try, take a look at # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling - install_name_tool -id $out/$file $file + ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file + + # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes + # libcxxabi to sometimes link against a different version of itself. + # Here we simply make that second reference point to ourselves. + for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do + ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file + done done ''; diff --git a/pkgs/development/compilers/llvm/12/libcxxabi/default.nix b/pkgs/development/compilers/llvm/12/libcxxabi/default.nix index 89b56ad230d85..c130a6c1c3115 100644 --- a/pkgs/development/compilers/llvm/12/libcxxabi/default.nix +++ b/pkgs/development/compilers/llvm/12/libcxxabi/default.nix @@ -44,11 +44,21 @@ stdenv.mkDerivation { preInstall = lib.optionalString stdenv.isDarwin '' for file in lib/*.dylib; do + # Fix up the install name. Preserve the basename, just replace the path. + installName="$out/lib/$(basename $(otool -D $file | tail -n 1))" + # this should be done in CMake, but having trouble figuring out # the magic combination of necessary CMake variables # if you fancy a try, take a look at # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling - install_name_tool -id $out/$file $file + ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file + + # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes + # libcxxabi to sometimes link against a different version of itself. + # Here we simply make that second reference point to ourselves. + for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do + ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file + done done ''; diff --git a/pkgs/development/compilers/llvm/13/libcxxabi/default.nix b/pkgs/development/compilers/llvm/13/libcxxabi/default.nix index 16ea0b113c754..5da86b96d5a72 100644 --- a/pkgs/development/compilers/llvm/13/libcxxabi/default.nix +++ b/pkgs/development/compilers/llvm/13/libcxxabi/default.nix @@ -41,11 +41,21 @@ stdenv.mkDerivation rec { preInstall = lib.optionalString stdenv.isDarwin '' for file in lib/*.dylib; do + # Fix up the install name. Preserve the basename, just replace the path. + installName="$out/lib/$(basename $(otool -D $file | tail -n 1))" + # this should be done in CMake, but having trouble figuring out # the magic combination of necessary CMake variables # if you fancy a try, take a look at # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling - install_name_tool -id $out/$file $file + ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file + + # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes + # libcxxabi to sometimes link against a different version of itself. + # Here we simply make that second reference point to ourselves. + for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do + ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file + done done ''; diff --git a/pkgs/development/compilers/llvm/14/libcxxabi/default.nix b/pkgs/development/compilers/llvm/14/libcxxabi/default.nix index d64708ab040ae..0487f1d0de83c 100644 --- a/pkgs/development/compilers/llvm/14/libcxxabi/default.nix +++ b/pkgs/development/compilers/llvm/14/libcxxabi/default.nix @@ -52,12 +52,23 @@ stdenv.mkDerivation rec { installPhase = if stdenv.isDarwin then '' for file in lib/*.dylib; do + # Fix up the install name. Preserve the basename, just replace the path. + installName="$out/lib/$(basename $(otool -D $file | tail -n 1))" + # this should be done in CMake, but having trouble figuring out # the magic combination of necessary CMake variables # if you fancy a try, take a look at # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling - install_name_tool -id $out/$file $file + ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file + + # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes + # libcxxabi to sometimes link against a different version of itself. + # Here we simply make that second reference point to ourselves. + for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do + ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file + done done + make install install -d 755 $out/include install -m 644 ../include/*.h $out/include diff --git a/pkgs/development/compilers/llvm/5/libcxxabi/default.nix b/pkgs/development/compilers/llvm/5/libcxxabi/default.nix index 60a41ab2d8303..f2f707ec445d0 100644 --- a/pkgs/development/compilers/llvm/5/libcxxabi/default.nix +++ b/pkgs/development/compilers/llvm/5/libcxxabi/default.nix @@ -27,11 +27,21 @@ stdenv.mkDerivation { preInstall = lib.optionalString stdenv.isDarwin '' for file in lib/*.dylib; do + # Fix up the install name. Preserve the basename, just replace the path. + installName="$out/lib/$(basename $(otool -D $file | tail -n 1))" + # this should be done in CMake, but having trouble figuring out # the magic combination of necessary CMake variables # if you fancy a try, take a look at # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling - install_name_tool -id $out/$file $file + ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file + + # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes + # libcxxabi to sometimes link against a different version of itself. + # Here we simply make that second reference point to ourselves. + for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do + ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file + done done ''; diff --git a/pkgs/development/compilers/llvm/6/libcxxabi/default.nix b/pkgs/development/compilers/llvm/6/libcxxabi/default.nix index d7de130fbaaf6..63e6eee6f596c 100644 --- a/pkgs/development/compilers/llvm/6/libcxxabi/default.nix +++ b/pkgs/development/compilers/llvm/6/libcxxabi/default.nix @@ -27,11 +27,21 @@ stdenv.mkDerivation { preInstall = lib.optionalString stdenv.isDarwin '' for file in lib/*.dylib; do + # Fix up the install name. Preserve the basename, just replace the path. + installName="$out/lib/$(basename $(otool -D $file | tail -n 1))" + # this should be done in CMake, but having trouble figuring out # the magic combination of necessary CMake variables # if you fancy a try, take a look at # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling - install_name_tool -id $out/$file $file + ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file + + # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes + # libcxxabi to sometimes link against a different version of itself. + # Here we simply make that second reference point to ourselves. + for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do + ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file + done done ''; diff --git a/pkgs/development/compilers/llvm/7/libcxxabi/default.nix b/pkgs/development/compilers/llvm/7/libcxxabi/default.nix index 1bc9444feda11..721200136a57b 100644 --- a/pkgs/development/compilers/llvm/7/libcxxabi/default.nix +++ b/pkgs/development/compilers/llvm/7/libcxxabi/default.nix @@ -46,11 +46,21 @@ stdenv.mkDerivation { preInstall = lib.optionalString stdenv.isDarwin '' for file in lib/*.dylib; do + # Fix up the install name. Preserve the basename, just replace the path. + installName="$out/lib/$(basename $(otool -D $file | tail -n 1))" + # this should be done in CMake, but having trouble figuring out # the magic combination of necessary CMake variables # if you fancy a try, take a look at # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling - install_name_tool -id $out/$file $file + ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file + + # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes + # libcxxabi to sometimes link against a different version of itself. + # Here we simply make that second reference point to ourselves. + for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do + ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file + done done ''; diff --git a/pkgs/development/compilers/llvm/8/libcxxabi/default.nix b/pkgs/development/compilers/llvm/8/libcxxabi/default.nix index 50a5eabc17039..5ade8a5ae66f9 100644 --- a/pkgs/development/compilers/llvm/8/libcxxabi/default.nix +++ b/pkgs/development/compilers/llvm/8/libcxxabi/default.nix @@ -42,11 +42,21 @@ stdenv.mkDerivation { preInstall = lib.optionalString stdenv.isDarwin '' for file in lib/*.dylib; do + # Fix up the install name. Preserve the basename, just replace the path. + installName="$out/lib/$(basename $(otool -D $file | tail -n 1))" + # this should be done in CMake, but having trouble figuring out # the magic combination of necessary CMake variables # if you fancy a try, take a look at # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling - install_name_tool -id $out/$file $file + ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file + + # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes + # libcxxabi to sometimes link against a different version of itself. + # Here we simply make that second reference point to ourselves. + for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do + ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file + done done ''; diff --git a/pkgs/development/compilers/llvm/9/libcxxabi/default.nix b/pkgs/development/compilers/llvm/9/libcxxabi/default.nix index ee6834affbcd3..4a235f5c2ef70 100644 --- a/pkgs/development/compilers/llvm/9/libcxxabi/default.nix +++ b/pkgs/development/compilers/llvm/9/libcxxabi/default.nix @@ -42,11 +42,21 @@ stdenv.mkDerivation { preInstall = lib.optionalString stdenv.isDarwin '' for file in lib/*.dylib; do + # Fix up the install name. Preserve the basename, just replace the path. + installName="$out/lib/$(basename $(otool -D $file | tail -n 1))" + # this should be done in CMake, but having trouble figuring out # the magic combination of necessary CMake variables # if you fancy a try, take a look at # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling - install_name_tool -id $out/$file $file + ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file + + # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes + # libcxxabi to sometimes link against a different version of itself. + # Here we simply make that second reference point to ourselves. + for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do + ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file + done done ''; diff --git a/pkgs/development/compilers/llvm/git/libcxxabi/default.nix b/pkgs/development/compilers/llvm/git/libcxxabi/default.nix index 2d4fe974c016b..b478668ebded9 100644 --- a/pkgs/development/compilers/llvm/git/libcxxabi/default.nix +++ b/pkgs/development/compilers/llvm/git/libcxxabi/default.nix @@ -70,11 +70,21 @@ stdenv.mkDerivation rec { preInstall = lib.optionalString stdenv.isDarwin '' for file in lib/*.dylib; do + # Fix up the install name. Preserve the basename, just replace the path. + installName="$out/lib/$(basename $(otool -D $file | tail -n 1))" + # this should be done in CMake, but having trouble figuring out # the magic combination of necessary CMake variables # if you fancy a try, take a look at # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling - install_name_tool -id $out/$file $file + ${stdenv.cc.targetPrefix}install_name_tool -id $installName $file + + # cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes + # libcxxabi to sometimes link against a different version of itself. + # Here we simply make that second reference point to ourselves. + for other in $(otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do + ${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file + done done ''; From d8cdbe829819d2ed0c714319e889f716203e99b7 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 16 Sep 2022 03:29:18 +0200 Subject: [PATCH 006/318] git: Disable tests that fail on ZFS with formD normalization These two tests are regularly creating problems for my hydra instance, because its builders run on ZFS and that makes them fail consistently. The issue has something to do with unicode normalization. My pools have formD normalization configured, that might be the culprit in this case. Closes: #185882 --- .../version-management/git-and-tools/git/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix index 95327f31ddcde..135fac65724b8 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git/default.nix @@ -339,6 +339,10 @@ stdenv.mkDerivation (finalAttrs: { disable_test t5319-multi-pack-index disable_test t6421-merge-partial-clone + # Fails reproducibly on ZFS on Linux with formD normalization + disable_test t0021-conversion + disable_test t3910-mac-os-precompose + ${lib.optionalString (!perlSupport) '' # request-pull is a Bash script that invokes Perl, so it is not available # when NO_PERL=1, and the test should be skipped, but the test suite does From 53e860a408fdbf518ef951e40f8629cedb82a7b4 Mon Sep 17 00:00:00 2001 From: Ethin Probst Date: Thu, 22 Sep 2022 11:53:43 -0500 Subject: [PATCH 007/318] bitwarden: 2022.8.1 -> 2022.9.1 --- pkgs/tools/security/bitwarden/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/bitwarden/default.nix b/pkgs/tools/security/bitwarden/default.nix index 842eb758c3002..752cd7076ea26 100644 --- a/pkgs/tools/security/bitwarden/default.nix +++ b/pkgs/tools/security/bitwarden/default.nix @@ -14,11 +14,11 @@ stdenv.mkDerivation rec { pname = "bitwarden"; - version = "2022.8.1"; + version = "2022.9.1"; src = fetchurl { url = "https://github.com/bitwarden/clients/releases/download/desktop-v${version}/Bitwarden-${version}-amd64.deb"; - sha256 = "sha256-MmhHs1Gp6H1CkLO/yCBhsF0KMiYXz37D6QP26fS+/u0="; + sha256 = "sha256-KauvzxLzTVKu2kdfqErjm5QLfTI1uaYLBSUcNDCsJT0="; }; desktopItem = makeDesktopItem { From 231bd21698da59d5510a98549d2adddbc5f35498 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 22 Sep 2022 23:27:35 +0000 Subject: [PATCH 008/318] modemmanager: 1.18.10 -> 1.18.12 --- pkgs/tools/networking/modemmanager/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/modemmanager/default.nix b/pkgs/tools/networking/modemmanager/default.nix index 76459d6d82d08..89ec8508bbfc3 100644 --- a/pkgs/tools/networking/modemmanager/default.nix +++ b/pkgs/tools/networking/modemmanager/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation rec { pname = "modemmanager"; - version = "1.18.10"; + version = "1.18.12"; src = fetchurl { url = "https://www.freedesktop.org/software/ModemManager/ModemManager-${version}.tar.xz"; - sha256 = "sha256-FiVfginu6y3+y43RNwNg1G8QFeyF5vulwcvZ9DcdZes="; + sha256 = "sha256-tGTkkl2VWmyobdCGFudjsmrkbX/Tfb4oFnjjQGWx5DA="; }; nativeBuildInputs = [ vala gobject-introspection gettext pkg-config ]; From c40a7bff7b2bb2b0df8e315470fffc630a40c24d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 23 Sep 2022 01:52:03 +0000 Subject: [PATCH 009/318] libsForQt5.plasma-wayland-protocols: 1.7.0 -> 1.8.0 --- .../libraries/plasma-wayland-protocols/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/plasma-wayland-protocols/default.nix b/pkgs/development/libraries/plasma-wayland-protocols/default.nix index 7db287e5a44ff..3f0980046d598 100644 --- a/pkgs/development/libraries/plasma-wayland-protocols/default.nix +++ b/pkgs/development/libraries/plasma-wayland-protocols/default.nix @@ -7,11 +7,11 @@ mkDerivation rec { pname = "plasma-wayland-protocols"; - version = "1.7.0"; + version = "1.8.0"; src = fetchurl { url = "mirror://kde/stable/${pname}/${pname}-${version}.tar.xz"; - sha256 = "sha256-CE4mhcqmHZTG/obc4AayJHTXu0s0xMuWvXY7l+MF+tY="; + sha256 = "sha256-XQ+gyaC0SAAeCEJSQfI1/PuiW7xizkPAUK0dgI1X3Xo="; }; nativeBuildInputs = [ extra-cmake-modules ]; From d6ef2ac944a63bdd51c3fb0264d62ba42be40db3 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 23 Sep 2022 01:59:13 +0000 Subject: [PATCH 010/318] popt: 1.18 -> 1.19 --- pkgs/development/libraries/popt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/popt/default.nix b/pkgs/development/libraries/popt/default.nix index 307408e4db1d5..37d83ff5b2b2a 100644 --- a/pkgs/development/libraries/popt/default.nix +++ b/pkgs/development/libraries/popt/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "popt"; - version = "1.18"; + version = "1.19"; src = fetchurl { url = "https://ftp.osuosl.org/pub/rpm/popt/releases/popt-1.x/popt-${version}.tar.gz"; - sha256 = "1lf5zlj5rbg6s4bww7hbhpca97prgprnarx978vcwa0bl81vqnai"; + sha256 = "sha256-wlpIOPyOTByKrLi9Yg7bMISj1jv4mH/a08onWMYyQPk="; }; patches = lib.optionals stdenv.isCygwin [ From 8a34b9e1368815edfcc1d72a642e0fbf81e14c95 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 25 Sep 2022 09:46:37 +0200 Subject: [PATCH 011/318] python310Packages.poetry-core: 1.1.0 -> 1.2.0 --- .../python-modules/poetry-core/default.nix | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/poetry-core/default.nix b/pkgs/development/python-modules/poetry-core/default.nix index 737985ece249f..b009ec945724e 100644 --- a/pkgs/development/python-modules/poetry-core/default.nix +++ b/pkgs/development/python-modules/poetry-core/default.nix @@ -15,15 +15,16 @@ buildPythonPackage rec { pname = "poetry-core"; - version = "1.1.0"; + version = "1.2.0"; format = "pyproject"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "python-poetry"; repo = pname; rev = version; - sha256 = "sha256-WUgBrO9h1E7N2SVFD47UPv39DMx1yQviV5tcNPmR+/g="; + hash = "sha256-d/VhnG+6qabgLMb8ki46R9+lpCwZNlS8QpM8u3VYmWs="; }; propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ @@ -41,13 +42,20 @@ buildPythonPackage rec { virtualenv ]; - # requires git history to work correctly - disabledTests = [ "default_with_excluded_data" "default_src_with_excluded_data" ]; + # Requires git history to work correctly + disabledTests = [ + "default_with_excluded_data" + "default_src_with_excluded_data" + ]; - pythonImportsCheck = [ "poetry.core" ]; + pythonImportsCheck = [ + "poetry.core" + ]; - # allow for package to use pep420's native namespaces - pythonNamespaces = [ "poetry" ]; + # Allow for package to use pep420's native namespaces + pythonNamespaces = [ + "poetry" + ]; meta = with lib; { description = "Core utilities for Poetry"; From e4e3dafe21dd3b47a030375ed91eaa60b44786b5 Mon Sep 17 00:00:00 2001 From: sg2002 Date: Fri, 23 Sep 2022 14:33:09 +0300 Subject: [PATCH 012/318] gpgme: fix i686 build --- pkgs/development/libraries/gpgme/default.nix | 2 + .../gpgme/t-addexistingsubkey-i686.patch | 369 ++++++++++++++++++ 2 files changed, 371 insertions(+) create mode 100644 pkgs/development/libraries/gpgme/t-addexistingsubkey-i686.patch diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix index 8d4e2e7271d41..8470c62a89065 100644 --- a/pkgs/development/libraries/gpgme/default.nix +++ b/pkgs/development/libraries/gpgme/default.nix @@ -35,6 +35,8 @@ stdenv.mkDerivation rec { }; patches = [ + # Fix compilation on i686, would not be needed after 1.18.1 releases, https://dev.gnupg.org/T5522 + ./t-addexistingsubkey-i686.patch # https://dev.gnupg.org/rMc4cf527ea227edb468a84bf9b8ce996807bd6992 ./fix_gpg_list_keys.diff # https://lists.gnupg.org/pipermail/gnupg-devel/2020-April/034591.html diff --git a/pkgs/development/libraries/gpgme/t-addexistingsubkey-i686.patch b/pkgs/development/libraries/gpgme/t-addexistingsubkey-i686.patch new file mode 100644 index 0000000000000..348bd8fa596a4 --- /dev/null +++ b/pkgs/development/libraries/gpgme/t-addexistingsubkey-i686.patch @@ -0,0 +1,369 @@ +From c977424a1d39751fc5055131ad3f7819d421dcc8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= +Date: Wed, 17 Aug 2022 14:51:19 +0200 +Subject: [PATCH 1/5] qt: Make sure expiration time is interpreted as unsigned + number + +* lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp (add_subkey): Convert +expiration time to uint_least32_t. +-- + +This fixes the corresponding test on 32-bit systems where time_t (the +return type of expirationTime()) is a signed 32-bit integer type. + +GnuPG-bug-id: 6137 +--- + lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp b/lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp +index 32e2c292..b74e7a06 100644 +--- a/lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp ++++ b/lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp +@@ -64,7 +64,8 @@ static QGpgMEAddExistingSubkeyJob::result_type add_subkey(Context *ctx, const Ke + std::unique_ptr interactor{new GpgAddExistingSubkeyEditInteractor{subkey.keyGrip()}}; + + if (!subkey.neverExpires()) { +- const auto expiry = QDateTime::fromSecsSinceEpoch(subkey.expirationTime(), Qt::UTC).toString(u"yyyyMMdd'T'hhmmss").toStdString(); ++ const auto expiry = QDateTime::fromSecsSinceEpoch(uint_least32_t(subkey.expirationTime()), ++ Qt::UTC).toString(u"yyyyMMdd'T'hhmmss").toStdString(); + interactor->setExpiry(expiry); + } + +-- +2.36.0.windows.1 + + +From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= +Date: Wed, 17 Aug 2022 14:56:13 +0200 +Subject: [PATCH 2/5] qt,tests: Log the actual error code if the assertion + fails + +* lang/qt/tests/t-addexistingsubkey.cpp ( +AddExistingSubkeyJobTest::testAddExistingSubkeyAsync, +AddExistingSubkeyJobTest::testAddExistingSubkeySync, +AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use +QCOMPARE instead of QVERIFY for asserting equality. +-- + +GnuPG-bug-id: 6137 +--- + lang/qt/tests/t-addexistingsubkey.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp +index 589c90bf..2e654cec 100644 +--- a/lang/qt/tests/t-addexistingsubkey.cpp ++++ b/lang/qt/tests/t-addexistingsubkey.cpp +@@ -168,7 +168,7 @@ private Q_SLOTS: + QSignalSpy spy (this, SIGNAL(asyncDone())); + QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT)); + +- QVERIFY(result.code() == GPG_ERR_NO_ERROR); ++ QCOMPARE(result.code(), static_cast(GPG_ERR_NO_ERROR)); + key.update(); + QCOMPARE(key.numSubkeys(), 3u); + } +@@ -190,7 +190,7 @@ private Q_SLOTS: + + const auto result = job->exec(key, sourceSubkey); + +- QVERIFY(result.code() == GPG_ERR_NO_ERROR); ++ QCOMPARE(result.code(), static_cast(GPG_ERR_NO_ERROR)); + key.update(); + QCOMPARE(key.numSubkeys(), 3u); + QCOMPARE(key.subkey(2).expirationTime(), 0); +@@ -213,7 +213,7 @@ private Q_SLOTS: + + const auto result = job->exec(key, sourceSubkey); + +- QVERIFY(result.code() == GPG_ERR_NO_ERROR); ++ QCOMPARE(result.code(), static_cast(GPG_ERR_NO_ERROR)); + key.update(); + QCOMPARE(key.numSubkeys(), 3u); + +-- +2.36.0.windows.1 + + +From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= +Date: Wed, 17 Aug 2022 15:22:29 +0200 +Subject: [PATCH 3/5] qt,tests: Make sure expiration time is interpreted as + unsigned number + +* lang/qt/tests/t-addexistingsubkey.cpp, +lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to +uint_least32_t. +-- + +This doesn't change the outcome of the tests (they also pass without +this change because of the expiration dates of the test keys), but it's +still good practise to treat the expiration time as an unsigned number +if the assertions check that the expiration time is in some range. + +GnuPG-bug-id: 6137 +--- + lang/qt/tests/t-addexistingsubkey.cpp | 6 +++--- + lang/qt/tests/t-changeexpiryjob.cpp | 26 +++++++++++++------------- + 2 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp +index 2e654cec..87eadf43 100644 +--- a/lang/qt/tests/t-addexistingsubkey.cpp ++++ b/lang/qt/tests/t-addexistingsubkey.cpp +@@ -222,9 +222,9 @@ private Q_SLOTS: + // several times + const auto allowedDeltaTSeconds = 1; + const auto expectedExpirationRange = std::make_pair( +- sourceSubkey.expirationTime() - allowedDeltaTSeconds, +- sourceSubkey.expirationTime() + allowedDeltaTSeconds); +- const auto actualExpiration = key.subkey(2).expirationTime(); ++ uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds, ++ uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds); ++ const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime()); + QVERIFY2(actualExpiration >= expectedExpirationRange.first, + ("actual: " + std::to_string(actualExpiration) + + "; expected: " + std::to_string(expectedExpirationRange.first)).c_str()); +diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp +index 090002f3..3da74d46 100644 +--- a/lang/qt/tests/t-changeexpiryjob.cpp ++++ b/lang/qt/tests/t-changeexpiryjob.cpp +@@ -70,7 +70,7 @@ private Q_SLOTS: + QVERIFY(!key.isNull()); + QVERIFY(!key.subkey(0).isNull()); + QVERIFY(!key.subkey(1).isNull()); +- const auto subkeyExpiration = key.subkey(1).expirationTime(); ++ const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime()); + + { + // Create the job +@@ -101,7 +101,7 @@ private Q_SLOTS: + newExpirationDate.toSecsSinceEpoch() - 10, + QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch()); + { +- const auto actualExpiration = key.subkey(0).expirationTime(); ++ const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime()); + QVERIFY2(actualExpiration >= expectedExpirationRange.first, + ("actual: " + std::to_string(actualExpiration) + + "; expected: " + std::to_string(expectedExpirationRange.first)).c_str()); +@@ -110,7 +110,7 @@ private Q_SLOTS: + "; expected: " + std::to_string(expectedExpirationRange.second)).c_str()); + } + { +- const auto actualExpiration = key.subkey(1).expirationTime(); ++ const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime()); + QCOMPARE(actualExpiration, subkeyExpiration); // unchanged + } + } +@@ -133,7 +133,7 @@ private Q_SLOTS: + QVERIFY(!key.isNull()); + QVERIFY(!key.subkey(0).isNull()); + QVERIFY(!key.subkey(1).isNull()); +- const auto primaryKeyExpiration = key.subkey(0).expirationTime(); ++ const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime()); + + { + // Create the job +@@ -164,11 +164,11 @@ private Q_SLOTS: + newExpirationDate.toSecsSinceEpoch() - 10, + QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch()); + { +- const auto actualExpiration = key.subkey(0).expirationTime(); ++ const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime()); + QCOMPARE(actualExpiration, primaryKeyExpiration); // unchanged + } + { +- const auto actualExpiration = key.subkey(1).expirationTime(); ++ const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime()); + QVERIFY2(actualExpiration >= expectedExpirationRange.first, + ("actual: " + std::to_string(actualExpiration) + + "; expected: " + std::to_string(expectedExpirationRange.first)).c_str()); +@@ -196,7 +196,7 @@ private Q_SLOTS: + QVERIFY(!key.isNull()); + QVERIFY(!key.subkey(0).isNull()); + QVERIFY(!key.subkey(1).isNull()); +- const auto subkeyExpiration = key.subkey(1).expirationTime(); ++ const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime()); + + { + // Create the job +@@ -228,7 +228,7 @@ private Q_SLOTS: + newExpirationDate.toSecsSinceEpoch() - 10, + QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch()); + { +- const auto actualExpiration = key.subkey(0).expirationTime(); ++ const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime()); + QVERIFY2(actualExpiration >= expectedExpirationRange.first, + ("actual: " + std::to_string(actualExpiration) + + "; expected: " + std::to_string(expectedExpirationRange.first)).c_str()); +@@ -237,7 +237,7 @@ private Q_SLOTS: + "; expected: " + std::to_string(expectedExpirationRange.second)).c_str()); + } + { +- const auto actualExpiration = key.subkey(1).expirationTime(); ++ const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime()); + QCOMPARE(actualExpiration, subkeyExpiration); // unchanged + } + } +@@ -291,7 +291,7 @@ private Q_SLOTS: + newExpirationDate.toSecsSinceEpoch() - 10, + QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch()); + { +- const auto actualExpiration = key.subkey(0).expirationTime(); ++ const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime()); + QVERIFY2(actualExpiration >= expectedExpirationRange.first, + ("actual: " + std::to_string(actualExpiration) + + "; expected: " + std::to_string(expectedExpirationRange.first)).c_str()); +@@ -300,7 +300,7 @@ private Q_SLOTS: + "; expected: " + std::to_string(expectedExpirationRange.second)).c_str()); + } + { +- const auto actualExpiration = key.subkey(1).expirationTime(); ++ const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime()); + QVERIFY2(actualExpiration >= expectedExpirationRange.first, + ("actual: " + std::to_string(actualExpiration) + + "; expected: " + std::to_string(expectedExpirationRange.first)).c_str()); +@@ -359,7 +359,7 @@ private Q_SLOTS: + newExpirationDate.toSecsSinceEpoch() - 10, + QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch()); + { +- const auto actualExpiration = key.subkey(0).expirationTime(); ++ const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime()); + QVERIFY2(actualExpiration >= expectedExpirationRange.first, + ("actual: " + std::to_string(actualExpiration) + + "; expected: " + std::to_string(expectedExpirationRange.first)).c_str()); +@@ -368,7 +368,7 @@ private Q_SLOTS: + "; expected: " + std::to_string(expectedExpirationRange.second)).c_str()); + } + { +- const auto actualExpiration = key.subkey(1).expirationTime(); ++ const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime()); + QVERIFY2(actualExpiration >= expectedExpirationRange.first, + ("actual: " + std::to_string(actualExpiration) + + "; expected: " + std::to_string(expectedExpirationRange.first)).c_str()); +-- +2.36.0.windows.1 + + +From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= +Date: Thu, 18 Aug 2022 10:43:19 +0200 +Subject: [PATCH 4/5] cpp: Fix handling of "no key" or "invalid time" + situations + +* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp +(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted +logic of string comparisons. +-- + +This fixes the problem that the interactor didn't return the proper +error code if gpg didn't accept the key grip or the expiration date. + +GnuPG-bug-id: 6137 +--- + lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp +index 547e613d..8eec7460 100644 +--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp ++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp +@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int + strcmp(args, "keygen.flags") == 0) { + return FLAGS; + } else if (status == GPGME_STATUS_GET_LINE && +- strcmp(args, "keygen.keygrip")) { ++ strcmp(args, "keygen.keygrip") == 0) { + err = NO_KEY_ERROR; + return ERROR; + } +@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int + strcmp(args, "keyedit.prompt") == 0) { + return QUIT; + } else if (status == GPGME_STATUS_GET_LINE && +- strcmp(args, "keygen.valid")) { ++ strcmp(args, "keygen.valid") == 0) { + err = INV_TIME_ERROR; + return ERROR; + } +-- +2.36.0.windows.1 + + +From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= +Date: Thu, 18 Aug 2022 10:55:09 +0200 +Subject: [PATCH 5/5] qt,tests: Make test pass on 32-bit systems + +* lang/qt/tests/t-addexistingsubkey.cpp +(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle +negative expiration date. +-- + +On 32-bit systems the expiration date of the test key overflows. This +will cause the AddExistingSubkeyJob to fail. We expect it to fail with +an "invalid time" error. + +GnuPG-bug-id: 6137 +--- + lang/qt/tests/t-addexistingsubkey.cpp | 42 +++++++++++++++------------ + 1 file changed, 24 insertions(+), 18 deletions(-) + +diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp +index 87eadf43..c0eee57b 100644 +--- a/lang/qt/tests/t-addexistingsubkey.cpp ++++ b/lang/qt/tests/t-addexistingsubkey.cpp +@@ -213,24 +213,30 @@ private Q_SLOTS: + + const auto result = job->exec(key, sourceSubkey); + +- QCOMPARE(result.code(), static_cast(GPG_ERR_NO_ERROR)); +- key.update(); +- QCOMPARE(key.numSubkeys(), 3u); +- +- // allow 1 second different expiration because gpg calculates with +- // expiration as difference to current time and takes current time +- // several times +- const auto allowedDeltaTSeconds = 1; +- const auto expectedExpirationRange = std::make_pair( +- uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds, +- uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds); +- const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime()); +- QVERIFY2(actualExpiration >= expectedExpirationRange.first, +- ("actual: " + std::to_string(actualExpiration) + +- "; expected: " + std::to_string(expectedExpirationRange.first)).c_str()); +- QVERIFY2(actualExpiration <= expectedExpirationRange.second, +- ("actual: " + std::to_string(actualExpiration) + +- "; expected: " + std::to_string(expectedExpirationRange.second)).c_str()); ++ if (sourceSubkey.expirationTime() > 0) { ++ QCOMPARE(result.code(), static_cast(GPG_ERR_NO_ERROR)); ++ key.update(); ++ QCOMPARE(key.numSubkeys(), 3u); ++ ++ // allow 1 second different expiration because gpg calculates with ++ // expiration as difference to current time and takes current time ++ // several times ++ const auto allowedDeltaTSeconds = 1; ++ const auto expectedExpirationRange = std::make_pair( ++ uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds, ++ uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds); ++ const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime()); ++ QVERIFY2(actualExpiration >= expectedExpirationRange.first, ++ ("actual: " + std::to_string(actualExpiration) + ++ "; expected: " + std::to_string(expectedExpirationRange.first)).c_str()); ++ QVERIFY2(actualExpiration <= expectedExpirationRange.second, ++ ("actual: " + std::to_string(actualExpiration) + ++ "; expected: " + std::to_string(expectedExpirationRange.second)).c_str()); ++ } else { ++ // on 32-bit systems the expiration date of the test key overflows; ++ // in this case we expect an appropriate error code ++ QCOMPARE(result.code(), static_cast(GPG_ERR_INV_TIME)); ++ } + } + + private: +-- +2.36.0.windows.1 + From abcaa9212306c4162292f6b81be1f5486bd966d8 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sun, 25 Sep 2022 18:06:39 +0200 Subject: [PATCH 013/318] openblas: Enable & honour parallel building --- .../development/libraries/science/math/openblas/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix index 6718262c2a384..39f1e7799e0a8 100644 --- a/pkgs/development/libraries/science/math/openblas/default.nix +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -174,6 +174,8 @@ stdenv.mkDerivation rec { buildPackages.stdenv.cc ]; + enableParallelBuilding = true; + makeFlags = mkMakeFlagsFromConfig (config // { FC = "${stdenv.cc.targetPrefix}gfortran"; CC = "${stdenv.cc.targetPrefix}${if stdenv.cc.isClang then "clang" else "cc"}"; @@ -191,6 +193,10 @@ stdenv.mkDerivation rec { NO_BINARY_MODE = if stdenv.isx86_64 then toString (stdenv.hostPlatform != stdenv.buildPlatform) else stdenv.hostPlatform != stdenv.buildPlatform; + # This disables automatic build job count detection (which honours neither enableParallelBuilding nor NIX_BUILD_CORES) + # and uses the main make invocation's job count, falling back to 1 if no parallelism is used. + # https://github.com/xianyi/OpenBLAS/blob/v0.3.20/getarch.c#L1781-L1792 + MAKE_NB_JOBS = 0; } // (lib.optionalAttrs singleThreaded { # As described on https://github.com/xianyi/OpenBLAS/wiki/Faq/4bded95e8dc8aadc70ce65267d1093ca7bdefc4c#multi-threaded USE_THREAD = false; From 1220237a3abe5bda473c9c0c6bf21b245fe87ca4 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 25 Sep 2022 21:06:43 +0000 Subject: [PATCH 014/318] libfido2: 1.11.0 -> 1.12.0 --- pkgs/development/libraries/libfido2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libfido2/default.nix b/pkgs/development/libraries/libfido2/default.nix index d7c034b9e98ba..674f22a4e2f4b 100644 --- a/pkgs/development/libraries/libfido2/default.nix +++ b/pkgs/development/libraries/libfido2/default.nix @@ -13,12 +13,12 @@ stdenv.mkDerivation rec { pname = "libfido2"; - version = "1.11.0"; + version = "1.12.0"; # releases on https://developers.yubico.com/libfido2/Releases/ are signed src = fetchurl { url = "https://developers.yubico.com/${pname}/Releases/${pname}-${version}.tar.gz"; - sha256 = "sha256-CDDFhT47RAmalxZuDOxUpltUt/qqwHBxhy93uOTXswI="; + sha256 = "sha256-gT1tJRFhQ9FtLpZ5FxinSCXaFrd0qNCT2W8Grhcw2cU="; }; nativeBuildInputs = [ cmake pkg-config ]; From 2fc8634038284c069c3e84449776b78b294fb334 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 06:34:44 +0000 Subject: [PATCH 015/318] dnsmasq: 2.86 -> 2.87 --- pkgs/tools/networking/dnsmasq/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/dnsmasq/default.nix b/pkgs/tools/networking/dnsmasq/default.nix index ba17f10e96c78..27cf4250c65df 100644 --- a/pkgs/tools/networking/dnsmasq/default.nix +++ b/pkgs/tools/networking/dnsmasq/default.nix @@ -17,11 +17,11 @@ let in stdenv.mkDerivation rec { pname = "dnsmasq"; - version = "2.86"; + version = "2.87"; src = fetchurl { url = "https://www.thekelleys.org.uk/dnsmasq/${pname}-${version}.tar.xz"; - sha256 = "sha256-KNUs/J4gBKxPhSdPUrMuFke028l2G4Ln3h5BxJkH6wg="; + sha256 = "sha256-AijANkp/I1b9fn8VSZN8vzCZp407LrG6W7DDHiuJ3no="; }; postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' From a1801d7cb343c0f8da6e96ac88b152cfff6be007 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Tue, 23 Aug 2022 23:30:23 +0200 Subject: [PATCH 016/318] apparmor: 3.0.7 -> 3.1.1 https://gitlab.com/apparmor/apparmor/-/wikis/Release_Notes_3.1 --- pkgs/os-specific/linux/apparmor/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix index 0a74554d6c60d..3fd787bce6bd4 100644 --- a/pkgs/os-specific/linux/apparmor/default.nix +++ b/pkgs/os-specific/linux/apparmor/default.nix @@ -21,13 +21,13 @@ }: let - apparmor-version = "3.0.7"; + apparmor-version = "3.1.1"; apparmor-meta = component: with lib; { homepage = "https://apparmor.net/"; description = "A mandatory access control system - ${component}"; license = licenses.gpl2; - maintainers = with maintainers; [ joachifm julm thoughtpolice ]; + maintainers = with maintainers; [ julm thoughtpolice ]; platforms = platforms.linux; }; @@ -35,7 +35,7 @@ let owner = "apparmor"; repo = "apparmor"; rev = "v${apparmor-version}"; - hash = "sha256-iLZY0wZQr+YvR8JCwTeECDuqFb1sQCQtkiUksiYCvWs="; + hash = "sha256-phEHfrza0EeX2HEM5ts8wVCFlSLlnEtZd2MwbG/XbFY="; }; aa-teardown = writeShellScript "aa-teardown" '' From 0bea4a194f7103fcedc0226a74e50657875a7c4d Mon Sep 17 00:00:00 2001 From: Daniel Barter Date: Sat, 17 Sep 2022 11:46:15 -0700 Subject: [PATCH 017/318] cc-wrapper/setup-hook.sh: remove duplicate flags in NIX_CFLAGS_COMPILE --- pkgs/build-support/cc-wrapper/setup-hook.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/build-support/cc-wrapper/setup-hook.sh b/pkgs/build-support/cc-wrapper/setup-hook.sh index 6a913cc4eac72..94ca721cd914c 100644 --- a/pkgs/build-support/cc-wrapper/setup-hook.sh +++ b/pkgs/build-support/cc-wrapper/setup-hook.sh @@ -69,10 +69,12 @@ ccWrapper_addCVars () { getHostRoleEnvHook if [ -d "$1/include" ]; then + (! echo "$NIX_CFLAGS_COMPILE" | grep -q -F "$1/include") && export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include" fi if [ -d "$1/Library/Frameworks" ]; then + (! echo "$NIX_CFLAGS_COMPILE" | grep -q -F "$1/Library/Frameworks") && export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks" fi } From 8bbb3e7f23423d819cd2cb865dd61c7a6d117dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 3 Sep 2022 21:35:27 +0200 Subject: [PATCH 018/318] ffmpeg: remove not necessary ? null --- pkgs/development/libraries/ffmpeg/generic.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 855586649b74c..2db1ff41c53f6 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -2,15 +2,15 @@ , alsa-lib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg , libssh, libtheora, libva, libdrm, libvorbis, libvpx, xz, soxr , x264, x265, xvidcore, zimg, zlib, libopus, speex, nv-codec-headers, dav1d -, srt ? null -, openglSupport ? false, libGLU ? null, libGL ? null -, libmfxSupport ? false, intel-media-sdk ? null -, libaomSupport ? false, libaom ? null +, srt +, openglSupport ? false, libGLU, libGL +, libmfxSupport ? false, intel-media-sdk +, libaomSupport ? false, libaom # Build options , runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime , multithreadBuild ? true # Multithreading via pthreads/win32 threads -, sdlSupport ? !stdenv.isAarch32, SDL ? null, SDL2 ? null -, vdpauSupport ? !stdenv.isAarch32, libvdpau ? null +, sdlSupport ? !stdenv.isAarch32, SDL, SDL2 +, vdpauSupport ? !stdenv.isAarch32, libvdpau # Developer options , debugDeveloper ? false , optimizationsDeveloper ? true @@ -70,10 +70,6 @@ let vpxSupport = reqMin "0.6" && !isAarch32; in -assert openglSupport -> libGL != null && libGLU != null; -assert libmfxSupport -> intel-media-sdk != null; -assert libaomSupport -> libaom != null; - stdenv.mkDerivation rec { pname = "ffmpeg"; From 8d6cdd8abaa1d944f54330887c301431a404157f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 3 Sep 2022 21:35:40 +0200 Subject: [PATCH 019/318] ffmpeg: cleanup darwin frameworks --- pkgs/development/libraries/ffmpeg/4.nix | 11 +++-------- pkgs/development/libraries/ffmpeg/5.nix | 7 +------ pkgs/development/libraries/ffmpeg/generic.nix | 5 ++--- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/4.nix b/pkgs/development/libraries/ffmpeg/4.nix index b518b7527ac0d..e37e90d553a3b 100644 --- a/pkgs/development/libraries/ffmpeg/4.nix +++ b/pkgs/development/libraries/ffmpeg/4.nix @@ -1,17 +1,12 @@ -{ callPackage, fetchpatch -# Darwin frameworks -, Cocoa, CoreMedia, VideoToolbox -, stdenv, lib -, ... -}@args: +{ callPackage, fetchpatch, ... }@args: callPackage ./generic.nix (rec { version = "4.4.2"; branch = version; sha256 = "sha256-+YpIJSDEdQdSGpB5FNqp77wThOBZG1r8PaGKqJfeKUg="; - darwinFrameworks = [ Cocoa CoreMedia VideoToolbox ]; + patches = [ - # sdl2 recently changed their versioning + # SDL2 recently changed their versioning (fetchpatch { url = "https://git.videolan.org/?p=ffmpeg.git;a=patch;h=e5163b1d34381a3319214a902ef1df923dd2eeba"; hash = "sha256-nLhP2+34cj5EgpnUrePZp60nYAxmbhZAEDfay4pBVk0="; diff --git a/pkgs/development/libraries/ffmpeg/5.nix b/pkgs/development/libraries/ffmpeg/5.nix index d09d7ccd1cece..b19c22a55f3a8 100644 --- a/pkgs/development/libraries/ffmpeg/5.nix +++ b/pkgs/development/libraries/ffmpeg/5.nix @@ -1,12 +1,7 @@ -{ callPackage -# Darwin frameworks -, Cocoa, CoreMedia, VideoToolbox -, ... -}@args: +{ callPackage, ... }@args: callPackage ./generic.nix (rec { version = "5.1.2"; branch = version; sha256 = "sha256-OaC8yNmFSfFsVwYkZ4JGpqxzbAZs69tAn5UC6RWyLys="; - darwinFrameworks = [ Cocoa CoreMedia VideoToolbox ]; } // args) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 2db1ff41c53f6..2f4ce0b552db0 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -15,8 +15,7 @@ , debugDeveloper ? false , optimizationsDeveloper ? true , extraWarningsDeveloper ? false -# Darwin frameworks -, Cocoa, darwinFrameworks ? [ Cocoa ] +, Cocoa, CoreMedia, VideoToolbox # Inherit generics , branch, sha256, version, patches ? [], knownVulnerabilities ? [] , doCheck ? true @@ -185,7 +184,7 @@ stdenv.mkDerivation rec { ++ optional ((isLinux || isFreeBSD) && !isAarch32) libva ++ optional ((isLinux || isFreeBSD) && !isAarch32) libdrm ++ optional isLinux alsa-lib - ++ optionals isDarwin darwinFrameworks + ++ optionals isDarwin [ Cocoa CoreMedia VideoToolbox ] ++ optional vdpauSupport libvdpau ++ optional sdlSupport (if reqMin "3.2" then SDL2 else SDL) ++ optional (reqMin "4.2") dav1d; From 7719968fb6faf81968db79a9c109edfb1133233c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 3 Sep 2022 21:50:24 +0200 Subject: [PATCH 020/318] ffmpeg: cleanup and improve options, add vaapiSupport vpxSupport srtSupport --- pkgs/development/libraries/ffmpeg/generic.nix | 34 +++++++------------ 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 2f4ce0b552db0..acb6e92f9962e 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -1,8 +1,10 @@ { lib, stdenv, buildPackages, fetchurl, pkg-config, addOpenGLRunpath, perl, texinfo, yasm , alsa-lib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg -, libssh, libtheora, libva, libdrm, libvorbis, libvpx, xz, soxr +, libssh, libtheora, libva, libdrm, libvorbis, xz, soxr , x264, x265, xvidcore, zimg, zlib, libopus, speex, nv-codec-headers, dav1d -, srt +, vpxSupport ? !stdenv.isAarch32, libvpx +, srtSupport ? true, srt +, vaapiSupport ? ((stdenv.isLinux || stdenv.isFreeBSD) && !stdenv.isAarch32) , openglSupport ? false, libGLU, libGL , libmfxSupport ? false, intel-media-sdk , libaomSupport ? false, libaom @@ -34,12 +36,6 @@ * pulseaudio * * Known issues: - * 0.6 - fails to compile (unresolved) (so far, only disabling a number of - * features works, but that is not a feasible solution) - * 0.6.90 - mmx: compile errors (fix: disable for 0.6.90-rc0) - * 1.1 - libsoxr: compile error (fix: disable for 1.1) - * Support was initially added in 1.1 before soxr api change, fix - * would probably be to add soxr-1.0 * ALL - Cross-compiling will disable features not present on host OS * (e.g. dxva2 support [DirectX] will not be enabled unless natively * compiled on Cygwin) @@ -47,7 +43,6 @@ */ let - inherit (stdenv) isDarwin isFreeBSD isLinux isAarch32; inherit (lib) optional optionals optionalString enableFeature filter; cmpVer = builtins.compareVersions; @@ -63,14 +58,9 @@ let # Disable dependency that needs fixes before it will work on Darwin or Arm disDarwinOrArmFix = origArg: minVer: fixArg: if ((isDarwin || isAarch32) && reqMin minVer) then fixArg else origArg; - - vaapiSupport = reqMin "0.6" && ((isLinux || isFreeBSD) && !isAarch32); - - vpxSupport = reqMin "0.6" && !isAarch32; in stdenv.mkDerivation rec { - pname = "ffmpeg"; inherit version; @@ -96,7 +86,7 @@ stdenv.mkDerivation rec { # Build flags "--enable-shared" (ifMinVer "0.6" "--enable-pic") - (ifMinVer "4.0" (enableFeature (srt != null) "libsrt")) + (ifMinVer "4.0" (enableFeature srtSupport "libsrt")) (enableFeature runtimeCpuDetectBuild "runtime-cpudetect") "--enable-hardcoded-tables" ] ++ @@ -115,7 +105,7 @@ stdenv.mkDerivation rec { "--enable-ffmpeg" "--disable-ffplay" (ifMinVer "0.6" "--enable-ffprobe") - (if reqMin "4" then null else "--disable-ffserver") + (ifVerOlder "4" "--disable-ffserver") # Libraries (ifMinVer "0.6" "--enable-avcodec") (ifMinVer "0.6" "--enable-avdevice") @@ -175,18 +165,18 @@ stdenv.mkDerivation rec { buildInputs = [ bzip2 fontconfig freetype gnutls libiconv lame libass libogg libssh libtheora - libvorbis xz soxr x264 x265 xvidcore zimg zlib libopus speex srt nv-codec-headers + libvorbis xz soxr x264 x265 xvidcore zimg zlib libopus speex nv-codec-headers ] ++ optionals openglSupport [ libGL libGLU ] ++ optional libmfxSupport intel-media-sdk ++ optional libaomSupport libaom ++ optional vpxSupport libvpx - ++ optionals (!isDarwin && !isAarch32 && pulseaudioSupport) [ libpulseaudio ] # Need to be fixed on Darwin and ARM - ++ optional ((isLinux || isFreeBSD) && !isAarch32) libva - ++ optional ((isLinux || isFreeBSD) && !isAarch32) libdrm - ++ optional isLinux alsa-lib - ++ optionals isDarwin [ Cocoa CoreMedia VideoToolbox ] + ++ optionals (!stdenv.isDarwin && !stdenv.isAarch32 && pulseaudioSupport) [ libpulseaudio ] # Need to be fixed on Darwin and ARM + ++ optionals vaapiSupport [ libva libdrm ] + ++ optional stdenv.isLinux alsa-lib + ++ optionals stdenv.isDarwin [ Cocoa CoreMedia VideoToolbox ] ++ optional vdpauSupport libvdpau ++ optional sdlSupport (if reqMin "3.2" then SDL2 else SDL) + ++ optional srtSupport srt ++ optional (reqMin "4.2") dav1d; enableParallelBuilding = true; From d369fa4ab8af86c874155c4c14cee79420d60009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 3 Sep 2022 21:51:00 +0200 Subject: [PATCH 021/318] ffmpeg: remove SDL1 support --- pkgs/development/libraries/ffmpeg/generic.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index acb6e92f9962e..b1f498e9287c3 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -11,7 +11,7 @@ # Build options , runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime , multithreadBuild ? true # Multithreading via pthreads/win32 threads -, sdlSupport ? !stdenv.isAarch32, SDL, SDL2 +, sdlSupport ? !stdenv.isAarch32, SDL2 , vdpauSupport ? !stdenv.isAarch32, libvdpau # Developer options , debugDeveloper ? false @@ -138,7 +138,7 @@ stdenv.mkDerivation rec { (ifMinVer "4.2" (enableFeature libmfxSupport "libmfx")) (ifMinVer "4.2" (enableFeature libaomSupport "libaom")) (disDarwinOrArmFix (ifMinVer "0.9" (lib.optionalString pulseaudioSupport "--enable-libpulse")) "0.9" "--disable-libpulse") - (ifMinVer "2.5" (if sdlSupport && reqMin "3.2" then "--enable-sdl2" else if sdlSupport then "--enable-sdl" else null)) # autodetected before 2.5, SDL1 support removed in 3.2 for SDL2 + (ifMinVer "2.5" (if sdlSupport && reqMin "3.2" then "--enable-sdl2" else null)) (ifMinVer "1.2" "--enable-libsoxr") "--enable-libx264" "--enable-libxvid" @@ -175,7 +175,7 @@ stdenv.mkDerivation rec { ++ optional stdenv.isLinux alsa-lib ++ optionals stdenv.isDarwin [ Cocoa CoreMedia VideoToolbox ] ++ optional vdpauSupport libvdpau - ++ optional sdlSupport (if reqMin "3.2" then SDL2 else SDL) + ++ optional sdlSupport SDL2 ++ optional srtSupport srt ++ optional (reqMin "4.2") dav1d; From eb3fb81016f2df5cbd5890c2be65a9fc2c6326d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 3 Sep 2022 21:56:46 +0200 Subject: [PATCH 022/318] ffmpeg: inputs cleanup --- pkgs/development/libraries/ffmpeg/generic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index b1f498e9287c3..b25e7c47c6a17 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -147,7 +147,7 @@ stdenv.mkDerivation rec { (ifMinVer "2.8" "--enable-libopus") "--enable-libspeex" (ifMinVer "2.8" "--enable-libx265") - (ifMinVer "4.2" (enableFeature (dav1d != null) "libdav1d")) + (ifMinVer "4.2" (enableFeature (reqMin "4.2") "libdav1d")) # Developer flags (enableFeature debugDeveloper "debug") (enableFeature optimizationsDeveloper "optimizations") From 8609c5598f73208a6696a41d4139cab4716c165c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 3 Sep 2022 22:01:14 +0200 Subject: [PATCH 023/318] ffmpeg: remove 0.X conditions --- pkgs/development/libraries/ffmpeg/generic.nix | 36 +++++++------------ 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index b25e7c47c6a17..e6282993d3b73 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -45,19 +45,11 @@ let inherit (lib) optional optionals optionalString enableFeature filter; - cmpVer = builtins.compareVersions; - reqMin = requiredVersion: (cmpVer requiredVersion branch != 1); - reqMatch = requiredVersion: (cmpVer requiredVersion branch == 0); + reqMin = requiredVersion: (builtins.compareVersions requiredVersion branch != 1); ifMinVer = minVer: flag: if reqMin minVer then flag else null; ifVerOlder = maxVer: flag: if (lib.versionOlder branch maxVer) then flag else null; - - # Version specific fix - verFix = withoutFix: fixVer: withFix: if reqMatch fixVer then withFix else withoutFix; - - # Disable dependency that needs fixes before it will work on Darwin or Arm - disDarwinOrArmFix = origArg: minVer: fixArg: if ((isDarwin || isAarch32) && reqMin minVer) then fixArg else origArg; in stdenv.mkDerivation rec { @@ -85,7 +77,7 @@ stdenv.mkDerivation rec { "--enable-version3" # Build flags "--enable-shared" - (ifMinVer "0.6" "--enable-pic") + "--enable-pic" (ifMinVer "4.0" (enableFeature srtSupport "libsrt")) (enableFeature runtimeCpuDetectBuild "runtime-cpudetect") "--enable-hardcoded-tables" @@ -98,46 +90,46 @@ stdenv.mkDerivation rec { else ["--disable-pthreads" "--disable-w32threads"]) ++ [ - (ifMinVer "0.9" "--disable-os2threads") # We don't support OS/2 + "--disable-os2threads" # We don't support OS/2 "--enable-network" (ifMinVer "2.4" "--enable-pixelutils") # Executables "--enable-ffmpeg" "--disable-ffplay" - (ifMinVer "0.6" "--enable-ffprobe") + "--enable-ffprobe" (ifVerOlder "4" "--disable-ffserver") # Libraries - (ifMinVer "0.6" "--enable-avcodec") - (ifMinVer "0.6" "--enable-avdevice") + "--enable-avcodec" + "--enable-avdevice" "--enable-avfilter" - (ifMinVer "0.6" "--enable-avformat") + "--enable-avformat" (ifMinVer "1.0" (ifVerOlder "5.0" "--enable-avresample")) (ifMinVer "1.1" "--enable-avutil") "--enable-postproc" - (ifMinVer "0.9" "--enable-swresample") + "--enable-swresample" "--enable-swscale" # Docs - (ifMinVer "0.6" "--disable-doc") + "--disable-doc" # External Libraries "--enable-libass" "--enable-bzlib" "--enable-gnutls" (ifMinVer "1.0" "--enable-fontconfig") - (ifMinVer "0.7" "--enable-libfreetype") + "--enable-libfreetype" "--enable-libmp3lame" (ifMinVer "1.2" "--enable-iconv") "--enable-libtheora" (ifMinVer "2.1" "--enable-libssh") - (ifMinVer "0.6" (enableFeature vaapiSupport "vaapi")) + (enableFeature vaapiSupport "vaapi") (ifMinVer "3.4" (enableFeature vaapiSupport "libdrm")) (enableFeature vdpauSupport "vdpau") "--enable-libvorbis" - (ifMinVer "0.6" (enableFeature vpxSupport "libvpx")) + (enableFeature vpxSupport "libvpx") (ifMinVer "2.4" "--enable-lzma") (ifMinVer "2.2" (enableFeature openglSupport "opengl")) (ifMinVer "4.2" (enableFeature libmfxSupport "libmfx")) (ifMinVer "4.2" (enableFeature libaomSupport "libaom")) - (disDarwinOrArmFix (ifMinVer "0.9" (lib.optionalString pulseaudioSupport "--enable-libpulse")) "0.9" "--disable-libpulse") + (lib.optionalString pulseaudioSupport "--enable-libpulse") (ifMinVer "2.5" (if sdlSupport && reqMin "3.2" then "--enable-sdl2" else null)) (ifMinVer "1.2" "--enable-libsoxr") "--enable-libx264" @@ -153,8 +145,6 @@ stdenv.mkDerivation rec { (enableFeature optimizationsDeveloper "optimizations") (enableFeature extraWarningsDeveloper "extra-warnings") "--disable-stripping" - # Disable mmx support for 0.6.90 - (verFix null "0.6.90" "--disable-mmx") ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--cross-prefix=${stdenv.cc.targetPrefix}" "--enable-cross-compile" From 77e8784f4efd776bdadb48ce69f3b29d867ae3b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 3 Sep 2022 22:02:11 +0200 Subject: [PATCH 024/318] ffmpeg: remove 1.X conditions --- pkgs/development/libraries/ffmpeg/generic.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index e6282993d3b73..a7086e12a4bcc 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -64,8 +64,7 @@ stdenv.mkDerivation rec { postPatch = "patchShebangs ."; inherit patches; - outputs = [ "bin" "dev" "out" "man" ] - ++ optional (reqMin "1.0") "doc" ; # just dev-doc + outputs = [ "bin" "dev" "out" "man" "doc" ]; setOutputFlags = false; # doesn't accept all and stores configureFlags in libs! configurePlatforms = []; @@ -103,8 +102,8 @@ stdenv.mkDerivation rec { "--enable-avdevice" "--enable-avfilter" "--enable-avformat" - (ifMinVer "1.0" (ifVerOlder "5.0" "--enable-avresample")) - (ifMinVer "1.1" "--enable-avutil") + (ifVerOlder "5.0" "--enable-avresample") + "--enable-avutil" "--enable-postproc" "--enable-swresample" "--enable-swscale" @@ -114,10 +113,10 @@ stdenv.mkDerivation rec { "--enable-libass" "--enable-bzlib" "--enable-gnutls" - (ifMinVer "1.0" "--enable-fontconfig") + "--enable-fontconfig" "--enable-libfreetype" "--enable-libmp3lame" - (ifMinVer "1.2" "--enable-iconv") + "--enable-iconv" "--enable-libtheora" (ifMinVer "2.1" "--enable-libssh") (enableFeature vaapiSupport "vaapi") @@ -131,7 +130,7 @@ stdenv.mkDerivation rec { (ifMinVer "4.2" (enableFeature libaomSupport "libaom")) (lib.optionalString pulseaudioSupport "--enable-libpulse") (ifMinVer "2.5" (if sdlSupport && reqMin "3.2" then "--enable-sdl2" else null)) - (ifMinVer "1.2" "--enable-libsoxr") + "--enable-libsoxr" "--enable-libx264" "--enable-libxvid" "--enable-libzimg" From 26a3bafb69845f66140bf57d21fc022b08309775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 29 Sep 2022 11:32:17 +0200 Subject: [PATCH 025/318] ffmpeg: remove 2.X and 3.X conditions --- pkgs/development/libraries/ffmpeg/generic.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index a7086e12a4bcc..594adc0463066 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -91,7 +91,7 @@ stdenv.mkDerivation rec { ++ [ "--disable-os2threads" # We don't support OS/2 "--enable-network" - (ifMinVer "2.4" "--enable-pixelutils") + "--enable-pixelutils" # Executables "--enable-ffmpeg" "--disable-ffplay" @@ -118,26 +118,26 @@ stdenv.mkDerivation rec { "--enable-libmp3lame" "--enable-iconv" "--enable-libtheora" - (ifMinVer "2.1" "--enable-libssh") + "--enable-libssh" (enableFeature vaapiSupport "vaapi") - (ifMinVer "3.4" (enableFeature vaapiSupport "libdrm")) + (enableFeature vaapiSupport "libdrm") (enableFeature vdpauSupport "vdpau") "--enable-libvorbis" (enableFeature vpxSupport "libvpx") - (ifMinVer "2.4" "--enable-lzma") - (ifMinVer "2.2" (enableFeature openglSupport "opengl")) + "--enable-lzma" + (enableFeature openglSupport "opengl") (ifMinVer "4.2" (enableFeature libmfxSupport "libmfx")) (ifMinVer "4.2" (enableFeature libaomSupport "libaom")) (lib.optionalString pulseaudioSupport "--enable-libpulse") - (ifMinVer "2.5" (if sdlSupport && reqMin "3.2" then "--enable-sdl2" else null)) + (enableFeature sdlSupport "sdl2") "--enable-libsoxr" "--enable-libx264" "--enable-libxvid" "--enable-libzimg" "--enable-zlib" - (ifMinVer "2.8" "--enable-libopus") + "--enable-libopus" "--enable-libspeex" - (ifMinVer "2.8" "--enable-libx265") + "--enable-libx265" (ifMinVer "4.2" (enableFeature (reqMin "4.2") "libdav1d")) # Developer flags (enableFeature debugDeveloper "debug") From ff3dd66849b724cf51c67d58410422067e63641b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 29 Sep 2022 09:34:12 +0000 Subject: [PATCH 026/318] libopenmpt: 0.6.5 -> 0.6.6 --- pkgs/development/libraries/audio/libopenmpt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/audio/libopenmpt/default.nix b/pkgs/development/libraries/audio/libopenmpt/default.nix index 270e4632aef15..8e5793b0bcd12 100644 --- a/pkgs/development/libraries/audio/libopenmpt/default.nix +++ b/pkgs/development/libraries/audio/libopenmpt/default.nix @@ -16,13 +16,13 @@ stdenv.mkDerivation rec { pname = "libopenmpt"; - version = "0.6.5"; + version = "0.6.6"; outputs = [ "out" "dev" "bin" ]; src = fetchurl { url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz"; - sha256 = "8iq+l3za5AX2hbdRUOf7FVsseJa0cA/VSr5ohA9m6cA="; + sha256 = "bdueJqQwYglEiReW/vsbuzi9kUj2z8VYgQwNPyaYdsc="; }; enableParallelBuilding = true; From 95059b974e56bced8bf03d0f623e8530bc2abf2b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 29 Sep 2022 10:41:03 +0000 Subject: [PATCH 027/318] nodejs-18_x: 18.9.1 -> 18.10.0 --- pkgs/development/web/nodejs/v18.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/web/nodejs/v18.nix b/pkgs/development/web/nodejs/v18.nix index c4050087cfe7d..7f9bff648ce6a 100644 --- a/pkgs/development/web/nodejs/v18.nix +++ b/pkgs/development/web/nodejs/v18.nix @@ -8,8 +8,8 @@ let in buildNodejs { inherit enableNpm; - version = "18.9.1"; - sha256 = "sha256-84GWPUNWi6aZkVyIYp3G2koZY4BNzTey5uHRDZI91dk="; + version = "18.10.0"; + sha256 = "17z8081bqsldx4dl7399dp9gdsmd04lgnwvwycj7sjmyw9a1nwdd"; patches = [ (fetchpatch { # Fixes cross compilation to aarch64-linux by reverting https://github.com/nodejs/node/pull/43200 From 4dca7afed548262b3da966d884892ae7c1a20739 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Fri, 30 Sep 2022 01:56:21 +0200 Subject: [PATCH 028/318] libaom: 3.4.0 -> 3.5.0 --- pkgs/development/libraries/libaom/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libaom/default.nix b/pkgs/development/libraries/libaom/default.nix index 575c2613e5b1b..5ec8c75e2af73 100644 --- a/pkgs/development/libraries/libaom/default.nix +++ b/pkgs/development/libraries/libaom/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation rec { pname = "libaom"; - version = "3.4.0"; + version = "3.5.0"; src = fetchzip { url = "https://aomedia.googlesource.com/aom/+archive/v${version}.tar.gz"; - sha256 = "sha256-NgzpVxQmsgOPzKkGpJIJrLiNQcruhpEoCi/CYJx5b3A="; + sha256 = "sha256-kEU8DVgB4JoyB6Lbh/XfC3LZcsVEM2STkZV8iZBCNis="; stripRoot = false; }; From 44165d3657676d19a9e46d1b773ec740582223c6 Mon Sep 17 00:00:00 2001 From: Jyun-Yan You Date: Thu, 29 Sep 2022 23:08:22 +0800 Subject: [PATCH 029/318] llvmPackages_{14, git}.clang: add nostdlibinc flag Fix header search paths as #153963 --- .../llvm/14/clang/add-nostdlibinc-flag.patch | 18 ++++++++++++++++++ .../compilers/llvm/14/clang/default.nix | 5 +---- .../llvm/git/clang/add-nostdlibinc-flag.patch | 18 ++++++++++++++++++ .../compilers/llvm/git/clang/default.nix | 5 +---- 4 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 pkgs/development/compilers/llvm/14/clang/add-nostdlibinc-flag.patch create mode 100644 pkgs/development/compilers/llvm/git/clang/add-nostdlibinc-flag.patch diff --git a/pkgs/development/compilers/llvm/14/clang/add-nostdlibinc-flag.patch b/pkgs/development/compilers/llvm/14/clang/add-nostdlibinc-flag.patch new file mode 100644 index 0000000000000..b73cd0185eb6c --- /dev/null +++ b/pkgs/development/compilers/llvm/14/clang/add-nostdlibinc-flag.patch @@ -0,0 +1,18 @@ +diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp +index 3bfddeefc7b2..05b11d9e562d 100644 +--- a/lib/Driver/Driver.cpp ++++ b/lib/Driver/Driver.cpp +@@ -482,6 +482,13 @@ DerivedArgList *Driver::TranslateInputArgs(const InputArgList &Args) const { + } + #endif + ++ { ++ Arg *A = DAL->MakeFlagArg(/*BaseArg=*/nullptr, ++ Opts.getOption(options::OPT_nostdlibinc)); ++ A->claim(); ++ DAL->append(A); ++ } ++ + return DAL; + } + diff --git a/pkgs/development/compilers/llvm/14/clang/default.nix b/pkgs/development/compilers/llvm/14/clang/default.nix index 5ff02d68de426..6b775efcc039d 100644 --- a/pkgs/development/compilers/llvm/14/clang/default.nix +++ b/pkgs/development/compilers/llvm/14/clang/default.nix @@ -45,6 +45,7 @@ let ./purity.patch # https://reviews.llvm.org/D51899 ./gnu-install-dirs.patch + ./add-nostdlibinc-flag.patch (substituteAll { src = ../../clang-11-12-LLVMgold-path.patch; libllvmLibdir = "${libllvm.lib}/lib"; @@ -54,10 +55,6 @@ let postPatch = '' (cd tools && ln -s ../../clang-tools-extra extra) - sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \ - -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \ - lib/Driver/ToolChains/*.cpp - # Patch for standalone doc building sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt '' + lib.optionalString stdenv.hostPlatform.isMusl '' diff --git a/pkgs/development/compilers/llvm/git/clang/add-nostdlibinc-flag.patch b/pkgs/development/compilers/llvm/git/clang/add-nostdlibinc-flag.patch new file mode 100644 index 0000000000000..80c2eb3623832 --- /dev/null +++ b/pkgs/development/compilers/llvm/git/clang/add-nostdlibinc-flag.patch @@ -0,0 +1,18 @@ +diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp +index 3f29afd35971..223d2769cdfc 100644 +--- a/lib/Driver/Driver.cpp ++++ b/lib/Driver/Driver.cpp +@@ -491,6 +491,13 @@ DerivedArgList *Driver::TranslateInputArgs(const InputArgList &Args) const { + } + #endif + ++ { ++ Arg *A = DAL->MakeFlagArg(/*BaseArg=*/nullptr, ++ Opts.getOption(options::OPT_nostdlibinc)); ++ A->claim(); ++ DAL->append(A); ++ } ++ + return DAL; + } + diff --git a/pkgs/development/compilers/llvm/git/clang/default.nix b/pkgs/development/compilers/llvm/git/clang/default.nix index 3110bef09e969..3df0e5042b8dc 100644 --- a/pkgs/development/compilers/llvm/git/clang/default.nix +++ b/pkgs/development/compilers/llvm/git/clang/default.nix @@ -46,6 +46,7 @@ let ./purity.patch # https://reviews.llvm.org/D51899 ./gnu-install-dirs.patch + ./add-nostdlibinc-flag.patch (substituteAll { src = ../../clang-11-12-LLVMgold-path.patch; libllvmLibdir = "${libllvm.lib}/lib"; @@ -55,10 +56,6 @@ let postPatch = '' (cd tools && ln -s ../../clang-tools-extra extra) - sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \ - -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \ - lib/Driver/ToolChains/*.cpp - # Patch for standalone doc building sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt '' + lib.optionalString stdenv.hostPlatform.isMusl '' From 76b7136f4fc9bff719aa715fd594dee652275c92 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 30 Sep 2022 11:39:22 +0200 Subject: [PATCH 030/318] python310Packages.iso8601: 1.0.2 -> 1.1.0 --- pkgs/development/python-modules/iso8601/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/iso8601/default.nix b/pkgs/development/python-modules/iso8601/default.nix index 14cef7c62a8c0..e189e3778bc84 100644 --- a/pkgs/development/python-modules/iso8601/default.nix +++ b/pkgs/development/python-modules/iso8601/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "iso8601"; - version = "1.0.2"; + version = "1.1.0"; format = "pyproject"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-J/UDIg5oRdnblU+yErlbA2LYt+bBsjJqhwYcPek1lLE="; + hash = "sha256-MoEee4He7iBj6m0ulPiBmobR84EeSdI2I6QfqDK+8D8="; }; nativeBuildInputs = [ From fcd508704649c12281ffc7fa915bf3cb09f1dcd5 Mon Sep 17 00:00:00 2001 From: phaer Date: Thu, 29 Sep 2022 12:36:05 +0200 Subject: [PATCH 031/318] systemd: build with portabled by default. --- nixos/modules/system/boot/systemd.nix | 3 +++ nixos/modules/system/boot/systemd/logind.nix | 2 ++ nixos/modules/system/boot/systemd/tmpfiles.nix | 1 + pkgs/os-specific/linux/systemd/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index a3bff27626d8f..702b1711cfc3f 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -151,6 +151,9 @@ let ] ++ optionals cfg.package.withHostnamed [ "dbus-org.freedesktop.hostname1.service" "systemd-hostnamed.service" + ] ++ optionals cfg.package.withPortabled [ + "dbus-org.freedesktop.portable1.service" + "systemd-portabled.service" ] ++ [ "systemd-exit.service" "systemd-update-done.service" diff --git a/nixos/modules/system/boot/systemd/logind.nix b/nixos/modules/system/boot/systemd/logind.nix index 5980160321367..b0c927f19f9d7 100644 --- a/nixos/modules/system/boot/systemd/logind.nix +++ b/nixos/modules/system/boot/systemd/logind.nix @@ -82,6 +82,8 @@ in "dbus-org.freedesktop.import1.service" ] ++ optionals config.systemd.package.withMachined [ "dbus-org.freedesktop.machine1.service" + ] ++ optionals config.systemd.package.withPortabled [ + "dbus-org.freedesktop.portable1.service" ] ++ [ "dbus-org.freedesktop.login1.service" "user@.service" diff --git a/nixos/modules/system/boot/systemd/tmpfiles.nix b/nixos/modules/system/boot/systemd/tmpfiles.nix index e990e953b0572..32b9b275d3587 100644 --- a/nixos/modules/system/boot/systemd/tmpfiles.nix +++ b/nixos/modules/system/boot/systemd/tmpfiles.nix @@ -79,6 +79,7 @@ in ln -s "${systemd}/example/tmpfiles.d/home.conf" ln -s "${systemd}/example/tmpfiles.d/journal-nocow.conf" + ln -s "${systemd}/example/tmpfiles.d/portables.conf" ln -s "${systemd}/example/tmpfiles.d/static-nodes-permissions.conf" ln -s "${systemd}/example/tmpfiles.d/systemd.conf" ln -s "${systemd}/example/tmpfiles.d/systemd-nologin.conf" diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 5b417369a5584..7f47843580610 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -92,7 +92,7 @@ , withOomd ? true , withPCRE2 ? true , withPolkit ? true -, withPortabled ? false +, withPortabled ? true , withRemote ? !stdenv.hostPlatform.isMusl , withResolved ? true , withShellCompletions ? true @@ -677,7 +677,7 @@ stdenv.mkDerivation { # runtime; otherwise we can't and we need to reboot. interfaceVersion = 2; - inherit withCryptsetup withHostnamed withImportd withLocaled withMachined withTimedated withUtmp util-linux kmod kbd; + inherit withCryptsetup withHostnamed withImportd withLocaled withMachined withPortabled withTimedated withUtmp util-linux kmod kbd; tests = { inherit (nixosTests) switchTest; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ac4ea888a94ad..b2abfb895dae7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25239,6 +25239,7 @@ with pkgs; withOomd = false; withPCRE2 = false; withPolkit = false; + withPortabled = false; withRemote = false; withResolved = false; withShellCompletions = false; From 466b73d659d71b6b00f7ce50dcfc8a6fd70e8c4b Mon Sep 17 00:00:00 2001 From: phaer Date: Thu, 29 Sep 2022 12:57:18 +0200 Subject: [PATCH 032/318] nixos/tests: init systemd-portabled Please enter the commit message for your changes. Lines starting --- nixos/tests/all-tests.nix | 1 + nixos/tests/systemd-portabled.nix | 51 +++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 nixos/tests/systemd-portabled.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 403ddd4cd1c3d..23b10ebb0b8a9 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -607,6 +607,7 @@ in { systemd-networkd-vrf = handleTest ./systemd-networkd-vrf.nix {}; systemd-nspawn = handleTest ./systemd-nspawn.nix {}; systemd-oomd = handleTest ./systemd-oomd.nix {}; + systemd-portabled = handleTest ./systemd-portabled.nix {}; systemd-shutdown = handleTest ./systemd-shutdown.nix {}; systemd-timesyncd = handleTest ./systemd-timesyncd.nix {}; systemd-misc = handleTest ./systemd-misc.nix {}; diff --git a/nixos/tests/systemd-portabled.nix b/nixos/tests/systemd-portabled.nix new file mode 100644 index 0000000000000..ef38258b0d866 --- /dev/null +++ b/nixos/tests/systemd-portabled.nix @@ -0,0 +1,51 @@ +import ./make-test-python.nix ({pkgs, lib, ...}: let + demo-program = pkgs.writeShellScriptBin "demo" '' + while ${pkgs.coreutils}/bin/sleep 3; do + echo Hello World > /dev/null + done + ''; + demo-service = pkgs.writeText "demo.service" '' + [Unit] + Description=demo service + Requires=demo.socket + After=demo.socket + + [Service] + Type=simple + ExecStart=${demo-program}/bin/demo + Restart=always + + [Install] + WantedBy=multi-user.target + Also=demo.socket + ''; + demo-socket = pkgs.writeText "demo.socket" '' + [Unit] + Description=demo socket + + [Socket] + ListenStream=/run/demo.sock + SocketMode=0666 + + [Install] + WantedBy=sockets.target + ''; + demo-portable = pkgs.portableService { + pname = "demo"; + version = "1.0"; + description = ''A demo "Portable Service" for a shell program built with nix''; + units = [ demo-service demo-socket ]; + }; +in { + + name = "systemd-portabled"; + nodes.machine = {}; + testScript = '' + machine.succeed("portablectl") + machine.wait_for_unit("systemd-portabled.service") + machine.succeed("portablectl attach --now --runtime ${demo-portable}/demo_1.0.raw") + machine.wait_for_unit("demo.service") + machine.succeed("portablectl detach --now --runtime demo_1.0") + machine.fail("systemctl status demo.service") + ''; +}) From 4a46a86bcf0b3abec41391ebc9e6eb5d444c0b9b Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Fri, 30 Sep 2022 19:59:41 +0100 Subject: [PATCH 033/318] dnsmasq: add some nixos tests to passthru.tests no specific nixos test (yet) so we'll have to make do with ones that use dnsmasq on the periphery --- pkgs/tools/networking/dnsmasq/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/tools/networking/dnsmasq/default.nix b/pkgs/tools/networking/dnsmasq/default.nix index 27cf4250c65df..1eb8b85166fe5 100644 --- a/pkgs/tools/networking/dnsmasq/default.nix +++ b/pkgs/tools/networking/dnsmasq/default.nix @@ -2,6 +2,7 @@ , libidn, libnetfilter_conntrack, buildPackages , dbusSupport ? stdenv.isLinux , dbus +, nixosTests }: with lib; @@ -77,6 +78,15 @@ stdenv.mkDerivation rec { ++ optionals dbusSupport [ dbus ] ++ optionals stdenv.isLinux [ libnetfilter_conntrack ]; + passthru.tests = { + prometheus-exporter = nixosTests.prometheus-exporters.dnsmasq; + + # these tests use dnsmasq incidentally + inherit (nixosTests) dnscrypt-proxy2; + kubernetes-dns-single = nixosTests.kubernetes.dns-single-node; + kubernetes-dns-multi = nixosTests.kubernetes.dns-multi-node; + }; + meta = { description = "An integrated DNS, DHCP and TFTP server for small networks"; homepage = "https://www.thekelleys.org.uk/dnsmasq/doc.html"; From 2998b31b02770f801e43614ac3c42a4fd4412863 Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Fri, 30 Sep 2022 12:30:03 -0400 Subject: [PATCH 034/318] nodejs: add back newer bypass-xcrun patch --- .../nodejs/bypass-darwin-xcrun-node16.patch | 41 +++++++++++++++++++ pkgs/development/web/nodejs/nodejs.nix | 3 -- pkgs/development/web/nodejs/v16.nix | 1 + pkgs/development/web/nodejs/v18.nix | 1 + 4 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/web/nodejs/bypass-darwin-xcrun-node16.patch diff --git a/pkgs/development/web/nodejs/bypass-darwin-xcrun-node16.patch b/pkgs/development/web/nodejs/bypass-darwin-xcrun-node16.patch new file mode 100644 index 0000000000000..e86fcc4d2973d --- /dev/null +++ b/pkgs/development/web/nodejs/bypass-darwin-xcrun-node16.patch @@ -0,0 +1,41 @@ +Avoids needing xcrun or xcodebuild in PATH for native package builds + +diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +index a75d8ee..476440d 100644 +--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py ++++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +@@ -522,7 +522,13 @@ class XcodeSettings: + # Since the CLT has no SDK paths anyway, returning None is the + # most sensible route and should still do the right thing. + try: +- return GetStdoutQuiet(["xcrun", "--sdk", sdk, infoitem]) ++ #return GetStdoutQuiet(["xcrun", "--sdk", sdk, infoitem]) ++ return { ++ "--show-sdk-platform-path": "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform", ++ "--show-sdk-path": "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk", ++ "--show-sdk-build-version": "19A547", ++ "--show-sdk-version": "10.15" ++ }[infoitem] + except GypError: + pass + +@@ -1499,7 +1505,8 @@ def XcodeVersion(): + version = "" + build = "" + try: +- version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines() ++ #version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines() ++ version_list = [] + # In some circumstances xcodebuild exits 0 but doesn't return + # the right results; for example, a user on 10.7 or 10.8 with + # a bogus path set via xcode-select +@@ -1510,7 +1517,8 @@ def XcodeVersion(): + version = version_list[0].split()[-1] # Last word on first line + build = version_list[-1].split()[-1] # Last word on last line + except GypError: # Xcode not installed so look for XCode Command Line Tools +- version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322 ++ #version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322 ++ version = "11.0.0.0.1.1567737322" + if not version: + raise GypError("No Xcode or CLT version detected!") + # Be careful to convert "4.2.3" to "0423" and "11.0.0" to "1100": diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index ab9a8b95d1a04..6d9a3392a7a92 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -123,7 +123,6 @@ let --replace "/usr/bin/env" "${coreutils}/bin/env" done '' + optionalString stdenv.isDarwin '' - sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' tools/gyp/pylib/gyp/xcode_emulation.py sed -i -e "s|tr1/type_traits|type_traits|g" \ -e "s|std::tr1|std|" src/util.h ''; @@ -176,8 +175,6 @@ let Libs: -L$libv8/lib -lv8 -pthread -licui18n Cflags: -I$libv8/include EOF - '' + optionalString (stdenv.isDarwin && enableNpm) '' - sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' $out/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py ''; passthru.updateScript = import ./update.nix { diff --git a/pkgs/development/web/nodejs/v16.nix b/pkgs/development/web/nodejs/v16.nix index 0b6a127bd2693..5e0ea0a996cce 100644 --- a/pkgs/development/web/nodejs/v16.nix +++ b/pkgs/development/web/nodejs/v16.nix @@ -12,6 +12,7 @@ in sha256 = "sha256-ZyH+tBUtVtLGs1jOOXq9Wn8drwnuLiXFAhubTT+GozA="; patches = [ ./disable-darwin-v8-system-instrumentation.patch + ./bypass-darwin-xcrun-node16.patch # Fix npm silently fail without a HOME directory https://github.com/npm/cli/issues/4996 (fetchpatch { url = "https://github.com/npm/cli/commit/9905d0e24c162c3f6cc006fa86b4c9d0205a4c6f.patch"; diff --git a/pkgs/development/web/nodejs/v18.nix b/pkgs/development/web/nodejs/v18.nix index 7f9bff648ce6a..9cb626a93d98b 100644 --- a/pkgs/development/web/nodejs/v18.nix +++ b/pkgs/development/web/nodejs/v18.nix @@ -20,5 +20,6 @@ buildNodejs { }) ./disable-darwin-v8-system-instrumentation.patch + ./bypass-darwin-xcrun-node16.patch ]; } From 688211615fa5958dc4f194559c4924459093260a Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Fri, 30 Sep 2022 14:30:34 -0400 Subject: [PATCH 035/318] nodePackages: remove usage of xcbuild --- pkgs/development/node-packages/overrides.nix | 21 ++++---------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/pkgs/development/node-packages/overrides.nix b/pkgs/development/node-packages/overrides.nix index 7c5a408706e4e..a66eada91b48e 100644 --- a/pkgs/development/node-packages/overrides.nix +++ b/pkgs/development/node-packages/overrides.nix @@ -96,13 +96,13 @@ final: prev: { nativeBuildInputs = with pkgs; [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ - xcbuild darwin.apple_sdk.frameworks.CoreText ]; buildInputs = with pkgs; [ pixman cairo pango + giflib ]; }; @@ -147,14 +147,13 @@ final: prev: { # ../../applications/video/epgstation epgstation = prev."epgstation-../../applications/video/epgstation".override (oldAttrs: { buildInputs = [ pkgs.postgresql ]; - nativeBuildInputs = [ final.node-pre-gyp final.node-gyp-build pkgs.which ] ++ lib.optionals stdenv.isDarwin [ pkgs.xcbuild ]; + nativeBuildInputs = [ final.node-pre-gyp final.node-gyp-build pkgs.which ]; meta = oldAttrs.meta // { platforms = lib.platforms.none; }; }); # NOTE: this is a stub package to fetch npm dependencies for # ../../applications/video/epgstation/client epgstation-client = prev."epgstation-client-../../applications/video/epgstation/client".override (oldAttrs: { - nativeBuildInputs = lib.optionals stdenv.isDarwin [ pkgs.xcbuild ]; meta = oldAttrs.meta // { platforms = lib.platforms.none; }; }); @@ -222,11 +221,7 @@ final: prev: { }); joplin = prev.joplin.override { - nativeBuildInputs = with pkgs; [ - pkg-config - ] ++ lib.optionals stdenv.isDarwin [ - xcbuild - ]; + nativeBuildInputs = [ pkgs.pkg-config ]; buildInputs = with pkgs; [ # required by sharp # https://sharp.pixelplumbing.com/install @@ -292,10 +287,6 @@ final: prev: { ''; }; - mastodon-bot = prev.mastodon-bot.override { - nativeBuildInputs = lib.optionals stdenv.isDarwin [ pkgs.xcbuild ]; - }; - mermaid-cli = prev."@mermaid-js/mermaid-cli".override ( if stdenv.isDarwin then {} @@ -513,11 +504,7 @@ final: prev: { }; thelounge-plugin-giphy = prev.thelounge-plugin-giphy.override { - nativeBuildInputs = [ - final.node-pre-gyp - ] ++ lib.optionals stdenv.isDarwin [ - pkgs.xcbuild - ]; + nativeBuildInputs = [ final.node-pre-gyp ]; }; thelounge-theme-flat-blue = prev.thelounge-theme-flat-blue.override { From f7df1e77d56ab4bc51ceca396545d00e81bedc48 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 30 Sep 2022 07:29:38 +1000 Subject: [PATCH 036/318] sqlite: 3.39.3 -> 3.39.4 https://www.sqlite.org/releaselog/3_39_4.html --- pkgs/development/libraries/sqlite/default.nix | 4 ++-- pkgs/development/libraries/sqlite/tools.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix index 786c3c9e313cb..085e330bed486 100644 --- a/pkgs/development/libraries/sqlite/default.nix +++ b/pkgs/development/libraries/sqlite/default.nix @@ -17,13 +17,13 @@ in stdenv.mkDerivation rec { pname = "sqlite${optionalString interactive "-interactive"}"; - version = "3.39.3"; + version = "3.39.4"; # nixpkgs-update: no auto update # NB! Make sure to update ./tools.nix src (in the same directory). src = fetchurl { url = "https://sqlite.org/2022/sqlite-autoconf-${archiveVersion version}.tar.gz"; - sha256 = "sha256-eGj7MIK+Pyz0SRxvum3ivdy8KTo1/vsGJO48E/AUIrk="; + sha256 = "sha256-8x1EW0jmfihM8gZxfMFwq2PL5P1/eagnk7dyKF54/bs="; }; outputs = [ "bin" "dev" "out" ]; diff --git a/pkgs/development/libraries/sqlite/tools.nix b/pkgs/development/libraries/sqlite/tools.nix index 92d521b1916c1..4467f38b0479b 100644 --- a/pkgs/development/libraries/sqlite/tools.nix +++ b/pkgs/development/libraries/sqlite/tools.nix @@ -4,12 +4,12 @@ let archiveVersion = import ./archive-version.nix lib; mkTool = { pname, makeTarget, description, homepage, mainProgram }: stdenv.mkDerivation rec { inherit pname; - version = "3.39.3"; + version = "3.39.4"; # nixpkgs-update: no auto update src = assert version == sqlite.version; fetchurl { url = "https://sqlite.org/2022/sqlite-src-${archiveVersion version}.zip"; - sha256 = "sha256-GMEvLh2hEkIRc8hcT4rtQyYScsGwR0qgdZKI/TD6ufw="; + sha256 = "sha256-AtlsbM+BGrm2ORnvcX9+UqRQxCDga9Ep+0g81ww7O7o="; }; nativeBuildInputs = [ unzip ]; From 32f520bc09e886f39ce251bf0b6492285c21603c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 1 Oct 2022 01:01:17 +0000 Subject: [PATCH 037/318] rsync: 3.2.5 -> 3.2.6 --- pkgs/applications/networking/sync/rsync/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/sync/rsync/default.nix b/pkgs/applications/networking/sync/rsync/default.nix index bdddfe4f86773..f172a7fc420b6 100644 --- a/pkgs/applications/networking/sync/rsync/default.nix +++ b/pkgs/applications/networking/sync/rsync/default.nix @@ -20,12 +20,12 @@ stdenv.mkDerivation rec { pname = "rsync"; - version = "3.2.5"; + version = "3.2.6"; src = fetchurl { # signed with key 0048 C8B0 26D4 C96F 0E58 9C2F 6C85 9FB1 4B96 A8C5 url = "mirror://samba/rsync/src/rsync-${version}.tar.gz"; - sha256 = "sha256-KsTSFjXN95GGe8N3w1ym3af1DZGaWL5FBX/VFgDGmro="; + sha256 = "sha256-+zNlurJ4N9Qf6vQulnxXvTpHvI8Qdlo2ce/Wo4NUVNM="; }; nativeBuildInputs = [ perl ]; From 5c12e0efb6108b91bce711337b0ae78b74b8dc1c Mon Sep 17 00:00:00 2001 From: Hraban Luyat Date: Sat, 1 Oct 2022 03:12:51 -0400 Subject: [PATCH 038/318] sbcl: bootstrap x86-64-darwin 1.2.11 -> 2.2.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update the binary used to bootstrap SBCL versions on Darwin (Mac OS) x86-64 systems (i.e. Intel, i.e. non-ARM) from 1.2.11 (released in 2015) to 2.2.9 (released September 2022). Generally, the more recent the bootstrap binary, the fewer the problems. This bootstrap binary can be used to compile other SBCL versions (for this target) from source. Those don’t have binary releases by the SBCL team. This is useful because building SBCL 2.x from source, using the binary release of 1.2.11, on this system configuration, ended up in an endless loop. See also this thread on the Mac ports forum, where people are having the same issue: https://trac.macports.org/ticket/64621 Now that SBCL has released a more recent binary build for this system, the problem is solved. --- pkgs/development/compilers/sbcl/bootstrap.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/sbcl/bootstrap.nix b/pkgs/development/compilers/sbcl/bootstrap.nix index eaf1ff24d3e7a..b081df1572f52 100644 --- a/pkgs/development/compilers/sbcl/bootstrap.nix +++ b/pkgs/development/compilers/sbcl/bootstrap.nix @@ -8,9 +8,9 @@ let sha256 = "sha256-H0ALigXcWIypdA+fTf7jERscwbb7QIAfcoxCtGDh0RU="; }; x86_64-darwin = { - version = "1.2.11"; + version = "2.2.9"; system = "x86-64-darwin"; - sha256 = "0lh4gpvi8hl6g6b9321g5pwh8sk3218i7h4lx7p3vd9z0cf3lz85"; + sha256 = "sha256-b1BLkoLIOELAYBYA9eBmMgm1OxMxJewzNP96C9ADfKY="; }; x86_64-linux = { version = "1.3.16"; From 2a9fc04635c6c0b9a822f3c0aafeade1422fb8d9 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 1 Oct 2022 08:27:38 +0100 Subject: [PATCH 039/318] cc-wrapper/add-hardening.sh: always unset _FORTIFY_SOURCE before re-setting it On darwin clang driver always sets -D_FORTIFY_SOURCE=0 under asan. This causes -Werror to trip over macro redefinition: :1:9: error: '_FORTIFY_SOURCE' macro redefined [-Werror,-Wmacro-redefined] #define _FORTIFY_SOURCE 2 ^ To avoid it let's always explicitly undefine it first before redefining. --- pkgs/build-support/cc-wrapper/add-hardening.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/cc-wrapper/add-hardening.sh b/pkgs/build-support/cc-wrapper/add-hardening.sh index e5d296f6c9c52..b23fda1fed756 100644 --- a/pkgs/build-support/cc-wrapper/add-hardening.sh +++ b/pkgs/build-support/cc-wrapper/add-hardening.sh @@ -38,7 +38,9 @@ for flag in "${!hardeningEnableMap[@]}"; do case $flag in fortify) if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling fortify >&2; fi - hardeningCFlags+=('-O2' '-D_FORTIFY_SOURCE=2') + # Use -U_FORTIFY_SOURCE to avoid warnings on toolchains that explicitly + # set -D_FORTIFY_SOURCE=0 (like 'clang -fsanitize=address'). + hardeningCFlags+=('-O2' '-U_FORTIFY_SOURCE' '-D_FORTIFY_SOURCE=2') ;; stackprotector) if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling stackprotector >&2; fi From bb6c08c8d5d9a04fecf18d7a000d99ec96567cc2 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sat, 1 Oct 2022 17:44:33 +0800 Subject: [PATCH 040/318] flac: build with cmake, fixes cross compilation --- pkgs/applications/audio/flac/default.nix | 27 +++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/audio/flac/default.nix b/pkgs/applications/audio/flac/default.nix index c9e3b946dd19f..644a19c0f0406 100644 --- a/pkgs/applications/audio/flac/default.nix +++ b/pkgs/applications/audio/flac/default.nix @@ -1,4 +1,12 @@ -{ lib, stdenv, fetchurl, fetchpatch, libogg }: +{ lib +, stdenv +, fetchurl +, cmake +, pkg-config +, doxygen +, graphviz +, libogg +}: stdenv.mkDerivation rec { pname = "flac"; @@ -10,9 +18,22 @@ stdenv.mkDerivation rec { sha256 = "91303c3e5dfde52c3e94e75976c0ab3ee14ced278ab8f60033a3a12db9209ae6"; }; - buildInputs = [ libogg ]; + nativeBuildInputs = [ + cmake + pkg-config + doxygen + graphviz + ]; - #doCheck = true; # takes lots of time + buildInputs = [ + libogg + ]; + + cmakeFlags = lib.optionals (!stdenv.hostPlatform.isStatic) [ + "-DBUILD_SHARED_LIBS=ON" + ]; + + # doCheck = true; # takes lots of time outputs = [ "bin" "dev" "out" "man" "doc" ]; From 1654dc831cf62f170f4344ee3ce054e5bf68dd9e Mon Sep 17 00:00:00 2001 From: Nicolas Benes Date: Sat, 1 Oct 2022 21:00:15 +0200 Subject: [PATCH 041/318] tzdata: enable cross-compilation for Windows * Additional make flags are needed since some functions do not exist or have different names or parameters on Windows. * When compiling for Windows, GCC implicitly adds a `.exe` suffix to the output file name. A patch is needed for the `install` target to locate and install the correct files. * The tzdata Makefile contains `zic` and `ZIC` variables. The former refers to the path of the program to execute, while the latter invokes the former with additional arguments (it is defined as `ZIC=$(zic) $(ZFLAGS)`, `ZFLAGS` is normally empty). Previously, `ZIC` was overridden, potentially loosing `ZFLAGS` arguments. This commit changes it to override `zic` instead. * The `zic` program is built and installed as part of the package and also executed during the build to translate time-related files. When cross-compiling it means that two executables need to be compiled: one to get installed and run on the host platform, and another to run on the build platform. Instead of renaming files and building a temporary executable for the build platform, this commit references the build platform's `tzdata.bin` package and runs its `zic` program. --- ...xe-extension-for-MS-Windows-binaries.patch | 15 ++++++++++++ pkgs/data/misc/tzdata/default.nix | 23 +++++++++---------- 2 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 pkgs/data/misc/tzdata/0001-Add-exe-extension-for-MS-Windows-binaries.patch diff --git a/pkgs/data/misc/tzdata/0001-Add-exe-extension-for-MS-Windows-binaries.patch b/pkgs/data/misc/tzdata/0001-Add-exe-extension-for-MS-Windows-binaries.patch new file mode 100644 index 0000000000000..d44481056c434 --- /dev/null +++ b/pkgs/data/misc/tzdata/0001-Add-exe-extension-for-MS-Windows-binaries.patch @@ -0,0 +1,15 @@ +diff --git a/Makefile b/Makefile +index a9a989e..4da737b 100644 +--- a/Makefile ++++ b/Makefile +@@ -579,8 +579,8 @@ install: all $(DATA) $(REDO) $(MANS) + -t '$(DESTDIR)$(TZDEFAULT)' + cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' + cp tzselect '$(DESTDIR)$(BINDIR)/.' +- cp zdump '$(DESTDIR)$(ZDUMPDIR)/.' +- cp zic '$(DESTDIR)$(ZICDIR)/.' ++ cp zdump.exe '$(DESTDIR)$(ZDUMPDIR)/.' ++ cp zic.exe '$(DESTDIR)$(ZICDIR)/.' + cp libtz.a '$(DESTDIR)$(LIBDIR)/.' + $(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a' + cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.' diff --git a/pkgs/data/misc/tzdata/default.nix b/pkgs/data/misc/tzdata/default.nix index 41004243a5571..847a7a05dae17 100644 --- a/pkgs/data/misc/tzdata/default.nix +++ b/pkgs/data/misc/tzdata/default.nix @@ -17,6 +17,10 @@ stdenv.mkDerivation rec { sourceRoot = "."; + patches = lib.optionals stdenv.hostPlatform.isWindows [ + ./0001-Add-exe-extension-for-MS-Windows-binaries.patch + ]; + outputs = [ "out" "bin" "man" "dev" ]; propagatedBuildOutputs = []; @@ -34,22 +38,17 @@ stdenv.mkDerivation rec { "CFLAGS+=-DZIC_BLOAT_DEFAULT=\\\"fat\\\"" "cc=${stdenv.cc.targetPrefix}cc" "AR=${stdenv.cc.targetPrefix}ar" + ] ++ lib.optionals stdenv.hostPlatform.isWindows [ + "CFLAGS+=-DHAVE_DIRECT_H" + "CFLAGS+=-DHAVE_SYMLINK=0" + "CFLAGS+=-DRESERVE_STD_EXT_IDS" ]; - depsBuildBuild = [ buildPackages.stdenv.cc ]; - doCheck = false; # needs more tools - installFlags = [ "ZIC=./zic-native" ]; - - preInstall = '' - mv zic.o zic.o.orig - mv zic zic.orig - make $makeFlags cc=${stdenv.cc.nativePrefix}cc AR=${stdenv.cc.nativePrefix}ar zic - mv zic zic-native - mv zic.o.orig zic.o - mv zic.orig zic - ''; + installFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ + "zic=${buildPackages.tzdata.bin}/bin/zic" + ]; postInstall = '' From dd3fc58112987982146bb5978eb6019e457c10ad Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Sat, 1 Oct 2022 21:46:46 -0600 Subject: [PATCH 042/318] mesa: Install radv override configs into $out Without this, the per-game radv overrides aren't applied. --- pkgs/development/libraries/mesa/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 6b78a570cccb8..65dd547c6ab7a 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -86,6 +86,8 @@ self = stdenv.mkDerivation { 'DATADIR "/drirc.d"' '"${placeholder "out"}/share/drirc.d"' substituteInPlace src/util/meson.build --replace \ "get_option('datadir')" "'${placeholder "out"}/share'" + substituteInPlace src/amd/vulkan/meson.build --replace \ + "get_option('datadir')" "'${placeholder "out"}/share'" ''; outputs = [ "out" "dev" "drivers" ] From 32461d551c7fa4c8119cff6c5080cec93f8470f7 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 2 Oct 2022 11:07:11 +0200 Subject: [PATCH 043/318] harfbuzz: 5.1.0 -> 5.2.0 * https://github.com/harfbuzz/harfbuzz/releases/tag/5.2.0 * Drop now released patch. --- pkgs/development/libraries/harfbuzz/default.nix | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index c9f8f83f0f882..3b419052b50d5 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchFromGitHub -, fetchpatch , pkg-config , glib , freetype @@ -31,7 +30,7 @@ }: let - version = "5.1.0"; + version = "5.2.0"; inherit (lib) optional optionals optionalString; mesonFeatureFlag = opt: b: "-D${opt}=${if b then "enabled" else "disabled"}"; @@ -45,17 +44,9 @@ stdenv.mkDerivation { owner = "harfbuzz"; repo = "harfbuzz"; rev = version; - sha256 = "sha256-K6iScmg1vNfwb1UYqtXsnijLVpcC+am2ZL+W5bLFzsI="; + sha256 = "1pry5w6anwi0qykpj1q3232r7cmfrw9yv4wwwrh028z0361fyxrv"; }; - patches = [ - (fetchpatch { - name = "aarch64-test-narrowing.diff"; - url = "https://github.com/harfbuzz/harfbuzz/commit/04d28d94e576aab099891e6736fd0088dfac3366.diff"; - sha256 = "sha256-099GP8t1G0kyYl79A6xJhfyrs3WXYitvn+He7sEz+Oo="; - }) - ]; - postPatch = '' patchShebangs src/*.py test '' + lib.optionalString stdenv.isDarwin '' From c8f9aa9f998bee523f6a1360bebdebc573150f4a Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 2 Oct 2022 11:14:56 +0200 Subject: [PATCH 044/318] harfbuzz: use upstream's release tarballs This is the intended way to build harfbuzz, so we may as well do it. Additionally it has the advantage that we only need to store and copy the compressed variant of the source tree (that has a stable hash) instead of the extracted variant like with fetchFromGitHub. --- pkgs/development/libraries/harfbuzz/default.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index 3b419052b50d5..0bb6546543dc0 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -1,6 +1,6 @@ { lib , stdenv -, fetchFromGitHub +, fetchurl , pkg-config , glib , freetype @@ -40,11 +40,9 @@ stdenv.mkDerivation { pname = "harfbuzz${optionalString withIcu "-icu"}"; inherit version; - src = fetchFromGitHub { - owner = "harfbuzz"; - repo = "harfbuzz"; - rev = version; - sha256 = "1pry5w6anwi0qykpj1q3232r7cmfrw9yv4wwwrh028z0361fyxrv"; + src = fetchurl { + url = "https://github.com/harfbuzz/harfbuzz/releases/download/${version}/harfbuzz-${version}.tar.xz"; + sha256 = "0b4lpkidwx0lf8slczjji652yll6g5zgmm5lmisnb4s7gf8r8nkk"; }; postPatch = '' From 0c1b92bfaf18a875c3514aa5044b0b53640134c2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 24 Sep 2022 08:09:50 +0000 Subject: [PATCH 045/318] fcft: 3.1.4 -> 3.1.5 * https://codeberg.org/dnkl/fcft/releases/tag/3.1.5 * Adjusts for fixed bug in HarfBuzz 5.2.0 Closes #192731. --- pkgs/development/libraries/fcft/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/fcft/default.nix b/pkgs/development/libraries/fcft/default.nix index 531276b90d792..ecc99092a905d 100644 --- a/pkgs/development/libraries/fcft/default.nix +++ b/pkgs/development/libraries/fcft/default.nix @@ -20,14 +20,14 @@ in stdenv.mkDerivation rec { pname = "fcft"; - version = "3.1.4"; + version = "3.1.5"; src = fetchFromGitea { domain = "codeberg.org"; owner = "dnkl"; repo = "fcft"; rev = version; - sha256 = "sha256-kSzUZR/5PcYTxPWNh/zAwLQbfeW/44u2elEmGR3NYcM="; + sha256 = "sha256-3gsaXnflGiGOpIkqDQe5u6x8d18x67/dc4Hh1iU89+o="; }; depsBuildBuild = [ pkg-config ]; From 156a0827bd7c9b06703b3cbf94f2035cd984d9f3 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 14:37:04 +0200 Subject: [PATCH 046/318] python3Packages.mypy-protobuf: Build using buildPythonPackage Reformat, tried to enable tests but we miss a dependency, added pythonImportsCheck. Added top-level attribute to expose executables. --- .../python-modules/mypy-protobuf/default.nix | 28 +++++++++++++++++-- pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/mypy-protobuf/default.nix b/pkgs/development/python-modules/mypy-protobuf/default.nix index 007fd2fd015f2..c63910abc56c0 100644 --- a/pkgs/development/python-modules/mypy-protobuf/default.nix +++ b/pkgs/development/python-modules/mypy-protobuf/default.nix @@ -1,6 +1,14 @@ -{ lib, fetchPypi, buildPythonApplication, protobuf, types-protobuf, grpcio-tools, pythonOlder }: +{ lib +, fetchPypi +, buildPythonPackage +, protobuf +, types-protobuf +, grpcio-tools +, pytestCheckHook +, pythonOlder +}: -buildPythonApplication rec { +buildPythonPackage rec { pname = "mypy-protobuf"; version = "3.3.0"; format = "pyproject"; @@ -12,7 +20,21 @@ buildPythonApplication rec { sha256 = "sha256-JPOwrssGZW6YP1jgfHMqkFd7nXrz4QZvwrZju/A3Akg="; }; - propagatedBuildInputs = [ protobuf types-protobuf grpcio-tools ]; + propagatedBuildInputs = [ + protobuf + types-protobuf + grpcio-tools + ]; + + doCheck = false; # ModuleNotFoundError: No module named 'testproto' + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "mypy_protobuf" + ]; meta = with lib; { description = "Generate mypy stub files from protobuf specs"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 80f7c717a3da7..bd1184d1f98bc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17614,6 +17614,8 @@ with pkgs; mypy = with python3Packages; toPythonApplication mypy; + mypy-protobuf = with python3Packages; toPythonApplication mypy-protobuf; + nsis = callPackage ../development/tools/nsis { }; tockloader = callPackage ../development/tools/misc/tockloader { }; From 974f1ece20a67a4bc5ae1e7d774833ac75888dd1 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 14:49:05 +0200 Subject: [PATCH 047/318] python3Packages.python-heatclient: Use buildPythonPackage and expose as top-level attribute. --- pkgs/development/python-modules/python-heatclient/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/python-heatclient/default.nix b/pkgs/development/python-modules/python-heatclient/default.nix index c51c222dd6fa9..df1fc0dc45970 100644 --- a/pkgs/development/python-modules/python-heatclient/default.nix +++ b/pkgs/development/python-modules/python-heatclient/default.nix @@ -1,6 +1,6 @@ { lib , babel -, buildPythonApplication +, buildPythonPackage , cliff , fetchPypi , iso8601 @@ -20,7 +20,7 @@ , testscenarios }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "python-heatclient"; version = "3.1.0"; format = "setuptools"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bd1184d1f98bc..c65f3321a4b1b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21178,6 +21178,7 @@ with pkgs; openslp = callPackage ../development/libraries/openslp {}; openstackclient = with python3Packages; toPythonApplication python-openstackclient; + heatclient = with python3Packages; toPythonApplication python-heatclient; openvdb = callPackage ../development/libraries/openvdb {}; From 17b976e99f0d19df7ef5d301c5b31d4f38d53f56 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 14:50:33 +0200 Subject: [PATCH 048/318] python3Packages: Use buildPythonPackage Also enables tests and fixes import check module name. --- .../python-modules/mkdocs-redirects/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/mkdocs-redirects/default.nix b/pkgs/development/python-modules/mkdocs-redirects/default.nix index 94bf504a76b67..9394692fc5cfe 100644 --- a/pkgs/development/python-modules/mkdocs-redirects/default.nix +++ b/pkgs/development/python-modules/mkdocs-redirects/default.nix @@ -1,11 +1,12 @@ { lib , callPackage -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , mkdocs +, pytestCheckHook }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "mkdocs-redirects"; version = "1.2.0"; @@ -20,7 +21,13 @@ buildPythonApplication rec { mkdocs ]; - pythonImportsCheck = [ "mkdocs" ]; + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "mkdocs_redirects" + ]; meta = with lib; { description = "Open source plugin for Mkdocs page redirects"; From 1ec7b00db38ccc0f126fd453ee55568048d29feb Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 14:58:23 +0200 Subject: [PATCH 049/318] python3Packages.filecheck: Use buildPythonPackage Build using poetry-core, enabled tests, expose as top-level attribute. --- .../python-modules/filecheck/default.nix | 25 +++++++++++++++---- pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/filecheck/default.nix b/pkgs/development/python-modules/filecheck/default.nix index 2480c196881af..9cbd8bde2117d 100644 --- a/pkgs/development/python-modules/filecheck/default.nix +++ b/pkgs/development/python-modules/filecheck/default.nix @@ -1,10 +1,11 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub -, poetry +, poetry-core +, pytestCheckHook }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "filecheck"; version = "0.0.22"; format = "pyproject"; @@ -16,9 +17,23 @@ buildPythonApplication rec { sha256 = "sha256-I2SypKkgcVuLyLiwNw5oWDb9qT56TbC6vbui8PEcziI="; }; - nativeBuildInputs = [ poetry ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "poetry>=0.12" "poetry-core" \ + --replace "poetry.masonry.api" "poetry.core.masonry.api" + ''; - pythonImportsCheck = [ "filecheck" ]; + nativeBuildInputs = [ + poetry-core + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "filecheck" + ]; meta = with lib; { homepage = "https://github.com/mull-project/FileCheck.py"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c65f3321a4b1b..b88d696138f6c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13398,6 +13398,8 @@ with pkgs; fasmg = callPackage ../development/compilers/fasmg { }; + filecheck = with python3Packages; toPythonApplication filecheck; + firrtl = callPackage ../development/compilers/firrtl { }; flasm = callPackage ../development/compilers/flasm { }; From a91ecb2e254cab9600babc79848b216f46c72119 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 15:05:25 +0200 Subject: [PATCH 050/318] rfc-bibtex: Migrate out of python3Packages This is a commandline tool, that does not advertise itself as as consumable library, so it does not belong into the python package set. Also fetch from git, so we can enable the tests. --- .../python-modules/rfc-bibtex/default.nix | 20 ----------- pkgs/tools/typesetting/rfc-bibtex/default.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 34 insertions(+), 21 deletions(-) delete mode 100644 pkgs/development/python-modules/rfc-bibtex/default.nix create mode 100644 pkgs/tools/typesetting/rfc-bibtex/default.nix diff --git a/pkgs/development/python-modules/rfc-bibtex/default.nix b/pkgs/development/python-modules/rfc-bibtex/default.nix deleted file mode 100644 index b9b7cdb76c4f3..0000000000000 --- a/pkgs/development/python-modules/rfc-bibtex/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ lib, buildPythonApplication, fetchPypi, isPy3k }: - -buildPythonApplication rec { - pname = "rfc-bibtex"; - version = "0.3.2"; - - src = fetchPypi { - inherit pname version; - sha256 = "60419a2043ef37ac2438f3eae7a3207d0a4cb2dd56ab21697f874a35ee52927f"; - }; - - disabled = !isPy3k; - - meta = with lib; { - homepage = "https://github.com/iluxonchik/rfc-bibtex/"; - description = "Generate Bibtex entries for IETF RFCs and Internet-Drafts"; - license = licenses.mit; - maintainers = with maintainers; [ teto ]; - }; -} diff --git a/pkgs/tools/typesetting/rfc-bibtex/default.nix b/pkgs/tools/typesetting/rfc-bibtex/default.nix new file mode 100644 index 0000000000000..de38b4cd29c26 --- /dev/null +++ b/pkgs/tools/typesetting/rfc-bibtex/default.nix @@ -0,0 +1,33 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +with python3.pkgs; buildPythonApplication rec { + pname = "rfc-bibtex"; + version = "0.3.2"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "iluxonchik"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-bPCNQqiG50vWVFA6J2kyxftwsXunHTNBdSkoIRYkb0s="; + }; + + checkInputs = [ + pytestCheckHook + vcrpy + ]; + + pythonImportsCheck = [ + "rfc_bibtex" + ]; + + meta = with lib; { + homepage = "https://github.com/iluxonchik/rfc-bibtex/"; + description = "Generate Bibtex entries for IETF RFCs and Internet-Drafts"; + license = licenses.mit; + maintainers = with maintainers; [ teto ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b88d696138f6c..b7aae58d73333 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36416,7 +36416,7 @@ with pkgs; renderizer = callPackage ../development/tools/renderizer {}; - rfc-bibtex = python3Packages.callPackage ../development/python-modules/rfc-bibtex { }; + rfc-bibtex = callPackage ../tools/typesetting/rfc-bibtex { }; pick-colour-picker = python3Packages.callPackage ../applications/graphics/pick-colour-picker { inherit glib gtk3 gobject-introspection wrapGAppsHook; From b32cb3b75646e9432d4bcf9b8f26c4ea83fba4d7 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 15:08:07 +0200 Subject: [PATCH 051/318] python3Packages.expiringdict: Use buildPythonPackage Also some package quality fixes. --- .../python-modules/expiringdict/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/expiringdict/default.nix b/pkgs/development/python-modules/expiringdict/default.nix index 942feff4513f6..9dfe60aca7e38 100644 --- a/pkgs/development/python-modules/expiringdict/default.nix +++ b/pkgs/development/python-modules/expiringdict/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , dill , coverage @@ -8,16 +8,17 @@ , nose }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "expiringdict"; version = "1.2.2"; + format = "setuptools"; # use fetchFromGitHub instead of fetchPypi because the test suite of # the package is not included into the PyPI tarball src = fetchFromGitHub { owner = "mailgun"; repo = pname; - rev = "v${version}"; + rev = "refs/tags/v${version}"; sha256 = "sha256-vRhJSHIqc51I+s/wndtfANM44CKW3QS1iajqyoSBf0I="; }; @@ -30,14 +31,18 @@ buildPythonApplication rec { ]; checkPhase = '' + runHook preCheck nosetests -v --with-coverage --cover-package=expiringdict + runHook postCheck ''; - pythonImportsCheck = [ "expiringdict" ]; + pythonImportsCheck = [ + "expiringdict" + ]; meta = with lib; { description = "Dictionary with auto-expiring values for caching purposes"; - homepage = "https://pypi.org/project/expiringdict/"; + homepage = "https://github.com/mailgun/expiringdict"; license = licenses.asl20; maintainers = with maintainers; [ gravndal ]; }; From f3416858078bf519609b8559312bf18e1ba1fe3b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 15:15:35 +0200 Subject: [PATCH 052/318] python3Packages.python-glanceclient: Use buildPythonPackage and add a top-level attribute. --- .../python-modules/python-glanceclient/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/python-glanceclient/default.nix b/pkgs/development/python-modules/python-glanceclient/default.nix index 4f63cca8a8b10..390aad8b55cd5 100644 --- a/pkgs/development/python-modules/python-glanceclient/default.nix +++ b/pkgs/development/python-modules/python-glanceclient/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchPypi , coreutils , pbr @@ -18,7 +18,7 @@ , requests-mock }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "python-glanceclient"; version = "4.1.0"; format = "setuptools"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b7aae58d73333..32f37add7ce79 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21180,6 +21180,7 @@ with pkgs; openslp = callPackage ../development/libraries/openslp {}; openstackclient = with python3Packages; toPythonApplication python-openstackclient; + glanceclient = with python3Packages; toPythonApplication python-glanceclient; heatclient = with python3Packages; toPythonApplication python-heatclient; openvdb = callPackage ../development/libraries/openvdb {}; From 8252b7387e320be45704a28779df6160c00d52ff Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 15:22:36 +0200 Subject: [PATCH 053/318] python3Packages.mkdocs-material: Use buildPythonPackage --- pkgs/development/python-modules/mkdocs-material/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mkdocs-material/default.nix b/pkgs/development/python-modules/mkdocs-material/default.nix index f58bbf2e69d63..d82c1a654362e 100644 --- a/pkgs/development/python-modules/mkdocs-material/default.nix +++ b/pkgs/development/python-modules/mkdocs-material/default.nix @@ -1,6 +1,6 @@ { lib , callPackage -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , jinja2 , markdown @@ -11,7 +11,7 @@ , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "mkdocs-material"; version = "8.4.3"; format = "setuptools"; From 32f2486bf7f76d8c7d39cf7250c101ffca83581d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 15:24:15 +0200 Subject: [PATCH 054/318] python3Packages.clintermission: Use buildPythonPackage and reformat. --- .../python-modules/clintermission/default.nix | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/clintermission/default.nix b/pkgs/development/python-modules/clintermission/default.nix index a0e5dcb7142f1..b5df005978c4d 100644 --- a/pkgs/development/python-modules/clintermission/default.nix +++ b/pkgs/development/python-modules/clintermission/default.nix @@ -1,8 +1,15 @@ -{ lib, buildPythonApplication, fetchFromGitHub, isPy3k, prompt-toolkit }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, isPy3k +, prompt-toolkit }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "clintermission"; version = "0.2.0"; + format = "setuptools"; + + disabled = !isPy3k; src = fetchFromGitHub { owner = "sebageek"; @@ -11,14 +18,16 @@ buildPythonApplication rec { sha256 = "09wl0rpw6c9hab51rs957z64b0v9j4fcbqbn726wnapf4z5w6yxv"; }; - propagatedBuildInputs = [ prompt-toolkit ]; - - disabled = !isPy3k; + propagatedBuildInputs = [ + prompt-toolkit + ]; # repo contains no tests doCheck = false; - pythonImportsCheck = [ "clintermission" ]; + pythonImportsCheck = [ + "clintermission" + ]; meta = with lib; { description = "Non-fullscreen command-line selection menu"; From a2b1eaa06390979fde2fa396d540405ffb9c51f4 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 15:29:31 +0200 Subject: [PATCH 055/318] poetry2conda: Migrate out of python package set --- .../package-management}/poetry2conda/default.nix | 10 ++-------- pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 -- 4 files changed, 4 insertions(+), 11 deletions(-) rename pkgs/{development/python-modules => tools/package-management}/poetry2conda/default.nix (84%) diff --git a/pkgs/development/python-modules/poetry2conda/default.nix b/pkgs/tools/package-management/poetry2conda/default.nix similarity index 84% rename from pkgs/development/python-modules/poetry2conda/default.nix rename to pkgs/tools/package-management/poetry2conda/default.nix index 7f5268a23dc46..1e570156f8c96 100644 --- a/pkgs/development/python-modules/poetry2conda/default.nix +++ b/pkgs/tools/package-management/poetry2conda/default.nix @@ -1,15 +1,9 @@ { lib -, buildPythonApplication , fetchFromGitHub -, pytest-mock -, pytestCheckHook -, toml -, poetry -, poetry-semver -, pyyaml +, python3 }: -buildPythonApplication rec { +with python3.pkgs; buildPythonApplication rec { pname = "poetry2conda"; version = "0.3.0"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 32f37add7ce79..28b98161843be 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15500,7 +15500,7 @@ with pkgs; inherit pkgs lib; }; - poetry2conda = python3Packages.callPackage ../development/python-modules/poetry2conda { }; + poetry2conda = callPackage ../tools/package-management/poetry2conda { }; pip-audit = callPackage ../development/tools/pip-audit {}; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index e41b075ce7103..4333585eb5e69 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -109,6 +109,7 @@ mapAliases ({ pathpy = path; # added 2022-04-12 pdfminer = pdfminer-six; # added 2022-05-25 pep257 = pydocstyle; # added 2022-04-12 + poetry2conda = throw "poetry2conda was promoted to a top-level attribute"; # Added 2022-10-02 poster3 = throw "poster3 is unmaintained and source is no longer available"; # added 2023-05-29 postorius = throw "Please use pkgs.mailmanPackages.postorius"; # added 2022-04-29 powerlineMemSegment = powerline-mem-segment; # added 2021-10-08 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5fc08d1d688ac..c2073057e0e00 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7157,8 +7157,6 @@ in { poetry-semver = callPackage ../development/python-modules/poetry-semver { }; - poetry2conda = callPackage ../development/python-modules/poetry2conda { }; - poezio = callPackage ../applications/networking/instant-messengers/poezio { }; polars = callPackage ../development/python-modules/polars { }; From b75d1a480d62b1413dd9619e4f303f7065173db0 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 15:39:54 +0200 Subject: [PATCH 056/318] python3Packages.gprof2dot: Use buildPythonPackage and expose as top-level attribute. --- pkgs/development/python-modules/gprof2dot/default.nix | 7 ++++--- pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/gprof2dot/default.nix b/pkgs/development/python-modules/gprof2dot/default.nix index 4eb3a79e5e87c..1536c5fcbdb36 100644 --- a/pkgs/development/python-modules/gprof2dot/default.nix +++ b/pkgs/development/python-modules/gprof2dot/default.nix @@ -1,13 +1,14 @@ { lib , fetchFromGitHub -, buildPythonApplication +, buildPythonPackage , python , graphviz }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "gprof2dot"; version = "2021.02.21"; + format = "setuptools"; src = fetchFromGitHub { owner = "jrfonseca"; @@ -36,6 +37,6 @@ buildPythonApplication rec { homepage = "https://github.com/jrfonseca/gprof2dot"; description = "Python script to convert the output from many profilers into a dot graph"; license = licenses.lgpl3Plus; - maintainers = [ maintainers.pmiddend ]; + maintainers = with maintainers; [ pmiddend ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 28b98161843be..3654576eb1315 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7241,6 +7241,8 @@ with pkgs; hamlib = hamlib_4; }; + gprof2dot = with python3Packages; toPythonApplication gprof2dot; + gprojector = callPackage ../applications/science/astronomy/gprojector { }; gptfdisk = callPackage ../tools/system/gptfdisk { }; From 565a8187a46ab2b4d3a12f97efab1aa4134fd83f Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 15:47:02 +0200 Subject: [PATCH 057/318] python3Packages.sybil: Use buildPythonPackage --- pkgs/development/python-modules/sybil/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sybil/default.nix b/pkgs/development/python-modules/sybil/default.nix index 41baf697fff36..2667f0af54647 100644 --- a/pkgs/development/python-modules/sybil/default.nix +++ b/pkgs/development/python-modules/sybil/default.nix @@ -1,11 +1,11 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchPypi , pytestCheckHook , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "sybil"; version = "3.0.1"; format = "setuptools"; From 98de11b31758ff1b9ab48c48fc44dbde48e7d2e0 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 15:57:39 +0200 Subject: [PATCH 058/318] mutmut: Migrate out of python package set Does not provide a library interface that could be imported and as such has no place within the python package set. --- .../{python-modules => tools}/mutmut/default.nix | 11 ++--------- pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 -- 4 files changed, 5 insertions(+), 11 deletions(-) rename pkgs/development/{python-modules => tools}/mutmut/default.nix (86%) diff --git a/pkgs/development/python-modules/mutmut/default.nix b/pkgs/development/tools/mutmut/default.nix similarity index 86% rename from pkgs/development/python-modules/mutmut/default.nix rename to pkgs/development/tools/mutmut/default.nix index 626c768f2a81c..4b40930c646d1 100644 --- a/pkgs/development/python-modules/mutmut/default.nix +++ b/pkgs/development/tools/mutmut/default.nix @@ -1,16 +1,9 @@ { lib , fetchFromGitHub -, buildPythonApplication -, click -, glob2 -, parso -, pony -, junit-xml -, pythonOlder -, testers +, python3 }: -let self = buildPythonApplication rec { +let self = with python3.pkgs; buildPythonApplication rec { pname = "mutmut"; version = "2.2.0"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3654576eb1315..abc0e423127aa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -737,6 +737,8 @@ with pkgs; owl = callPackage ../tools/networking/owl { }; + mutmut = callPackage ../development/tools/mutmut { }; + packcc = callPackage ../development/tools/packcc { }; packer = callPackage ../development/tools/packer { }; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 4333585eb5e69..afaedf9a6e5d1 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -101,6 +101,7 @@ mapAliases ({ mailman-web = throw "Please use pkgs.mailman-web"; # added 2022-04-29 mistune_0_8 = throw "mistune_0_8 was removed because it was outdated and insecure"; # added 2022-08-12 mistune_2_0 = mistune; # added 2022-08-12 + mutmut = throw "mutmut has been promoted to a top-level attribute"; # added 2022-10-02 net2grid = gridnet; # add 2022-04-22 nose-cover3 = throw "nose-cover3 has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-02-16 ordereddict = throw "ordereddict has been removed because it is only useful on unsupported python versions."; # added 2022-05-28 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c2073057e0e00..f4595081ac2c3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5950,8 +5950,6 @@ in { mutf8 = callPackage ../development/python-modules/mutf8 { }; - mutmut = callPackage ../development/python-modules/mutmut { }; - mujson = callPackage ../development/python-modules/mujson { }; mwclient = callPackage ../development/python-modules/mwclient { }; From 2649e800edab06f2fb310e26f90231171ee0cc9c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 16:02:17 +0200 Subject: [PATCH 059/318] python3Packages.pypass: Add top-level attribute --- pkgs/development/python-modules/pypass/default.nix | 6 ++---- pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pypass/default.nix b/pkgs/development/python-modules/pypass/default.nix index 85d6c9d49bb0a..f70e40029992e 100644 --- a/pkgs/development/python-modules/pypass/default.nix +++ b/pkgs/development/python-modules/pypass/default.nix @@ -18,10 +18,8 @@ , xclip }: -# NOTE: pypass can also be used as an application, but probably the most -# important usecase is as a library. So, let's use buildPythonPackage and -# support any Python version instead of defining it as an application with -# buildPythonApplication. +# Use the `pypass` top-level attribute, if you're interested in the +# application buildPythonPackage rec { pname = "pypass"; version = "0.2.1"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index abc0e423127aa..5c08138a7d4c7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10384,6 +10384,8 @@ with pkgs; pyocd = python3Packages.callPackage ../development/embedded/pyocd { }; + pypass = with python3Packages; toPythonApplication pypass; + pyspread = libsForQt5.callPackage ../applications/office/pyspread { }; teapot = callPackage ../applications/office/teapot { }; From 227aec9ac17dc0d4638c4188e1e8c8091728f2f3 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 16:14:53 +0200 Subject: [PATCH 060/318] python3Packages.griffe: Use buildPythonPackage and expose griffe as top-level attribute. --- pkgs/development/python-modules/griffe/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/griffe/default.nix b/pkgs/development/python-modules/griffe/default.nix index f7e9fd75855fd..43191ca0b8924 100644 --- a/pkgs/development/python-modules/griffe/default.nix +++ b/pkgs/development/python-modules/griffe/default.nix @@ -1,6 +1,6 @@ { lib , aiofiles -, buildPythonApplication +, buildPythonPackage , cached-property , fetchFromGitHub , git @@ -9,7 +9,7 @@ , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "griffe"; version = "0.22.0"; format = "pyproject"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5c08138a7d4c7..38056324332d9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16695,6 +16695,8 @@ with pkgs; graphene = callPackage ../development/libraries/graphene { }; + griffe = with python3Packages; toPythonApplication griffe; + gtk-doc = callPackage ../development/tools/documentation/gtk-doc { }; gtkdialog = callPackage ../development/tools/misc/gtkdialog { }; From d889b1b2985784ee8f234f3372ba5e7cbc3d0216 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 17:01:48 +0200 Subject: [PATCH 061/318] notifymuch: Migrate out of python package set It's an application with no visible library surface, so it has no place in the python package set. --- .../misc}/notifymuch/default.nix | 16 +++++++--------- pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 -- 4 files changed, 10 insertions(+), 11 deletions(-) rename pkgs/{development/python-modules => applications/misc}/notifymuch/default.nix (88%) diff --git a/pkgs/development/python-modules/notifymuch/default.nix b/pkgs/applications/misc/notifymuch/default.nix similarity index 88% rename from pkgs/development/python-modules/notifymuch/default.nix rename to pkgs/applications/misc/notifymuch/default.nix index bc1610e2ca94e..e94b6f2f156b7 100644 --- a/pkgs/development/python-modules/notifymuch/default.nix +++ b/pkgs/applications/misc/notifymuch/default.nix @@ -1,19 +1,16 @@ { lib -, buildPythonApplication -, isPy3k , fetchFromGitHub -, notmuch -, pygobject3 , gobject-introspection , libnotify , wrapGAppsHook , gtk3 +, python3 }: -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "notifymuch"; version = "0.1"; - disabled = !isPy3k; + format = "setuptools"; src = fetchFromGitHub { owner = "kspi"; @@ -24,11 +21,12 @@ buildPythonApplication rec { }; propagatedBuildInputs = [ - notmuch - pygobject3 libnotify gtk3 - ]; + ] ++ (with python3.pkgs; [ + notmuch + pygobject3 + ]); nativeBuildInputs = [ gobject-introspection diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 38056324332d9..e7d229249afbc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4512,6 +4512,8 @@ with pkgs; notify = callPackage ../tools/misc/notify { }; + notifymuch = callPackage ../applications/misc/notifymuch { }; + npins = callPackage ../tools/nix/npins { }; nrsc5 = callPackage ../applications/misc/nrsc5 { }; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index afaedf9a6e5d1..72fb1fa0ee1fc 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -104,6 +104,7 @@ mapAliases ({ mutmut = throw "mutmut has been promoted to a top-level attribute"; # added 2022-10-02 net2grid = gridnet; # add 2022-04-22 nose-cover3 = throw "nose-cover3 has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-02-16 + notifymuch = throw "notifymuch has been promoted to a top-level attribute"; # added 2022-10-02 ordereddict = throw "ordereddict has been removed because it is only useful on unsupported python versions."; # added 2022-05-28 pam = python-pam; # added 2020-09-07. PasteDeploy = pastedeploy; # added 2021-10-07 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f4595081ac2c3..cecd0418e73f1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6250,8 +6250,6 @@ in { notify2 = callPackage ../development/python-modules/notify2 { }; - notifymuch = callPackage ../development/python-modules/notifymuch {}; - notmuch = callPackage ../development/python-modules/notmuch { inherit (pkgs) notmuch; }; From cd016901b1ede81a8714549ee1048e9a1756612b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 17:02:32 +0200 Subject: [PATCH 062/318] phonemizer: Use buildPythonPackage and add a top-level attribute. The package is broken and needs an updated patch, but that does not mean this change is wrong. --- pkgs/development/python-modules/phonemizer/default.nix | 9 +++++---- pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/phonemizer/default.nix b/pkgs/development/python-modules/phonemizer/default.nix index 550a4fefd25a5..38e5f8533eb32 100644 --- a/pkgs/development/python-modules/phonemizer/default.nix +++ b/pkgs/development/python-modules/phonemizer/default.nix @@ -1,7 +1,7 @@ { lib , stdenv , substituteAll -, buildPythonApplication +, buildPythonPackage , fetchPypi , joblib , segments @@ -13,17 +13,18 @@ , pytest-cov }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "phonemizer"; version = "3.2.1"; + format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "sha256-Bo+F+FqKmtxjijeHrqyvcaU+R1eLEtdzwJdDNQDNiSs="; + hash = "sha256-Bo+F+FqKmtxjijeHrqyvcaU+R1eLEtdzwJdDNQDNiSs="; }; postPatch = '' - sed -i -e '/\'pytest-runner\'/d setup.py + sed -i '/pytest-runner/d setup.py ''; patches = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e7d229249afbc..f1c7bad114bc1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33114,6 +33114,8 @@ with pkgs; nux = callPackage ../tools/misc/nux { }; + phonemizer = with python3Packages; toPythonApplication phonemizer; + tts = callPackage ../tools/audio/tts { }; ### GAMES From c2379dbd43fbda68b68a4f810c96f8e1195ca79f Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 17:16:31 +0200 Subject: [PATCH 063/318] python3Packages.python-swiftclient: use buildPythonPackage --- .../development/python-modules/python-swiftclient/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/python-swiftclient/default.nix b/pkgs/development/python-modules/python-swiftclient/default.nix index 3329753d63342..f5a15a34f0ca5 100644 --- a/pkgs/development/python-modules/python-swiftclient/default.nix +++ b/pkgs/development/python-modules/python-swiftclient/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchPypi , installShellFiles , mock @@ -10,7 +10,7 @@ , stestr }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "python-swiftclient"; version = "4.1.0"; format = "setuptools"; From b934a91f704ef61d786b36533651350fbf15326f Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 17:24:37 +0200 Subject: [PATCH 064/318] gigalixir: Migrate out of python package set This is a CLI client and not a library and as such it has no place in the python package set. --- .../misc}/gigalixir/default.nix | 37 ++++++------------- pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 - 4 files changed, 14 insertions(+), 28 deletions(-) rename pkgs/{development/python-modules => tools/misc}/gigalixir/default.nix (76%) diff --git a/pkgs/development/python-modules/gigalixir/default.nix b/pkgs/tools/misc/gigalixir/default.nix similarity index 76% rename from pkgs/development/python-modules/gigalixir/default.nix rename to pkgs/tools/misc/gigalixir/default.nix index c32c98fb3dd26..c3710ca944871 100644 --- a/pkgs/development/python-modules/gigalixir/default.nix +++ b/pkgs/tools/misc/gigalixir/default.nix @@ -1,34 +1,26 @@ { stdenv , lib -, buildPythonApplication -, click -, fetchPypi +, python3 , git -, httpretty -, qrcode -, pygments -, pyopenssl -, pytestCheckHook -, requests -, rollbar -, stripe -, pythonOlder -, sure }: -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "gigalixir"; version = "1.3.0"; format = "setuptools"; - disabled = pythonOlder "3.7"; - - src = fetchPypi { + src = python3.pkgs.fetchPypi { inherit pname version; hash = "sha256-kNtybgv8j7t1tl6R5ZuC4vj5fnEcEenuNt0twA1kAh0="; }; - propagatedBuildInputs = [ + postPatch = '' + substituteInPlace setup.py \ + --replace "'pytest-runner'," "" \ + --replace "cryptography==" "cryptography>=" + ''; + + propagatedBuildInputs = with python3.pkgs; [ click pygments pyopenssl @@ -40,16 +32,11 @@ buildPythonApplication rec { checkInputs = [ git + ] ++ (with python3.pkgs; [ httpretty pytestCheckHook sure - ]; - - postPatch = '' - substituteInPlace setup.py \ - --replace "'pytest-runner'," "" \ - --replace "cryptography==" "cryptography>=" - ''; + ]); disabledTests = [ # Test requires network access diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f1c7bad114bc1..cd62768787af8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27689,7 +27689,7 @@ with pkgs; gg-scm = callPackage ../applications/version-management/git-and-tools/gg { }; - gigalixir = with python3Packages; toPythonApplication gigalixir; + gigalixir = callPackage ../tools/misc/gigalixir { }; go-libp2p-daemon = callPackage ../servers/go-libp2p-daemon { }; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 72fb1fa0ee1fc..a9ea2323a67ec 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -73,6 +73,7 @@ mapAliases ({ flask_testing = flask-testing; # added 2022-04-25 flask_wtf = flask-wtf; # added 2022-05-24 garminconnect-ha = garminconnect; # added 2022-02-05 + gigalixir = throw "gigalixir has been promoted to a top-level attribute"; # Added 2022-10-02 glances = throw "glances has moved to pkgs.glances"; # added 2020-20-28 google_api_python_client = throw "'google_api_python_client' has been renamed to/replaced by 'google-api-python-client'"; # Converted to throw 2022-09-24 googleapis_common_protos = throw "'googleapis_common_protos' has been renamed to/replaced by 'googleapis-common-protos'"; # Converted to throw 2022-09-24 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cecd0418e73f1..8cb9d6c3f57ac 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3739,8 +3739,6 @@ in { gidgethub = callPackage ../development/python-modules/gidgethub { }; - gigalixir = callPackage ../development/python-modules/gigalixir { }; - gin-config = callPackage ../development/python-modules/gin-config { }; gios = callPackage ../development/python-modules/gios { }; From d677311d4613c84469d7a7fb018bdc6b199a7f8f Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 17:28:35 +0200 Subject: [PATCH 065/318] python3Packages.screeninfo: Use buildPythonPackage --- pkgs/development/python-modules/screeninfo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/screeninfo/default.nix b/pkgs/development/python-modules/screeninfo/default.nix index f67d68b0ddddf..574d3159494ac 100644 --- a/pkgs/development/python-modules/screeninfo/default.nix +++ b/pkgs/development/python-modules/screeninfo/default.nix @@ -1,6 +1,6 @@ { stdenv , lib -, buildPythonApplication +, buildPythonPackage , dataclasses , fetchFromGitHub , libX11 @@ -11,7 +11,7 @@ , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "screeninfo"; version = "0.8.1"; format = "pyproject"; From 1f71c25333dcda2ac3f9f9a3587962ccf92b744f Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 17:41:25 +0200 Subject: [PATCH 066/318] python2Packages.yolk: drop Was introduced in 2016 with only a top-level attribute, which got removed in the same year, so hasn't been used since. Also last commit in 2013, uses python2 print statements, so it has to go. --- .../python-modules/yolk/default.nix | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 pkgs/development/python-modules/yolk/default.nix diff --git a/pkgs/development/python-modules/yolk/default.nix b/pkgs/development/python-modules/yolk/default.nix deleted file mode 100644 index d241e3f8edc03..0000000000000 --- a/pkgs/development/python-modules/yolk/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ lib, fetchurl, buildPythonApplication, pythonPackages }: - -with lib; - -buildPythonApplication rec { - pname = "yolk"; - version = "0.4.3"; - - src = fetchurl { - url = "mirror://pypi/y/yolk/yolk-${version}.tar.gz"; - sha256 = "1f6xwx210jnl5nq0m3agh2p1cxmaizawaf3fwq43q4yw050fn1qw"; - }; - - buildInputs = with pythonPackages; [ nose ]; - - meta = { - description = "Command-line tool for querying PyPI and Python packages installed on your system"; - homepage = "https://github.com/cakebread/yolk"; - maintainers = with maintainers; []; - license = licenses.bsd3; - }; -} - From 24110fcf92897639c003fe7f5e4305788f918c0e Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 17:51:09 +0200 Subject: [PATCH 067/318] python3Packages.ironicclient: Use buildPythonPackage and expose as ironicclient top-level attribute. --- .../python-modules/python-ironicclient/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/python-ironicclient/default.nix b/pkgs/development/python-modules/python-ironicclient/default.nix index 5f0f1d8dea532..bf41e95739e9c 100644 --- a/pkgs/development/python-modules/python-ironicclient/default.nix +++ b/pkgs/development/python-modules/python-ironicclient/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchPypi , pbr , appdirs @@ -18,7 +18,7 @@ , oslotest }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "python-ironicclient"; version = "5.0.1"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cd62768787af8..dae5c6e379d72 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21192,6 +21192,7 @@ with pkgs; openstackclient = with python3Packages; toPythonApplication python-openstackclient; glanceclient = with python3Packages; toPythonApplication python-glanceclient; heatclient = with python3Packages; toPythonApplication python-heatclient; + ironicclient = with python3Packages; toPythonApplication python-ironicclient; openvdb = callPackage ../development/libraries/openvdb {}; From 97b667de3bbe534c99b5caf8ef1680c9c26e39d5 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 17:54:11 +0200 Subject: [PATCH 068/318] python3Packages.remarshal: Use buildPythonPackage --- pkgs/development/python-modules/remarshal/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/remarshal/default.nix b/pkgs/development/python-modules/remarshal/default.nix index 99c868eb0b804..2b7a20a2dd004 100644 --- a/pkgs/development/python-modules/remarshal/default.nix +++ b/pkgs/development/python-modules/remarshal/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub # build deps @@ -16,7 +16,7 @@ , pytestCheckHook }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "remarshal"; version = "0.14.0"; format = "pyproject"; From 28e35ec966405e011aca1640c8a1224c119e243d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 17:55:58 +0200 Subject: [PATCH 069/318] python3Packages.mkdocs-autorefs: use buildPythonPackage --- pkgs/development/python-modules/mkdocs-autorefs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mkdocs-autorefs/default.nix b/pkgs/development/python-modules/mkdocs-autorefs/default.nix index ea1dffdf0db02..dd88bd332e0e8 100644 --- a/pkgs/development/python-modules/mkdocs-autorefs/default.nix +++ b/pkgs/development/python-modules/mkdocs-autorefs/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , markdown , mkdocs @@ -8,7 +8,7 @@ , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "mkdocs-autorefs"; version = "0.4.1"; format = "pyproject"; From 08ad607288bcbdf2eec17f4bdfc596fbef5eea9a Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 17:56:49 +0200 Subject: [PATCH 070/318] python3Packages.language-data: use buildPythonPackage --- pkgs/development/python-modules/language-data/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/language-data/default.nix b/pkgs/development/python-modules/language-data/default.nix index 803df3abaea59..ff04b036dc05c 100644 --- a/pkgs/development/python-modules/language-data/default.nix +++ b/pkgs/development/python-modules/language-data/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , marisa-trie , poetry-core @@ -7,7 +7,7 @@ , setuptools }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "language-data"; version = "1.0.1"; format = "pyproject"; From 5f14d6e82813cdf591f99a7add743d7167496691 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 17:57:37 +0200 Subject: [PATCH 071/318] python3Packages.mkdocstrings: use buildPythonPackage --- pkgs/development/python-modules/mkdocstrings/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mkdocstrings/default.nix b/pkgs/development/python-modules/mkdocstrings/default.nix index b151727a8fbd3..5d20ea1a6e97b 100644 --- a/pkgs/development/python-modules/mkdocstrings/default.nix +++ b/pkgs/development/python-modules/mkdocstrings/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , jinja2 , markdown @@ -12,7 +12,7 @@ , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "mkdocstrings"; version = "0.19.0"; format = "pyproject"; From df99716e494081b3a37dedf756c1faa5629eefe2 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 18:05:42 +0200 Subject: [PATCH 072/318] python3Packages.codespell: Migrate out of python package set --- .../codespell/default.nix | 16 +++++++++++++--- pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 -- 4 files changed, 15 insertions(+), 6 deletions(-) rename pkgs/development/{python-modules => tools}/codespell/default.nix (82%) diff --git a/pkgs/development/python-modules/codespell/default.nix b/pkgs/development/tools/codespell/default.nix similarity index 82% rename from pkgs/development/python-modules/codespell/default.nix rename to pkgs/development/tools/codespell/default.nix index e8be4644910c8..07b1b4c96c3e7 100644 --- a/pkgs/development/python-modules/codespell/default.nix +++ b/pkgs/development/tools/codespell/default.nix @@ -1,8 +1,13 @@ -{ lib, buildPythonApplication, fetchFromGitHub, pytestCheckHook, pytest-dependency, aspell-python, aspellDicts, chardet }: +{ lib +, fetchFromGitHub +, aspellDicts +, python3 +}: -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "codespell"; version = "2.2.1"; + format = "setuptools"; src = fetchFromGitHub { owner = "codespell-project"; @@ -17,7 +22,12 @@ buildPythonApplication rec { --replace "--cov-report=" "" ''; - checkInputs = [ aspell-python chardet pytestCheckHook pytest-dependency ]; + checkInputs = with python3.pkgs; [ + aspell-python + chardet + pytestCheckHook + pytest-dependency + ]; preCheck = '' export ASPELL_CONF="dict-dir ${aspellDicts.en}/lib/aspell" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dae5c6e379d72..0bee0afb909e4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2406,7 +2406,7 @@ with pkgs; cod = callPackage ../tools/misc/cod { }; - codespell = with python3Packages; toPythonApplication codespell; + codespell = callPackage ../development/tools/codespell { }; coolreader = libsForQt5.callPackage ../applications/misc/coolreader {}; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index a9ea2323a67ec..79231ed51b078 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -43,6 +43,7 @@ mapAliases ({ bt_proximity = throw "'bt_proximity' has been renamed to/replaced by 'bt-proximity'"; # Converted to throw 2022-09-24 carrot = throw "carrot has been removed, as its development was discontinued in 2012"; # added 2022-01-18 class-registry = phx-class-registry; # added 2021-10-05 + codespell = throw "codespell has been promoted to a top-level attribute"; # Added 2022-10-02 ConfigArgParse = throw "'ConfigArgParse' has been renamed to/replaced by 'configargparse'"; # Converted to throw 2022-09-24 cozy = throw "cozy was removed because it was not actually https://pypi.org/project/Cozy/."; # added 2022-01-14 cryptography_vectors = "cryptography_vectors is no longer exposed in python*Packages because it is used for testing cryptography only."; # Added 2022-03-23 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8cb9d6c3f57ac..5abf2acf8cf4f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1962,8 +1962,6 @@ in { codepy = callPackage ../development/python-modules/codepy { }; - codespell = callPackage ../development/python-modules/codespell { }; - cogapp = callPackage ../development/python-modules/cogapp { }; coinmetrics-api-client = callPackage ../development/python-modules/coinmetrics-api-client { }; From 2cf6c1f1b3e46894c5bfc957c2382cc5ecadd8cd Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 18:07:51 +0200 Subject: [PATCH 073/318] python3Packages.drivelib: Use buildPythonPackage --- pkgs/development/python-modules/drivelib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/drivelib/default.nix b/pkgs/development/python-modules/drivelib/default.nix index 526e58d14340d..7b0a629e8a89b 100644 --- a/pkgs/development/python-modules/drivelib/default.nix +++ b/pkgs/development/python-modules/drivelib/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchPypi , expiringdict , google-auth-httplib2 @@ -7,7 +7,7 @@ , google-api-python-client }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "drivelib"; version = "0.3.0"; From 91d0e1f8781983c759edbd31a0e2709bb4318a7d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 18:13:32 +0200 Subject: [PATCH 074/318] python3Packages.mkdocs-minify: Use buildPythonPackage and enable test suite. --- .../python-modules/mkdocs-minify/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mkdocs-minify/default.nix b/pkgs/development/python-modules/mkdocs-minify/default.nix index 0beeb51641600..ee6765d31751d 100644 --- a/pkgs/development/python-modules/mkdocs-minify/default.nix +++ b/pkgs/development/python-modules/mkdocs-minify/default.nix @@ -1,14 +1,15 @@ { lib , callPackage -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , mkdocs , csscompressor , htmlmin , jsmin +, pytestCheckHook }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "mkdocs-minify"; version = "0.5.0"; @@ -26,6 +27,11 @@ buildPythonApplication rec { mkdocs ]; + checkInputs = [ + mkdocs + pytestCheckHook + ]; + pythonImportsCheck = [ "mkdocs" ]; meta = with lib; { From f1510313aa59d85883ec7fe5f7f83f47714d5466 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 18:15:05 +0200 Subject: [PATCH 075/318] python3Packages.mkdocstrings-python: Use buildPythonPackage --- .../python-modules/mkdocstrings-python/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mkdocstrings-python/default.nix b/pkgs/development/python-modules/mkdocstrings-python/default.nix index 4e10c4287d8cb..58ead57744960 100644 --- a/pkgs/development/python-modules/mkdocstrings-python/default.nix +++ b/pkgs/development/python-modules/mkdocstrings-python/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , griffe , mkdocs-material @@ -9,7 +9,7 @@ , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "mkdocstrings-python"; version = "0.7.1"; format = "pyproject"; From 670d203938e1ad55f517deb1151ce731f2c47b47 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 18:23:34 +0200 Subject: [PATCH 076/318] python3Packages.down: Use buildPythonPackage --- pkgs/development/python-modules/gdown/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/gdown/default.nix b/pkgs/development/python-modules/gdown/default.nix index 3368706c8c12f..bd29bec954337 100644 --- a/pkgs/development/python-modules/gdown/default.nix +++ b/pkgs/development/python-modules/gdown/default.nix @@ -1,6 +1,6 @@ { lib , beautifulsoup4 -, buildPythonApplication +, buildPythonPackage , fetchPypi , filelock , requests @@ -9,7 +9,7 @@ , six }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "gdown"; version = "4.5.1"; format = "setuptools"; From a7a6688dc352aa91ff347dba0cb4bb2e24dc469d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 18:26:29 +0200 Subject: [PATCH 077/318] python3Packages.jsbeautifier: Use buildPythonPackage and expose as top-level attribute. --- pkgs/development/python-modules/jsbeautifier/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/jsbeautifier/default.nix b/pkgs/development/python-modules/jsbeautifier/default.nix index 242b282d4dd2d..62ca71d52fdab 100644 --- a/pkgs/development/python-modules/jsbeautifier/default.nix +++ b/pkgs/development/python-modules/jsbeautifier/default.nix @@ -1,13 +1,13 @@ { lib , fetchPypi -, buildPythonApplication +, buildPythonPackage , editorconfig , pytestCheckHook , pythonOlder , six }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "jsbeautifier"; version = "1.14.6"; format = "setuptools"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0bee0afb909e4..1c897ab386d03 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8025,6 +8025,8 @@ with pkgs; jsawk = callPackage ../tools/text/jsawk { }; + jsbeautifier = with python3Packages; toPythonApplication jsbeautifier; + jscoverage = callPackage ../development/tools/misc/jscoverage { }; jsduck = callPackage ../development/tools/jsduck { }; From e755d64d655e8605306a2c39ae11728a92f2ba66 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 18:28:50 +0200 Subject: [PATCH 078/318] python3Packages.python-manilaclient: Use buildPythonPackage and expose a top-level attribute. --- .../python-modules/python-manilaclient/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/python-manilaclient/default.nix b/pkgs/development/python-modules/python-manilaclient/default.nix index 9a9e01ff4be75..301ce42f0c776 100644 --- a/pkgs/development/python-modules/python-manilaclient/default.nix +++ b/pkgs/development/python-modules/python-manilaclient/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchPypi , installShellFiles , pbr @@ -21,7 +21,7 @@ , pythonOlder }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "python-manilaclient"; version = "4.1.0"; format = "setuptools"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1c897ab386d03..30d53a6006f7d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21195,6 +21195,7 @@ with pkgs; glanceclient = with python3Packages; toPythonApplication python-glanceclient; heatclient = with python3Packages; toPythonApplication python-heatclient; ironicclient = with python3Packages; toPythonApplication python-ironicclient; + manilaclient = with python3Packages; toPythonApplication python-manilaclient; openvdb = callPackage ../development/libraries/openvdb {}; From f0e5c494b4f79541ab11cea2b46dd54c5e31d15d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 18:43:21 +0200 Subject: [PATCH 079/318] python3Packages.coconut: Use buildPythonPackage --- pkgs/development/python-modules/coconut/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/coconut/default.nix b/pkgs/development/python-modules/coconut/default.nix index b7301cf1e73a7..dec024fa8385f 100644 --- a/pkgs/development/python-modules/coconut/default.nix +++ b/pkgs/development/python-modules/coconut/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , cpyparsing , ipykernel @@ -12,7 +12,7 @@ , watchdog }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "coconut"; version = "1.6.0"; From f45e641a9f28b15f182c3c00c7ca15224b1b4530 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 18:50:37 +0200 Subject: [PATCH 080/318] python3Packages.behave: Use buildPythonPackage and expose top-level attribute. --- pkgs/development/python-modules/behave/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/behave/default.nix b/pkgs/development/python-modules/behave/default.nix index 5254f79c4b2fd..1030e589a21df 100644 --- a/pkgs/development/python-modules/behave/default.nix +++ b/pkgs/development/python-modules/behave/default.nix @@ -1,11 +1,11 @@ { lib, stdenv, fetchFromGitHub -, buildPythonApplication, python +, buildPythonPackage, python , pytestCheckHook, mock, path, pyhamcrest, pytest-html , glibcLocales , colorama, cucumber-tag-expressions, parse, parse-type, six }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "behave"; version = "1.2.7.dev2"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 30d53a6006f7d..5b339173e3b38 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3083,6 +3083,8 @@ with pkgs; tezos-rust-libs = callPackage ../development/libraries/tezos-rust-libs { }; + behave = with python3Packages; toPythonApplication behave; + behdad-fonts = callPackage ../data/fonts/behdad-fonts { }; bfetch = callPackage ../tools/misc/bfetch { }; From 32a3a0a14b3531c02f1d83a1a2c7326aca9b1564 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 18:51:40 +0200 Subject: [PATCH 081/318] python3Packages.tempest: Use buildPythonPackage --- pkgs/development/python-modules/tempest/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tempest/default.nix b/pkgs/development/python-modules/tempest/default.nix index 7f50fc8f30231..654c8a9e2ab0b 100644 --- a/pkgs/development/python-modules/tempest/default.nix +++ b/pkgs/development/python-modules/tempest/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchPypi , pbr , cliff @@ -26,7 +26,7 @@ , python }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "tempest"; version = "32.0.0"; From 31c87e7d7794cb5e1a755a70721852f64ebbdef0 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 2 Oct 2022 19:10:07 +0100 Subject: [PATCH 082/318] pulseaudio: use xorg.* packages directly instead of xlibsWrapper indirection Validated as no change in `out` and `dev` outputs with diffoscope on `pulseaudio.override { x11Support = true; }` expression. --- pkgs/servers/pulseaudio/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix index 6b09105ef20a1..f1fc2a3573b7c 100644 --- a/pkgs/servers/pulseaudio/default.nix +++ b/pkgs/servers/pulseaudio/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, fetchpatch, pkg-config , libsndfile, libtool, makeWrapper, perlPackages -, xlibsWrapper, xorg, libcap, alsa-lib, glib, dconf +, xorg, libcap, alsa-lib, glib, dconf , avahi, libjack2, libasyncns, lirc, dbus , sbc, bluez5, udev, openssl, fftwFloat , soxr, speexdsp, systemd, webrtc-audio-processing @@ -76,7 +76,7 @@ stdenv.mkDerivation rec { ++ lib.optionals (!libOnly) ( [ libasyncns webrtc-audio-processing ] ++ lib.optional jackaudioSupport libjack2 - ++ lib.optionals x11Support [ xlibsWrapper xorg.libXtst xorg.libXi ] + ++ lib.optionals x11Support [ xorg.libICE xorg.libSM xorg.libX11 xorg.libXi xorg.libXtst ] ++ lib.optional useSystemd systemd ++ lib.optionals stdenv.isLinux [ alsa-lib udev ] ++ lib.optional airtunesSupport openssl From 9a9b1952fe5d9095f3d13f0ad9e66b448f2ee91f Mon Sep 17 00:00:00 2001 From: Hraban Luyat Date: Wed, 24 Aug 2022 09:11:19 +0200 Subject: [PATCH 083/318] sbcl: 2.2.6 -> 2.2.9 --- pkgs/development/compilers/sbcl/2.2.9.nix | 4 ++++ pkgs/development/compilers/sbcl/common.nix | 4 ++-- pkgs/top-level/all-packages.nix | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/compilers/sbcl/2.2.9.nix diff --git a/pkgs/development/compilers/sbcl/2.2.9.nix b/pkgs/development/compilers/sbcl/2.2.9.nix new file mode 100644 index 0000000000000..22e0e30f392b0 --- /dev/null +++ b/pkgs/development/compilers/sbcl/2.2.9.nix @@ -0,0 +1,4 @@ +import ./common.nix { + version = "2.2.9"; + sha256 = "sha256-fr69bSAj//cHewNy+hFx+IBSm97GEE8gmDKXwv63wXI="; +} diff --git a/pkgs/development/compilers/sbcl/common.nix b/pkgs/development/compilers/sbcl/common.nix index 05fa6b390897d..261c14106a68b 100644 --- a/pkgs/development/compilers/sbcl/common.nix +++ b/pkgs/development/compilers/sbcl/common.nix @@ -32,8 +32,8 @@ stdenv.mkDerivation rec { url = "https://github.com/sbcl/sbcl/commit/8fa3f76fba2e8572e86ac6fc5754e6b2954fc774.patch"; sha256 = "1ic531pjnws1k3xd03a5ixbq8cn10dlh2nfln59k0vbm0253g3lv"; }) - ++ lib.optionals (lib.versionAtLeast version "2.1.10") [ - # Fix pending upstream inclusion on -fno-common toolchains: + ++ lib.optionals (lib.versionAtLeast version "2.1.10" && lib.versionOlder version "2.2.9") [ + # Fix included in SBCL trunk since 2.2.9: # https://bugs.launchpad.net/sbcl/+bug/1980570 (fetchpatch { name = "darwin-fno-common.patch"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d1c5fd77f4d12..4a400d3dd52b2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14869,7 +14869,8 @@ with pkgs; sbcl_2_1_11 = callPackage ../development/compilers/sbcl/2.1.11.nix {}; sbcl_2_2_4 = callPackage ../development/compilers/sbcl/2.2.4.nix {}; sbcl_2_2_6 = callPackage ../development/compilers/sbcl/2.2.6.nix {}; - sbcl = sbcl_2_2_6; + sbcl_2_2_9 = callPackage ../development/compilers/sbcl/2.2.9.nix {}; + sbcl = sbcl_2_2_9; roswell = callPackage ../development/tools/roswell { }; From 7479aacffc8835ac8f754befc682c1c712e714dd Mon Sep 17 00:00:00 2001 From: Hraban Luyat Date: Sun, 2 Oct 2022 14:50:52 -0400 Subject: [PATCH 084/318] sbcl: refactor separate 2.*.nix into single file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Inspired by scala’s 2.x.nix, a bit lower in the same all-packages.nix file, I have combined all the separate SBCL build declarations into a single 2.x.nix file which you can call with the version as an argument. Benefits: - Less clutter in the filesystem - Less indirection - Cleaner overview of available versions This yields no rebuilds on my machine. --- pkgs/development/compilers/sbcl/2.0.8.nix | 4 -- pkgs/development/compilers/sbcl/2.0.9.nix | 4 -- pkgs/development/compilers/sbcl/2.1.1.nix | 4 -- pkgs/development/compilers/sbcl/2.1.10.nix | 4 -- pkgs/development/compilers/sbcl/2.1.11.nix | 4 -- pkgs/development/compilers/sbcl/2.1.2.nix | 4 -- pkgs/development/compilers/sbcl/2.1.9.nix | 4 -- pkgs/development/compilers/sbcl/2.2.4.nix | 4 -- pkgs/development/compilers/sbcl/2.2.6.nix | 4 -- pkgs/development/compilers/sbcl/2.2.9.nix | 4 -- .../compilers/sbcl/{common.nix => 2.x.nix} | 48 ++++++++++++++++++- pkgs/top-level/all-packages.nix | 20 ++++---- 12 files changed, 56 insertions(+), 52 deletions(-) delete mode 100644 pkgs/development/compilers/sbcl/2.0.8.nix delete mode 100644 pkgs/development/compilers/sbcl/2.0.9.nix delete mode 100644 pkgs/development/compilers/sbcl/2.1.1.nix delete mode 100644 pkgs/development/compilers/sbcl/2.1.10.nix delete mode 100644 pkgs/development/compilers/sbcl/2.1.11.nix delete mode 100644 pkgs/development/compilers/sbcl/2.1.2.nix delete mode 100644 pkgs/development/compilers/sbcl/2.1.9.nix delete mode 100644 pkgs/development/compilers/sbcl/2.2.4.nix delete mode 100644 pkgs/development/compilers/sbcl/2.2.6.nix delete mode 100644 pkgs/development/compilers/sbcl/2.2.9.nix rename pkgs/development/compilers/sbcl/{common.nix => 2.x.nix} (85%) diff --git a/pkgs/development/compilers/sbcl/2.0.8.nix b/pkgs/development/compilers/sbcl/2.0.8.nix deleted file mode 100644 index bbc171a8d9863..0000000000000 --- a/pkgs/development/compilers/sbcl/2.0.8.nix +++ /dev/null @@ -1,4 +0,0 @@ -import ./common.nix { - version = "2.0.8"; - sha256 = "1xwrwvps7drrpyw3wg5h3g2qajmkwqs9gz0fdw1ns9adp7vld390"; -} diff --git a/pkgs/development/compilers/sbcl/2.0.9.nix b/pkgs/development/compilers/sbcl/2.0.9.nix deleted file mode 100644 index 80b30ec87f487..0000000000000 --- a/pkgs/development/compilers/sbcl/2.0.9.nix +++ /dev/null @@ -1,4 +0,0 @@ -import ./common.nix { - version = "2.0.9"; - sha256 = "17wvrcwgp45z9b6arik31fjnz7908qhr5ackxq1y0gqi1hsh1xy4"; -} diff --git a/pkgs/development/compilers/sbcl/2.1.1.nix b/pkgs/development/compilers/sbcl/2.1.1.nix deleted file mode 100644 index a32f8a4a28b38..0000000000000 --- a/pkgs/development/compilers/sbcl/2.1.1.nix +++ /dev/null @@ -1,4 +0,0 @@ -import ./common.nix { - version = "2.1.1"; - sha256 = "15wa66sachhzgvg5n35vihmkpasg100lh561c1d1bdrql0p8kbd9"; -} diff --git a/pkgs/development/compilers/sbcl/2.1.10.nix b/pkgs/development/compilers/sbcl/2.1.10.nix deleted file mode 100644 index 8cf6f50b5869b..0000000000000 --- a/pkgs/development/compilers/sbcl/2.1.10.nix +++ /dev/null @@ -1,4 +0,0 @@ -import ./common.nix { - version = "2.1.10"; - sha256 = "0f5ihj486m7ghh3nc0jlnqa656sbqcmhdv32syz2rjx5b47ky67b"; -} diff --git a/pkgs/development/compilers/sbcl/2.1.11.nix b/pkgs/development/compilers/sbcl/2.1.11.nix deleted file mode 100644 index abe48953a5736..0000000000000 --- a/pkgs/development/compilers/sbcl/2.1.11.nix +++ /dev/null @@ -1,4 +0,0 @@ -import ./common.nix { - version = "2.1.11"; - sha256 = "1zgypmn19c58pv7j33ga7m1l7lzghj70w3xbybpgmggxwwflihdz"; -} diff --git a/pkgs/development/compilers/sbcl/2.1.2.nix b/pkgs/development/compilers/sbcl/2.1.2.nix deleted file mode 100644 index 4f4c85b286c7e..0000000000000 --- a/pkgs/development/compilers/sbcl/2.1.2.nix +++ /dev/null @@ -1,4 +0,0 @@ -import ./common.nix { - version = "2.1.2"; - sha256 = "sha256:02scrqyp2izsd8xjm2k5j5lhn4pdhd202jlcb54ysmcqjd80awdp"; -} diff --git a/pkgs/development/compilers/sbcl/2.1.9.nix b/pkgs/development/compilers/sbcl/2.1.9.nix deleted file mode 100644 index da26a9aeffb70..0000000000000 --- a/pkgs/development/compilers/sbcl/2.1.9.nix +++ /dev/null @@ -1,4 +0,0 @@ -import ./common.nix { - version = "2.1.9"; - sha256 = "189gjqzdz10xh3ybiy4ch1r98bsmkcb4hpnrmggd4y2g5kqnyx4y"; -} diff --git a/pkgs/development/compilers/sbcl/2.2.4.nix b/pkgs/development/compilers/sbcl/2.2.4.nix deleted file mode 100644 index 1be043f112eef..0000000000000 --- a/pkgs/development/compilers/sbcl/2.2.4.nix +++ /dev/null @@ -1,4 +0,0 @@ -import ./common.nix { - version = "2.2.4"; - sha256 = "sha256-/N0lHLxl9/gI7QrXckaEjRvhZqppoX90mWABhLelcgI="; -} diff --git a/pkgs/development/compilers/sbcl/2.2.6.nix b/pkgs/development/compilers/sbcl/2.2.6.nix deleted file mode 100644 index 6fb24da6abe5f..0000000000000 --- a/pkgs/development/compilers/sbcl/2.2.6.nix +++ /dev/null @@ -1,4 +0,0 @@ -import ./common.nix { - version = "2.2.6"; - sha256 = "sha256-PiMEjI+oJvuRMiC+sqw2l9vFwM3y6J/tjbOe0XEjBKA="; -} diff --git a/pkgs/development/compilers/sbcl/2.2.9.nix b/pkgs/development/compilers/sbcl/2.2.9.nix deleted file mode 100644 index 22e0e30f392b0..0000000000000 --- a/pkgs/development/compilers/sbcl/2.2.9.nix +++ /dev/null @@ -1,4 +0,0 @@ -import ./common.nix { - version = "2.2.9"; - sha256 = "sha256-fr69bSAj//cHewNy+hFx+IBSm97GEE8gmDKXwv63wXI="; -} diff --git a/pkgs/development/compilers/sbcl/common.nix b/pkgs/development/compilers/sbcl/2.x.nix similarity index 85% rename from pkgs/development/compilers/sbcl/common.nix rename to pkgs/development/compilers/sbcl/2.x.nix index 261c14106a68b..cfc9d34a4da81 100644 --- a/pkgs/development/compilers/sbcl/common.nix +++ b/pkgs/development/compilers/sbcl/2.x.nix @@ -1,5 +1,3 @@ -{ version, sha256 }: - { lib, stdenv, fetchurl, fetchpatch, writeText, sbclBootstrap, zstd , sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit" , threadSupport ? (stdenv.hostPlatform.isx86 || "aarch64-linux" == stdenv.hostPlatform.system || "aarch64-darwin" == stdenv.hostPlatform.system) @@ -11,8 +9,54 @@ , purgeNixReferences ? false , coreCompression ? lib.versionAtLeast version "2.2.6" , texinfo +, version }: +let + versionMap = { + "2.0.8" = { + sha256 = "1xwrwvps7drrpyw3wg5h3g2qajmkwqs9gz0fdw1ns9adp7vld390"; + }; + + "2.0.9" = { + sha256 = "17wvrcwgp45z9b6arik31fjnz7908qhr5ackxq1y0gqi1hsh1xy4"; + }; + + "2.1.1" = { + sha256 = "15wa66sachhzgvg5n35vihmkpasg100lh561c1d1bdrql0p8kbd9"; + }; + + "2.1.2" = { + sha256 = "sha256:02scrqyp2izsd8xjm2k5j5lhn4pdhd202jlcb54ysmcqjd80awdp"; + }; + + "2.1.9" = { + sha256 = "189gjqzdz10xh3ybiy4ch1r98bsmkcb4hpnrmggd4y2g5kqnyx4y"; + }; + + "2.1.10" = { + sha256 = "0f5ihj486m7ghh3nc0jlnqa656sbqcmhdv32syz2rjx5b47ky67b"; + }; + + "2.1.11" = { + sha256 = "1zgypmn19c58pv7j33ga7m1l7lzghj70w3xbybpgmggxwwflihdz"; + }; + + "2.2.4" = { + sha256 = "sha256-/N0lHLxl9/gI7QrXckaEjRvhZqppoX90mWABhLelcgI="; + }; + + "2.2.6" = { + sha256 = "sha256-PiMEjI+oJvuRMiC+sqw2l9vFwM3y6J/tjbOe0XEjBKA="; + }; + + "2.2.9" = { + sha256 = "sha256-fr69bSAj//cHewNy+hFx+IBSm97GEE8gmDKXwv63wXI="; + }; + }; + +in with versionMap.${version}; + stdenv.mkDerivation rec { pname = "sbcl"; inherit version; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aa5209fa1daa7..557e6ffd4af0e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14874,16 +14874,16 @@ with pkgs; sagittarius-scheme = callPackage ../development/compilers/sagittarius-scheme {}; sbclBootstrap = callPackage ../development/compilers/sbcl/bootstrap.nix {}; - sbcl_2_0_8 = callPackage ../development/compilers/sbcl/2.0.8.nix {}; - sbcl_2_0_9 = callPackage ../development/compilers/sbcl/2.0.9.nix {}; - sbcl_2_1_1 = callPackage ../development/compilers/sbcl/2.1.1.nix {}; - sbcl_2_1_2 = callPackage ../development/compilers/sbcl/2.1.2.nix {}; - sbcl_2_1_9 = callPackage ../development/compilers/sbcl/2.1.9.nix {}; - sbcl_2_1_10 = callPackage ../development/compilers/sbcl/2.1.10.nix {}; - sbcl_2_1_11 = callPackage ../development/compilers/sbcl/2.1.11.nix {}; - sbcl_2_2_4 = callPackage ../development/compilers/sbcl/2.2.4.nix {}; - sbcl_2_2_6 = callPackage ../development/compilers/sbcl/2.2.6.nix {}; - sbcl_2_2_9 = callPackage ../development/compilers/sbcl/2.2.9.nix {}; + sbcl_2_0_8 = callPackage ../development/compilers/sbcl/2.x.nix { version = "2.0.8"; }; + sbcl_2_0_9 = callPackage ../development/compilers/sbcl/2.x.nix { version = "2.0.9"; }; + sbcl_2_1_1 = callPackage ../development/compilers/sbcl/2.x.nix { version = "2.1.1"; }; + sbcl_2_1_2 = callPackage ../development/compilers/sbcl/2.x.nix { version = "2.1.2"; }; + sbcl_2_1_9 = callPackage ../development/compilers/sbcl/2.x.nix { version = "2.1.9"; }; + sbcl_2_1_10 = callPackage ../development/compilers/sbcl/2.x.nix { version = "2.1.10"; }; + sbcl_2_1_11 = callPackage ../development/compilers/sbcl/2.x.nix { version = "2.1.11"; }; + sbcl_2_2_4 = callPackage ../development/compilers/sbcl/2.x.nix { version = "2.2.4"; }; + sbcl_2_2_6 = callPackage ../development/compilers/sbcl/2.x.nix { version = "2.2.6"; }; + sbcl_2_2_9 = callPackage ../development/compilers/sbcl/2.x.nix { version = "2.2.9"; }; sbcl = sbcl_2_2_9; roswell = callPackage ../development/tools/roswell { }; From b8a03cec225e78bb112c66836fc85720801cb377 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 3 Oct 2022 09:57:35 +0800 Subject: [PATCH 085/318] flac: set CFLAGS and CXXFLAGS to match performance of autotools build --- pkgs/applications/audio/flac/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/audio/flac/default.nix b/pkgs/applications/audio/flac/default.nix index 644a19c0f0406..bebb35f45009e 100644 --- a/pkgs/applications/audio/flac/default.nix +++ b/pkgs/applications/audio/flac/default.nix @@ -33,6 +33,9 @@ stdenv.mkDerivation rec { "-DBUILD_SHARED_LIBS=ON" ]; + CFLAGS = [ "-O3" "-funroll-loops" ]; + CXXFLAGS = [ "-O3" ]; + # doCheck = true; # takes lots of time outputs = [ "bin" "dev" "out" "man" "doc" ]; From c11887327ba5e8a0451bd3b80956f280999cae4e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 1 Oct 2022 06:34:12 +0000 Subject: [PATCH 086/318] xz: 5.2.6 -> 5.2.7 --- pkgs/tools/compression/xz/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/compression/xz/default.nix b/pkgs/tools/compression/xz/default.nix index 86df04c266919..1f898dbdef4bc 100644 --- a/pkgs/tools/compression/xz/default.nix +++ b/pkgs/tools/compression/xz/default.nix @@ -10,11 +10,11 @@ stdenv.mkDerivation rec { pname = "xz"; - version = "5.2.6"; + version = "5.2.7"; src = fetchurl { url = "https://tukaani.org/xz/xz-${version}.tar.bz2"; - sha256 = "E+NALjAbYBj2px7w5Jf3FMbRHiFK6C2rFWuBwqZKyyU="; + sha256 = "tl8dDCcI5XcW9N0iFpiac4R6xv20Fo/86xVXZ+Irg0s="; }; strictDeps = true; From 20c2a3a9d596a30bff1b28247e40e668329d32a9 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 3 Oct 2022 13:09:29 +0200 Subject: [PATCH 087/318] systemd: nixpkgs-fmt --- pkgs/os-specific/linux/systemd/default.nix | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 5b417369a5584..b242fb370024c 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -571,21 +571,22 @@ stdenv.mkDerivation { ]; # { replacement, search, where } -> List[str] - mkSubstitute = { replacement, search, where, ignore ? [] }: + mkSubstitute = { replacement, search, where, ignore ? [ ] }: map (path: "substituteInPlace ${path} --replace '${search}' \"${replacement}\"") where; - mkEnsureSubstituted = { replacement, search, where, ignore ? [] }: - let - ignore' = lib.concatStringsSep "|" (ignore ++ ["^test" "NEWS"]); - in '' - set +e - search=$(grep '${search}' -r | grep -v "${replacement}" | grep -Ev "${ignore'}") - set -e - if [[ -n "$search" ]]; then - echo "Not all references to '${search}' have been replaced. Found the following matches:" - echo "$search" - exit 1 - fi - ''; + mkEnsureSubstituted = { replacement, search, where, ignore ? [ ] }: + let + ignore' = lib.concatStringsSep "|" (ignore ++ [ "^test" "NEWS" ]); + in + '' + set +e + search=$(grep '${search}' -r | grep -v "${replacement}" | grep -Ev "${ignore'}") + set -e + if [[ -n "$search" ]]; then + echo "Not all references to '${search}' have been replaced. Found the following matches:" + echo "$search" + exit 1 + fi + ''; in '' mesonFlagsArray+=(-Dntp-servers="0.nixos.pool.ntp.org 1.nixos.pool.ntp.org 2.nixos.pool.ntp.org 3.nixos.pool.ntp.org") From 0247a5b6da0666fe5e40626ccc55c24dbb6b6b93 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 3 Oct 2022 13:09:47 +0200 Subject: [PATCH 088/318] systemd: 251.4 -> 251.5 Changes: ``` 654ae8c1e4 base-filesystem.c: add trailing zero byte for s390x entry e4a19eef33 basic/missing_loop.h: fix missing lo_flags LO_FLAGS_DIRECT_IO 24238be484 mount-util: fix error code 1b1ad8c79f udev: certainly restart event for previously locked device 7dacfb3fb4 stub: Use EfiLoaderCode for kernel memory eaeaf4f6ef network: do not silently stop to process configuration on activation failure bb803856bc bus: use inline trace argument for ANONYMOUS auth 6349062326 Fix ObjectManager interface emitted for non-manager objects c90ab07fa0 test-bus-objects: Test interfaces added/removed signal interfaces e32fe1b457 Fix GetManagedObjects returning ObjectManager interface for non-manager objects efd8e39f4a test-bus-objects: Test GetManagedObjects interfaces are correct 344efd022a coredump: when parsing json, optionally copy the string first de08edca17 systemctl: color ignored exit status in yellow, not red 1531a496e3 manager: make clear internal Dump() logic is debugging only. c4fd38f7d2 man: document the Dump() calls of the PID 1 D-Bus interface, and what they are 140fee4627 resolve: do not cache mDNS goodbye packet 1a2d93a770 kbd-model-map: correct variants for cz-qwerty to include comma 9d1ebb2247 resolve: persist DNSOverTLS configuration in state file 3137ac6ef5 udev: support by-path devlink for multipath nvme block devices c948091cc5 run: make --working-directory= work for --scope too 7bb204620d kbd-model-map: add a mapping for switched czech qwerty/us e5157050d1 test: add more test cases for mkdir_p_safe() and mkdir_p_root() b3a9f7b5cb mkdir: chase_symlinks_and_stat() does not return 0 0bfdc91807 units: make sure that initrd-switch-root.service pulls in .target 45fb64c54b units: add dependency ordering for emergency.service conflicts 6535813084 units: add ordering dependencies on initrd-switch-root.target 09c90224f1 units/systemd-network-generator.service: add forgotten ordering for shutdown 1dd723a3b8 units: reorder/split unit dependency blocks 054cad0097 man: explicitly document that "reboot -f" is different from "systemctl reboot -f" c5b0ae86b1 watchdog: use /dev/watchdog0 only if it exists ac805eac15 journalctl: respect --quiet flag during file concistency verification c1d729795d xdg-autostart-service: expand tilde in Exec lines 35c5f5d688 unit: drop ProtectClock=yes from systemd-udevd.service 175ba30cf6 busctl: Fix warning about invaild introspection data 6c7b91372d udev/rules,hwdb: filter out mostly meaningless default strings 8b89e677e9 units: prolong the stop timeout for homed 202a79e7c5 homed: don't wait indefinitely for workers on exit 44660d2e12 man: fix static bridge example e0dde8a14f log: don't attempt to duplicate closed fd 254b77e73c condition: fix device-tree firmware path 96da39ddb1 udev-util: minor cleanups for on_ac_power() 3345520512 docs: fix incorrect env var name for credentials directory 49f9fa87b2 shell-completion: drop unused $mode 1e29d934de oomd: fix off-by-one when dumping kill candidates b00cb050c8 on-ac-power: ignore devices with scope==Device 9886011356 on-ac-power: rework logic 1fc74d251e sd-device: add helper to read a unsigned int attribute 6d4c138534 shared/udev-util: say "ignoring device", not "ignoring" cd2fad2300 virt: Support detection of Apple Virtualization.framework guests 6e47e75c86 virt: align tables 951e99231e check-os-release.py compatible with Python < 3.8 d572a74163 core/mount: adjust deserialized state based on /proc/self/mountinfo 2e372afc35 Allow uneven length BootXXXX variables 8ad143e684 gpt: fix native uuids for s390x 2bb9a0a29b udev: fix inversed inequality for timeout of retrying event cf67d5ed1b bash-completion: add systemd-sysext support ada437cfb1 sysext: add missing COMMAND to the help output and man synopsis 58bc1e8e04 hostname: make chassis type actually obtained from ACPI when nothing from DMI 4ffde70981 booctl: do not say uuids differ if one of the uuids is unset 5219a99ccb bash-completion: autocomplete cgroup names in systemd-cgtop 9f2f391153 sysusers: add fsync for passwd (#24324) c966377c51 dhcp6: do not append ORO option when no option requested 97474b03e7 dhcp6: gracefully handle NoBinding error c67a388aef udev/cdrom_id: check last track info 52c631b02e firstboot: fix can't overwrite timezone f279a6f4d1 cryptenroll: fix memory leak 66b060225d sd-device-enumerator: drop noisy log messages 6e1acfe818 sd-device-monitor: actually refuse to send invalid devices 81339c45e8 sd-device-monitor: fix inversed condition 1760559918 resolvctl: only remove protocol after last dot when mangling ifname for resolvconf a3348ba748 oom: drop invalid %m in the log message b3dd66f32b meson: Test correct efi linker for supported args f9d936b865 sysusers: properly process user entries with an explicit GID ec5a46ca34 sysusers: only check whether the requested GID is available 037b1a8acc dhcp: fix potential buffer overflow ed2955f8fe udev-util: assume system is running on AC power when no battery found 37b54927d3 Fix issue with system time set back (#24131) 4fdca1ab9e shared/generator: Ensure growfs unit runs after repart 32f9d70f8b manager: optionally, do a full preset on first boot ``` --- pkgs/os-specific/linux/systemd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index b242fb370024c..775e6b7eda33d 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -120,7 +120,7 @@ assert withHomed -> withCryptsetup; let wantCurl = withRemote || withImportd; wantGcrypt = withResolved || withImportd; - version = "251.4"; + version = "251.5"; # Bump this variable on every (major) version change. See below (in the meson options list) for why. # command: @@ -137,7 +137,7 @@ stdenv.mkDerivation { owner = "systemd"; repo = "systemd-stable"; rev = "v${version}"; - sha256 = "sha256-lfG6flT1k8LZBAdDK+cF9RjmJMkHMJquMjQK3MINFd8="; + sha256 = "sha256-2MEmvFT1D+9v8OazBwjnKc7i/x7i196Eoi8bODk1cM4="; }; # On major changes, or when otherwise required, you *must* reformat the patches, From f943f70ae75702eb36412c9ce3cadd2f558ca55b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 3 Oct 2022 14:32:29 +0200 Subject: [PATCH 089/318] python310Packages.certifi: 2022.06.15 -> 2022.09.24 --- pkgs/development/python-modules/certifi/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/certifi/default.nix b/pkgs/development/python-modules/certifi/default.nix index 674fc1183d8ef..ecf7ed49aa5c4 100644 --- a/pkgs/development/python-modules/certifi/default.nix +++ b/pkgs/development/python-modules/certifi/default.nix @@ -7,22 +7,24 @@ buildPythonPackage rec { pname = "certifi"; - version = "2022.06.15"; + version = "2022.09.24"; - disabled = pythonOlder "3.5"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = pname; repo = "python-certifi"; rev = version; - sha256 = "sha256-CKO8wF5FMGLIZbTd7YrKE9OWV9MbfQ2+BMc5IPk1FFU="; + hash = "sha256-B6LO6AfG9cfpyNI7hj3VjmGTFsrrIkDYO4gPMkZY74w="; }; checkInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ "certifi" ]; + pythonImportsCheck = [ + "certifi" + ]; meta = with lib; { homepage = "https://github.com/certifi/python-certifi"; From 9503adb6660010f132f5574a4d0233aff067367d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 30 Sep 2022 13:09:56 +0200 Subject: [PATCH 090/318] python3Packages.scipy: Limit OpenMP threads during check phase The scipy tests already run in parallel and the openmp threads come on top of that. That overloads machines very easily and therefore we introduce a scaling limit to the number of openmp threads used. https://www.openmp.org/spec-html/5.0/openmpse50.html --- pkgs/development/python-modules/scipy/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index aa578d21d257e..e791454b9018f 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -54,6 +54,7 @@ buildPythonPackage rec { checkPhase = '' runHook preCheck pushd "$out" + export OMP_NUM_THREADS=$(( $NIX_BUILD_CORES / 4 )) ${python.interpreter} -c "import scipy; scipy.test('fast', verbose=10, parallel=$NIX_BUILD_CORES)" popd runHook postCheck From 8648265671a66555d8f12c5701b27a1a7a56390f Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Tue, 4 Oct 2022 01:42:08 -0700 Subject: [PATCH 091/318] python310Packages.hatch-fancy-pypi-readme: 22.7.0 -> 22.8.0 --- .../python-modules/hatch-fancy-pypi-readme/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/hatch-fancy-pypi-readme/default.nix b/pkgs/development/python-modules/hatch-fancy-pypi-readme/default.nix index 4e1a32236f0d6..4d1ba69c93df7 100644 --- a/pkgs/development/python-modules/hatch-fancy-pypi-readme/default.nix +++ b/pkgs/development/python-modules/hatch-fancy-pypi-readme/default.nix @@ -5,11 +5,13 @@ , pythonOlder , build , hatchling +, tomli +, typing-extensions }: buildPythonPackage rec { pname = "hatch-fancy-pypi-readme"; - version = "22.7.0"; + version = "22.8.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -17,7 +19,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "hatch_fancy_pypi_readme"; inherit version; - hash = "sha256-3t8roLgaKXWrsd7ukxCy64XSI4D9oNUoaedgtUNapZY="; + hash = "sha256-2pEoLKCWAcGK3tjjeNr4tXjHAhSGbwlxFW7pu5zmwmo="; }; nativeBuildInputs = [ @@ -26,6 +28,10 @@ buildPythonPackage rec { propagatedBuildInputs = [ hatchling + ] ++ lib.optionals (pythonOlder "3.11") [ + tomli + ] ++ lib.optionals (pythonOlder "3.8") [ + typing-extensions ]; checkInputs = [ From a13e1e6277d561ea3bcaa30782fd2f81dbcf7756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Tue, 4 Oct 2022 12:54:31 +0200 Subject: [PATCH 092/318] openssh: 9.0p1 -> 9.1p1 --- .../manual/from_md/release-notes/rl-2211.section.xml | 10 ++++++++++ nixos/doc/manual/release-notes/rl-2211.section.md | 2 ++ pkgs/tools/networking/openssh/default.nix | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml index ad08caf3ce5c8..dca3cb33904c6 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml @@ -436,6 +436,16 @@ future Git update without notice. + + + openssh was updated to version 9.1, + disabling the generation of DSA keys when using + ssh-keygen -A as they are insecure. Also, + SetEnv directives in + ssh_config and + sshd_config are now first-match-wins + + bsp-layout no longer uses the command diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md index 85c35b993ac4c..517d5d9fa8433 100644 --- a/nixos/doc/manual/release-notes/rl-2211.section.md +++ b/nixos/doc/manual/release-notes/rl-2211.section.md @@ -147,6 +147,8 @@ Available as [services.patroni](options.html#opt-services.patroni.enable). - The `fetchgit` fetcher now uses [cone mode](https://www.git-scm.com/docs/git-sparse-checkout/2.37.0#_internalscone_mode_handling) by default for sparse checkouts. [Non-cone mode](https://www.git-scm.com/docs/git-sparse-checkout/2.37.0#_internalsnon_cone_problems) can be enabled by passing `nonConeMode = true`, but note that non-cone mode is deprecated and this option may be removed alongside a future Git update without notice. +- `openssh` was updated to version 9.1, disabling the generation of DSA keys when using `ssh-keygen -A` as they are insecure. Also, `SetEnv` directives in `ssh_config` and `sshd_config` are now first-match-wins + - `bsp-layout` no longer uses the command `cycle` to switch to other window layouts, as it got replaced by the commands `previous` and `next`. - The Barco ClickShare driver/client package `pkgs.clickshare-csc1` and the option `programs.clickshare-csc1.enable` have been removed, diff --git a/pkgs/tools/networking/openssh/default.nix b/pkgs/tools/networking/openssh/default.nix index 55aec86bee57e..7a2be129b8ddd 100644 --- a/pkgs/tools/networking/openssh/default.nix +++ b/pkgs/tools/networking/openssh/default.nix @@ -6,11 +6,11 @@ in openssh = common rec { pname = "openssh"; - version = "9.0p1"; + version = "9.1p1"; src = fetchurl { url = "mirror://openbsd/OpenSSH/portable/openssh-${version}.tar.gz"; - sha256 = "12m2f9czvgmi7akp7xah6y7mrrpi280a3ksk47iwr7hy2q1475q3"; + hash = "sha256-GfhQCcfj4jeH8CNvuxV4OSq01L+fjsX+a8HNfov90og="; }; extraPatches = [ ./ssh-keysign-8.5.patch ]; From 2ba40b566960fbab1e549a792fe4690cd31bb70f Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 4 Oct 2022 02:31:30 +0200 Subject: [PATCH 093/318] python3Packages.pytest-xdist: Disable fork safety on darwin We run pytest with `--forked` in nixpkgs, to reduce side effects that can occur when multiple tests mutate their environment in incompatible ways. Forking on macOS 10.13 and later is unsafe when an application does work between calls to fork() and its followup exec(). This may lead to crashes when calls into the Objective-C runtime are issued, which will in turn coredump the Python interpreter. One good reproducer for this scenario is when the urllib module tries to lookup proxy configurations in `urllib.request.getproxies()` through `get_proxies_macos_sysconf` into the native `_scproxy` module. This is a class of issues that is of course not limited to the urllib module. The general recommendation is to use `spawn` instead of `fork`, but we don't have any influence on upstream developers to do one or the other. One often cited workaround would be to disable fork safety entirely on calls to `initialize()`, which is probably a better solution than running without multithreading (slow) or without the `--forked` (prone to side effects) mode. This currently happens on aarch64-linux only, where we use more recent 11.0 SDK version, while x86_64-darwin has been stuck on 10.12 for a while now. https://github.com/python/cpython/issues/77906#issuecomment-1093788352 http://www.sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html Closes: #194290 --- .../development/python-modules/pytest-xdist/setup-hook.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/pytest-xdist/setup-hook.sh b/pkgs/development/python-modules/pytest-xdist/setup-hook.sh index 5523a7f360f5f..61d0f64d1a4da 100644 --- a/pkgs/development/python-modules/pytest-xdist/setup-hook.sh +++ b/pkgs/development/python-modules/pytest-xdist/setup-hook.sh @@ -3,6 +3,14 @@ pytestXdistHook() { "--numprocesses=$NIX_BUILD_CORES" "--forked" ) + + # Using --forked on darwin leads to crashes when fork safety is + # enabled. This often happens when urllib tries to request proxy + # settings on MacOS through `urllib.request.getproxies()` + # - https://github.com/python/cpython/issues/77906 + if [[ "$OSTYPE" == "darwin"* ]]; then + export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES + fi } # the flags should be added before pytestCheckHook runs so From de5951f3c2dad844f7589228d6b9eb0bf606587c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Mon, 3 Oct 2022 17:22:23 +0200 Subject: [PATCH 094/318] pythonPackages.pythonRelaxDepsHook: cleanup unpacked folder or it will end up in the dist output. --- .../interpreters/python/hooks/python-relax-deps-hook.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh b/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh index 82231ee3adc6c..d404c6021f4f0 100644 --- a/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh @@ -80,6 +80,9 @@ pythonRelaxDepsHook() { @pythonInterpreter@ -m wheel pack "$unpack_dir/$pkg_name" done + # Remove the folder since it will otherwise be in the dist output. + rm -rf "$unpack_dir" + popd } From 69ea4c8696f175fb2f40dcbc40e598e10a29346d Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Mon, 3 Oct 2022 17:23:26 +0200 Subject: [PATCH 095/318] pythonPackages.buildPython*: also output dist when using wheel Typically the actual wheel will be unchanged, but it is possible we use the relax deps hook modifying the wheel. --- pkgs/development/interpreters/python/mk-python-derivation.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index abb1ceb7879e1..bdb4969bf1642 100644 --- a/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -109,7 +109,7 @@ else let inherit (python) stdenv; - withDistOutput = lib.elem format ["pyproject" "setuptools" "flit"]; + withDistOutput = lib.elem format ["pyproject" "setuptools" "flit" "wheel"]; name_ = name; From 0afebbb8f85dabc00857c2575d05b74d57ea388c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 4 Oct 2022 13:42:25 +0000 Subject: [PATCH 096/318] numactl: 2.0.15 -> 2.0.16 --- pkgs/os-specific/linux/numactl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/numactl/default.nix b/pkgs/os-specific/linux/numactl/default.nix index ac17a18273a77..28157ffe1677a 100644 --- a/pkgs/os-specific/linux/numactl/default.nix +++ b/pkgs/os-specific/linux/numactl/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "numactl"; - version = "2.0.15"; + version = "2.0.16"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "sha256-mowDqCkAHDEV9AWCgAEWL0//sNMUk/K8w3eO7Wg+AwQ="; + sha256 = "sha256-aDKzkmvrPDzQl4n0KgeiU5LOLhQA0tmwzGiXvJDp7ZI="; }; nativeBuildInputs = [ autoreconfHook ]; From 5a8e48c968c8137bc12ef3c9f09f6285a2ea00c0 Mon Sep 17 00:00:00 2001 From: oxalica Date: Tue, 4 Oct 2022 09:27:45 +0800 Subject: [PATCH 097/318] systemd: don't taint on unmerged /usr Discussion: https://github.com/systemd/systemd/issues/24191#issuecomment-1209350080 --- ...018-core-don-t-taint-on-unmerged-usr.patch | 33 +++++++++++++++++++ pkgs/os-specific/linux/systemd/default.nix | 1 + 2 files changed, 34 insertions(+) create mode 100644 pkgs/os-specific/linux/systemd/0018-core-don-t-taint-on-unmerged-usr.patch diff --git a/pkgs/os-specific/linux/systemd/0018-core-don-t-taint-on-unmerged-usr.patch b/pkgs/os-specific/linux/systemd/0018-core-don-t-taint-on-unmerged-usr.patch new file mode 100644 index 0000000000000..1cd3c2105e1a2 --- /dev/null +++ b/pkgs/os-specific/linux/systemd/0018-core-don-t-taint-on-unmerged-usr.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: oxalica +Date: Tue, 4 Oct 2022 09:18:07 +0800 +Subject: [PATCH] core: don't taint on unmerged /usr + +NixOS has very different approach towards /bin and /sbin - they don't +really exist (except for /bin/sh and /usr/bin/env, because these are used +heavily in shebangs around the world). The concept of merged or unmerged +usr doesn't really apply here at all, it's neither of the two. +Users don't execute things from /bin or /sbin, there's nothing else in +there. In all cases, systemd doesn't look things up from /usr/bin or /bin, +so showing the taint isn't really helpful. + +See also: https://github.com/systemd/systemd/issues/24191 +--- + src/core/manager.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/src/core/manager.c b/src/core/manager.c +index 33ded94a7c..8847479799 100644 +--- a/src/core/manager.c ++++ b/src/core/manager.c +@@ -4488,10 +4488,6 @@ char* manager_taint_string(const Manager *m) { + if (m->taint_usr) + stage[n++] = "split-usr"; + +- _cleanup_free_ char *usrbin = NULL; +- if (readlink_malloc("/bin", &usrbin) < 0 || !PATH_IN_SET(usrbin, "usr/bin", "/usr/bin")) +- stage[n++] = "unmerged-usr"; +- + if (access("/proc/cgroups", F_OK) < 0) + stage[n++] = "cgroups-missing"; + diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 775e6b7eda33d..35b165255cf98 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -163,6 +163,7 @@ stdenv.mkDerivation { ./0015-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch ./0016-pkg-config-derive-prefix-from-prefix.patch ./0017-inherit-systemd-environment-when-calling-generators.patch + ./0018-core-don-t-taint-on-unmerged-usr.patch ] ++ lib.optional stdenv.hostPlatform.isMusl ( let oe-core = fetchzip { From dad24c51c1f9b2252ad0af67c59d8763f479412e Mon Sep 17 00:00:00 2001 From: oxalica Date: Wed, 5 Oct 2022 00:19:38 +0800 Subject: [PATCH 098/318] systemd-no-tainted: init as regression test --- nixos/tests/all-tests.nix | 1 + nixos/tests/systemd-no-tainted.nix | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 nixos/tests/systemd-no-tainted.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 36c51b5731001..4cb4e28f17828 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -607,6 +607,7 @@ in { systemd-networkd-dhcpserver-static-leases = handleTest ./systemd-networkd-dhcpserver-static-leases.nix {}; systemd-networkd-ipv6-prefix-delegation = handleTest ./systemd-networkd-ipv6-prefix-delegation.nix {}; systemd-networkd-vrf = handleTest ./systemd-networkd-vrf.nix {}; + systemd-no-tainted = handleTest ./systemd-no-tainted.nix {}; systemd-nspawn = handleTest ./systemd-nspawn.nix {}; systemd-oomd = handleTest ./systemd-oomd.nix {}; systemd-shutdown = handleTest ./systemd-shutdown.nix {}; diff --git a/nixos/tests/systemd-no-tainted.nix b/nixos/tests/systemd-no-tainted.nix new file mode 100644 index 0000000000000..f0504065f2a48 --- /dev/null +++ b/nixos/tests/systemd-no-tainted.nix @@ -0,0 +1,14 @@ +import ./make-test-python.nix ({ pkgs, ... }: { + name = "systemd-no-tainted"; + + nodes.machine = { }; + + testScript = '' + machine.wait_for_unit("multi-user.target") + with subtest("systemctl should not report tainted with unmerged-usr"): + output = machine.succeed("systemctl status") + print(output) + assert "Tainted" not in output + assert "unmerged-usr" not in output + ''; +}) From 051228cee40636904597fa0251cc7772b2b3cb34 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 4 Oct 2022 19:58:14 +0100 Subject: [PATCH 099/318] ghostscript: use xorg.* packages directly instead of xlibsWrapper indirection Validated as no change in `out`, `man`, `doc` outputs with diffoscope on `ghostscript` expression. --- pkgs/misc/ghostscript/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index 28344c3fc5a3e..922941c55e8d9 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -2,7 +2,7 @@ , libjpeg, libpng, libtiff, freetype, fontconfig, libpaper, jbig2dec , libiconv, ijs, lcms2, callPackage, bash, buildPackages, openjpeg , cupsSupport ? config.ghostscript.cups or (!stdenv.isDarwin), cups -, x11Support ? cupsSupport, xlibsWrapper # with CUPS, X11 only adds very little +, x11Support ? cupsSupport, xorg # with CUPS, X11 only adds very little }: let @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { libjpeg libpng libtiff freetype fontconfig libpaper jbig2dec libiconv ijs lcms2 bash openjpeg ] - ++ lib.optional x11Support xlibsWrapper + ++ lib.optionals x11Support [ xorg.libICE xorg.libX11 xorg.libXext xorg.libXt ] ++ lib.optional cupsSupport cups ; From b0d7504e82ab300d0bcef59f9afd02d1699d7bd6 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Wed, 5 Oct 2022 07:19:03 +1000 Subject: [PATCH 100/318] go_1_18: 1.18.6 -> 1.18.7 --- pkgs/development/compilers/go/1.18.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/go/1.18.nix b/pkgs/development/compilers/go/1.18.nix index c3ec8ceac009d..7490aa8a2484e 100644 --- a/pkgs/development/compilers/go/1.18.nix +++ b/pkgs/development/compilers/go/1.18.nix @@ -45,11 +45,11 @@ let in stdenv.mkDerivation rec { pname = "go"; - version = "1.18.6"; + version = "1.18.7"; src = fetchurl { url = "https://go.dev/dl/go${version}.src.tar.gz"; - sha256 = "sha256-p/HVBCQ1XavOZtERKxyuQ5tu5eTxXtum8QTApLFz6JU="; + sha256 = "sha256-lGfjO4Gfcb67IfsO4d1nlP0iRK6UkHqYQoZxL5g5qUQ="; }; strictDeps = true; From 90c083ffba01efd0d144218e28bde930ec7ba95c Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 4 Oct 2022 23:01:45 +0100 Subject: [PATCH 101/318] gnome2.libgnomeui: use xorg.* packages directly instead of xlibsWrapper indirection Validated as no change in `out` and `dev` outputs with diffoscope on `gnome2.libgnomeui` expression. --- pkgs/desktops/gnome-2/platform/libgnomeui/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/gnome-2/platform/libgnomeui/default.nix b/pkgs/desktops/gnome-2/platform/libgnomeui/default.nix index f59bee32929bc..29ed44431c31d 100644 --- a/pkgs/desktops/gnome-2/platform/libgnomeui/default.nix +++ b/pkgs/desktops/gnome-2/platform/libgnomeui/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, fetchpatch, pkg-config, libxml2, xlibsWrapper, glib, pango +{ lib, stdenv, fetchurl, fetchpatch, pkg-config, libxml2, xorg, glib, pango , intltool, libgnome, libgnomecanvas, libbonoboui, GConf, libtool , gnome_vfs, libgnome-keyring, libglade }: @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config intltool ]; buildInputs = - [ xlibsWrapper libxml2 GConf pango glib libgnome-keyring libglade libtool ]; + [ xorg.libX11 xorg.libSM xorg.libICE libxml2 GConf pango glib libgnome-keyring libglade libtool ]; propagatedBuildInputs = [ libgnome libbonoboui libgnomecanvas gnome_vfs ]; } From 23664c3870c3254db9b0a00bcf500298b69ab70f Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 3 Oct 2022 08:10:53 +0100 Subject: [PATCH 102/318] linuxHeaders: 5.19 -> 6.0 --- pkgs/os-specific/linux/kernel-headers/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix index daa8c1ae2019f..7e148b9145c65 100644 --- a/pkgs/os-specific/linux/kernel-headers/default.nix +++ b/pkgs/os-specific/linux/kernel-headers/default.nix @@ -84,12 +84,12 @@ let in { inherit makeLinuxHeaders; - linuxHeaders = let version = "5.19"; in + linuxHeaders = let version = "6.0"; in makeLinuxHeaders { inherit version; src = fetchurl { - url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "1a05a3hw4w3k530mxhns96xw7hag743xw5w967yazqcykdbhq97z"; + url = "mirror://kernel/linux/kernel/v${lib.versions.major version}.x/linux-${version}.tar.xz"; + sha256 = "sha256-XCRDpVON5SaI77VcJ6sFOcH161jAz9FqK5+7CP2BeI4="; }; patches = [ ./no-relocs.patch # for building x86 kernel headers on non-ELF platforms From f42cdfe227d9b16a3036c3b568b12f3f21bc47bf Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Fri, 23 Sep 2022 15:47:05 -0600 Subject: [PATCH 103/318] cryptsetup: Allow reading tokens from relative path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Janne Heß Co-authored-by: Ilan Joselevich --- pkgs/os-specific/linux/cryptsetup/default.nix | 5 ++ .../cryptsetup/relative-token-path.patch | 50 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 pkgs/os-specific/linux/cryptsetup/relative-token-path.patch diff --git a/pkgs/os-specific/linux/cryptsetup/default.nix b/pkgs/os-specific/linux/cryptsetup/default.nix index 62f3f0c4db14b..697791446aba8 100644 --- a/pkgs/os-specific/linux/cryptsetup/default.nix +++ b/pkgs/os-specific/linux/cryptsetup/default.nix @@ -13,6 +13,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-kYSm672c5+shEVLn90GmyC8tHMDiSoTsnFKTnu4PBUI="; }; + patches = [ + # Allow reading tokens from a relative path, see #167994 + ./relative-token-path.patch + ]; + postPatch = '' patchShebangs tests diff --git a/pkgs/os-specific/linux/cryptsetup/relative-token-path.patch b/pkgs/os-specific/linux/cryptsetup/relative-token-path.patch new file mode 100644 index 0000000000000..dffd0ba3bb520 --- /dev/null +++ b/pkgs/os-specific/linux/cryptsetup/relative-token-path.patch @@ -0,0 +1,50 @@ +From 4f95ab1f8110a8ab9d7b0e192731ce467f6e5c26 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Janne=20He=C3=9F?= +Date: Sun, 4 Sep 2022 11:15:02 -0600 +Subject: [PATCH] Allow loading token handlers from the default search path + +Since [1] landed in cryptsetup, token handlers (libcryptsetup-token-*.so) +are loaded from a fixed path defined at compile-time. This is +problematic with NixOS since it introduces a dependency cycle +between cryptsetup and systemd. + +This downstream patch [2] allows loading token plugins from the +default library search path. This approach is not accepted upstream [3] +due to security concerns, but the potential attack vectors require +root access and they are sufficiently addressed: + +* cryptsetup could be used as a setuid binary (not used in NixOS). + In this case, LD_LIBRARY_PATH is ignored because of secure-execution + mode. +* cryptsetup running as root could lead to a malicious token handler + being loaded through LD_LIBRARY_PATH. However, fixing the path + doesn't prevent the same malicious .so being loaded through LD_PRELOAD. + +[1] https://gitlab.com/cryptsetup/cryptsetup/-/commit/5b9e98f94178d3cd179d9f6e2a0a68c7d9eb6507 +[2] https://github.com/NixOS/nixpkgs/issues/167994#issuecomment-1094249369 +[3] https://gitlab.com/cryptsetup/cryptsetup/-/issues/733 +--- + lib/luks2/luks2_token.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/lib/luks2/luks2_token.c b/lib/luks2/luks2_token.c +index 26467253..6f8329f0 100644 +--- a/lib/luks2/luks2_token.c ++++ b/lib/luks2/luks2_token.c +@@ -151,12 +151,10 @@ crypt_token_load_external(struct crypt_device *cd, const char *name, struct cryp + + token = &ret->u.v2; + +- r = snprintf(buf, sizeof(buf), "%s/libcryptsetup-token-%s.so", crypt_token_external_path(), name); ++ r = snprintf(buf, sizeof(buf), "libcryptsetup-token-%s.so", name); + if (r < 0 || (size_t)r >= sizeof(buf)) + return -EINVAL; + +- assert(*buf == '/'); +- + log_dbg(cd, "Trying to load %s.", buf); + + h = dlopen(buf, RTLD_LAZY); +-- +2.37.2 + From 570824e10253f59c9a2332002b061415b2567627 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Fri, 23 Sep 2022 15:47:05 -0600 Subject: [PATCH 104/318] systemd: Wrap in LUKS2 tokens MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update pkgs/os-specific/linux/systemd/default.nix Co-authored-by: Janne Heß Co-authored-by: Ilan Joselevich Co-authored-by: Jörg Thalheim --- nixos/modules/system/boot/systemd/initrd.nix | 3 +++ pkgs/os-specific/linux/systemd/default.nix | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix index 03f94c426cb09..2dfa2926fe18a 100644 --- a/nixos/modules/system/boot/systemd/initrd.nix +++ b/nixos/modules/system/boot/systemd/initrd.nix @@ -403,6 +403,9 @@ in { # so NSS can look up usernames "${pkgs.glibc}/lib/libnss_files.so.2" + ] ++ optionals cfg.package.withCryptsetup [ + # the unwrapped systemd-cryptsetup executable + "${cfg.package}/lib/systemd/.systemd-cryptsetup-wrapped" ] ++ jobScripts; targets.initrd.aliases = ["default.target"]; diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 1cde12f202291..26a916ad8190e 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -7,6 +7,7 @@ , fetchpatch , fetchzip , buildPackages +, makeBinaryWrapper , ninja , meson , m4 @@ -332,6 +333,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ pkg-config + makeBinaryWrapper gperf ninja meson @@ -666,7 +668,14 @@ stdenv.mkDerivation { preFixup = lib.optionalString withEfi '' mv $out/lib/systemd/boot/efi $out/dont-strip-me ''; - postFixup = lib.optionalString withEfi '' + + # Wrap in the correct path for LUKS2 tokens. + postFixup = lib.optionalString withCryptsetup '' + for f in lib/systemd/systemd-cryptsetup bin/systemd-cryptenroll; do + # This needs to be in LD_LIBRARY_PATH because rpath on a binary is not propagated to libraries using dlopen, in this case `libcryptsetup.so` + wrapProgram $out/$f --prefix LD_LIBRARY_PATH : ${placeholder "out"}/lib/cryptsetup + done + '' + lib.optionalString withEfi '' mv $out/dont-strip-me $out/lib/systemd/boot/efi ''; From 19c34ac44b29f0115ba515c3e2ae724d0360b3f7 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Fri, 23 Sep 2022 15:47:05 -0600 Subject: [PATCH 105/318] systemd/initrd: Add files required by TPM2 and FIDO2 support to the initramfs --- nixos/modules/system/boot/systemd/initrd.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix index 2dfa2926fe18a..d5fa5864cf350 100644 --- a/nixos/modules/system/boot/systemd/initrd.nix +++ b/nixos/modules/system/boot/systemd/initrd.nix @@ -404,6 +404,14 @@ in { # so NSS can look up usernames "${pkgs.glibc}/lib/libnss_files.so.2" ] ++ optionals cfg.package.withCryptsetup [ + # tpm2 support + "${cfg.package}/lib/cryptsetup/libcryptsetup-token-systemd-tpm2.so" + pkgs.tpm2-tss + + # fido2 support + "${cfg.package}/lib/cryptsetup/libcryptsetup-token-systemd-fido2.so" + "${pkgs.libfido2}/lib/libfido2.so.1" + # the unwrapped systemd-cryptsetup executable "${cfg.package}/lib/systemd/.systemd-cryptsetup-wrapped" ] ++ jobScripts; From 9e9637ecb6f254f4e659ee5c291908ec3e977303 Mon Sep 17 00:00:00 2001 From: Jamie McClymont Date: Fri, 23 Sep 2022 15:47:05 -0600 Subject: [PATCH 106/318] nixos/tests/systemd-initrd-luks-tpm2: init --- nixos/tests/all-tests.nix | 1 + nixos/tests/systemd-initrd-luks-tpm2.nix | 72 ++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 nixos/tests/systemd-initrd-luks-tpm2.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 14267cd8afb28..021889d1e43da 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -597,6 +597,7 @@ in { systemd-initrd-btrfs-raid = handleTest ./systemd-initrd-btrfs-raid.nix {}; systemd-initrd-luks-keyfile = handleTest ./systemd-initrd-luks-keyfile.nix {}; systemd-initrd-luks-password = handleTest ./systemd-initrd-luks-password.nix {}; + systemd-initrd-luks-tpm2 = handleTest ./systemd-initrd-luks-tpm2.nix {}; systemd-initrd-modprobe = handleTest ./systemd-initrd-modprobe.nix {}; systemd-initrd-shutdown = handleTest ./systemd-shutdown.nix { systemdStage1 = true; }; systemd-initrd-simple = handleTest ./systemd-initrd-simple.nix {}; diff --git a/nixos/tests/systemd-initrd-luks-tpm2.nix b/nixos/tests/systemd-initrd-luks-tpm2.nix new file mode 100644 index 0000000000000..085088d2ee25e --- /dev/null +++ b/nixos/tests/systemd-initrd-luks-tpm2.nix @@ -0,0 +1,72 @@ +import ./make-test-python.nix ({ lib, pkgs, ... }: { + name = "systemd-initrd-luks-tpm2"; + + nodes.machine = { pkgs, ... }: { + # Use systemd-boot + virtualisation = { + emptyDiskImages = [ 512 ]; + useBootLoader = true; + useEFIBoot = true; + qemu.options = ["-chardev socket,id=chrtpm,path=/tmp/mytpm1/swtpm-sock -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0"]; + }; + boot.loader.systemd-boot.enable = true; + + boot.initrd.availableKernelModules = [ "tpm_tis" ]; + + environment.systemPackages = with pkgs; [ cryptsetup ]; + boot.initrd.systemd = { + enable = true; + }; + + specialisation.boot-luks.configuration = { + boot.initrd.luks.devices = lib.mkVMOverride { + cryptroot = { + device = "/dev/vdc"; + crypttabExtraOpts = [ "tpm2-device=auto" ]; + }; + }; + virtualisation.bootDevice = "/dev/mapper/cryptroot"; + }; + }; + + testScript = '' + import subprocess + import os + import time + + + class Tpm: + def __init__(self): + os.mkdir("/tmp/mytpm1") + self.start() + + def start(self): + self.proc = subprocess.Popen(["${pkgs.swtpm}/bin/swtpm", "socket", "--tpmstate", "dir=/tmp/mytpm1", "--ctrl", "type=unixio,path=/tmp/mytpm1/swtpm-sock", "--log", "level=20", "--tpm2"]) + + def wait_for_death_then_restart(self): + while self.proc.poll() is None: + print("waiting for tpm to die") + time.sleep(1) + assert self.proc.returncode == 0 + self.start() + + tpm = Tpm() + + + # Create encrypted volume + machine.wait_for_unit("multi-user.target") + machine.succeed("echo -n supersecret | cryptsetup luksFormat -q --iter-time=1 /dev/vdc -") + machine.succeed("PASSWORD=supersecret SYSTEMD_LOG_LEVEL=debug systemd-cryptenroll --tpm2-pcrs= --tpm2-device=auto /dev/vdc |& systemd-cat") + + # Boot from the encrypted disk + machine.succeed("bootctl set-default nixos-generation-1-specialisation-boot-luks.conf") + machine.succeed("sync") + machine.crash() + + tpm.wait_for_death_then_restart() + + # Boot and decrypt the disk + machine.wait_for_unit("multi-user.target") + assert "/dev/mapper/cryptroot on / type ext4" in machine.succeed("mount") + ''; +}) From 21bbef95481db371a60d3ff900385e44662b648d Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Fri, 23 Sep 2022 15:47:05 -0600 Subject: [PATCH 107/318] nixos/luksroot: Reword message on FIDO2 support with systemd stage 1 --- nixos/modules/system/boot/luksroot.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix index 38f8b6fd87c21..b0c841f4fe592 100644 --- a/nixos/modules/system/boot/luksroot.nix +++ b/nixos/modules/system/boot/luksroot.nix @@ -905,9 +905,11 @@ in { assertion = config.boot.initrd.systemd.enable -> !luks.gpgSupport; message = "systemd stage 1 does not support GPG smartcards yet."; } - # TODO { assertion = config.boot.initrd.systemd.enable -> !luks.fido2Support; - message = "systemd stage 1 does not support FIDO2 yet."; + message = '' + systemd stage 1 does not support configuring FIDO2 unlocking through `boot.initrd.luks.devices..fido2`. + Use systemd-cryptenroll(1) to configure FIDO2 support. + ''; } # TODO { assertion = config.boot.initrd.systemd.enable -> !luks.yubikeySupport; From b9b454820a1c587eb646732fc13c7ebd49edfc27 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Fri, 23 Sep 2022 15:47:05 -0600 Subject: [PATCH 108/318] systemd/initrd: Add TPM modules into initrd This improves the out-of-box experience of TPM2 unlocking at a small (50K) overhead. --- nixos/modules/system/boot/systemd/initrd.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix index d5fa5864cf350..31702499b0f14 100644 --- a/nixos/modules/system/boot/systemd/initrd.nix +++ b/nixos/modules/system/boot/systemd/initrd.nix @@ -332,7 +332,10 @@ in { config = mkIf (config.boot.initrd.enable && cfg.enable) { system.build = { inherit initialRamdisk; }; - boot.initrd.availableKernelModules = [ "autofs4" ]; # systemd needs this for some features + boot.initrd.availableKernelModules = [ + "autofs4" # systemd needs this for some features + "tpm-tis" "tpm-crb" # systemd-cryptenroll + ]; boot.initrd.systemd = { initrdBin = [pkgs.bash pkgs.coreutils cfg.package.kmod cfg.package] ++ config.system.fsPackages; From 78f929c5a6ac6320f5c99eadd805bac4d208c863 Mon Sep 17 00:00:00 2001 From: oxalica Date: Tue, 4 Oct 2022 01:10:03 +0800 Subject: [PATCH 109/318] nixos/tests/systemd-initrd-luks-fido2: init --- nixos/tests/all-tests.nix | 1 + nixos/tests/systemd-initrd-luks-fido2.nix | 45 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 nixos/tests/systemd-initrd-luks-fido2.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 021889d1e43da..29d82025feb07 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -595,6 +595,7 @@ in { systemd-cryptenroll = handleTest ./systemd-cryptenroll.nix {}; systemd-escaping = handleTest ./systemd-escaping.nix {}; systemd-initrd-btrfs-raid = handleTest ./systemd-initrd-btrfs-raid.nix {}; + systemd-initrd-luks-fido2 = handleTest ./systemd-initrd-luks-fido2.nix {}; systemd-initrd-luks-keyfile = handleTest ./systemd-initrd-luks-keyfile.nix {}; systemd-initrd-luks-password = handleTest ./systemd-initrd-luks-password.nix {}; systemd-initrd-luks-tpm2 = handleTest ./systemd-initrd-luks-tpm2.nix {}; diff --git a/nixos/tests/systemd-initrd-luks-fido2.nix b/nixos/tests/systemd-initrd-luks-fido2.nix new file mode 100644 index 0000000000000..133e552a3dc99 --- /dev/null +++ b/nixos/tests/systemd-initrd-luks-fido2.nix @@ -0,0 +1,45 @@ +import ./make-test-python.nix ({ lib, pkgs, ... }: { + name = "systemd-initrd-luks-fido2"; + + nodes.machine = { pkgs, config, ... }: { + # Use systemd-boot + virtualisation = { + emptyDiskImages = [ 512 ]; + useBootLoader = true; + useEFIBoot = true; + qemu.package = lib.mkForce (pkgs.qemu_test.override { canokeySupport = true; }); + qemu.options = [ "-device canokey,file=/tmp/canokey-file" ]; + }; + boot.loader.systemd-boot.enable = true; + + boot.initrd.systemd.enable = true; + + environment.systemPackages = with pkgs; [ cryptsetup ]; + + specialisation.boot-luks.configuration = { + boot.initrd.luks.devices = lib.mkVMOverride { + cryptroot = { + device = "/dev/vdc"; + crypttabExtraOpts = [ "fido2-device=auto" ]; + }; + }; + virtualisation.bootDevice = "/dev/mapper/cryptroot"; + }; + }; + + testScript = '' + # Create encrypted volume + machine.wait_for_unit("multi-user.target") + machine.succeed("echo -n supersecret | cryptsetup luksFormat -q --iter-time=1 /dev/vdc -") + machine.succeed("PASSWORD=supersecret SYSTEMD_LOG_LEVEL=debug systemd-cryptenroll --fido2-device=auto /dev/vdc |& systemd-cat") + + # Boot from the encrypted disk + machine.succeed("bootctl set-default nixos-generation-1-specialisation-boot-luks.conf") + machine.succeed("sync") + machine.crash() + + # Boot and decrypt the disk + machine.wait_for_unit("multi-user.target") + assert "/dev/mapper/cryptroot on / type ext4" in machine.succeed("mount") + ''; +}) From cf7be5db710cb6a9160e3a6724894e209a4e9eef Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Tue, 4 Oct 2022 07:48:28 +1000 Subject: [PATCH 110/318] git: 2.37.3 -> 2.38.0 https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.38.0.txt --- .../version-management/git-and-tools/git/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix index 9b2c755b1091a..441727ad5bccb 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git/default.nix @@ -28,7 +28,7 @@ assert sendEmailSupport -> perlSupport; assert svnSupport -> perlSupport; let - version = "2.37.3"; + version = "2.38.0"; svn = subversionClient.override { perlBindings = perlSupport; }; gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ]; in @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz"; - sha256 = "sha256-gUZB1/YWWc+8F4JdBGJJnKFAPjn/U9dqhRIFDmSD6Ho="; + sha256 = "sha256-kj6t4msYFN540GvajgqfXai3xLMEs/kFD/tGTwMQMgo="; }; outputs = [ "out" ] ++ lib.optional withManual "doc"; From 3ed0fafe3b6c2df23b1b7aad3678316fc617c2fa Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 17 Sep 2022 09:13:55 +0100 Subject: [PATCH 111/318] x264: pull upstream parallel build fix Without the change parallel builds occasionally fail as: $ make --shuffle ... gcc ... -c common/opencl.c -o common/opencl-8.o ... common/opencl.c:116:10: fatal error: common/oclobj.h: No such file or directory 116 | #include "common/oclobj.h" | ^~~~~~~~~~~~~~~~~ --- pkgs/development/libraries/x264/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/x264/default.nix b/pkgs/development/libraries/x264/default.nix index df248f6b4d433..1537900023905 100644 --- a/pkgs/development/libraries/x264/default.nix +++ b/pkgs/development/libraries/x264/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitLab, nasm +{ stdenv, lib, fetchFromGitLab, fetchpatch, nasm , enableShared ? !stdenv.hostPlatform.isStatic }: @@ -16,7 +16,15 @@ stdenv.mkDerivation rec { # Upstream ./configure greps for (-mcpu|-march|-mfpu) in CFLAGS, which in nix # is put in the cc wrapper anyway. - patches = [ ./disable-arm-neon-default.patch ]; + patches = [ + ./disable-arm-neon-default.patch + (fetchpatch { + # https://code.videolan.org/videolan/x264/-/merge_requests/114 + name = "fix-parallelism.patch"; + url = "https://code.videolan.org/videolan/x264/-/commit/e067ab0b530395f90b578f6d05ab0a225e2efdf9.patch"; + hash = "sha256-16h2IUCRjYlKI2RXYq8QyXukAdfoQxyBKsK/nI6vhRI="; + }) + ]; postPatch = '' patchShebangs . From 75ffef8f2e49dc61ec664f5474f1023964ef52d1 Mon Sep 17 00:00:00 2001 From: Yureka Date: Thu, 6 Oct 2022 13:43:43 +0200 Subject: [PATCH 112/318] pkgsMusl.texinfoInteractive: fix build (#193919) --- pkgs/development/tools/misc/texinfo/common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/texinfo/common.nix b/pkgs/development/tools/misc/texinfo/common.nix index df3b12ea5b688..036e992e97316 100644 --- a/pkgs/development/tools/misc/texinfo/common.nix +++ b/pkgs/development/tools/misc/texinfo/common.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation { && !stdenv.isDarwin && !stdenv.isSunOS; # flaky - checkFlagsArray = [ + checkFlags = lib.optionals (!stdenv.hostPlatform.isMusl) [ # Test is known to fail on various locales on texinfo-6.8: # https://lists.gnu.org/r/bug-texinfo/2021-07/msg00012.html "XFAIL_TESTS=test_scripts/layout_formatting_fr_icons.sh" From 82d5854fcc8f4bd527f7887b28483b40aae9114e Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Thu, 6 Oct 2022 16:40:39 +0200 Subject: [PATCH 113/318] bundler: 2.3.22 -> 2.3.23 --- pkgs/development/ruby-modules/bundler/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ruby-modules/bundler/default.nix b/pkgs/development/ruby-modules/bundler/default.nix index 4961173658ed0..13848a602dcfb 100644 --- a/pkgs/development/ruby-modules/bundler/default.nix +++ b/pkgs/development/ruby-modules/bundler/default.nix @@ -4,8 +4,8 @@ buildRubyGem rec { inherit ruby; name = "${gemName}-${version}"; gemName = "bundler"; - version = "2.3.22"; - source.sha256 = "sha256-vOfZB6poOsiYPULaGhUXD9aSxlBGeK2ghF70ouz0IJ4="; + version = "2.3.23"; + source.sha256 = "sha256-xYrUhtzNfN3X9r8GqGj9d1aeZkcPozFrk/2c9oVkKx8="; dontPatchShebangs = true; passthru.updateScript = writeScript "gem-update-script" '' From c5e2f3c06603bc968ad8cc19b6896d4ac6a99d55 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Sun, 25 Sep 2022 09:59:05 +0200 Subject: [PATCH 114/318] ruby: move towards ruby 3 Currently, `pkgs.ruby` is ruby 2.7.6, which is in 'security updates only' mode and scheduled to go EOL April 2023. Updating `pkgs.ruby` to be ruby 3.1 would be a rather large change, but using ruby 3 to bootstrap building ruby itself would be a nice first step in that direction. Tested with asciidoctor that this indeed now allows building a ruby application without getting ruby 2.7 in the build closure. Also fixes #192729 --- pkgs/development/interpreters/ruby/default.nix | 2 +- pkgs/development/ruby-modules/bundler-app/default.nix | 4 +++- pkgs/top-level/all-packages.nix | 8 +++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index 524734b5a5fac..dc7594da17d92 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -48,7 +48,7 @@ let , buildEnv, bundler, bundix , libiconv, libobjc, libunwind, Foundation , makeWrapper, buildRubyGem, defaultGemConfig - , baseRuby ? buildPackages.ruby.override { + , baseRuby ? buildPackages.ruby_3_1.override { useRailsExpress = false; docSupport = false; rubygemsSupport = false; diff --git a/pkgs/development/ruby-modules/bundler-app/default.nix b/pkgs/development/ruby-modules/bundler-app/default.nix index 826ce9e59379c..5bb9e47cf5a68 100644 --- a/pkgs/development/ruby-modules/bundler-app/default.nix +++ b/pkgs/development/ruby-modules/bundler-app/default.nix @@ -35,7 +35,9 @@ }@args: let - basicEnv = (callPackage ../bundled-common {}) args; + basicEnv = (callPackage ../bundled-common { + inherit ruby; + }) args; cmdArgs = removeAttrs args [ "pname" "postBuild" "gemConfig" "passthru" "gemset" "gemdir" ] // { inherit preferLocalBuild allowSubstitutes; # pass the defaults diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 194547c2e8069..15d201af88fe9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4855,7 +4855,13 @@ with pkgs; enableExtraPlugins = true; }; - asciidoctor = callPackage ../tools/typesetting/asciidoctor { }; + asciidoctor = callPackage ../tools/typesetting/asciidoctor { + bundlerApp = bundlerApp.override { + # asciidoc supports both ruby 2 and 3, + # but we don't want to be stuck on it: + ruby = ruby_3_1; + }; + }; asciidoctor-with-extensions = callPackage ../tools/typesetting/asciidoctor-with-extensions { }; From 013a2f421aed8f14f4ef02cfbaf862eefff91ee6 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Wed, 5 Oct 2022 06:09:37 +0200 Subject: [PATCH 115/318] kexec-tools: 2.0.23 -> 2.0.25 Signed-off-by: Felix Singer --- pkgs/os-specific/linux/kexec-tools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kexec-tools/default.nix b/pkgs/os-specific/linux/kexec-tools/default.nix index 6faa401eccc56..e10f3e4defb85 100644 --- a/pkgs/os-specific/linux/kexec-tools/default.nix +++ b/pkgs/os-specific/linux/kexec-tools/default.nix @@ -2,14 +2,14 @@ stdenv.mkDerivation rec { pname = "kexec-tools"; - version = "2.0.23"; + version = "2.0.25"; src = fetchurl { urls = [ "mirror://kernel/linux/utils/kernel/kexec/${pname}-${version}.tar.xz" "http://horms.net/projects/kexec/kexec-tools/${pname}-${version}.tar.xz" ]; - sha256 = "qmPNbH3ZWwbOumJAp/3GeSeJytp1plXmcUmHF1IkJBs="; + sha256 = "sha256-fOLl3vOOwE95/rEH0CJD3VhvvGhWnszwL0S606E+wH0="; }; patches = [ From b78bf087ed7e15d48c6484f8b270c86a2f52a6e8 Mon Sep 17 00:00:00 2001 From: Alain Zscheile Date: Thu, 8 Sep 2022 12:27:20 +0200 Subject: [PATCH 116/318] sord: unstable-2021-01-12 -> 0.16.14 --- pkgs/development/libraries/sord/default.nix | 37 +++++++++++++-------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/pkgs/development/libraries/sord/default.nix b/pkgs/development/libraries/sord/default.nix index dee53bd3b2a7c..efb8bf0b89529 100644 --- a/pkgs/development/libraries/sord/default.nix +++ b/pkgs/development/libraries/sord/default.nix @@ -1,31 +1,42 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, python3, serd, pcre, wafHook }: +{ lib +, stdenv +, doxygen +, fetchFromGitHub +, meson +, ninja +, pcre +, pkg-config +, python3 +, serd +}: stdenv.mkDerivation rec { pname = "sord"; - version = "unstable-2021-01-12"; + version = "0.16.14"; - # Commit picked in mitigation of #109729 src = fetchFromGitHub { owner = "drobilla"; repo = pname; - rev = "d2efdb2d026216449599350b55c2c85c0d3efb89"; - sha256 = "hHTwK+K6cj9MGO77a1IXiUZtEbXZ08cLGkYZ5eMOIVA="; - fetchSubmodules = true; + rev = "v${version}"; + hash = "sha256-S22Szpg6iXeana5t6EpbOtRstthgrJ4Z2cBrf7a9ZBk="; }; - preConfigure = '' - export PKGCONFIG="$PKG_CONFIG" - ''; - - nativeBuildInputs = [ pkg-config python3 wafHook ]; + nativeBuildInputs = [ + doxygen + meson + ninja + pkg-config + python3 + ]; buildInputs = [ pcre ]; propagatedBuildInputs = [ serd ]; - dontAddWafCrossFlags = true; + + doCheck = true; meta = with lib; { homepage = "http://drobilla.net/software/sord"; description = "A lightweight C library for storing RDF data in memory"; - license = licenses.mit; + license = with licenses; [ bsd0 isc ]; maintainers = [ maintainers.goibhniu ]; platforms = platforms.unix; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d5bf08f3f11b5..c427687616dae 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22004,7 +22004,7 @@ with pkgs; sope = callPackage ../development/libraries/sope { }; - sord = callPackage ../development/libraries/sord {}; + sord = callPackage ../development/libraries/sord { }; soundtouch = callPackage ../development/libraries/soundtouch {}; From dcf7a5ec3dac6a53ce1a27e0806bd93309b9d053 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 6 Oct 2022 00:51:05 -0400 Subject: [PATCH 117/318] netbsd: Adapt to BSD-common infra changes for FreeBSD See https://github.com/NixOS/nixpkgs/pull/82131 for the rest of the changes for FreeBSD. This is PRed separately because it is a macOS moderate rebuild so we target staging. The main change is that we CD to the path we're building *after* applying patches, so we can patch other parts of the tree (from `extraPaths`) as needed. Another change is that `netbsd.install` no longer depends on `fts`, which it evidently no longer needs. --- .../bsd/netbsd/compat-cxx-safe-header.patch | 4 +- .../netbsd/compat-dont-configure-twice.patch | 4 +- .../bsd/netbsd/compat-no-force-native.patch | 4 +- pkgs/os-specific/bsd/netbsd/default.nix | 39 ++++++++++--------- pkgs/os-specific/bsd/netbsd/getent.patch | 4 +- pkgs/os-specific/bsd/netbsd/locale.patch | 4 +- .../bsd/netbsd/no-dynamic-linker.patch | 4 +- .../bsd/netbsd/sys-headers-incsdir.patch | 4 +- pkgs/os-specific/bsd/setup-hook.sh | 7 +++- 9 files changed, 41 insertions(+), 33 deletions(-) diff --git a/pkgs/os-specific/bsd/netbsd/compat-cxx-safe-header.patch b/pkgs/os-specific/bsd/netbsd/compat-cxx-safe-header.patch index f67ca2e507915..2aaa90b76146b 100644 --- a/pkgs/os-specific/bsd/netbsd/compat-cxx-safe-header.patch +++ b/pkgs/os-specific/bsd/netbsd/compat-cxx-safe-header.patch @@ -1,6 +1,6 @@ diff -u -r1.35.2.1 nbtool_config.h.in ---- a/nbtool_config.h.in 22 Apr 2015 07:18:58 -0000 1.35.2.1 -+++ b/nbtool_config.h.in 31 May 2018 01:46:53 -0000 +--- a/tools/compat/nbtool_config.h.in 22 Apr 2015 07:18:58 -0000 1.35.2.1 ++++ b/tools/compat/nbtool_config.h.in 31 May 2018 01:46:53 -0000 @@ -680,5 +680,14 @@ /* Define if you have u_int8_t, but not uint8_t. */ #undef uint8_t diff --git a/pkgs/os-specific/bsd/netbsd/compat-dont-configure-twice.patch b/pkgs/os-specific/bsd/netbsd/compat-dont-configure-twice.patch index 1a69e73e255fc..2758e256a6168 100644 --- a/pkgs/os-specific/bsd/netbsd/compat-dont-configure-twice.patch +++ b/pkgs/os-specific/bsd/netbsd/compat-dont-configure-twice.patch @@ -6,8 +6,8 @@ Date: Wed Sep 1 15:38:56 2021 +0000 diff --git a/Makefile b/Makefile index b5adb8a5f2e9..1a914ef16739 100644 ---- a/Makefile -+++ b/Makefile +--- a/tools/compat/Makefile ++++ b/tools/compat/Makefile @@ -76,11 +76,6 @@ _CURDIR:= ${.CURDIR} SRCS:= ${SRCS:M*.c} diff --git a/pkgs/os-specific/bsd/netbsd/compat-no-force-native.patch b/pkgs/os-specific/bsd/netbsd/compat-no-force-native.patch index cd442d95f412a..117fb7e042982 100644 --- a/pkgs/os-specific/bsd/netbsd/compat-no-force-native.patch +++ b/pkgs/os-specific/bsd/netbsd/compat-no-force-native.patch @@ -8,8 +8,8 @@ Date: Wed Sep 1 15:38:56 2021 +0000 diff --git a/Makefile b/Makefile index 4bcf227f0e75..9ed1d6eea6ff 100644 ---- a/Makefile -+++ b/Makefile +--- a/tools/compat/Makefile ++++ b/tools/compat/Makefile @@ -1,6 +1,6 @@ # $NetBSD: Makefile,v 1.87 2019/05/08 02:25:50 thorpej Exp $ diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index ae93d42b67657..82e7dafdd3b41 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -3,7 +3,7 @@ , buildPackages, splicePackages, newScope , bsdSetupHook, makeSetupHook, fetchcvs, groff, mandoc, byacc, flex , zlib -, writeText, symlinkJoin +, writeScript, writeText, runtimeShell, symlinkJoin }: let @@ -121,12 +121,12 @@ in lib.makeScopeWithSplicing installPhase = "includesPhase"; dontBuild = true; } // attrs // { + # Files that use NetBSD-specific macros need to have nbtool_config.h + # included ahead of them on non-NetBSD platforms. postPatch = lib.optionalString (!stdenv'.hostPlatform.isNetBSD) '' - # Files that use NetBSD-specific macros need to have nbtool_config.h - # included ahead of them on non-NetBSD platforms. set +e grep -Zlr "^__RCSID - ^__BEGIN_DECLS" | xargs -0r grep -FLZ nbtool_config.h | + ^__BEGIN_DECLS" $BSD_PATH | xargs -0r grep -FLZ nbtool_config.h | xargs -0tr sed -i '0,/^#/s//#include \n\0/' set -e '' + attrs.postPatch or ""; @@ -146,7 +146,7 @@ in lib.makeScopeWithSplicing skipIncludesPhase = true; postPatch = '' - patchShebangs configure + patchShebangs $BSD_PATH/configure ${self.make.postPatch} ''; @@ -281,11 +281,12 @@ in lib.makeScopeWithSplicing # HACK: to ensure parent directories exist. This emulates GNU # install’s -D option. No alternative seems to exist in BSD install. - install = let binstall = writeText "binstall" '' - #!${stdenv.shell} - for last in $@; do true; done + install = let binstall = writeScript "binstall" '' + #!${runtimeShell} + set -eu + for last in "$@"; do true; done mkdir -p $(dirname $last) - xinstall "$@" + @out@/bin/xinstall "$@" ''; in mkDerivation { path = "usr.bin/xinstall"; version = "9.2"; @@ -297,13 +298,14 @@ in lib.makeScopeWithSplicing mandoc groff rsync ]; skipIncludesPhase = true; - buildInputs = with self; compatIfNeeded ++ [ fts ]; + buildInputs = with self; compatIfNeeded; installPhase = '' runHook preInstall install -D install.1 $out/share/man/man1/install.1 install -D xinstall $out/bin/xinstall install -D -m 0550 ${binstall} $out/bin/binstall + substituteInPlace $out/bin/binstall --subst-var out ln -s $out/bin/binstall $out/bin/install runHook postInstall @@ -391,6 +393,7 @@ in lib.makeScopeWithSplicing install mandoc groff rsync ]; }; + ## ## END BOOTSTRAPPING ## @@ -705,10 +708,10 @@ in lib.makeScopeWithSplicing SHLIBINSTALLDIR = "$(out)/lib"; makeFlags = defaultMakeFlags ++ [ "LIBDO.terminfo=${self.libterminfo}/lib" ]; postPatch = '' - sed -i '1i #undef bool_t' el.h - substituteInPlace config.h \ + sed -i '1i #undef bool_t' $BSD_PATH/el.h + substituteInPlace $BSD_PATH/config.h \ --replace "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" "" - substituteInPlace readline/Makefile --replace /usr/include "$out/include" + substituteInPlace $BSD_PATH/readline/Makefile --replace /usr/include "$out/include" ''; NIX_CFLAGS_COMPILE = [ "-D__noinline=" @@ -728,8 +731,8 @@ in lib.makeScopeWithSplicing buildInputs = with self; compatIfNeeded; SHLIBINSTALLDIR = "$(out)/lib"; postPatch = '' - substituteInPlace term.c --replace /usr/share $out/share - substituteInPlace setupterm.c \ + substituteInPlace $BSD_PATH/term.c --replace /usr/share $out/share + substituteInPlace $BSD_PATH/setupterm.c \ --replace '#include ' 'void use_env(bool);' ''; postBuild = '' @@ -757,10 +760,10 @@ in lib.makeScopeWithSplicing MKDOC = "no"; # missing vfontedpr makeFlags = defaultMakeFlags ++ [ "LIBDO.terminfo=${self.libterminfo}/lib" ]; postPatch = lib.optionalString (!stdenv.isDarwin) '' - substituteInPlace printw.c \ + substituteInPlace $BSD_PATH/printw.c \ --replace "funopen(win, NULL, __winwrite, NULL, NULL)" NULL \ --replace "__strong_alias(vwprintw, vw_printw)" 'extern int vwprintw(WINDOW*, const char*, va_list) __attribute__ ((alias ("vw_printw")));' - substituteInPlace scanw.c \ + substituteInPlace $BSD_PATH/scanw.c \ --replace "__strong_alias(vwscanw, vw_scanw)" 'extern int vwscanw(WINDOW*, const char*, va_list) __attribute__ ((alias ("vw_scanw")));' ''; }; @@ -985,7 +988,7 @@ in lib.makeScopeWithSplicing # man0 generates a man.pdf using ps2pdf, but doesn't install it later, # so we can avoid the dependency on ghostscript postPatch = '' - substituteInPlace man0/Makefile --replace "ps2pdf" "echo noop " + substituteInPlace $BSD_PATH/man0/Makefile --replace "ps2pdf" "echo noop " ''; makeFlags = defaultMakeFlags ++ [ "FILESDIR=$(out)/share" diff --git a/pkgs/os-specific/bsd/netbsd/getent.patch b/pkgs/os-specific/bsd/netbsd/getent.patch index e9e34d19a315b..18258b6486186 100644 --- a/pkgs/os-specific/bsd/netbsd/getent.patch +++ b/pkgs/os-specific/bsd/netbsd/getent.patch @@ -1,8 +1,8 @@ Author: Matthew Bauer Description: Remove unavailable getent databases Version: 7.1.2 ---- a/getent.c 2018-04-16 13:33:49.000000000 -0500 -+++ b/getent.c 2018-04-16 13:29:30.000000000 -0500 +--- a/usr.bin/getent/getent.c 2018-04-16 13:33:49.000000000 -0500 ++++ b/usr.bin/getent/getent.c 2018-04-16 13:29:30.000000000 -0500 @@ -42,7 +42,6 @@ #include #include diff --git a/pkgs/os-specific/bsd/netbsd/locale.patch b/pkgs/os-specific/bsd/netbsd/locale.patch index 1df9eb385625c..4b7f478552879 100644 --- a/pkgs/os-specific/bsd/netbsd/locale.patch +++ b/pkgs/os-specific/bsd/netbsd/locale.patch @@ -1,5 +1,5 @@ ---- a/locale.c 2018-06-11 14:39:06.449762000 -0400 -+++ b/locale.c 2018-06-11 14:42:28.461122899 -0400 +--- a/usr.bin/locale/locale.c 2018-06-11 14:39:06.449762000 -0400 ++++ b/usr.bin/locale/locale.c 2018-06-11 14:42:28.461122899 -0400 @@ -56,14 +56,8 @@ #include #include diff --git a/pkgs/os-specific/bsd/netbsd/no-dynamic-linker.patch b/pkgs/os-specific/bsd/netbsd/no-dynamic-linker.patch index 5a2b9092a5c56..b3e9f3c88a13c 100644 --- a/pkgs/os-specific/bsd/netbsd/no-dynamic-linker.patch +++ b/pkgs/os-specific/bsd/netbsd/no-dynamic-linker.patch @@ -4,8 +4,8 @@ rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/i386/stand/efiboot/Makefile.efiboot,v: wa retrieving revision 1.16 retrieving revision 1.17 diff -u -p -r1.16 -r1.17 ---- sys/arch/i386/stand/efiboot/Makefile.efiboot 2019/09/13 02:19:45 1.16 -+++ sys/arch/i386/stand/efiboot/Makefile.efiboot 2020/04/04 15:30:46 1.17 +--- a/sys/arch/i386/stand/efiboot/Makefile.efiboot 2019/09/13 02:19:45 1.16 ++++ b/sys/arch/i386/stand/efiboot/Makefile.efiboot 2020/04/04 15:30:46 1.17 @@ -41,6 +41,7 @@ BINMODE=444 .PATH: ${.CURDIR}/../../libsa diff --git a/pkgs/os-specific/bsd/netbsd/sys-headers-incsdir.patch b/pkgs/os-specific/bsd/netbsd/sys-headers-incsdir.patch index ed85f8ea5b0cf..5cfb2a54c8db2 100644 --- a/pkgs/os-specific/bsd/netbsd/sys-headers-incsdir.patch +++ b/pkgs/os-specific/bsd/netbsd/sys-headers-incsdir.patch @@ -1,7 +1,7 @@ diff --git a/Makefile b/Makefile index 3f1e18dc659d..163362b82f94 100644 ---- a/Makefile -+++ b/Makefile +--- a/sys/Makefile ++++ b/sys/Makefile @@ -2,6 +2,8 @@ .include diff --git a/pkgs/os-specific/bsd/setup-hook.sh b/pkgs/os-specific/bsd/setup-hook.sh index 4bdfde68b62e7..7dd7de48ac463 100644 --- a/pkgs/os-specific/bsd/setup-hook.sh +++ b/pkgs/os-specific/bsd/setup-hook.sh @@ -48,6 +48,7 @@ addMakeFlags() { makeFlags="BINDIR=${!outputBin}/bin $makeFlags" makeFlags="LIBDIR=${!outputLib}/lib $makeFlags" makeFlags="SHLIBDIR=${!outputLib}/lib $makeFlags" + makeFlags="SHAREDIR=${!outputLib}/share $makeFlags" makeFlags="MANDIR=${!outputMan}/share/man $makeFlags" makeFlags="INFODIR=${!outputInfo}/share/info $makeFlags" makeFlags="DOCDIR=${!outputDoc}/share/doc $makeFlags" @@ -61,10 +62,13 @@ setBSDSourceDir() { sourceRoot=$PWD/$sourceRoot export BSDSRCDIR=$sourceRoot export _SRC_TOP_=$BSDSRCDIR - cd $sourceRoot +} + +cdBSDPath() { if [ -d "$BSD_PATH" ] then sourceRoot=$sourceRoot/$BSD_PATH + cd $BSD_PATH fi } @@ -104,6 +108,7 @@ moveUsrDir() { } postUnpackHooks+=(setBSDSourceDir) +postPatchHooks+=(cdBSDPath) preConfigureHooks+=(addMakeFlags) preInstallHooks+=(includesPhase) fixupOutputHooks+=(moveUsrDir) From e3137f73fd85d6b63a04b4e2d94f48d2f68113f3 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 6 Oct 2022 12:48:19 -0400 Subject: [PATCH 118/318] netbsd.install: Use `writeShellScript` --- pkgs/os-specific/bsd/netbsd/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index 82e7dafdd3b41..8e120cd19a84f 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -3,7 +3,7 @@ , buildPackages, splicePackages, newScope , bsdSetupHook, makeSetupHook, fetchcvs, groff, mandoc, byacc, flex , zlib -, writeScript, writeText, runtimeShell, symlinkJoin +, writeShellScript, writeText, runtimeShell, symlinkJoin }: let @@ -281,8 +281,7 @@ in lib.makeScopeWithSplicing # HACK: to ensure parent directories exist. This emulates GNU # install’s -D option. No alternative seems to exist in BSD install. - install = let binstall = writeScript "binstall" '' - #!${runtimeShell} + install = let binstall = writeShellScript "binstall" '' set -eu for last in "$@"; do true; done mkdir -p $(dirname $last) From 044163d6ef477ed41ceca7b294814f9a36d8bee7 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 6 Oct 2022 14:44:14 -0400 Subject: [PATCH 119/318] bsd: `BSD_PATH` rename to `COMPONENT_PATH` @alyssais and I agreed this is clearer. --- pkgs/os-specific/bsd/netbsd/default.nix | 22 +++++++++++----------- pkgs/os-specific/bsd/setup-hook.sh | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index 8e120cd19a84f..c90de5067dc3f 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -94,7 +94,7 @@ in lib.makeScopeWithSplicing }.${stdenv'.hostPlatform.parsed.cpu.name} or stdenv'.hostPlatform.parsed.cpu.name; - BSD_PATH = attrs.path; + COMPONENT_PATH = attrs.path; makeFlags = defaultMakeFlags; @@ -126,7 +126,7 @@ in lib.makeScopeWithSplicing postPatch = lib.optionalString (!stdenv'.hostPlatform.isNetBSD) '' set +e grep -Zlr "^__RCSID - ^__BEGIN_DECLS" $BSD_PATH | xargs -0r grep -FLZ nbtool_config.h | + ^__BEGIN_DECLS" $COMPONENT_PATH | xargs -0r grep -FLZ nbtool_config.h | xargs -0tr sed -i '0,/^#/s//#include \n\0/' set -e '' + attrs.postPatch or ""; @@ -146,7 +146,7 @@ in lib.makeScopeWithSplicing skipIncludesPhase = true; postPatch = '' - patchShebangs $BSD_PATH/configure + patchShebangs $COMPONENT_PATH/configure ${self.make.postPatch} ''; @@ -707,10 +707,10 @@ in lib.makeScopeWithSplicing SHLIBINSTALLDIR = "$(out)/lib"; makeFlags = defaultMakeFlags ++ [ "LIBDO.terminfo=${self.libterminfo}/lib" ]; postPatch = '' - sed -i '1i #undef bool_t' $BSD_PATH/el.h - substituteInPlace $BSD_PATH/config.h \ + sed -i '1i #undef bool_t' $COMPONENT_PATH/el.h + substituteInPlace $COMPONENT_PATH/config.h \ --replace "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" "" - substituteInPlace $BSD_PATH/readline/Makefile --replace /usr/include "$out/include" + substituteInPlace $COMPONENT_PATH/readline/Makefile --replace /usr/include "$out/include" ''; NIX_CFLAGS_COMPILE = [ "-D__noinline=" @@ -730,8 +730,8 @@ in lib.makeScopeWithSplicing buildInputs = with self; compatIfNeeded; SHLIBINSTALLDIR = "$(out)/lib"; postPatch = '' - substituteInPlace $BSD_PATH/term.c --replace /usr/share $out/share - substituteInPlace $BSD_PATH/setupterm.c \ + substituteInPlace $COMPONENT_PATH/term.c --replace /usr/share $out/share + substituteInPlace $COMPONENT_PATH/setupterm.c \ --replace '#include ' 'void use_env(bool);' ''; postBuild = '' @@ -759,10 +759,10 @@ in lib.makeScopeWithSplicing MKDOC = "no"; # missing vfontedpr makeFlags = defaultMakeFlags ++ [ "LIBDO.terminfo=${self.libterminfo}/lib" ]; postPatch = lib.optionalString (!stdenv.isDarwin) '' - substituteInPlace $BSD_PATH/printw.c \ + substituteInPlace $COMPONENT_PATH/printw.c \ --replace "funopen(win, NULL, __winwrite, NULL, NULL)" NULL \ --replace "__strong_alias(vwprintw, vw_printw)" 'extern int vwprintw(WINDOW*, const char*, va_list) __attribute__ ((alias ("vw_printw")));' - substituteInPlace $BSD_PATH/scanw.c \ + substituteInPlace $COMPONENT_PATH/scanw.c \ --replace "__strong_alias(vwscanw, vw_scanw)" 'extern int vwscanw(WINDOW*, const char*, va_list) __attribute__ ((alias ("vw_scanw")));' ''; }; @@ -987,7 +987,7 @@ in lib.makeScopeWithSplicing # man0 generates a man.pdf using ps2pdf, but doesn't install it later, # so we can avoid the dependency on ghostscript postPatch = '' - substituteInPlace $BSD_PATH/man0/Makefile --replace "ps2pdf" "echo noop " + substituteInPlace $COMPONENT_PATH/man0/Makefile --replace "ps2pdf" "echo noop " ''; makeFlags = defaultMakeFlags ++ [ "FILESDIR=$(out)/share" diff --git a/pkgs/os-specific/bsd/setup-hook.sh b/pkgs/os-specific/bsd/setup-hook.sh index 7dd7de48ac463..e0afefcd73f71 100644 --- a/pkgs/os-specific/bsd/setup-hook.sh +++ b/pkgs/os-specific/bsd/setup-hook.sh @@ -66,9 +66,9 @@ setBSDSourceDir() { } cdBSDPath() { - if [ -d "$BSD_PATH" ] - then sourceRoot=$sourceRoot/$BSD_PATH - cd $BSD_PATH + if [ -d "$COMPONENT_PATH" ] + then sourceRoot=$sourceRoot/$COMPONENT_PATH + cd $COMPONENT_PATH fi } From 167fc5aa3e3a64a09f085805ef29381f6f292c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6gler?= Date: Thu, 6 Oct 2022 22:14:45 +0200 Subject: [PATCH 120/318] libXft: 2.3.4 -> 2.3.6 --- pkgs/servers/x11/xorg/default.nix | 6 +++--- pkgs/servers/x11/xorg/overrides.nix | 17 ----------------- pkgs/servers/x11/xorg/tarballs.list | 2 +- 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 77d68e1d9aab7..d751c304739ed 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -1082,11 +1082,11 @@ lib.makeScope newScope (self: with self; { # THIS IS A GENERATED FILE. DO NOT EDIT! libXft = callPackage ({ stdenv, pkg-config, fetchurl, fontconfig, freetype, libX11, xorgproto, libXrender }: stdenv.mkDerivation { pname = "libXft"; - version = "2.3.4"; + version = "2.3.6"; builder = ./builder.sh; src = fetchurl { - url = "mirror://xorg/individual/lib/libXft-2.3.4.tar.bz2"; - sha256 = "1pdbr6gzfvixc791pjf42i9gg8wvfq6cpq6sdca04h4i42mxmpjp"; + url = "mirror://xorg/individual/lib/libXft-2.3.6.tar.xz"; + sha256 = "08ihq0in7iy5bwrx71nhnlkj7k1ic34brjcqs2wbnf69kwqyg9k0"; }; hardeningDisable = [ "bindnow" "relro" ]; strictDeps = true; diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 75a17a9ef3282..26ab03280e71a 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -203,23 +203,6 @@ self: super: configureFlags = attrs.configureFlags or [] ++ malloc0ReturnsNullCrossFlag; - patches = [ - # The following three patches add color emoji rendering support. - # https://gitlab.freedesktop.org/xorg/lib/libxft/merge_requests/1 - (fetchpatch { - url = "https://gitlab.freedesktop.org/xorg/lib/libxft/commit/723092ece088559f1af299236305911f4ee4d450.patch"; - sha256 = "1y5s6x5b7n2rqxapdx65zlcz35s7i7075qxkfnj859hx7k5ybx53"; - }) - (fetchpatch { - url = "https://gitlab.freedesktop.org/xorg/lib/libxft/commit/e0fc4ce7e87ab9c4b47e5c8e693f070dfd0d2f7b.patch"; - sha256 = "1x7cbhdrprrmngyy3l3b45bz6717dzp881687h5hxa4g2bg5c764"; - }) - (fetchpatch { - url = "https://gitlab.freedesktop.org/xorg/lib/libxft/commit/d385aa3e5320d18918413df0e8aef3a713a47e0b.patch"; - sha256 = "1acnks2g88hari2708x93ywa9m2f4lm60yhn9va45151ma2qb5n0"; - }) - ]; - # the include files need ft2build.h, and Requires.private isn't enough for us postInstall = '' sed "/^Requires:/s/$/, freetype2/" -i "$dev/lib/pkgconfig/xft.pc" diff --git a/pkgs/servers/x11/xorg/tarballs.list b/pkgs/servers/x11/xorg/tarballs.list index 302d56a066367..3a3432be8d1bf 100644 --- a/pkgs/servers/x11/xorg/tarballs.list +++ b/pkgs/servers/x11/xorg/tarballs.list @@ -188,7 +188,7 @@ mirror://xorg/individual/lib/libXext-1.3.4.tar.bz2 mirror://xorg/individual/lib/libXfixes-6.0.0.tar.bz2 mirror://xorg/individual/lib/libXfont-1.5.4.tar.bz2 mirror://xorg/individual/lib/libXfont2-2.0.5.tar.bz2 -mirror://xorg/individual/lib/libXft-2.3.4.tar.bz2 +mirror://xorg/individual/lib/libXft-2.3.6.tar.xz mirror://xorg/individual/lib/libXi-1.8.tar.bz2 mirror://xorg/individual/lib/libXinerama-1.1.4.tar.bz2 mirror://xorg/individual/lib/libxkbfile-1.1.0.tar.bz2 From d37e1ef86d98783bf5a385f4006eb9878f3e52d3 Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Thu, 6 Oct 2022 21:10:46 -0400 Subject: [PATCH 121/318] p11-kit: add darwin tls ca store path --- pkgs/development/libraries/p11-kit/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/p11-kit/default.nix b/pkgs/development/libraries/p11-kit/default.nix index fee4a2e8259fe..1f2646a03638d 100644 --- a/pkgs/development/libraries/p11-kit/default.nix +++ b/pkgs/development/libraries/p11-kit/default.nix @@ -63,6 +63,7 @@ stdenv.mkDerivation rec { "/etc/ssl/certs/ca-certificates.crt" # NixOS + Debian/Ubuntu/Arch/Gentoo... "/etc/pki/tls/certs/ca-bundle.crt" # Fedora/CentOS "/var/lib/ca-certificates/ca-bundle.pem" # openSUSE + "/etc/ssl/cert.pem" # Darwin/macOS ]}" ]; From 22a90ce5027161ca76075aafeb3896e9d5e0161e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 7 Oct 2022 07:28:07 +0000 Subject: [PATCH 122/318] bpftools: 5.19.8 -> 5.19.12 --- pkgs/os-specific/linux/bpftools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/bpftools/default.nix b/pkgs/os-specific/linux/bpftools/default.nix index 640ab5f76a96e..ec109753c208e 100644 --- a/pkgs/os-specific/linux/bpftools/default.nix +++ b/pkgs/os-specific/linux/bpftools/default.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation rec { pname = "bpftools"; - version = "5.19.8"; + version = "5.19.12"; src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "1kl7fifsa6vsm34xg3kd2svhx18n771hfj67nhwnlalmb9whhqv1"; + sha256 = "sha256-xDalSMcxLOb8WjRyy+rYle749ShB++fHH9jki9/isLo="; }; nativeBuildInputs = [ python3 bison flex ]; From 9069a064f8a8ae0896cda6343464a076599dbcb5 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 7 Oct 2022 16:31:39 +0300 Subject: [PATCH 123/318] libxml2: enable strictDeps and enable pythonSupport when cross --- pkgs/development/libraries/libxml2/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index 474afc4ba6ca2..3fe272591e109 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -12,7 +12,7 @@ , ncurses , findXMLCatalogs , libiconv -, pythonSupport ? enableShared && stdenv.buildPlatform == stdenv.hostPlatform +, pythonSupport ? enableShared , icuSupport ? false , icu , enableShared ? stdenv.hostPlatform.libc != "msvcrt" && !stdenv.hostPlatform.isStatic @@ -60,6 +60,8 @@ stdenv.mkDerivation rec { }) ]; + strictDeps = true; + nativeBuildInputs = [ pkg-config autoreconfHook @@ -94,7 +96,8 @@ stdenv.mkDerivation rec { (lib.enableFeature enableStatic "static") (lib.enableFeature enableShared "shared") (lib.withFeature icuSupport "icu") - (lib.withFeatureAs pythonSupport "python" python) + (lib.withFeature pythonSupport "python") + (lib.optionalString pythonSupport "PYTHON=${python.pythonForBuild.interpreter}") ]; installFlags = lib.optionals pythonSupport [ From 8e43dec8bae3ab15f6214a9b6261a925ee1880e8 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 7 Oct 2022 16:52:01 +0300 Subject: [PATCH 124/318] libxslt: enable strictDeps and enable pythonSupport when cross --- pkgs/development/libraries/libxslt/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix index 29c6938911622..fda00f6766648 100644 --- a/pkgs/development/libraries/libxslt/default.nix +++ b/pkgs/development/libraries/libxslt/default.nix @@ -10,7 +10,7 @@ , ncurses , libgcrypt , cryptoSupport ? false -, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform +, pythonSupport ? true , gnome }: @@ -26,6 +26,8 @@ stdenv.mkDerivation rec { sha256 = "EoSPCkQI9ltTDTlizZ/2cLaueWGRz+/zdSK1dy3o3I4="; }; + strictDeps = true; + nativeBuildInputs = [ pkg-config autoreconfHook @@ -51,7 +53,8 @@ stdenv.mkDerivation rec { "--without-debug" "--without-mem-debug" "--without-debugger" - (lib.withFeatureAs pythonSupport "python" python) + (lib.withFeature pythonSupport "python") + (lib.optionalString pythonSupport "PYTHON=${python.pythonForBuild.interpreter}") ] ++ lib.optionals (!cryptoSupport) [ "--without-crypto" ]; From 98715e1b1acda26f0cd86dc2b74abd1672af8644 Mon Sep 17 00:00:00 2001 From: Guillaume Bouchard Date: Tue, 4 Oct 2022 12:09:35 +0200 Subject: [PATCH 125/318] lib.closePropagation: Remove the quadratic behavior in lib.closePropagation The code of `lib.closePropagation` was internally using a recursion on the dependencies and returns all the derivation directly or indirectly referenced by buildInputs. `lib.closeProgation` is implemented in pure nix and uses an unique function for list which is quadratic and does "true" equality, which needs deep set comparison. Instead, we use the `builtins.genericClosure` which is implemented as a builtin and uses a more efficient sorting feature. Note that `genericClosure` needs a `key` to discriminate the values, we used the `outPath` which is unique and orderable. On benchmarks, it performs up to 15x time faster on a benchmark related to haskellPackages.ghcWithPackages. --- lib/deprecated.nix | 31 ++++++++++++++++++++- pkgs/development/haskell-modules/hoogle.nix | 1 - 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/lib/deprecated.nix b/lib/deprecated.nix index ddce69f160ccd..ed14e04bbd68d 100644 --- a/lib/deprecated.nix +++ b/lib/deprecated.nix @@ -157,7 +157,36 @@ rec { } ); - closePropagation = list: (uniqList {inputList = (innerClosePropagation [] list);}); + closePropagationSlow = list: (uniqList {inputList = (innerClosePropagation [] list);}); + + # This is an optimisation of lib.closePropagation which avoids the O(n^2) behavior + # Using a list of derivations, it generates the full closure of the propagatedXXXBuildInputs + # The ordering / sorting / comparison is done based on the `outPath` + # attribute of each derivation. + # On some benchmarks, it performs up to 15 times faster than lib.closePropagation. + # See https://github.com/NixOS/nixpkgs/pull/194391 for details. + closePropagationFast = list: + builtins.map (x: x.val) (builtins.genericClosure { + startSet = builtins.map (x: { + key = x.outPath; + val = x; + }) (builtins.filter (x: x != null) list); + operator = item: + if !builtins.isAttrs item.val then + [ ] + else + builtins.concatMap (x: + if x != null then [{ + key = x.outPath; + val = x; + }] else + [ ]) ((item.val.propagatedBuildInputs or [ ]) + ++ (item.val.propagatedNativeBuildInputs or [ ])); + }); + + closePropagation = if builtins ? genericClosure + then closePropagationFast + else closePropagationSlow; # calls a function (f attr value ) for each record item. returns a list mapAttrsFlatten = f: r: map (attr: f attr r.${attr}) (attrNames r); diff --git a/pkgs/development/haskell-modules/hoogle.nix b/pkgs/development/haskell-modules/hoogle.nix index 4c8bf8c2d2824..b5be7edb6e5a9 100644 --- a/pkgs/development/haskell-modules/hoogle.nix +++ b/pkgs/development/haskell-modules/hoogle.nix @@ -36,7 +36,6 @@ let This index includes documentation for many Haskell modules. ''; - # TODO: closePropagation is deprecated; replace docPackages = lib.closePropagation # we grab the doc outputs (map (lib.getOutput "doc") packages); From a2cd604de9b9022cff2eda33c90c594140f8e932 Mon Sep 17 00:00:00 2001 From: Guillaume Bouchard Date: Wed, 5 Oct 2022 16:03:10 +0200 Subject: [PATCH 126/318] nixos/doc: add release-notes entries for lib.closePropagation changes --- .../from_md/release-notes/rl-2211.section.xml | 15 +++++++++++++++ nixos/doc/manual/release-notes/rl-2211.section.md | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml index 78bd6c6a22d84..7355c1d4b7b2e 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml @@ -130,6 +130,15 @@ certificates by default. + + + Improved performances of + lib.closePropagation which was previously + quadratic. This is used in e.g. + ghcWithPackages. Please see backward + incompatibilities notes below. + + Cinnamon has been updated to 5.4. While at it, the cinnamon @@ -546,6 +555,12 @@ notes. + + + lib.closePropagation now needs that all + gathered sets have an outPath attribute. + + lemmy module option diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md index 37b0db8a8ce10..94a04434b30f6 100644 --- a/nixos/doc/manual/release-notes/rl-2211.section.md +++ b/nixos/doc/manual/release-notes/rl-2211.section.md @@ -52,6 +52,8 @@ In addition to numerous new and upgraded packages, this release has the followin - Perl has been updated to 5.36, and its core module `HTTP::Tiny` was patched to verify SSL/TLS certificates by default. +- Improved performances of `lib.closePropagation` which was previously quadratic. This is used in e.g. `ghcWithPackages`. Please see backward incompatibilities notes below. + - Cinnamon has been updated to 5.4. While at it, the cinnamon module now defaults to blueman as bluetooth manager and slick-greeter as lightdm greeter to match upstream. @@ -182,6 +184,8 @@ Available as [services.patroni](options.html#opt-services.patroni.enable). - `teleport` has been upgraded to major version 10. Please see upstream [upgrade instructions](https://goteleport.com/docs/ver/10.0/management/operations/upgrading/) and [release notes](https://goteleport.com/docs/ver/10.0/changelog/#1000). +- `lib.closePropagation` now needs that all gathered sets have an `outPath` attribute. + - lemmy module option `services.lemmy.settings.database.createLocally` moved to `services.lemmy.database.createLocally`. From 09226fffcf076f976a9915ec7b9db12f5b2594a3 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 7 Oct 2022 19:26:22 +0300 Subject: [PATCH 127/318] nixosOptionsDoc: buildInputs -> nativeBuildInputs to make strictDepsByDefault work --- nixos/lib/make-options-doc/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/lib/make-options-doc/default.nix b/nixos/lib/make-options-doc/default.nix index 6a1bb868c20de..9a75956b0d695 100644 --- a/nixos/lib/make-options-doc/default.nix +++ b/nixos/lib/make-options-doc/default.nix @@ -122,7 +122,7 @@ in rec { optionsJSON = pkgs.runCommand "options.json" { meta.description = "List of NixOS options in JSON format"; - buildInputs = [ + nativeBuildInputs = [ pkgs.brotli (let self = (pkgs.python3Minimal.override { From e903932306865715f0863fd9d5d975e8c9b0cae3 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 7 Oct 2022 20:30:17 +0000 Subject: [PATCH 128/318] libical: 3.0.14 -> 3.0.15 --- pkgs/development/libraries/libical/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libical/default.nix b/pkgs/development/libraries/libical/default.nix index 3fef461874c96..2a3f8f65b7d69 100644 --- a/pkgs/development/libraries/libical/default.nix +++ b/pkgs/development/libraries/libical/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { pname = "libical"; - version = "3.0.14"; + version = "3.0.15"; outputs = [ "out" "dev" ]; # "devdoc" ]; @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { owner = "libical"; repo = "libical"; rev = "v${version}"; - sha256 = "sha256-gZ6IBjG5pNKJ+hWcTzXMP7yxL4he4LTklZGoC9vXra8="; + sha256 = "sha256-7M5GBteFKmKCB6556XXV4s6iIC/+3c3Ck17s/QX3Jus="; }; strictDeps = true; From e96ef86e70060e844c2e6b4b7c60d425099511ac Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Fri, 7 Oct 2022 20:31:00 +0000 Subject: [PATCH 129/318] libical: unbreak on darwin --- pkgs/development/libraries/libical/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/libraries/libical/default.nix b/pkgs/development/libraries/libical/default.nix index 2a3f8f65b7d69..4dfb28108743d 100644 --- a/pkgs/development/libraries/libical/default.nix +++ b/pkgs/development/libraries/libical/default.nix @@ -98,7 +98,6 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; homepage = "https://github.com/libical/libical"; description = "An Open Source implementation of the iCalendar protocols"; license = licenses.mpl20; From 49b4e3ad51a59e80f32fcef314ba9ea54b2d065b Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Sat, 1 Oct 2022 06:16:08 +0000 Subject: [PATCH 130/318] luajit_2_0: 2.0.5-2022-03-13 -> 2.0.5-2022-09-13 --- pkgs/development/interpreters/luajit/2.0.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/luajit/2.0.nix b/pkgs/development/interpreters/luajit/2.0.nix index fe7843caeb0f7..3df2ac457c07a 100644 --- a/pkgs/development/interpreters/luajit/2.0.nix +++ b/pkgs/development/interpreters/luajit/2.0.nix @@ -2,10 +2,10 @@ callPackage ./default.nix { sourceVersion = { major = "2"; minor = "0"; patch = "5"; }; inherit self passthruFun; - version = "2.0.5-2022-03-13"; - rev = "93a65d3cc263aef2d2feb3d7ff2206aca3bee17e"; + version = "2.0.5-2022-09-13"; + rev = "46e62cd963a426e83a60f691dcbbeb742c7b3ba2"; isStable = true; - hash = "sha256-Gp7OdfxBGkW59zxWUml2ugPABLUv2SezMiDblA/FZ7g="; + hash = "sha256-/XR9+6NjXs2TrUVKJNkH2h970BkDNFqMDJTWcy/bswU="; extraMeta = { # this isn't precise but it at least stops the useless Hydra build platforms = with lib; filter (p: !hasPrefix "aarch64-" p) (platforms.linux ++ platforms.darwin); From ac56a47df455f58224f58383607185bbe3523c3b Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Sat, 1 Oct 2022 06:16:55 +0000 Subject: [PATCH 131/318] luajit_2_1: 2.1.0-2022-04-05 -> 2.1.0-2022-10-04 --- pkgs/development/interpreters/luajit/2.1.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/luajit/2.1.nix b/pkgs/development/interpreters/luajit/2.1.nix index d5c539331e003..d2233f15819fd 100644 --- a/pkgs/development/interpreters/luajit/2.1.nix +++ b/pkgs/development/interpreters/luajit/2.1.nix @@ -2,8 +2,8 @@ callPackage ./default.nix { sourceVersion = { major = "2"; minor = "1"; patch = "0"; }; inherit self passthruFun; - version = "2.1.0-2022-04-05"; - rev = "5e3c45c43bb0e0f1f2917d432e9d2dba12c42a6e"; + version = "2.1.0-2022-10-04"; + rev = "6c4826f12c4d33b8b978004bc681eb1eef2be977"; isStable = false; - hash = "sha256-Q+34hJDgyCqmtThHbxR16Nn7zhq4Ql142No2rO57HL0="; + hash = "sha256-GMgoSVHrfIuLdk8mW9XgdemNFsAkkQR4wiGGjaAXAKg="; } From cfe59eab367f69fe9638ac42f118d99023a2a708 Mon Sep 17 00:00:00 2001 From: Rahul Butani Date: Fri, 7 Oct 2022 16:43:32 -0500 Subject: [PATCH 132/318] =?UTF-8?q?sigtool:=200.1.2=20=E2=86=92=20=200.1.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit adds `--sign` as an alias for `-s`: https://github.com/thefloweringash/sigtool/releases/tag/v0.1.3 --- pkgs/os-specific/darwin/sigtool/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/darwin/sigtool/default.nix b/pkgs/os-specific/darwin/sigtool/default.nix index 4c573af95be13..b9c385ebd31c0 100644 --- a/pkgs/os-specific/darwin/sigtool/default.nix +++ b/pkgs/os-specific/darwin/sigtool/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "sigtool"; - version = "0.1.2"; + version = "0.1.3"; src = fetchFromGitHub { owner = "thefloweringash"; repo = "sigtool"; rev = "v${version}"; - sha256 = "sha256-v4udqW37vwcqBdqfvfwHnoyXpuLFt188ekVCPCPsTPM"; + sha256 = "sha256-K3VSFaqcZEomF7kROJz+AwxdW1MmxxEFDaRnWnzcw54="; }; nativeBuildInputs = [ pkg-config ]; From 844cc21d55c8b8850db70cf3c7b0347023346b9c Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Sun, 9 Oct 2022 10:45:58 +1000 Subject: [PATCH 133/318] go, buildGoModule, buildGoPackage: default to 1.19 --- pkgs/top-level/all-packages.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 547ca93ef8df3..792e431c33909 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22781,9 +22781,9 @@ with pkgs; ### DEVELOPMENT / GO # the unversioned attributes should always point to the same go version - go = go_1_18; - buildGoModule = buildGo118Module; - buildGoPackage = buildGo118Package; + go = go_1_19; + buildGoModule = buildGo119Module; + buildGoPackage = buildGo119Package; go_1_17 = callPackage ../development/compilers/go/1.17.nix ({ inherit (darwin.apple_sdk.frameworks) Foundation Security; From e5b5136429ab1df2ec1818dd8e8ae4ff04e3cf23 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 23 Sep 2022 14:59:16 +0100 Subject: [PATCH 134/318] cryptsetup: Remove ruby build dependency from NixOS Removing this build dependency makes most NixOS tests completely independent of the ruby ecosystem. This helps reduce mass-rebuilds, which is especially useful when bisecting the staging branch using a NixOS test. --- pkgs/os-specific/linux/cryptsetup/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/cryptsetup/default.nix b/pkgs/os-specific/linux/cryptsetup/default.nix index 62f3f0c4db14b..2bf95abb8eee1 100644 --- a/pkgs/os-specific/linux/cryptsetup/default.nix +++ b/pkgs/os-specific/linux/cryptsetup/default.nix @@ -1,5 +1,12 @@ { lib, stdenv, fetchurl, lvm2, json_c, asciidoctor -, openssl, libuuid, pkg-config, popt }: +, openssl, libuuid, pkg-config, popt + + # The release tarballs contain precomputed manpage files, so we don't need + # to run asciidoctor on the man sources. By avoiding asciidoctor, we make + # the bare NixOS build hash independent of changes to the ruby ecosystem, + # saving mass-rebuilds. +, rebuildMan ? false +}: stdenv.mkDerivation rec { pname = "cryptsetup"; @@ -28,6 +35,8 @@ stdenv.mkDerivation rec { "--enable-cryptsetup-reencrypt" "--with-crypto_backend=openssl" "--disable-ssh-token" + ] ++ lib.optionals (!rebuildMan) [ + "--disable-asciidoc" ] ++ lib.optionals stdenv.hostPlatform.isStatic [ "--disable-external-tokens" # We have to override this even though we're removing token @@ -36,7 +45,7 @@ stdenv.mkDerivation rec { "--with-luks2-external-tokens-path=/" ]; - nativeBuildInputs = [ pkg-config asciidoctor ]; + nativeBuildInputs = [ pkg-config ] ++ lib.optionals rebuildMan [ asciidoctor ]; buildInputs = [ lvm2 json_c openssl libuuid popt ]; # The test [7] header backup in compat-test fails with a mysterious From e56fb06eef794985d73431c2dc1ef757a3664578 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 23 Sep 2022 15:08:35 +0100 Subject: [PATCH 135/318] cryptsetup: Add tests.nixos --- pkgs/os-specific/linux/cryptsetup/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/cryptsetup/default.nix b/pkgs/os-specific/linux/cryptsetup/default.nix index 2bf95abb8eee1..69e084d8aa83b 100644 --- a/pkgs/os-specific/linux/cryptsetup/default.nix +++ b/pkgs/os-specific/linux/cryptsetup/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, lvm2, json_c, asciidoctor -, openssl, libuuid, pkg-config, popt +, openssl, libuuid, pkg-config, popt, nixosTests # The release tarballs contain precomputed manpage files, so we don't need # to run asciidoctor on the man sources. By avoiding asciidoctor, we make @@ -53,6 +53,19 @@ stdenv.mkDerivation rec { # Issue filed upstream: https://gitlab.com/cryptsetup/cryptsetup/-/issues/763 doCheck = !stdenv.hostPlatform.isMusl; + passthru = { + tests = { + nixos = + lib.optionalAttrs stdenv.hostPlatform.isLinux ( + lib.recurseIntoAttrs ( + lib.filterAttrs + (name: _value: lib.hasPrefix "luks" name) + nixosTests.installer + ) + ); + }; + }; + meta = { homepage = "https://gitlab.com/cryptsetup/cryptsetup/"; description = "LUKS for dm-crypt"; From 2623fc4a78b76cbf4253cb765c80c6d3be8cc03a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Tue, 4 Oct 2022 12:11:04 +0200 Subject: [PATCH 136/318] lua: add back Darwin makeBinaryWrapper fix --- pkgs/development/interpreters/lua-5/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/interpreters/lua-5/default.nix b/pkgs/development/interpreters/lua-5/default.nix index 39de727854374..7a43b92b2051c 100644 --- a/pkgs/development/interpreters/lua-5/default.nix +++ b/pkgs/development/interpreters/lua-5/default.nix @@ -61,6 +61,7 @@ let in rec { buildEnv = callPackage ./wrapper.nix { lua = self; + makeWrapper = makeBinaryWrapper; inherit (luaPackages) requiredLuaModules; }; withPackages = import ./with-packages.nix { inherit buildEnv luaPackages;}; From 49b5c1f562f5d79e188cee2495e177ac60c5f43e Mon Sep 17 00:00:00 2001 From: ilkecan Date: Thu, 29 Sep 2022 15:59:07 +0000 Subject: [PATCH 137/318] vimPlugins.plenary-nvim: remove stale comment The plugin is being built using `luaPackages` since #178180. --- pkgs/applications/editors/vim/plugins/overrides.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 69f07ef40fec7..9743de6fa1eae 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -660,8 +660,6 @@ self: super: { inherit parinfer-rust; - # plenary-nvim = super.toVimPlugin(luaPackages.plenary-nvim); - plenary-nvim = super.plenary-nvim.overrideAttrs (old: { postPatch = '' sed -Ei lua/plenary/curl.lua \ From 9314243820135b56287519f2599a4556460210e9 Mon Sep 17 00:00:00 2001 From: ilkecan Date: Thu, 29 Sep 2022 15:59:07 +0000 Subject: [PATCH 138/318] luaPackages.gitsigns-nvim: remove noop override `toVimPlugin` function mentioned is added with #178180. --- pkgs/development/lua-modules/overrides.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index 1ff2101b14629..74ffea9643952 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -514,12 +514,6 @@ with prev; ''; }); - # TODO just while testing, remove afterwards - # toVimPlugin should do it instead - gitsigns-nvim = prev.gitsigns-nvim.overrideAttrs (oa: { - nativeBuildInputs = oa.nativeBuildInputs or [ ] ++ [ vimUtils.vimGenDocHook ]; - }); - # aliases cjson = prev.lua-cjson; } From 448bb9bbaecd27e90e3a20b761736db25c939e87 Mon Sep 17 00:00:00 2001 From: ilkecan Date: Thu, 29 Sep 2022 15:59:07 +0000 Subject: [PATCH 139/318] vimUtils.buildVimPlugin: prevent building twice Don't set the `rtp` attribute using `overrideAttrs`. `overrideAttrs` passes the attribute to the builder hence creates a different derivation. This made vim plugins being built twice. --- .../editors/vim/plugins/build-vim-plugin.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix b/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix index 9e7bb1be2d5c8..bf54e8a5e0ac5 100644 --- a/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix +++ b/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix @@ -8,6 +8,12 @@ }: rec { + addRtp = drv: + drv // { + rtp = "${drv}"; + overrideAttrs = f: addRtp (drv.overrideAttrs f); + }; + buildVimPlugin = attrs@{ name ? "${attrs.pname}-${attrs.version}", namePrefix ? "vimplugin-", @@ -36,9 +42,7 @@ rec { runHook postInstall ''; }); - in toVimPlugin(drv.overrideAttrs(oa: { - rtp = "${drv}"; - })); + in addRtp drv; buildVimPluginFrom2Nix = attrs: buildVimPlugin ({ # vim plugins may override this From ef30dee2d6e0317bbdca083ffc2587e4f0895711 Mon Sep 17 00:00:00 2001 From: ilkecan Date: Thu, 29 Sep 2022 16:31:05 +0000 Subject: [PATCH 140/318] buildVimPlugin: deprecate `rtp` attribute --- pkgs/applications/editors/vim/plugins/build-vim-plugin.nix | 4 ++-- pkgs/applications/editors/vim/plugins/vim-utils.nix | 4 ++-- pkgs/applications/editors/vim/vimacs.nix | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix b/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix index bf54e8a5e0ac5..66234c2c198e1 100644 --- a/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix +++ b/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix @@ -10,7 +10,7 @@ rec { addRtp = drv: drv // { - rtp = "${drv}"; + rtp = lib.warn "`rtp` attribute is deprecated, use `outPath` instead." drv.outPath; overrideAttrs = f: addRtp (drv.overrideAttrs f); }; @@ -42,7 +42,7 @@ rec { runHook postInstall ''; }); - in addRtp drv; + in addRtp (toVimPlugin drv); buildVimPluginFrom2Nix = attrs: buildVimPlugin ({ # vim plugins may override this diff --git a/pkgs/applications/editors/vim/plugins/vim-utils.nix b/pkgs/applications/editors/vim/plugins/vim-utils.nix index 2e482cdf7df5b..09c5527cd0ec2 100644 --- a/pkgs/applications/editors/vim/plugins/vim-utils.nix +++ b/pkgs/applications/editors/vim/plugins/vim-utils.nix @@ -243,10 +243,10 @@ let */ plugImpl = '' - source ${vimPlugins.vim-plug.rtp}/plug.vim + source ${vimPlugins.vim-plug}/plug.vim silent! call plug#begin('/dev/null') - '' + (lib.concatMapStringsSep "\n" (pkg: "Plug '${pkg.rtp}'") plug.plugins) + '' + '' + (lib.concatMapStringsSep "\n" (pkg: "Plug '${pkg}'") plug.plugins) + '' call plug#end() ''; diff --git a/pkgs/applications/editors/vim/vimacs.nix b/pkgs/applications/editors/vim/vimacs.nix index 6eb995f86e068..f8a087cbe6ee0 100644 --- a/pkgs/applications/editors/vim/vimacs.nix +++ b/pkgs/applications/editors/vim/vimacs.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { --replace '-gvim}' '-@bin@/bin/vim -g}' \ --replace '--cmd "let g:VM_Enabled = 1"' \ '--cmd "let g:VM_Enabled = 1" --cmd "set rtp^=@rtp@" ${vimacsExtraArgs}' \ - --replace @rtp@ ${vimPlugins.vimacs.rtp} \ + --replace @rtp@ ${vimPlugins.vimacs} \ --replace @bin@ ${vimPackage} for prog in vm gvm gvimacs vmdiff vimacsdiff do From ff30c899d8bd92d1a1c9f4d4e81455b04cb0868e Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 16 Jul 2022 22:42:23 +0200 Subject: [PATCH 141/318] glibc: make crypt support optional The libcrypt library is going to be replaced with libxcrypt in packages that require it. --- pkgs/development/libraries/glibc/common.nix | 5 ++++- pkgs/development/libraries/glibc/default.nix | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 6ed0a4d4da0fe..83cde07749496 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -36,6 +36,7 @@ , withLinuxHeaders ? false , profilingLibraries ? false , withGd ? false +, withLibcrypt ? false , meta , extraBuildInputs ? [] , extraNativeBuildInputs ? [] @@ -183,7 +184,9 @@ stdenv.mkDerivation ({ # To avoid linking with -lgcc_s (dynamic link) # so the glibc does not depend on its compiler store path "libc_cv_as_needed=no" - ] ++ lib.optional withGd "--with-gd"; + ] + ++ lib.optional withGd "--with-gd" + ++ lib.optional (!withLibcrypt) "--disable-crypt"; makeFlags = [ "OBJCOPY=${stdenv.cc.targetPrefix}objcopy" diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 728b97d2f5f4e..8602498f01b94 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -2,6 +2,7 @@ , withLinuxHeaders ? true , profilingLibraries ? false , withGd ? false +, withLibcrypt? false , buildPackages }: @@ -16,7 +17,7 @@ in callPackage ./common.nix { inherit stdenv; } { pname = "glibc" + lib.optionalString withGd "-gd"; - inherit withLinuxHeaders profilingLibraries withGd; + inherit withLinuxHeaders profilingLibraries withGd withLibcrypt; # Note: # Things you write here override, and do not add to, From 7c29dcb80b3efb13f1018a531d0c67d2de06c481 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 17 Jul 2022 03:01:01 +0200 Subject: [PATCH 142/318] libxcrypt: use tarball src, prune dependencies --- .../libraries/libxcrypt/default.nix | 33 +++++++------------ 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/pkgs/development/libraries/libxcrypt/default.nix b/pkgs/development/libraries/libxcrypt/default.nix index eadf6f91e1e07..b3f98d685709c 100644 --- a/pkgs/development/libraries/libxcrypt/default.nix +++ b/pkgs/development/libraries/libxcrypt/default.nix @@ -1,36 +1,25 @@ -{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, pkg-config, perl, fetchpatch }: +{ lib, stdenv, fetchurl, perl }: stdenv.mkDerivation rec { pname = "libxcrypt"; version = "4.4.28"; - src = fetchFromGitHub { - owner = "besser82"; - repo = "libxcrypt"; - rev = "v${version}"; - sha256 = "sha256-Ohf+RCOXnoCxAFnXXV9e2TCqpfZziQl+FGJTGDSQTF0="; + src = fetchurl { + url = "https://github.com/besser82/libxcrypt/releases/download/v${version}/libxcrypt-${version}.tar.xz"; + sha256 = "sha256-npNoEfn60R28ozyhm9l8VcUus8oVkB8nreBGzHnmnoc="; }; - patches = [ - # Fix for tests on musl is being upstreamed: - # https://github.com/besser82/libxcrypt/pull/157 - # Applied in all environments to prevent patchrot - (fetchpatch { - url = "https://github.com/besser82/libxcrypt/commit/a4228faa0b96986abc076125cf97d352a063d92f.patch"; - sha256 = "sha256-iGNz8eer6OkA0yR74WisE6GbFTYyXKw7koXl/R7DhVE="; - }) + configureFlags = [ + "--enable-hashes=all" + "--enable-obsolete-api=glibc" + "--disable-failure-tokens" ]; - preConfigure = '' - patchShebangs autogen.sh - ./autogen.sh - ''; - - configureFlags = [ - "--disable-werror" + nativeBuildInputs = [ + perl ]; - nativeBuildInputs = [ autoconf automake libtool pkg-config perl ]; + enableParallelBuilding = true; doCheck = true; From a369108233b0494ccf77f7dd2bf797c8012b113a Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 20 Jul 2022 02:01:28 +0200 Subject: [PATCH 143/318] perl: allow building without libcrypt --- pkgs/development/interpreters/perl/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/interpreters/perl/default.nix b/pkgs/development/interpreters/perl/default.nix index 79e2bf84a0cdd..01122fd4cde67 100644 --- a/pkgs/development/interpreters/perl/default.nix +++ b/pkgs/development/interpreters/perl/default.nix @@ -1,6 +1,7 @@ { config, lib, stdenv, fetchurl, fetchFromGitHub, pkgs, buildPackages , callPackage , enableThreading ? true, coreutils, makeWrapper +, enableCrypt ? true , zlib }: @@ -82,6 +83,7 @@ let ++ optionals ((builtins.match ''5\.[0-9]*[13579]\..+'' version) != null) [ "-Dusedevel" "-Uversiononly" ] ++ optional stdenv.isSunOS "-Dcc=gcc" ++ optional enableThreading "-Dusethreads" + ++ optional (!enableCrypt) "-A clear:d_crypt_r" ++ optional stdenv.hostPlatform.isStatic "--all-static" ++ optionals (!crossCompiling) [ "-Dprefix=${placeholder "out"}" From e36bd3c473bf86f0ec18faee2f5aa310316ec7cd Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 20 Jul 2022 02:01:43 +0200 Subject: [PATCH 144/318] libxcrypt: build using perl without libcrypt support --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f949ac5879465..4e8b8c54f3a00 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20709,7 +20709,9 @@ with pkgs; libx86 = callPackage ../development/libraries/libx86 {}; - libxcrypt = callPackage ../development/libraries/libxcrypt { }; + libxcrypt = callPackage ../development/libraries/libxcrypt { + perl = perl.override { enableCrypt = false; }; + }; libxdg_basedir = callPackage ../development/libraries/libxdg-basedir { }; From 3624ac24587b17d96d64446cd8dbbcf2158ab916 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 26 Sep 2022 22:04:58 +0200 Subject: [PATCH 145/318] perl: fix build with libxcrypt --- pkgs/development/interpreters/perl/default.nix | 6 +++++- pkgs/stdenv/linux/default.nix | 2 +- pkgs/top-level/all-packages.nix | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/perl/default.nix b/pkgs/development/interpreters/perl/default.nix index 01122fd4cde67..4d95ebf2052bf 100644 --- a/pkgs/development/interpreters/perl/default.nix +++ b/pkgs/development/interpreters/perl/default.nix @@ -1,10 +1,12 @@ { config, lib, stdenv, fetchurl, fetchFromGitHub, pkgs, buildPackages , callPackage , enableThreading ? true, coreutils, makeWrapper -, enableCrypt ? true +, enableCrypt ? true, libxcrypt ? null , zlib }: +assert (enableCrypt -> (libxcrypt != null)); + # Note: this package is used for bootstrapping fetchurl, and thus # cannot use fetchpatch! All mutable patches (generated by GitHub or # cgit) that are needed here should be included directly in Nixpkgs as @@ -34,6 +36,8 @@ let optional crossCompiling "mini"; setOutputFlags = false; + propagatedBuildInputs = lib.optional enableCrypt libxcrypt; + disallowedReferences = [ stdenv.cc ]; patches = diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 03856d5c07111..dbaff342fb1af 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -221,7 +221,7 @@ in # This is not an issue for the final stdenv, because this perl # won't be included in the final stdenv and won't be exported to # top-level pkgs as an override either. - perl = super.perl.override { enableThreading = false; }; + perl = super.perl.override { enableThreading = false; enableCrypt = false; }; }; }) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4e8b8c54f3a00..0b8a1145c78e3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20710,7 +20710,11 @@ with pkgs; libx86 = callPackage ../development/libraries/libx86 {}; libxcrypt = callPackage ../development/libraries/libxcrypt { - perl = perl.override { enableCrypt = false; }; + fetchurl = stdenv.fetchurlBoot; + perl = perl.override { + enableCrypt = false; + fetchurl = stdenv.fetchurlBoot; + }; }; libxdg_basedir = callPackage ../development/libraries/libxdg-basedir { }; From 0097f57b1fe054aa3b43b4af66786e8f9ee00647 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 24 Sep 2022 20:35:13 +0200 Subject: [PATCH 146/318] gcc11: fix build with libxcrypt --- pkgs/development/compilers/gcc/11/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/gcc/11/default.nix b/pkgs/development/compilers/gcc/11/default.nix index 3a61c5820b111..3b03e185dd86f 100644 --- a/pkgs/development/compilers/gcc/11/default.nix +++ b/pkgs/development/compilers/gcc/11/default.nix @@ -26,6 +26,7 @@ , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places , buildPackages +, libxcrypt }: # Make sure we get GNU sed. @@ -180,7 +181,7 @@ stdenv.mkDerivation ({ ++ optional targetPlatform.isLinux patchelf; buildInputs = [ - gmp mpfr libmpc + gmp mpfr libmpc libxcrypt targetPackages.stdenv.cc.bintools # For linking code at run-time ] ++ (optional (isl != null) isl) ++ (optional (zlib != null) zlib) @@ -190,10 +191,12 @@ stdenv.mkDerivation ({ NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl"; - preConfigure = import ../common/pre-configure.nix { + preConfigure = (import ../common/pre-configure.nix { inherit lib; inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic enableMultilib; - }; + }) + '' + ln -sf ${libxcrypt}/include/crypt.h libsanitizer/sanitizer_common/crypt.h + ''; dontDisableStatic = true; From 495e6501b6952a8c0d667f052459d61b70f26701 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Tue, 27 Sep 2022 03:52:22 +0200 Subject: [PATCH 147/318] llvmPackages_11.compiler-rt: fix build with libxcrypt --- pkgs/development/compilers/llvm/11/compiler-rt/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/11/compiler-rt/default.nix b/pkgs/development/compilers/llvm/11/compiler-rt/default.nix index 74c566763f6ac..6790910ee8304 100644 --- a/pkgs/development/compilers/llvm/11/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/11/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, xcbuild, libllvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, xcbuild, libllvm, libcxxabi, libxcrypt }: let @@ -26,6 +26,8 @@ stdenv.mkDerivation { "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" + ] ++ lib.optionals (haveLibc && !isMusl) [ + "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl || isNewDarwinBootstrap) [ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" "-DCOMPILER_RT_BUILD_XRAY=OFF" From 194d852242928d46be6313dc82821ee13b25114f Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 24 Sep 2022 20:36:09 +0200 Subject: [PATCH 148/318] cpython: fix build with libxcrypt --- pkgs/development/interpreters/python/cpython/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index ddf0a55484754..424258167150b 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -14,6 +14,7 @@ , bluez ? null, bluezSupport ? false , zlib , tzdata ? null +, libxcrypt , self , configd , autoreconfHook @@ -353,6 +354,9 @@ in with passthru; stdenv.mkDerivation { # Never even try to use lchmod on linux, # don't rely on detecting glibc-isms. "ac_cv_func_lchmod=no" + ] ++ optionals (libxcrypt != null) [ + "CFLAGS=-I${libxcrypt}/include" + "LIBS=-L${libxcrypt}/lib" ] ++ optionals tzdataSupport [ "--with-tzpath=${tzdata}/share/zoneinfo" ] ++ optional static "LDFLAGS=-static"; @@ -388,7 +392,7 @@ in with passthru; stdenv.mkDerivation { postInstall = let # References *not* to nuke from (sys)config files keep-references = concatMapStringsSep " " (val: "-e ${val}") ([ - (placeholder "out") + (placeholder "out") libxcrypt ] ++ optionals tzdataSupport [ tzdata ]); From 872c524454776ff2787812f052609a1da5a09768 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 24 Sep 2022 20:36:34 +0200 Subject: [PATCH 149/318] cyrus_sasl: fix build with libxcrypt --- pkgs/development/libraries/cyrus-sasl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/cyrus-sasl/default.nix b/pkgs/development/libraries/cyrus-sasl/default.nix index be20a9b1678df..170b9a0fba4a2 100644 --- a/pkgs/development/libraries/cyrus-sasl/default.nix +++ b/pkgs/development/libraries/cyrus-sasl/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, openssl, openldap, libkrb5, db, gettext -, pam, fixDarwinDylibNames, autoreconfHook, enableLdap ? false +, pam, libxcrypt, fixDarwinDylibNames, autoreconfHook, enableLdap ? false , buildPackages, pruneLibtoolFiles, nixosTests }: with lib; @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pruneLibtoolFiles ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; buildInputs = - [ openssl db gettext libkrb5 ] + [ openssl db gettext libkrb5 libxcrypt ] ++ lib.optional enableLdap openldap ++ lib.optional stdenv.isLinux pam; From 44a73d018eb093bc16cfdad606fa13c12dd9497e Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 24 Sep 2022 20:36:55 +0200 Subject: [PATCH 150/318] libxslt: fix build with libxcrypt --- pkgs/development/libraries/libxslt/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix index fda00f6766648..a3bb7128c0f10 100644 --- a/pkgs/development/libraries/libxslt/default.nix +++ b/pkgs/development/libraries/libxslt/default.nix @@ -8,6 +8,7 @@ , gettext , python , ncurses +, libxcrypt , libgcrypt , cryptoSupport ? false , pythonSupport ? true @@ -34,7 +35,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ - libxml2.dev + libxml2.dev libxcrypt ] ++ lib.optional stdenv.isDarwin [ gettext ] ++ lib.optionals pythonSupport [ From 2c2fde951cd116908de11759ca0c21302751f6ae Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 24 Sep 2022 20:37:24 +0200 Subject: [PATCH 151/318] apparmor: fix build with libxcrypt --- pkgs/os-specific/linux/apparmor/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix index 3fd787bce6bd4..933b4e176f762 100644 --- a/pkgs/os-specific/linux/apparmor/default.nix +++ b/pkgs/os-specific/linux/apparmor/default.nix @@ -18,6 +18,7 @@ , writeShellScript , closureInfo , runCommand +, libxcrypt }: let @@ -93,7 +94,8 @@ let perl ] ++ lib.optional withPython python; - buildInputs = lib.optional withPerl perl + buildInputs = [ libxcrypt ] + ++ lib.optional withPerl perl ++ lib.optional withPython python; # required to build apparmor-parser From 5df544acc2a346064ac0186cb9c2485c0b331afd Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 24 Sep 2022 20:37:45 +0200 Subject: [PATCH 152/318] pam: enable libxcrypt by default --- pkgs/os-specific/linux/pam/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/pam/default.nix b/pkgs/os-specific/linux/pam/default.nix index 72f91e89c7454..22e7057e343f7 100644 --- a/pkgs/os-specific/linux/pam/default.nix +++ b/pkgs/os-specific/linux/pam/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, buildPackages, fetchurl, flex, cracklib, db4, gettext, audit , nixosTests -, withLibxcrypt ? false, libxcrypt +, withLibxcrypt ? true, libxcrypt }: stdenv.mkDerivation rec { From 74424224fd22d26dc9560445459c32c8a321d971 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 24 Sep 2022 20:38:09 +0200 Subject: [PATCH 153/318] shadow: fix build with libxcrypt --- pkgs/os-specific/linux/shadow/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/shadow/default.nix b/pkgs/os-specific/linux/shadow/default.nix index 5537f9f6aacb0..c6fd417d0d6fa 100644 --- a/pkgs/os-specific/linux/shadow/default.nix +++ b/pkgs/os-specific/linux/shadow/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, nixosTests, fetchpatch, fetchFromGitHub, autoreconfHook, libxslt , libxml2 , docbook_xml_dtd_45, docbook_xsl, itstool, flex, bison, runtimeShell -, pam ? null, glibcCross ? null +, libxcrypt, pam ? null, glibcCross ? null }: let @@ -28,7 +28,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-PxLX5V0t18JftT5wT41krNv18Ew7Kz3MfZkOi/80ODA="; }; - buildInputs = lib.optional (pam != null && stdenv.isLinux) pam; + buildInputs = [ libxcrypt ] + ++ lib.optional (pam != null && stdenv.isLinux) pam; nativeBuildInputs = [autoreconfHook libxslt libxml2 docbook_xml_dtd_45 docbook_xsl flex bison itstool ]; @@ -62,6 +63,8 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-man" "--with-group-name-max-length=32" + "--with-bcrypt" + "--with-yescrypt" ] ++ lib.optional (stdenv.hostPlatform.libc != "glibc") "--disable-nscd"; preBuild = lib.optionalString (stdenv.hostPlatform.libc == "glibc") From f6011b26e4a0ce633aceb33db6f4c4c2e6660920 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 24 Sep 2022 20:38:33 +0200 Subject: [PATCH 154/318] systemd: fix build with libxcrypt --- pkgs/os-specific/linux/systemd/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 1cde12f202291..28d385ad5eab5 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -27,6 +27,7 @@ , util-linux , kbd , kmod +, libxcrypt # Optional dependencies , pam @@ -360,6 +361,7 @@ stdenv.mkDerivation { acl audit kmod + libxcrypt libcap libidn2 libuuid From f9090d5862c1ebdb8f00b1878372fb286da793d0 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 26 Sep 2022 22:44:58 +0200 Subject: [PATCH 155/318] libxcrypt: fix build with musl --- pkgs/development/libraries/libxcrypt/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libxcrypt/default.nix b/pkgs/development/libraries/libxcrypt/default.nix index b3f98d685709c..dc2c5d3fb6ccb 100644 --- a/pkgs/development/libraries/libxcrypt/default.nix +++ b/pkgs/development/libraries/libxcrypt/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { "--enable-hashes=all" "--enable-obsolete-api=glibc" "--disable-failure-tokens" + ] ++ lib.optionals stdenv.hostPlatform.isMusl [ + "--disable-werror" ]; nativeBuildInputs = [ @@ -21,7 +23,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - doCheck = true; + doCheck = !stdenv.hostPlatform.isMusl; meta = with lib; { description = "Extended crypt library for descrypt, md5crypt, bcrypt, and others"; From 32e7482074ecc3d7be079e8ed87cd74c7986f202 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 26 Sep 2022 22:45:24 +0200 Subject: [PATCH 156/318] nixos/tests/shadow: new hashes support with libxcrypt --- nixos/modules/config/users-groups.nix | 2 +- nixos/tests/shadow.nix | 30 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix index dae2fde0b4e76..b538a0119c06d 100644 --- a/nixos/modules/config/users-groups.nix +++ b/nixos/modules/config/users-groups.nix @@ -697,7 +697,7 @@ in { value = "[a-zA-Z0-9/+.-]+"; options = "${id}(=${value})?(,${id}=${value})*"; scheme = "${id}(${sep}${options})?"; - content = "${base64}${sep}${base64}"; + content = "${base64}${sep}${base64}(${sep}${base64})?"; mcf = "^${sep}${scheme}${sep}${content}$"; in if (allowsLogin user.hashedPassword diff --git a/nixos/tests/shadow.nix b/nixos/tests/shadow.nix index 50a9f71246469..baa2e5945c05d 100644 --- a/nixos/tests/shadow.nix +++ b/nixos/tests/shadow.nix @@ -3,6 +3,8 @@ let password2 = "helloworld"; password3 = "bazqux"; password4 = "asdf123"; + hashed_bcrypt = "$2b$05$8xIEflrk2RxQtcVXbGIxs.Vl0x7dF1/JSv3cyX6JJt0npzkTCWvxK"; # fnord + hashed_yeshash = "$y$j9T$d8Z4EAf8P1SvM/aDFbxMS0$VnTXMp/Hnc7QdCBEaLTq5ZFOAFo2/PM0/xEAFuOE88."; # fnord in import ./make-test-python.nix ({ pkgs, ... }: { name = "shadow"; meta = with pkgs.lib.maintainers; { maintainers = [ nequissimus ]; }; @@ -27,6 +29,16 @@ in import ./make-test-python.nix ({ pkgs, ... }: { password = password4; shell = pkgs.bash; }; + users.berta = { + isNormalUser = true; + hashedPassword = hashed_bcrypt; + shell = pkgs.bash; + }; + users.yesim = { + isNormalUser = true; + hashedPassword = hashed_yeshash; + shell = pkgs.bash; + }; }; }; @@ -115,5 +127,23 @@ in import ./make-test-python.nix ({ pkgs, ... }: { shadow.wait_until_succeeds("pgrep login") shadow.send_chars("${password2}\n") shadow.wait_until_tty_matches("5", "login:") + + with subtest("check alternate password hashes"): + shadow.send_key("alt-f6") + shadow.wait_until_succeeds("[ $(fgconsole) = 6 ]") + for u in ["berta", "yesim"]: + shadow.wait_for_unit("getty@tty6.service") + shadow.wait_until_succeeds("pgrep -f 'agetty.*tty6'") + shadow.wait_until_tty_matches("6", "login: ") + shadow.send_chars(f"{u}\n") + shadow.wait_until_tty_matches("6", f"login: {u}") + shadow.wait_until_succeeds("pgrep login") + shadow.sleep(2) + shadow.send_chars("fnord\n") + shadow.send_chars(f"whoami > /tmp/{u}\n") + shadow.wait_for_file(f"/tmp/{u}") + print(shadow.succeed(f"cat /tmp/{u}")) + assert u in shadow.succeed(f"cat /tmp/{u}") + shadow.send_chars("logout\n") ''; }) From e8748e2afaa900b437d322421ffa1d5fbae7069d Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Tue, 27 Sep 2022 03:16:25 +0200 Subject: [PATCH 157/318] accountsservice: fix build with libxcrypt --- pkgs/development/libraries/accountsservice/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/accountsservice/default.nix b/pkgs/development/libraries/accountsservice/default.nix index 4bd7a67871f9d..694aab16d1abd 100644 --- a/pkgs/development/libraries/accountsservice/default.nix +++ b/pkgs/development/libraries/accountsservice/default.nix @@ -16,6 +16,7 @@ , python3 , vala , gettext +, libxcrypt }: stdenv.mkDerivation rec { @@ -66,6 +67,7 @@ stdenv.mkDerivation rec { glib polkit systemd + libxcrypt ]; mesonFlags = [ From dd331ad167795eaa8bf8044d750bea4e0fb28233 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Tue, 27 Sep 2022 03:17:07 +0200 Subject: [PATCH 158/318] openldap: fix build with libxcrypt --- pkgs/development/libraries/openldap/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/openldap/default.nix b/pkgs/development/libraries/openldap/default.nix index f357b8d4b7208..64b6c8c234450 100644 --- a/pkgs/development/libraries/openldap/default.nix +++ b/pkgs/development/libraries/openldap/default.nix @@ -11,6 +11,7 @@ , libtool , openssl , systemdMinimal +, libxcrypt }: stdenv.mkDerivation rec { @@ -42,6 +43,7 @@ stdenv.mkDerivation rec { libsodium libtool openssl + libxcrypt ] ++ lib.optionals (stdenv.isLinux) [ systemdMinimal ]; From ae4e703c17aaeb207acc12e802655dc7ab70bc2e Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Tue, 27 Sep 2022 03:51:42 +0200 Subject: [PATCH 159/318] tdb: fix build with libxcrypt --- pkgs/development/libraries/tdb/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/tdb/default.nix b/pkgs/development/libraries/tdb/default.nix index f040022cc91b8..9a534c4c14652 100644 --- a/pkgs/development/libraries/tdb/default.nix +++ b/pkgs/development/libraries/tdb/default.nix @@ -5,6 +5,7 @@ , python3 , readline , libxslt +, libxcrypt , docbook-xsl-nons , docbook_xml_dtd_45 }: @@ -30,6 +31,7 @@ stdenv.mkDerivation rec { buildInputs = [ python3 readline # required to build python + libxcrypt ]; wafPath = "buildtools/bin/waf"; From 77a7b43e629918d0f77cdfbf3678c2ea1fc1bb6c Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Tue, 27 Sep 2022 04:07:33 +0200 Subject: [PATCH 160/318] aprutil: fix build with libxcrypt --- .../libraries/apr-util/default.nix | 24 ++++++++++++------- .../apr-util/fix-libxcrypt-build.patch | 14 +++++++++++ 2 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 pkgs/development/libraries/apr-util/fix-libxcrypt-build.patch diff --git a/pkgs/development/libraries/apr-util/default.nix b/pkgs/development/libraries/apr-util/default.nix index 6f38bfa0d076d..909965bb06886 100644 --- a/pkgs/development/libraries/apr-util/default.nix +++ b/pkgs/development/libraries/apr-util/default.nix @@ -2,7 +2,7 @@ , sslSupport ? true, openssl , bdbSupport ? true, db , ldapSupport ? !stdenv.isCygwin, openldap -, libiconv +, libiconv, libxcrypt , cyrus_sasl, autoreconfHook }: @@ -21,7 +21,10 @@ stdenv.mkDerivation rec { sha256 = "0nq3s1yn13vplgl6qfm09f7n0wm08malff9s59bqf9nid9xjzqfk"; }; - patches = optional stdenv.isFreeBSD ./include-static-dependencies.patch; + patches = [ ./fix-libxcrypt-build.patch ] + ++ optional stdenv.isFreeBSD ./include-static-dependencies.patch; + + NIX_CFLAGS_LINK = [ "-lcrypt" ]; outputs = [ "out" "dev" ]; outputBin = "dev"; @@ -38,15 +41,18 @@ stdenv.mkDerivation rec { "--without-freetds" "--without-berkeley-db" "--without-crypto" ] ; - # For some reason, db version 6.9 is selected when cross-compiling. - # It's unclear as to why, it requires someone with more autotools / configure knowledge to go deeper into that. - # Always replacing the link flag with a generic link flag seems to help though, so let's do that for now. - postConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' - substituteInPlace Makefile \ - --replace "-ldb-6.9" "-ldb" + postConfigure = '' + echo '#define APR_HAVE_CRYPT_H 1' >> confdefs.h + '' + + # For some reason, db version 6.9 is selected when cross-compiling. + # It's unclear as to why, it requires someone with more autotools / configure knowledge to go deeper into that. + # Always replacing the link flag with a generic link flag seems to help though, so let's do that for now. + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + substituteInPlace Makefile \ + --replace "-ldb-6.9" "-ldb" ''; - propagatedBuildInputs = [ apr expat libiconv ] + propagatedBuildInputs = [ apr expat libiconv libxcrypt ] ++ optional sslSupport openssl ++ optional bdbSupport db ++ optional ldapSupport openldap diff --git a/pkgs/development/libraries/apr-util/fix-libxcrypt-build.patch b/pkgs/development/libraries/apr-util/fix-libxcrypt-build.patch new file mode 100644 index 0000000000000..2994e5de0f78b --- /dev/null +++ b/pkgs/development/libraries/apr-util/fix-libxcrypt-build.patch @@ -0,0 +1,14 @@ +diff --git a/crypto/apr_passwd.c b/crypto/apr_passwd.c +index c961de2..a397f27 100644 +--- a/crypto/apr_passwd.c ++++ b/crypto/apr_passwd.c +@@ -24,9 +24,7 @@ + #if APR_HAVE_STRING_H + #include + #endif +-#if APR_HAVE_CRYPT_H + #include +-#endif + #if APR_HAVE_UNISTD_H + #include + #endif From 3028beca394ab608361de9acb1f95d069a30d745 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Tue, 27 Sep 2022 04:31:10 +0200 Subject: [PATCH 161/318] apacheHttpd: fix build with libxcrypt --- pkgs/servers/http/apache-httpd/2.4.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix index 72ad91d017e10..ec8b3e5c6fa24 100644 --- a/pkgs/servers/http/apache-httpd/2.4.nix +++ b/pkgs/servers/http/apache-httpd/2.4.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, perl, zlib, apr, aprutil, pcre2, libiconv, lynx, which +{ lib, stdenv, fetchurl, perl, zlib, apr, aprutil, pcre2, libiconv, lynx, which, libxcrypt , nixosTests , proxySupport ? true , sslSupport ? true, openssl @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ which ]; - buildInputs = [ perl ] ++ + buildInputs = [ perl libxcrypt ] ++ lib.optional brotliSupport brotli ++ lib.optional sslSupport openssl ++ lib.optional ldapSupport openldap ++ # there is no --with-ldap flag From cc9be15a2f6f11a33d28a85857717bebd8312841 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Tue, 27 Sep 2022 04:29:53 +0200 Subject: [PATCH 162/318] alpine: fix build with libxcrypt --- pkgs/applications/networking/mailreaders/alpine/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/alpine/default.nix b/pkgs/applications/networking/mailreaders/alpine/default.nix index 04f1732f7a5b8..7c168340b1ce7 100644 --- a/pkgs/applications/networking/mailreaders/alpine/default.nix +++ b/pkgs/applications/networking/mailreaders/alpine/default.nix @@ -1,5 +1,5 @@ {lib, stdenv, fetchurl, ncurses, tcl, openssl, pam, libkrb5 -, openldap +, openldap, libxcrypt }: stdenv.mkDerivation rec { @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ - ncurses tcl openssl pam libkrb5 openldap + ncurses tcl openssl pam libkrb5 openldap libxcrypt ]; hardeningDisable = [ "format" ]; From 5b572c53779e03b51c4ecebd94a4592d8e765566 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Tue, 27 Sep 2022 04:30:17 +0200 Subject: [PATCH 163/318] talloc: fix build with libxcrypt --- pkgs/development/libraries/talloc/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/talloc/default.nix b/pkgs/development/libraries/talloc/default.nix index cb7af61a63ed2..fb52f75f8c101 100644 --- a/pkgs/development/libraries/talloc/default.nix +++ b/pkgs/development/libraries/talloc/default.nix @@ -4,6 +4,7 @@ , pkg-config , readline , libxslt +, libxcrypt , docbook-xsl-nons , docbook_xml_dtd_42 , fixDarwinDylibNames @@ -33,6 +34,7 @@ stdenv.mkDerivation rec { python3 readline libxslt + libxcrypt ]; wafPath = "buildtools/bin/waf"; From 52f2785e67a289486a43081c41934c4510bdd47a Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Tue, 27 Sep 2022 04:30:42 +0200 Subject: [PATCH 164/318] vsftpd: fix build with libxcrypt --- pkgs/servers/ftp/vsftpd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/ftp/vsftpd/default.nix b/pkgs/servers/ftp/vsftpd/default.nix index 3a3517f4f2307..601d14d342a17 100644 --- a/pkgs/servers/ftp/vsftpd/default.nix +++ b/pkgs/servers/ftp/vsftpd/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, libcap, libseccomp, openssl, pam, nixosTests }: +{ lib, stdenv, fetchurl, libcap, libseccomp, openssl, pam, libxcrypt, nixosTests }: stdenv.mkDerivation rec { pname = "vsftpd"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-JrYCrkVLC6bZnvRKCba54N+n9nIoEGc23x8njHC8kdM="; }; - buildInputs = [ libcap openssl libseccomp pam ]; + buildInputs = [ libcap openssl libseccomp pam libxcrypt ]; patches = [ ./CVE-2015-1419.patch ]; From c1da1990ee0631b77f88fa60be293eee21ddf297 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Tue, 27 Sep 2022 04:31:30 +0200 Subject: [PATCH 165/318] opensmtpd: fix build with libxcrypt --- pkgs/servers/mail/opensmtpd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/mail/opensmtpd/default.nix b/pkgs/servers/mail/opensmtpd/default.nix index 5f36b139781b9..3bac9e0c6ef60 100644 --- a/pkgs/servers/mail/opensmtpd/default.nix +++ b/pkgs/servers/mail/opensmtpd/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, autoconf, automake, libtool, bison -, libasr, libevent, zlib, libressl, db, pam, nixosTests +, libasr, libevent, zlib, libressl, db, pam, libxcrypt, nixosTests }: stdenv.mkDerivation rec { @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { version = "6.8.0p2"; nativeBuildInputs = [ autoconf automake libtool bison ]; - buildInputs = [ libasr libevent zlib libressl db pam ]; + buildInputs = [ libasr libevent zlib libressl db pam libxcrypt ]; src = fetchurl { url = "https://www.opensmtpd.org/archives/${pname}-${version}.tar.gz"; From 057ae3d0f141bd8d86e5cfc7ef7650a65cda40f9 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Tue, 27 Sep 2022 04:32:53 +0200 Subject: [PATCH 166/318] llvmPackage_14.compiler-rt: fix build with libxcrypt --- pkgs/development/compilers/llvm/14/compiler-rt/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/14/compiler-rt/default.nix b/pkgs/development/compilers/llvm/14/compiler-rt/default.nix index 097410cd7981f..ef2495714e451 100644 --- a/pkgs/development/compilers/llvm/14/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/14/compiler-rt/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, llvm_meta, version , monorepoSrc, runCommand -, cmake, python3, xcbuild, libllvm, libcxxabi +, cmake, python3, xcbuild, libllvm, libcxxabi, libxcrypt }: let @@ -38,6 +38,8 @@ stdenv.mkDerivation { "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" + ] ++ lib.optionals (haveLibc && !isMusl) [ + "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" "-DCOMPILER_RT_BUILD_XRAY=OFF" From be9bc07aa182f2e15f26e4f6a800b55d2bc10408 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 27 Sep 2022 12:33:59 +0200 Subject: [PATCH 167/318] screen: fix build with libxcrypt --- pkgs/tools/misc/screen/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/screen/default.nix b/pkgs/tools/misc/screen/default.nix index b5b3f2b189b69..f9d546a30fe35 100644 --- a/pkgs/tools/misc/screen/default.nix +++ b/pkgs/tools/misc/screen/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, autoreconfHook, ncurses, utmp, pam ? null }: +{ lib, stdenv, fetchurl, autoreconfHook, ncurses, libxcrypt, utmp, pam ? null }: stdenv.mkDerivation rec { pname = "screen"; @@ -22,6 +22,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ ncurses + libxcrypt ] ++ lib.optional stdenv.isLinux pam ++ lib.optional stdenv.isDarwin utmp; From 43327d2957cfa38e71ef57a43d532b8267f59d95 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 27 Sep 2022 15:43:01 +0200 Subject: [PATCH 168/318] pppd: fix build with libxcrypt --- pkgs/tools/networking/ppp/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/networking/ppp/default.nix b/pkgs/tools/networking/ppp/default.nix index d39607338e74f..d7735466ddcf2 100644 --- a/pkgs/tools/networking/ppp/default.nix +++ b/pkgs/tools/networking/ppp/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , substituteAll , libpcap +, libxcrypt , openssl , bash }: @@ -31,6 +32,7 @@ stdenv.mkDerivation rec { buildInputs = [ libpcap + libxcrypt openssl bash ]; @@ -48,6 +50,8 @@ stdenv.mkDerivation rec { "CC=${stdenv.cc.targetPrefix}cc" ]; + NIX_LDFLAGS = "-lcrypt"; + installPhase = '' runHook preInstall mkdir -p $out/bin From 728c97f88adf5cf47e6196f082eef37b5eaadd93 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 27 Sep 2022 15:43:23 +0200 Subject: [PATCH 169/318] pppd: inherit nixos test into passthru.tests --- pkgs/tools/networking/ppp/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/networking/ppp/default.nix b/pkgs/tools/networking/ppp/default.nix index d7735466ddcf2..be50397bf1d0a 100644 --- a/pkgs/tools/networking/ppp/default.nix +++ b/pkgs/tools/networking/ppp/default.nix @@ -6,6 +6,7 @@ , libxcrypt , openssl , bash +, nixosTests }: stdenv.mkDerivation rec { @@ -64,6 +65,10 @@ stdenv.mkDerivation rec { substituteInPlace "$out/bin/pon" --replace "/usr/sbin" "$out/bin" ''; + passthru.tests = { + inherit (nixosTests) pppd; + }; + meta = with lib; { homepage = "https://ppp.samba.org"; description = "Point-to-point implementation to provide Internet connections over serial lines"; From fd944575287b2164eac27e36946b5d6a355c27de Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 28 Sep 2022 00:32:00 +0200 Subject: [PATCH 170/318] open-vm-tools: fix build with libxcrypt --- pkgs/applications/virtualization/open-vm-tools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/open-vm-tools/default.nix b/pkgs/applications/virtualization/open-vm-tools/default.nix index d62964d109599..7755795306a67 100644 --- a/pkgs/applications/virtualization/open-vm-tools/default.nix +++ b/pkgs/applications/virtualization/open-vm-tools/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchFromGitHub, makeWrapper, autoreconfHook , bash, fuse3, libmspack, openssl, pam, xercesc, icu, libdnet, procps, libtirpc, rpcsvc-proto -, libX11, libXext, libXinerama, libXi, libXrender, libXrandr, libXtst +, libX11, libXext, libXinerama, libXi, libXrender, libXrandr, libXtst, libxcrypt , pkg-config, glib, gdk-pixbuf-xlib, gtk3, gtkmm3, iproute2, dbus, systemd, which , libdrm, udev, util-linux , withX ? true @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ]; - buildInputs = [ fuse3 glib icu libdnet libdrm libmspack libtirpc openssl pam procps rpcsvc-proto udev xercesc ] + buildInputs = [ fuse3 glib icu libdnet libdrm libmspack libtirpc libxcrypt openssl pam procps rpcsvc-proto udev xercesc ] ++ lib.optionals withX [ gdk-pixbuf-xlib gtk3 gtkmm3 libX11 libXext libXinerama libXi libXrender libXrandr libXtst ]; postPatch = '' From d438cee6a6dc5eb7dd0c09bc4da5a40089aea2d0 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 29 Sep 2022 16:58:03 +0200 Subject: [PATCH 171/318] conserver: fix build with libxcrypt --- pkgs/tools/misc/conserver/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/conserver/default.nix b/pkgs/tools/misc/conserver/default.nix index d8bb437404d41..30ac050ee0d33 100644 --- a/pkgs/tools/misc/conserver/default.nix +++ b/pkgs/tools/misc/conserver/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , fetchpatch , autoreconfHook +, libxcrypt , gssapiSupport ? false , libkrb5 , freeipmiSupport ? false @@ -36,7 +37,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [ ] + buildInputs = [ libxcrypt ] ++ lib.optionals freeipmiSupport [ freeipmi ] ++ lib.optionals gssapiSupport [ libkrb5 ] ++ lib.optionals opensslSupport [ openssl ]; From 71dad513b387f047fe88f4f3036d1409ce6f1a9e Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 29 Sep 2022 17:06:12 +0200 Subject: [PATCH 172/318] dante: fix build with libxcrypt --- pkgs/servers/dante/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/dante/default.nix b/pkgs/servers/dante/default.nix index dd5967a2407b8..742ee2a0e684c 100644 --- a/pkgs/servers/dante/default.nix +++ b/pkgs/servers/dante/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv, fetchurl, fetchpatch, pam, libkrb5, cyrus_sasl, miniupnpc, autoreconfHook }: +{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook +, pam, libkrb5, cyrus_sasl, miniupnpc, libxcrypt }: stdenv.mkDerivation rec { pname = "dante"; @@ -10,7 +11,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = lib.optional stdenv.hostPlatform.isMips64 autoreconfHook; - buildInputs = [ pam libkrb5 cyrus_sasl miniupnpc ]; + buildInputs = [ pam libkrb5 cyrus_sasl miniupnpc libxcrypt ]; configureFlags = if !stdenv.isDarwin then [ "--with-libc=libc.so.6" ] From c82e7ee61b6bda4ab0cc0ffebf38ff599d65b671 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 29 Sep 2022 17:06:26 +0200 Subject: [PATCH 173/318] hiawatha: fix build with libxcrypt --- pkgs/servers/http/hiawatha/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/http/hiawatha/default.nix b/pkgs/servers/http/hiawatha/default.nix index 950faf89bedb8..2ab0b12c483fb 100644 --- a/pkgs/servers/http/hiawatha/default.nix +++ b/pkgs/servers/http/hiawatha/default.nix @@ -4,6 +4,7 @@ , cmake , ninja , mbedtls +, libxcrypt , enableCache ? true # Internal cache support. , enableIpV6 ? true @@ -27,7 +28,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ninja ]; - buildInputs = [ mbedtls ] ++ lib.optionals enableXslt [ libxslt libxml2 ]; + buildInputs = [ mbedtls libxcrypt ] ++ lib.optionals enableXslt [ libxslt libxml2 ]; prePatch = '' substituteInPlace CMakeLists.txt --replace SETUID "" From 5c34a5351a3adbc3554ea3c77874109dab255777 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 29 Sep 2022 17:06:42 +0200 Subject: [PATCH 174/318] ircdHybrid: fix build with libxcrypt --- pkgs/servers/irc/ircd-hybrid/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/irc/ircd-hybrid/default.nix b/pkgs/servers/irc/ircd-hybrid/default.nix index 346555cf5d7a1..cda989b8bef9c 100644 --- a/pkgs/servers/irc/ircd-hybrid/default.nix +++ b/pkgs/servers/irc/ircd-hybrid/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, openssl, zlib }: +{ lib, stdenv, fetchurl, openssl, zlib, libxcrypt }: stdenv.mkDerivation rec { pname = "ircd-hybrid"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-vQNzx4DjCMGm9piQFf8o4cIpme92S3toY2tihXPCUe8="; }; - buildInputs = [ openssl zlib ]; + buildInputs = [ openssl zlib libxcrypt ]; configureFlags = [ "--with-nicklen=100" From ce67773d12f7fde7796565705f6f0acff6d58ce0 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 29 Sep 2022 17:09:21 +0200 Subject: [PATCH 175/318] libcli: fix build with libxcrypt --- pkgs/development/libraries/libcli/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libcli/default.nix b/pkgs/development/libraries/libcli/default.nix index 8aa06bfb19bc2..da076a590e19a 100644 --- a/pkgs/development/libraries/libcli/default.nix +++ b/pkgs/development/libraries/libcli/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, fetchurl }: +{ lib, stdenv, fetchFromGitHub, fetchurl, libxcrypt }: stdenv.mkDerivation rec { pname = "libcli"; @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { }) ]; + buildInputs = [ libxcrypt ]; + enableParallelBuilding = true; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "AR=${stdenv.cc.targetPrefix}ar" "PREFIX=$(out)" ]; From f51c3fd469714434e2bd2f194f211479d4777eaf Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Sep 2022 17:08:16 +0200 Subject: [PATCH 176/318] ldapvi: fix build with libxcrypt --- pkgs/tools/misc/ldapvi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/ldapvi/default.nix b/pkgs/tools/misc/ldapvi/default.nix index f8862cfa56774..dd0d34f50fe57 100644 --- a/pkgs/tools/misc/ldapvi/default.nix +++ b/pkgs/tools/misc/ldapvi/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchgit, openldap, openssl, popt, glib, ncurses, readline, pkg-config, cyrus_sasl, autoconf, automake }: +{ lib, stdenv, fetchgit, openldap, openssl, popt, glib, libxcrypt, ncurses, readline, pkg-config, cyrus_sasl, autoconf, automake }: stdenv.mkDerivation { pname = "ldapvi"; @@ -11,7 +11,7 @@ stdenv.mkDerivation { }; nativeBuildInputs = [ pkg-config autoconf automake ]; - buildInputs = [ openldap openssl popt glib ncurses readline cyrus_sasl ]; + buildInputs = [ openldap openssl popt glib libxcrypt ncurses readline cyrus_sasl ]; preConfigure = '' cd ldapvi From d017316b51a712862b404d681e8f0ce4bc80db69 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Sep 2022 17:08:58 +0200 Subject: [PATCH 177/318] atheme: fix build with libxcrypt --- pkgs/servers/irc/atheme/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/irc/atheme/default.nix b/pkgs/servers/irc/atheme/default.nix index 9db7ef3aaca89..3df18bbe0c978 100644 --- a/pkgs/servers/irc/atheme/default.nix +++ b/pkgs/servers/irc/atheme/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchgit, libmowgli, pkg-config, git, gettext, pcre, libidn, cracklib, openssl }: +{ lib, stdenv, fetchgit, libmowgli, pkg-config, git, gettext, pcre, libidn, libxcrypt, cracklib, openssl }: stdenv.mkDerivation rec { pname = "atheme"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config git gettext ]; - buildInputs = [ libmowgli pcre libidn cracklib openssl ]; + buildInputs = [ libmowgli pcre libidn libxcrypt cracklib openssl ]; configureFlags = [ "--with-pcre" From dbf9333f2cdd0c242c28d3a5b07d6175f300fb51 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Sep 2022 17:17:20 +0200 Subject: [PATCH 178/318] xorg.xdm: fix build with libxcrypt --- pkgs/servers/x11/xorg/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 77d68e1d9aab7..b1a8c8eccacc9 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -1992,7 +1992,7 @@ lib.makeScope newScope (self: with self; { }) {}; # THIS IS A GENERATED FILE. DO NOT EDIT! - xdm = callPackage ({ stdenv, pkg-config, fetchurl, libX11, libXau, libXaw, libXdmcp, libXext, libXft, libXinerama, libXmu, libXpm, xorgproto, libXrender, libXt }: stdenv.mkDerivation { + xdm = callPackage ({ stdenv, pkg-config, fetchurl, libX11, libXau, libXaw, libXdmcp, libXext, libXft, libXinerama, libXmu, libXpm, libxcrypt, xorgproto, libXrender, libXt }: stdenv.mkDerivation { pname = "xdm"; version = "1.1.12"; builder = ./builder.sh; @@ -2003,7 +2003,7 @@ lib.makeScope newScope (self: with self; { hardeningDisable = [ "bindnow" "relro" ]; strictDeps = true; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ libX11 libXau libXaw libXdmcp libXext libXft libXinerama libXmu libXpm xorgproto libXrender libXt ]; + buildInputs = [ libX11 libXau libXaw libXdmcp libXext libXft libXinerama libXmu libXpm xorgproto libXrender libXt libxcrypt ]; meta.platforms = lib.platforms.unix; }) {}; From 0465c23d9aa9ad23389bd415ed9b0356cb517935 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Sep 2022 17:18:15 +0200 Subject: [PATCH 179/318] wmic-bin: fix build with libxcrypt --- pkgs/servers/monitoring/plugins/wmic-bin.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/monitoring/plugins/wmic-bin.nix b/pkgs/servers/monitoring/plugins/wmic-bin.nix index 00e76624d102b..7ce7802eaf4a7 100644 --- a/pkgs/servers/monitoring/plugins/wmic-bin.nix +++ b/pkgs/servers/monitoring/plugins/wmic-bin.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, autoPatchelfHook, popt }: +{ stdenv, lib, fetchFromGitHub, autoPatchelfHook, popt, libxcrypt }: stdenv.mkDerivation rec { pname = "wmic-bin"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "1w1mdbiwz37wzry1q38h8dyjaa6iggmsb9wcyhhlawwm1vj50w48"; }; - buildInputs = [ popt ]; + buildInputs = [ popt libxcrypt ]; nativeBuildInputs = [ autoPatchelfHook ]; From 555d39b246e9b7339d27634a483076adbecd0d23 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Sep 2022 17:18:39 +0200 Subject: [PATCH 180/318] libreswan: fix build with libxcrypt --- pkgs/tools/networking/libreswan/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/libreswan/default.nix b/pkgs/tools/networking/libreswan/default.nix index 25ad29b1cfe71..01ac1af23ef0d 100644 --- a/pkgs/tools/networking/libreswan/default.nix +++ b/pkgs/tools/networking/libreswan/default.nix @@ -11,6 +11,7 @@ , pam , libevent , libcap_ng +, libxcrypt , curl , nspr , bash @@ -66,7 +67,7 @@ stdenv.mkDerivation rec { buildInputs = [ systemd coreutils gnused gawk gmp unbound pam libevent - libcap_ng curl nspr nss ldns + libcap_ng libxcrypt curl nspr nss ldns # needed to patch shebangs python3 bash ] ++ lib.optional stdenv.isLinux libselinux; From 167544c2df5c76d84819d8421f823be886691ff2 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Sep 2022 17:27:45 +0200 Subject: [PATCH 181/318] tengine: fix build with libxcrypt --- pkgs/servers/http/tengine/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/tengine/default.nix b/pkgs/servers/http/tengine/default.nix index d7c8ea226febf..d464f7aa3e5f2 100644 --- a/pkgs/servers/http/tengine/default.nix +++ b/pkgs/servers/http/tengine/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, openssl, zlib, pcre, libxml2, libxslt +{ lib, stdenv, fetchFromGitHub, openssl, zlib, pcre, libxcrypt, libxml2, libxslt , substituteAll, gd, geoip, gperftools, jemalloc, nixosTests , withDebug ? false , withMail ? false @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { }; buildInputs = - [ openssl zlib pcre libxml2 libxslt gd geoip gperftools jemalloc ] + [ openssl zlib pcre libxcrypt libxml2 libxslt gd geoip gperftools jemalloc ] ++ concatMap (mod: mod.inputs or []) modules; patches = singleton (substituteAll { From 3575e575f87a744f81cf059eaf5111debb1cc3c2 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 29 Sep 2022 17:13:49 +0200 Subject: [PATCH 182/318] libguestfs: fix build with libxcrypt --- pkgs/development/libraries/libguestfs/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/libguestfs/default.nix b/pkgs/development/libraries/libguestfs/default.nix index e2da1a30ff146..745b1a180008c 100644 --- a/pkgs/development/libraries/libguestfs/default.nix +++ b/pkgs/development/libraries/libguestfs/default.nix @@ -4,6 +4,7 @@ , pkg-config , autoreconfHook , makeWrapper +, libxcrypt , ncurses , cpio , gperf @@ -65,6 +66,7 @@ stdenv.mkDerivation rec { ] ++ (with perlPackages; [ perl libintl-perl GetoptLong ModuleBuild ]) ++ (with ocamlPackages; [ ocaml findlib ]); buildInputs = [ + libxcrypt ncurses jansson pcre2 From ec31b96900ed4acfe41dec2f0ce04d12e4a5b18b Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 29 Sep 2022 17:14:03 +0200 Subject: [PATCH 183/318] leafnode: fix build with libxcrypt --- pkgs/servers/news/leafnode/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/news/leafnode/default.nix b/pkgs/servers/news/leafnode/default.nix index 03aea95177a4d..32c59aea2bd37 100644 --- a/pkgs/servers/news/leafnode/default.nix +++ b/pkgs/servers/news/leafnode/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pcre }: +{ lib, stdenv, fetchurl, pcre, libxcrypt }: stdenv.mkDerivation { pname = "leafnode"; @@ -27,7 +27,7 @@ stdenv.mkDerivation { sed -i validatefqdn.c -e 's/int is_validfqdn(const char \*f) {/int is_validfqdn(const char *f) { return 1;/;' ''; - buildInputs = [ pcre]; + buildInputs = [ pcre libxcrypt ]; meta = { homepage = "http://leafnode.sourceforge.net/"; From 84eda8bc8b0e9bc9bada2a752b885d82cc804354 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 29 Sep 2022 17:20:34 +0200 Subject: [PATCH 184/318] lsh: fix build with libxcrypt --- pkgs/tools/networking/lsh/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/lsh/default.nix b/pkgs/tools/networking/lsh/default.nix index 07f0524d5f4fa..7c5e09b950ae1 100644 --- a/pkgs/tools/networking/lsh/default.nix +++ b/pkgs/tools/networking/lsh/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, gperf, guile, gmp, zlib, liboop, readline, gnum4, pam -, nettools, lsof, procps }: +, nettools, lsof, procps, libxcrypt }: stdenv.mkDerivation rec { pname = "lsh"; @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { # Should be present in upcoming 2.1 release. NIX_CFLAGS_COMPILE = "-std=gnu90 -fcommon"; - buildInputs = [ gperf guile gmp zlib liboop readline gnum4 pam ]; + buildInputs = [ gperf guile gmp zlib liboop readline gnum4 pam libxcrypt ]; meta = { description = "GPL'd implementation of the SSH protocol"; From 31e5ad8466035f6de2b6e900837fc8b6ee78d348 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 29 Sep 2022 17:20:56 +0200 Subject: [PATCH 185/318] pgpool: fix build with libxcrypt --- pkgs/servers/sql/pgpool/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/servers/sql/pgpool/default.nix b/pkgs/servers/sql/pgpool/default.nix index 436217f2e63e5..10b8871c57861 100644 --- a/pkgs/servers/sql/pgpool/default.nix +++ b/pkgs/servers/sql/pgpool/default.nix @@ -3,6 +3,7 @@ , fetchurl , postgresql , openssl +, libxcrypt , withPam ? stdenv.isLinux , pam }: @@ -20,6 +21,7 @@ stdenv.mkDerivation rec { buildInputs = [ postgresql openssl + libxcrypt ] ++ lib.optional withPam pam; configureFlags = [ From 47945f27bfa569c3f1bc010db39d24af2233ce5c Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 29 Sep 2022 17:21:15 +0200 Subject: [PATCH 186/318] groonga: fix build with libxcrypt --- pkgs/servers/search/groonga/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/search/groonga/default.nix b/pkgs/servers/search/groonga/default.nix index ffe9f901df582..7b7717828e17e 100644 --- a/pkgs/servers/search/groonga/default.nix +++ b/pkgs/servers/search/groonga/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, autoreconfHook, mecab, kytea, libedit, pkg-config +{ lib, stdenv, fetchurl, autoreconfHook, mecab, kytea, libedit, pkg-config, libxcrypt , suggestSupport ? false, zeromq, libevent, msgpack, openssl , lz4Support ? false, lz4 , zlibSupport ? true, zlib @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { ''; buildInputs = with lib; - [ mecab kytea libedit openssl ] + [ mecab kytea libedit openssl libxcrypt ] ++ optional lz4Support lz4 ++ optional zlibSupport zlib ++ optionals suggestSupport [ zeromq libevent msgpack ]; From da15c9c274a33074f364f2c3c0a38f9c139f5107 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 29 Sep 2022 17:21:28 +0200 Subject: [PATCH 187/318] mailutils: fix build with libxcrypt --- pkgs/tools/networking/mailutils/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/networking/mailutils/default.nix b/pkgs/tools/networking/mailutils/default.nix index faccef57697a0..225b208822a3a 100644 --- a/pkgs/tools/networking/mailutils/default.nix +++ b/pkgs/tools/networking/mailutils/default.nix @@ -22,6 +22,7 @@ , python3 , sasl , system-sendmail +, libxcrypt }: stdenv.mkDerivation rec { @@ -63,6 +64,7 @@ stdenv.mkDerivation rec { python3 readline sasl + libxcrypt ] ++ lib.optionals stdenv.isLinux [ nettools ]; patches = [ From 2a7df1adc851f3f78efe797ec5d8dd998d9786e3 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 29 Sep 2022 17:26:17 +0200 Subject: [PATCH 188/318] popa3d: fix build with libxcrypt --- pkgs/servers/mail/popa3d/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/mail/popa3d/default.nix b/pkgs/servers/mail/popa3d/default.nix index 9678bfe3fa28a..d36d26b5d520a 100644 --- a/pkgs/servers/mail/popa3d/default.nix +++ b/pkgs/servers/mail/popa3d/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, openssl }: +{ lib, stdenv, fetchurl, openssl, libxcrypt }: stdenv.mkDerivation rec { pname = "popa3d"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "1g48cd74sqhl496wmljhq44iyfpghaz363a1ip8nyhpjz7d57f03"; }; - buildInputs = [ openssl ]; + buildInputs = [ openssl libxcrypt ]; patches = [ ./fix-mail-spool-path.patch From 870b0ebd13514e4629460d3742c563ef01996c37 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Sep 2022 17:29:47 +0200 Subject: [PATCH 189/318] tcsh: fix build with libxcrypt --- pkgs/shells/tcsh/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/shells/tcsh/default.nix b/pkgs/shells/tcsh/default.nix index 4fac6eb13d640..8ca3eb5a9ee1b 100644 --- a/pkgs/shells/tcsh/default.nix +++ b/pkgs/shells/tcsh/default.nix @@ -2,6 +2,7 @@ , stdenv , fetchurl , fetchpatch +, libxcrypt , ncurses }: @@ -16,6 +17,7 @@ stdenv.mkDerivation rec { strictDeps = true; buildInputs = [ + libxcrypt ncurses ]; From c7b0317c909c8c49cc0e1c8a44e7e48f355cc537 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Sep 2022 17:40:20 +0200 Subject: [PATCH 190/318] swiProlog: fix build with libxcrypt --- pkgs/development/compilers/swi-prolog/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/swi-prolog/default.nix b/pkgs/development/compilers/swi-prolog/default.nix index d53d1426a94b2..a1eb060d6bab6 100644 --- a/pkgs/development/compilers/swi-prolog/default.nix +++ b/pkgs/development/compilers/swi-prolog/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, jdk, gmp, readline, openssl, unixODBC, zlib -, libarchive, db, pcre, libedit, libossp_uuid, libXpm +, libarchive, db, pcre, libedit, libossp_uuid, libxcrypt,libXpm , libSM, libXt, freetype, pkg-config, fontconfig , cmake, libyaml, Security , libjpeg, libX11, libXext, libXft, libXinerama @@ -59,7 +59,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ gmp readline openssl - libarchive libyaml db pcre libedit libossp_uuid + libarchive libyaml db pcre libedit libossp_uuid libxcrypt zlib ] ++ lib.optionals (withGui && !stdenv.isDarwin) [ libXpm libX11 libXext libXft libXinerama libjpeg ] ++ extraLibraries From 7f0e9f08599550e7c853e515d4c626150d9a8692 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Sep 2022 17:41:13 +0200 Subject: [PATCH 191/318] sumo: fix build with libxcrypt --- pkgs/applications/science/networking/sumo/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/networking/sumo/default.nix b/pkgs/applications/science/networking/sumo/default.nix index 9cdf576b9c682..7c5794eb8e831 100644 --- a/pkgs/applications/science/networking/sumo/default.nix +++ b/pkgs/applications/science/networking/sumo/default.nix @@ -1,7 +1,7 @@ { lib, bzip2, cmake, eigen, fetchFromGitHub, ffmpeg, fox_1_6, gdal, git, gl2ps, gpp , gtest, jdk, libGL, libGLU, libX11, libjpeg, - libpng, libtiff, openscenegraph , proj, python3, python37Packages, - stdenv, swig, xercesc, xorg, zlib }: + libpng, libtiff, libxcrypt, openscenegraph , proj, python3, + python37Packages, stdenv, swig, xercesc, xorg, zlib }: stdenv.mkDerivation rec { pname = "sumo"; @@ -36,6 +36,7 @@ stdenv.mkDerivation rec { libjpeg libpng libtiff + libxcrypt openscenegraph proj python37Packages.setuptools From eb2ed865eb1bee848d81b188cb23fee4fb2186cb Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Sep 2022 18:28:05 +0200 Subject: [PATCH 192/318] toybox: fix build with libxcrypt --- pkgs/tools/misc/toybox/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/toybox/default.nix b/pkgs/tools/misc/toybox/default.nix index fc9465f35cdc1..c94537c0bfd24 100644 --- a/pkgs/tools/misc/toybox/default.nix +++ b/pkgs/tools/misc/toybox/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchFromGitHub, which, - buildPackages, + buildPackages, libxcrypt, enableStatic ? stdenv.hostPlatform.isStatic, enableMinimal ? false, extraConfig ? "" @@ -18,8 +18,12 @@ stdenv.mkDerivation rec { }; depsBuildBuild = [ buildPackages.stdenv.cc ]; # needed for cross - buildInputs = lib.optionals (enableStatic && stdenv.cc.libc ? static) - [ stdenv.cc.libc stdenv.cc.libc.static ]; + buildInputs = [ + libxcrypt + ] ++lib.optionals (enableStatic && stdenv.cc.libc ? static) [ + stdenv.cc.libc + stdenv.cc.libc.static + ]; postPatch = "patchShebangs ."; From aac6de8d3162de6eb2526a785ea7b5cfa1cbd3cd Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Sep 2022 18:29:11 +0200 Subject: [PATCH 193/318] gcc10: fix build with libxcrypt --- pkgs/development/compilers/gcc/10/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/gcc/10/default.nix b/pkgs/development/compilers/gcc/10/default.nix index 78728c3c592b0..207860b90c0ec 100644 --- a/pkgs/development/compilers/gcc/10/default.nix +++ b/pkgs/development/compilers/gcc/10/default.nix @@ -26,6 +26,7 @@ , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places , buildPackages +, libxcrypt }: # Make sure we get GNU sed. @@ -172,7 +173,7 @@ stdenv.mkDerivation ({ ++ optional targetPlatform.isLinux patchelf; buildInputs = [ - gmp mpfr libmpc + gmp mpfr libmpc libxcrypt targetPackages.stdenv.cc.bintools # For linking code at run-time ] ++ (optional (isl != null) isl) ++ (optional (zlib != null) zlib) @@ -182,10 +183,12 @@ stdenv.mkDerivation ({ NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl"; - preConfigure = import ../common/pre-configure.nix { + preConfigure = (import ../common/pre-configure.nix { inherit lib; inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic enableMultilib; - }; + }) + '' + ln -sf ${libxcrypt}/include/crypt.h libsanitizer/sanitizer_common/crypt.h + ''; dontDisableStatic = true; From 21c552eaf6bf28b83fbee425bd49e9a049b76fbc Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Sep 2022 19:02:02 +0200 Subject: [PATCH 194/318] gcc12: fix build with libxcrypt --- pkgs/development/compilers/gcc/12/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/gcc/12/default.nix b/pkgs/development/compilers/gcc/12/default.nix index 10ce704382a79..c7fcd5475ade6 100644 --- a/pkgs/development/compilers/gcc/12/default.nix +++ b/pkgs/development/compilers/gcc/12/default.nix @@ -26,6 +26,7 @@ , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places , buildPackages +, libxcrypt }: # Make sure we get GNU sed. @@ -173,7 +174,7 @@ stdenv.mkDerivation ({ ++ optional targetPlatform.isLinux patchelf; buildInputs = [ - gmp mpfr libmpc + gmp mpfr libmpc libxcrypt targetPackages.stdenv.cc.bintools # For linking code at run-time ] ++ (optional (isl != null) isl) ++ (optional (zlib != null) zlib) @@ -183,10 +184,13 @@ stdenv.mkDerivation ({ NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl"; - preConfigure = import ../common/pre-configure.nix { + + preConfigure = (import ../common/pre-configure.nix { inherit lib; inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic enableMultilib; - }; + }) + '' + ln -sf ${libxcrypt}/include/crypt.h libsanitizer/sanitizer_common/crypt.h + ''; dontDisableStatic = true; From 126319f7b02795005bdc664e88e75818f8f6f56a Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 01:43:34 +0200 Subject: [PATCH 195/318] xrootd: fix build with libxcrypt --- pkgs/tools/networking/xrootd/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/networking/xrootd/default.nix b/pkgs/tools/networking/xrootd/default.nix index 24354f3ec7c1c..454ee09446209 100644 --- a/pkgs/tools/networking/xrootd/default.nix +++ b/pkgs/tools/networking/xrootd/default.nix @@ -9,6 +9,7 @@ , fuse , libkrb5 , libuuid +, libxcrypt , libxml2 , openssl , readline @@ -48,6 +49,7 @@ stdenv.mkDerivation rec { curl libkrb5 libuuid + libxcrypt libxml2 openssl readline From 897f5b25fb35a340bc7b65243fc5de45a3e84109 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 01:47:06 +0200 Subject: [PATCH 196/318] pounce: fix build with libxcrypt --- pkgs/servers/pounce/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/pounce/default.nix b/pkgs/servers/pounce/default.nix index 0d01f9cb7c493..e03d6e6827a15 100644 --- a/pkgs/servers/pounce/default.nix +++ b/pkgs/servers/pounce/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, libressl, fetchzip, pkg-config }: +{ lib, stdenv, libressl, fetchzip, pkg-config, libxcrypt }: stdenv.mkDerivation rec { pname = "pounce"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "17vmbfr7ika6kmq9jqa3rpd4cr71arapav7hlmggnj7a9yw5b9mg"; }; - buildInputs = [ libressl ]; + buildInputs = [ libressl libxcrypt ]; nativeBuildInputs = [ pkg-config ]; From 29392852362839e48459f6225997c3609c37f598 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 01:47:20 +0200 Subject: [PATCH 197/318] uwsgi: fix build with libxcrypt --- pkgs/servers/uwsgi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/uwsgi/default.nix b/pkgs/servers/uwsgi/default.nix index d24c482a8895a..2dc2c3230a82c 100644 --- a/pkgs/servers/uwsgi/default.nix +++ b/pkgs/servers/uwsgi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, nixosTests, lib, fetchurl, pkg-config, jansson, pcre +{ stdenv, nixosTests, lib, fetchurl, pkg-config, jansson, pcre, libxcrypt # plugins: list of strings, eg. [ "python2" "python3" ] , plugins ? [] , pam, withPAM ? stdenv.isLinux @@ -74,7 +74,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ python3 pkg-config ]; - buildInputs = [ jansson pcre ] + buildInputs = [ jansson pcre libxcrypt ] ++ lib.optional withPAM pam ++ lib.optional withSystemd systemd ++ lib.optional withCap libcap From a1c07a61b2b8c12254a69b36f70187ee33c84152 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 01:47:35 +0200 Subject: [PATCH 198/318] super: fix build with libxcrypt --- pkgs/tools/security/super/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/super/default.nix b/pkgs/tools/security/super/default.nix index eba7def957ce3..1c2e9cbd4ab4e 100644 --- a/pkgs/tools/security/super/default.nix +++ b/pkgs/tools/security/super/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, fetchpatch }: +{ lib, stdenv, fetchurl, fetchpatch, libxcrypt }: stdenv.mkDerivation rec { pname = "super"; @@ -37,6 +37,8 @@ stdenv.mkDerivation rec { "--localstatedir=/var" ]; + buildInputs = [ libxcrypt ]; + installFlags = [ "sysconfdir=$(out)/etc" "localstatedir=$(TMPDIR)" ]; meta = { From e1f8bfbbd1007f74d4e8db08422622ef01d6a5c3 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 01:57:53 +0200 Subject: [PATCH 199/318] policycoreutils: fix build with libxcrypt --- pkgs/os-specific/linux/policycoreutils/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/policycoreutils/default.nix b/pkgs/os-specific/linux/policycoreutils/default.nix index c066dd4c4c5c5..33875049747dd 100644 --- a/pkgs/os-specific/linux/policycoreutils/default.nix +++ b/pkgs/os-specific/linux/policycoreutils/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, gettext, libsepol, libselinux, libsemanage }: +{ lib, stdenv, fetchurl, gettext, libsepol, libselinux, libsemanage, libxcrypt }: stdenv.mkDerivation rec { pname = "policycoreutils"; @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ gettext ]; - buildInputs = [ libsepol libselinux libsemanage ]; + buildInputs = [ libsepol libselinux libsemanage libxcrypt ]; makeFlags = [ "PREFIX=$(out)" From 77c50b072905f6b3c793f600f97455b5df9a5568 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 01:58:20 +0200 Subject: [PATCH 200/318] pies: fix build with libxcrypt --- pkgs/servers/pies/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/pies/default.nix b/pkgs/servers/pies/default.nix index d96835c94978f..9f5dfafcbea1d 100644 --- a/pkgs/servers/pies/default.nix +++ b/pkgs/servers/pies/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, lib, stdenv }: +{ fetchurl, lib, stdenv, libxcrypt }: stdenv.mkDerivation rec { pname = "pies"; @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "12r7rjjyibjdj08dvwbp0iflfpzl4s0zhn6cr6zj3hwf9gbzgl1g"; }; + buildInputs = [ libxcrypt ]; + configureFlags = ["--sysconfdir=/etc"]; hardeningDisable = [ "format" ]; From eee1cec722fcb7f934a4e807a10238097f58de6d Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 01:58:43 +0200 Subject: [PATCH 201/318] partimage: fix build with libxcrypt --- pkgs/tools/backup/partimage/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/backup/partimage/default.nix b/pkgs/tools/backup/partimage/default.nix index afb8489e1f429..d5a2863d968d8 100644 --- a/pkgs/tools/backup/partimage/default.nix +++ b/pkgs/tools/backup/partimage/default.nix @@ -7,6 +7,7 @@ , openssl , pkg-config , slang +, libxcrypt , autoreconfHook }: stdenv.mkDerivation rec { @@ -23,7 +24,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-ssl-headers=${openssl.dev}/include/openssl" ]; nativeBuildInputs = [ pkg-config autoreconfHook ]; - buildInputs = [ bzip2 zlib newt newt openssl slang ]; + buildInputs = [ bzip2 zlib newt newt openssl slang libxcrypt ]; patches = [ ./gentoos-zlib.patch From 55a576305eb0850048edced430bbb95192abd182 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 01:59:34 +0200 Subject: [PATCH 202/318] otpw: fix build with libxcrypt --- pkgs/os-specific/linux/otpw/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/otpw/default.nix b/pkgs/os-specific/linux/otpw/default.nix index 14381ac68c164..6c53bf16efc19 100644 --- a/pkgs/os-specific/linux/otpw/default.nix +++ b/pkgs/os-specific/linux/otpw/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pam }: +{ lib, stdenv, fetchurl, pam, libxcrypt }: stdenv.mkDerivation rec { pname = "otpw"; @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { cp *.8 $out/share/man/man8 ''; - buildInputs = [ pam ]; + buildInputs = [ pam libxcrypt ]; hardeningDisable = [ "stackprotector" ]; From f9df47f16d1fcd7893dc358ffed8d61d4015a9bb Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:01:41 +0200 Subject: [PATCH 203/318] zeroc-ice: fix build with libxcrypt --- pkgs/development/libraries/zeroc-ice/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/zeroc-ice/default.nix b/pkgs/development/libraries/zeroc-ice/default.nix index 4eef03c4a6193..3050525c2a29e 100644 --- a/pkgs/development/libraries/zeroc-ice/default.nix +++ b/pkgs/development/libraries/zeroc-ice/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitHub -, bzip2, expat, libedit, lmdb, openssl +, bzip2, expat, libedit, lmdb, openssl, libxcrypt , python3 # for tests only , cpp11 ? false }: @@ -31,7 +31,7 @@ in stdenv.mkDerivation rec { sha256 = "sha256-h455isEmnRyoasXhh1UaA5PICcEEM8/C3IJf5yHRl5g="; }; - buildInputs = [ zeroc_mcpp bzip2 expat libedit lmdb openssl ]; + buildInputs = [ zeroc_mcpp bzip2 expat libedit lmdb openssl libxcrypt ]; preBuild = '' makeFlagsArray+=( From 2b899ee967d64382557cba0f6b39e9d1c53b6e5d Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:01:57 +0200 Subject: [PATCH 204/318] luaPackages.luaposix: fix build with libxcrypt --- pkgs/development/lua-modules/overrides.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index 74ffea9643952..7f06652e66b3c 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -22,6 +22,7 @@ , libmysqlclient , libuuid , libuv +, libxcrypt , libyaml , mariadb , mpfr @@ -336,6 +337,12 @@ with prev; ]; }); + luaposix = prev.luaLib.overrideLuarocks prev.luaposix (drv: { + externalDeps = [ + { name = "CRYPT"; dep = libxcrypt; } + ]; + }); + luasec = prev.luaLib.overrideLuarocks prev.luasec (drv: { externalDeps = [ { name = "OPENSSL"; dep = openssl_1_1; } From fe91064c225215bd8a5095ce3909c6166b8c40c6 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:02:16 +0200 Subject: [PATCH 205/318] monit: fix build with libxcrypt --- pkgs/tools/system/monit/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/system/monit/default.nix b/pkgs/tools/system/monit/default.nix index b338f6a80d6af..07b0163b5ac99 100644 --- a/pkgs/tools/system/monit/default.nix +++ b/pkgs/tools/system/monit/default.nix @@ -4,6 +4,7 @@ , bison , flex , zlib +, libxcrypt , usePAM ? stdenv.hostPlatform.isLinux , pam , useSSL ? true @@ -20,7 +21,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ bison flex ]; - buildInputs = [ zlib.dev ] ++ + buildInputs = [ zlib.dev libxcrypt ] ++ lib.optionals useSSL [ openssl ] ++ lib.optionals usePAM [ pam ]; From e963dde643459007e043fc29a8b89b5a159793be Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:09:59 +0200 Subject: [PATCH 206/318] libfilezilla: fix build with libxcrypt --- pkgs/development/libraries/libfilezilla/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libfilezilla/default.nix b/pkgs/development/libraries/libfilezilla/default.nix index 16c09b65ff1e8..bc70e1fde3aca 100644 --- a/pkgs/development/libraries/libfilezilla/default.nix +++ b/pkgs/development/libraries/libfilezilla/default.nix @@ -6,6 +6,7 @@ , nettle , pkg-config , libiconv +, libxcrypt , ApplicationServices }: @@ -20,7 +21,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = [ gettext gnutls nettle ] + buildInputs = [ gettext gnutls nettle libxcrypt ] ++ lib.optionals stdenv.isDarwin [ libiconv ApplicationServices ]; enableParallelBuilding = true; From 2e7e473125226319b981c72195eb024d69725059 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:10:16 +0200 Subject: [PATCH 207/318] libsigrokdecode: fix build with libxcrypt --- pkgs/development/tools/libsigrokdecode/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/libsigrokdecode/default.nix b/pkgs/development/tools/libsigrokdecode/default.nix index 06b5f5c35bbad..672dddfc5ca22 100644 --- a/pkgs/development/tools/libsigrokdecode/default.nix +++ b/pkgs/development/tools/libsigrokdecode/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pkg-config, glib, python3, check }: +{ lib, stdenv, fetchurl, pkg-config, glib, python3, check, libxcrypt }: stdenv.mkDerivation rec { pname = "libsigrokdecode"; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ glib python3 ]; + buildInputs = [ glib python3 libxcrypt ]; checkInputs = [ check ]; doCheck = true; From 67408deaa2d4dcdf958dd6b071c85c127c9f9393 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:10:31 +0200 Subject: [PATCH 208/318] hylafaxplus: fix build with libxcrypt --- pkgs/servers/hylafaxplus/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/servers/hylafaxplus/default.nix b/pkgs/servers/hylafaxplus/default.nix index d02f1b5a7e376..c1a8cdc26d8e3 100644 --- a/pkgs/servers/hylafaxplus/default.nix +++ b/pkgs/servers/hylafaxplus/default.nix @@ -13,6 +13,7 @@ , gnugrep , gnused , libtiff +, libxcrypt , openssl , psmisc , sharutils @@ -79,6 +80,7 @@ stdenv.mkDerivation { file # for `file` command ghostscript libtiff + libxcrypt openssl psmisc # for `fuser` command sharutils # for `uuencode` command From f0f14f1db5cbf4c291af6e1af4ccff77665a4881 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:10:51 +0200 Subject: [PATCH 209/318] dropbear: fix build with libxcrypt --- pkgs/tools/networking/dropbear/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/dropbear/default.nix b/pkgs/tools/networking/dropbear/default.nix index 30efbcc508d0b..e15b0072be769 100644 --- a/pkgs/tools/networking/dropbear/default.nix +++ b/pkgs/tools/networking/dropbear/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, glibc, zlib +{ lib, stdenv, fetchurl, glibc, zlib, libxcrypt , enableStatic ? stdenv.hostPlatform.isStatic , enableSCP ? false , sftpPath ? "/run/current-system/sw/libexec/sftp-server" @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { ./pass-path.patch ]; - buildInputs = [ zlib ] ++ lib.optionals enableStatic [ glibc.static zlib.static ]; + buildInputs = [ zlib libxcrypt ] ++ lib.optionals enableStatic [ glibc.static zlib.static ]; meta = with lib; { homepage = "https://matt.ucc.asn.au/dropbear/dropbear.html"; From 64e160c0b01a4f30307defe42834d14d1f57233e Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:30:48 +0200 Subject: [PATCH 210/318] kodi: fix build with libxcrypt --- pkgs/applications/video/kodi/unwrapped.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/kodi/unwrapped.nix b/pkgs/applications/video/kodi/unwrapped.nix index a37e5c92e241f..a272f90bd3334 100644 --- a/pkgs/applications/video/kodi/unwrapped.nix +++ b/pkgs/applications/video/kodi/unwrapped.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchFromGitHub, autoconf, automake, libtool, makeWrapper , pkg-config, cmake, yasm, python3Packages -, libgcrypt, libgpg-error, libunistring +, libxcrypt, libgcrypt, libgpg-error, libunistring , boost, avahi, lame , gettext, pcre-cpp, yajl, fribidi, which , openssl, gperf, tinyxml2, taglib, libssh, swig, jre_headless @@ -131,7 +131,7 @@ in stdenv.mkDerivation { sqlite libmysqlclient avahi lame curl bzip2 zip unzip glxinfo libcec libcec_platform dcadec libuuid - libgcrypt libgpg-error libunistring + libxcrypt libgcrypt libgpg-error libunistring libcrossguid libplist bluez giflib glib harfbuzz lcms2 libpthreadstubs ffmpeg flatbuffers fstrcmp rapidjson From 24bc4540bfd314e90881bade8bed7557090cfa7b Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:31:09 +0200 Subject: [PATCH 211/318] pure-ftpd: fix build with libxcrypt --- pkgs/servers/ftp/pure-ftpd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/ftp/pure-ftpd/default.nix b/pkgs/servers/ftp/pure-ftpd/default.nix index 15f1520b80708..fe82f1c4679d6 100644 --- a/pkgs/servers/ftp/pure-ftpd/default.nix +++ b/pkgs/servers/ftp/pure-ftpd/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, openssl, pam, fetchpatch }: +{ lib, stdenv, fetchurl, openssl, pam, libxcrypt }: stdenv.mkDerivation rec { pname = "pure-ftpd"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-QWD2a3ZhXuojl+rE6j8KFGt5KCB7ebxMwvma17e9lRM="; }; - buildInputs = [ openssl pam ]; + buildInputs = [ openssl pam libxcrypt ]; configureFlags = [ "--with-tls" ]; From 31f1f3627dbd5ee02ae639fe146183401fa4c36f Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:31:24 +0200 Subject: [PATCH 212/318] cernlib: fix build with libxcrypt --- pkgs/development/libraries/physics/cernlib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/physics/cernlib/default.nix b/pkgs/development/libraries/physics/cernlib/default.nix index 77ad6e201a32b..8eae6fcaad55c 100644 --- a/pkgs/development/libraries/physics/cernlib/default.nix +++ b/pkgs/development/libraries/physics/cernlib/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, gfortran, imake, makedepend, motif, xorg }: +{ lib, stdenv, fetchurl, gfortran, imake, makedepend, motif, xorg, libxcrypt }: stdenv.mkDerivation rec { version = "2006"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "0awla1rl96z82br7slcmg8ks1d2a7slk6dj79ywb871j2ksi3fky"; }; - buildInputs = with xorg; [ gfortran motif libX11 libXft libXt ]; + buildInputs = with xorg; [ gfortran motif libX11 libXft libXt libxcrypt ]; nativeBuildInputs = [ imake makedepend ]; sourceRoot = "."; From e33af60685cb9e8d3b3feed8ffe778d7e162af85 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:31:37 +0200 Subject: [PATCH 213/318] bozohttpd: fix build with libxcrypt --- pkgs/servers/http/bozohttpd/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/http/bozohttpd/default.nix b/pkgs/servers/http/bozohttpd/default.nix index 1574a953b174c..b236e1f2621f9 100644 --- a/pkgs/servers/http/bozohttpd/default.nix +++ b/pkgs/servers/http/bozohttpd/default.nix @@ -6,6 +6,7 @@ , inetutils , wget , openssl +, libxcrypt , minimal ? false , userSupport ? !minimal , cgiSupport ? !minimal @@ -42,7 +43,7 @@ stdenv.mkDerivation rec { ]; patchFlags = [ "-p3" ]; - buildInputs = [ openssl ] ++ optional (luaSupport) lua; + buildInputs = [ openssl libxcrypt ] ++ optional (luaSupport) lua; nativeBuildInputs = [ bmake groff ]; COPTS = [ From 519b8c8d9aabd437efd584815299d8f6e675570b Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:42:25 +0200 Subject: [PATCH 214/318] sawfish: fix build with libxcrypt --- pkgs/applications/window-managers/sawfish/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/window-managers/sawfish/default.nix b/pkgs/applications/window-managers/sawfish/default.nix index f75d7ec5d1bd7..ef001787a596f 100644 --- a/pkgs/applications/window-managers/sawfish/default.nix +++ b/pkgs/applications/window-managers/sawfish/default.nix @@ -8,6 +8,7 @@ , imlib , libICE , libSM +, libxcrypt , libXinerama , libXrandr , libXtst @@ -44,6 +45,7 @@ stdenv.mkDerivation rec { imlib libICE libSM + libxcrypt libXinerama libXrandr libXtst From 845ae8e68479bf07b823254a178fc0854448a4ec Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:42:40 +0200 Subject: [PATCH 215/318] qnial: fix build with libxcrypt --- pkgs/development/interpreters/qnial/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/qnial/default.nix b/pkgs/development/interpreters/qnial/default.nix index 74360daa87666..ae68c1ad6af3c 100644 --- a/pkgs/development/interpreters/qnial/default.nix +++ b/pkgs/development/interpreters/qnial/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, unzip, pkg-config, makeWrapper, ncurses }: +{ lib, stdenv, fetchFromGitHub, unzip, pkg-config, makeWrapper, ncurses, libxcrypt }: stdenv.mkDerivation { pname = "qnial"; @@ -26,6 +26,7 @@ stdenv.mkDerivation { buildInputs = [ ncurses + libxcrypt ]; meta = { From 09597d4807616073eb21f695d0400eb7520aaf2f Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:42:53 +0200 Subject: [PATCH 216/318] unicon-lang: fix build with libxcrypt --- pkgs/development/interpreters/unicon-lang/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/unicon-lang/default.nix b/pkgs/development/interpreters/unicon-lang/default.nix index 848c9541114e5..593a955c798bb 100644 --- a/pkgs/development/interpreters/unicon-lang/default.nix +++ b/pkgs/development/interpreters/unicon-lang/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, unzip, libX11, libXt, libnsl }: +{ lib, stdenv, fetchurl, unzip, libX11, libXt, libnsl, libxcrypt }: stdenv.mkDerivation { pname = "unicon-lang"; @@ -8,7 +8,7 @@ stdenv.mkDerivation { sha256 = "1g9l2dfp99dqih2ir2limqfjgagh3v9aqly6x0l3qavx3qkkwf61"; }; nativeBuildInputs = [ unzip ]; - buildInputs = [ libnsl libX11 libXt ]; + buildInputs = [ libnsl libX11 libXt libxcrypt ]; hardeningDisable = [ "fortify" ]; From 15f6c0a3557c4246178dbae5640a9c1cd9da2874 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:43:07 +0200 Subject: [PATCH 217/318] gvm-libs: fix build with libxcrypt --- pkgs/development/libraries/gvm-libs/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/gvm-libs/default.nix b/pkgs/development/libraries/gvm-libs/default.nix index a141d36e33006..ba08fc61f5682 100644 --- a/pkgs/development/libraries/gvm-libs/default.nix +++ b/pkgs/development/libraries/gvm-libs/default.nix @@ -12,6 +12,7 @@ , libpcap , libssh , libuuid +, libxcrypt , libxml2 , pkg-config , zlib @@ -46,6 +47,7 @@ stdenv.mkDerivation rec { libpcap libssh libuuid + libxcrypt libxml2 zlib ]; From 8dde32e4147d15e788ef2460e8672048bcf3c016 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:43:23 +0200 Subject: [PATCH 218/318] snis: fix build with libxcrypt --- pkgs/games/snis/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/games/snis/default.nix b/pkgs/games/snis/default.nix index ed09ed46eff54..b74fef4518208 100644 --- a/pkgs/games/snis/default.nix +++ b/pkgs/games/snis/default.nix @@ -18,6 +18,7 @@ , sox , libopus , openscad +, libxcrypt }: stdenv.mkDerivation { @@ -46,7 +47,7 @@ stdenv.mkDerivation { ''; nativeBuildInputs = [ pkg-config openscad makeWrapper ]; - buildInputs = [ coreutils portaudio libbsd libpng libvorbis SDL2 lua5_2 glew openssl picotts sox alsa-utils libopus ]; + buildInputs = [ coreutils portaudio libbsd libpng libvorbis SDL2 lua5_2 glew openssl picotts sox alsa-utils libopus libxcrypt ]; postBuild = '' make models -j$NIX_BUILD_CORES From 125ec340c876d30806fe510c504c0093ac5f4130 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:43:38 +0200 Subject: [PATCH 219/318] slock: fix build with libxcrypt --- pkgs/misc/screensavers/slock/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/screensavers/slock/default.nix b/pkgs/misc/screensavers/slock/default.nix index 9f364ba520cd2..c23b5fdc249b8 100644 --- a/pkgs/misc/screensavers/slock/default.nix +++ b/pkgs/misc/screensavers/slock/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, writeText -, xorgproto, libX11, libXext, libXrandr +, xorgproto, libX11, libXext, libXrandr, libxcrypt # default header can be obtained from # https://git.suckless.org/slock/tree/config.def.h , conf ? null }: @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { sha256 = "0sif752303dg33f14k6pgwq2jp1hjyhqv6x4sy3sj281qvdljf5m"; }; - buildInputs = [ xorgproto libX11 libXext libXrandr ]; + buildInputs = [ xorgproto libX11 libXext libXrandr libxcrypt ]; installFlags = [ "PREFIX=$(out)" ]; From fd1bcb107a77fdd7f90d21ecea4eee157da48e82 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:43:58 +0200 Subject: [PATCH 220/318] dico: fix build with libxcrypt --- pkgs/servers/dico/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/dico/default.nix b/pkgs/servers/dico/default.nix index 0275046aa2526..e372ffe9bad8f 100644 --- a/pkgs/servers/dico/default.nix +++ b/pkgs/servers/dico/default.nix @@ -1,5 +1,5 @@ { fetchurl, lib, stdenv, libtool, gettext, zlib, readline, gsasl -, guile, python3, pcre, libffi, groff }: +, guile, python3, pcre, libffi, groff, libxcrypt }: stdenv.mkDerivation rec { pname = "dico"; @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ groff ]; buildInputs = - [ libtool gettext zlib readline gsasl guile python3 pcre libffi ]; + [ libtool gettext zlib readline gsasl guile python3 pcre libffi libxcrypt ]; strictDeps = true; From ccba311ff55e4e87526109f1d0fdb15b706916a1 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:44:10 +0200 Subject: [PATCH 221/318] dcap: fix build with libxcrypt --- pkgs/tools/networking/dcap/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/dcap/default.nix b/pkgs/tools/networking/dcap/default.nix index f606c3f6cd6a8..3ee1a389ef946 100644 --- a/pkgs/tools/networking/dcap/default.nix +++ b/pkgs/tools/networking/dcap/default.nix @@ -6,6 +6,7 @@ , libtool , zlib , cunit +, libxcrypt }: stdenv.mkDerivation rec { pname = "dcap"; @@ -19,7 +20,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ autoconf automake libtool ]; - buildInputs = [ zlib ]; + buildInputs = [ zlib libxcrypt ]; preConfigure = '' patchShebangs bootstrap.sh From 57f4391a43c34915ab9664e1b83af244cde9ab7d Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:44:24 +0200 Subject: [PATCH 222/318] haproxy: fix build with libxcrypt --- pkgs/tools/networking/haproxy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/haproxy/default.nix b/pkgs/tools/networking/haproxy/default.nix index 2a51d9ac0755a..b27c229ae04d4 100644 --- a/pkgs/tools/networking/haproxy/default.nix +++ b/pkgs/tools/networking/haproxy/default.nix @@ -2,7 +2,7 @@ , usePcre ? true , withPrometheusExporter ? true , stdenv, lib, fetchurl, nixosTests -, openssl, zlib +, openssl, zlib, libxcrypt , lua5_3 ? null, pcre ? null, systemd ? null }: @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-zp4Z6/zdQ+Ua+KYJDx341RLZct33QvpkimQ7uxkFZgU="; }; - buildInputs = [ openssl zlib ] + buildInputs = [ openssl zlib libxcrypt ] ++ lib.optional useLua lua5_3 ++ lib.optional usePcre pcre ++ lib.optional stdenv.isLinux systemd; From cfc636c357a07270223ec96c5be507faecada6e1 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:44:41 +0200 Subject: [PATCH 223/318] srelay: fix build with libxcrypt --- pkgs/tools/networking/srelay/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/srelay/default.nix b/pkgs/tools/networking/srelay/default.nix index da09395fc7a8a..709e4f9594a48 100644 --- a/pkgs/tools/networking/srelay/default.nix +++ b/pkgs/tools/networking/srelay/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl }: +{ lib, stdenv, fetchurl, libxcrypt }: stdenv.mkDerivation rec { pname = "srelay"; @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { patches = [ ./arm.patch ]; + buildInputs = [ libxcrypt ]; + installPhase = "install -D srelay $out/bin/srelay"; meta = { From 58bbfeb6985c406ef55ff3cd927bb723c612c023 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:57:03 +0200 Subject: [PATCH 224/318] nntp-proxy: fix build with libxcrypt --- pkgs/applications/networking/nntp-proxy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/nntp-proxy/default.nix b/pkgs/applications/networking/nntp-proxy/default.nix index 626913cd60a43..a3a136a32695c 100644 --- a/pkgs/applications/networking/nntp-proxy/default.nix +++ b/pkgs/applications/networking/nntp-proxy/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, libconfig, pkg-config, libevent, openssl }: +{ lib, stdenv, fetchFromGitHub, libconfig, pkg-config, libevent, openssl, libxcrypt }: stdenv.mkDerivation { pname = "nntp-proxy"; @@ -12,7 +12,7 @@ stdenv.mkDerivation { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ libconfig libevent openssl ]; + buildInputs = [ libconfig libevent openssl libxcrypt ]; installFlags = [ "INSTALL_DIR=$(out)/bin/" ]; From 7b33ea4752ea81e33faf8cba29b4e60252207ca6 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:57:18 +0200 Subject: [PATCH 225/318] shellhub-agent: fix build with libxcrypt --- pkgs/applications/networking/shellhub-agent/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/networking/shellhub-agent/default.nix b/pkgs/applications/networking/shellhub-agent/default.nix index a04e9a82e8c49..86242b5641e99 100644 --- a/pkgs/applications/networking/shellhub-agent/default.nix +++ b/pkgs/applications/networking/shellhub-agent/default.nix @@ -4,6 +4,7 @@ , gitUpdater , makeWrapper , openssh +, libxcrypt }: buildGoModule rec { @@ -31,6 +32,7 @@ buildGoModule rec { }; nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ libxcrypt ]; postInstall = '' wrapProgram $out/bin/agent --prefix PATH : ${lib.makeBinPath [ openssh ]} From 9fb94a820df8a469b2f0116540959691d96c4b26 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:57:33 +0200 Subject: [PATCH 226/318] pam_mysql: fix build with libxcrypt --- pkgs/os-specific/linux/pam_mysql/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/pam_mysql/default.nix b/pkgs/os-specific/linux/pam_mysql/default.nix index 807899cf2b28c..036d4b20cb4c5 100644 --- a/pkgs/os-specific/linux/pam_mysql/default.nix +++ b/pkgs/os-specific/linux/pam_mysql/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, meson, ninja, pam, pkg-config, libmysqlclient, mariadb }: +{ lib, stdenv, fetchFromGitHub, meson, ninja, pam, pkg-config, libmysqlclient, mariadb, libxcrypt }: stdenv.mkDerivation rec { pname = "pam_mysql"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ meson pkg-config ninja ]; - buildInputs = [ pam libmysqlclient mariadb ]; + buildInputs = [ pam libmysqlclient mariadb libxcrypt ]; meta = with lib; { description = "PAM authentication module against a MySQL database"; From 94e54c615279d156ef6e2c8d8f29ffffb3848714 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:57:49 +0200 Subject: [PATCH 227/318] pam_pgsql: fix build with libxcrypt --- pkgs/os-specific/linux/pam_pgsql/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/pam_pgsql/default.nix b/pkgs/os-specific/linux/pam_pgsql/default.nix index 3cfa6733efa84..2eabcefe584c6 100644 --- a/pkgs/os-specific/linux/pam_pgsql/default.nix +++ b/pkgs/os-specific/linux/pam_pgsql/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, postgresql, libgcrypt, pam }: +{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, postgresql, libgcrypt, pam, libxcrypt }: stdenv.mkDerivation rec { pname = "pam_pgsql"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = [ libgcrypt pam postgresql ]; + buildInputs = [ libgcrypt pam postgresql libxcrypt ]; meta = with lib; { description = "Support to authenticate against PostgreSQL for PAM-enabled appliations"; From 3edcff9eb2cd962860391099cb58f1faa18bcb9b Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:58:02 +0200 Subject: [PATCH 228/318] sysvinit: fix build with libxcrypt --- pkgs/os-specific/linux/sysvinit/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/sysvinit/default.nix b/pkgs/os-specific/linux/sysvinit/default.nix index 87b5b81066c20..c8ba3164ab09d 100644 --- a/pkgs/os-specific/linux/sysvinit/default.nix +++ b/pkgs/os-specific/linux/sysvinit/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, withoutInitTools ? false }: +{ lib, stdenv, fetchurl, libxcrypt, withoutInitTools ? false }: stdenv.mkDerivation rec { pname = if withoutInitTools then "sysvtools" else "sysvinit"; @@ -14,6 +14,8 @@ stdenv.mkDerivation rec { sed -i -e "s,/sbin/,$out/sbin/," src/halt.c src/init.c src/paths.h ''; + buildInputs = [ libxcrypt ]; + makeFlags = [ "SULOGINLIBS=-lcrypt" "ROOT=$(out)" "MANDIR=/share/man" ]; preInstall = From fc4f68d27c5c10f6e7170f39ab8bbae46fdbb17f Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 02:58:21 +0200 Subject: [PATCH 229/318] mokutil: fix build with libxcrypt --- pkgs/tools/security/mokutil/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/security/mokutil/default.nix b/pkgs/tools/security/mokutil/default.nix index b408e4d2c80eb..5a597b73a7cec 100644 --- a/pkgs/tools/security/mokutil/default.nix +++ b/pkgs/tools/security/mokutil/default.nix @@ -6,6 +6,7 @@ , openssl , efivar , keyutils +, libxcrypt }: stdenv.mkDerivation rec { @@ -28,6 +29,7 @@ stdenv.mkDerivation rec { openssl efivar keyutils + libxcrypt ]; meta = with lib; { From c755643cde23b589e98f1543171b36f9b5ef6248 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 03:05:16 +0200 Subject: [PATCH 230/318] epic5: fix build with libxcrypt --- pkgs/applications/networking/irc/epic5/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/irc/epic5/default.nix b/pkgs/applications/networking/irc/epic5/default.nix index 9b096eb72e9b0..969a9da46b15c 100644 --- a/pkgs/applications/networking/irc/epic5/default.nix +++ b/pkgs/applications/networking/irc/epic5/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, openssl, ncurses, libiconv, tcl, coreutils, fetchpatch }: +{ lib, stdenv, fetchurl, openssl, ncurses, libiconv, tcl, coreutils, fetchpatch, libxcrypt }: stdenv.mkDerivation rec { pname = "epic5"; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; # Darwin needs libiconv, tcl; while Linux build don't - buildInputs = [ openssl ncurses ] + buildInputs = [ openssl ncurses libxcrypt ] ++ lib.optionals stdenv.isDarwin [ libiconv tcl ]; patches = [ From bcdde95c79c94906ab8693fdd601bb72394d9357 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 03:05:32 +0200 Subject: [PATCH 231/318] kermit: fix build with libxcrypt --- pkgs/tools/misc/kermit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/kermit/default.nix b/pkgs/tools/misc/kermit/default.nix index 33644e911c635..bccecde01cc75 100644 --- a/pkgs/tools/misc/kermit/default.nix +++ b/pkgs/tools/misc/kermit/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, ncurses, glibc }: +{ lib, stdenv, fetchurl, ncurses, libxcrypt }: stdenv.mkDerivation { pname = "kermit"; @@ -9,7 +9,7 @@ stdenv.mkDerivation { sha256 = "0487mh6s99ijqf1pfmbm302pa5i4pzmm8s439hdl1ffs5g8jqpqd"; }; - buildInputs = [ ncurses glibc ]; + buildInputs = [ ncurses libxcrypt ]; unpackPhase = '' mkdir -p src From 6264d9461670ec4d8e43a3b9cd906c1d1da6d403 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 03:42:56 +0200 Subject: [PATCH 232/318] root5: fix build with libxcrypt --- pkgs/applications/science/misc/root/5.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/misc/root/5.nix b/pkgs/applications/science/misc/root/5.nix index 84443645865e8..1b4d6bcd04867 100644 --- a/pkgs/applications/science/misc/root/5.nix +++ b/pkgs/applications/science/misc/root/5.nix @@ -14,6 +14,7 @@ , libGL , zlib , libxml2 +, libxcrypt , lz4 , xz , gsl_1 @@ -33,7 +34,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = [ pcre python2 zlib libxml2 lz4 xz gsl_1 xxHash ] + buildInputs = [ pcre python2 zlib libxml2 lz4 xz gsl_1 xxHash libxcrypt ] ++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ] ++ lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ] ; From 2c10e089b9e5b0996e97c98cd57f44517e16d3f4 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 03:45:48 +0200 Subject: [PATCH 233/318] root: fix build with libxcrypt --- pkgs/applications/science/misc/root/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index 457b571be922a..5ae80c745bdce 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -16,6 +16,7 @@ , libXext , libGLU , libGL +, libxcrypt , libxml2 , llvm_9 , lz4 @@ -72,6 +73,7 @@ stdenv.mkDerivation rec { zlib zstd lapack + libxcrypt libxml2 _llvm_9 lz4 From 9430efb5bb5873d9ab4a152492ef56cad3ba61cd Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 03:46:00 +0200 Subject: [PATCH 234/318] pleroma: fix build with libxcrypt --- pkgs/servers/pleroma/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/servers/pleroma/default.nix b/pkgs/servers/pleroma/default.nix index e4204f28f1d5c..cb2d57112f332 100644 --- a/pkgs/servers/pleroma/default.nix +++ b/pkgs/servers/pleroma/default.nix @@ -1,6 +1,7 @@ { lib, beamPackages , fetchFromGitHub, fetchFromGitLab , file, cmake +, libxcrypt , nixosTests, writeText , ... }: @@ -129,6 +130,8 @@ beamPackages.mixRelease rec { postInstall = "mv $out/lib/erlang/lib/crypt-${version}/priv/{source,crypt}.so"; beamDeps = with final; [ elixir_make ]; + + buildInputs = [ libxcrypt ]; }; web_push_encryption = beamPackages.buildMix rec { name = "web_push_encryption"; From 3d6b548fd26c7c163bdb58f5369549e5c9c84271 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 03:58:47 +0200 Subject: [PATCH 235/318] sogo: fix build with libxcrypt --- pkgs/servers/web-apps/sogo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/web-apps/sogo/default.nix b/pkgs/servers/web-apps/sogo/default.nix index 286883722f64d..6517ad1a60011 100644 --- a/pkgs/servers/web-apps/sogo/default.nix +++ b/pkgs/servers/web-apps/sogo/default.nix @@ -1,4 +1,4 @@ -{ gnustep, lib, fetchFromGitHub, fetchpatch, makeWrapper, python3, lndir +{ gnustep, lib, fetchFromGitHub, fetchpatch, makeWrapper, python3, lndir, libxcrypt , openssl, openldap, sope, libmemcached, curl, libsodium, libytnef, libzip, pkg-config, nixosTests , oath-toolkit , enableActiveSync ? false @@ -15,7 +15,7 @@ gnustep.stdenv.mkDerivation rec { }; nativeBuildInputs = [ gnustep.make makeWrapper python3 pkg-config ]; - buildInputs = [ gnustep.base sope openssl libmemcached curl libsodium libytnef libzip openldap oath-toolkit ] + buildInputs = [ gnustep.base sope openssl libmemcached curl libsodium libytnef libzip openldap oath-toolkit libxcrypt ] ++ lib.optional enableActiveSync libwbxml; patches = lib.optional enableActiveSync ./enable-activesync.patch; From fb591b9d8b825b2fab6771b0d2ecf475028c5bfd Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 03:58:59 +0200 Subject: [PATCH 236/318] cde: fix build with libxcrypt --- pkgs/tools/package-management/cde/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/package-management/cde/default.nix b/pkgs/tools/package-management/cde/default.nix index 5e86e2affb32f..43a32eccda16d 100644 --- a/pkgs/tools/package-management/cde/default.nix +++ b/pkgs/tools/package-management/cde/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub, libxcrypt }: stdenv.mkDerivation rec { pname = "cde"; @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { # useful. preferLocalBuild = true; + buildInputs = [ libxcrypt ]; + patchBuild = '' sed -i -e '/install/d' $src/Makefile ''; From 993839aab56a9eb006d1162155ea43a471784a18 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 30 Sep 2022 04:06:10 +0200 Subject: [PATCH 237/318] bftpd: fix build with libxcrypt --- pkgs/servers/ftp/bftpd/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/ftp/bftpd/default.nix b/pkgs/servers/ftp/bftpd/default.nix index 6bedb469f4d47..73edd94a34935 100644 --- a/pkgs/servers/ftp/bftpd/default.nix +++ b/pkgs/servers/ftp/bftpd/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl }: +{ lib, stdenv, fetchurl, libxcrypt }: stdenv.mkDerivation rec { pname = "bftpd"; @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-lyHQYU4aXQ/muAyaigStqO/ULL393SOelagFmuKDqm8="; }; + buildInputs = [ libxcrypt ]; + preConfigure = '' sed -re 's/-[og] 0//g' -i Makefile* ''; From f64f7708014550a0ee7055a324aefd52c439142b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 1 Oct 2022 14:33:10 +0200 Subject: [PATCH 238/318] llvmPackages_13.compiler-rt: fix build with libxcrypt --- pkgs/development/compilers/llvm/13/compiler-rt/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix index 82b7ac048c755..9124686705ae7 100644 --- a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, src, cmake, python3, xcbuild, libllvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, src, cmake, python3, xcbuild, libllvm, libcxxabi, libxcrypt }: let @@ -28,6 +28,8 @@ stdenv.mkDerivation { "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" + ] ++ lib.optionals (haveLibc && !isMusl) [ + "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl || isAarch64) [ "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF" ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [ From efd944cb72d800366d883679129623edb7a06f13 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 1 Oct 2022 14:35:08 +0200 Subject: [PATCH 239/318] llvmPackages_12.compiler-rt: fix build with libxcrypt --- pkgs/development/compilers/llvm/12/compiler-rt/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/12/compiler-rt/default.nix b/pkgs/development/compilers/llvm/12/compiler-rt/default.nix index 1ac4b2afec184..ed34d06ed9861 100644 --- a/pkgs/development/compilers/llvm/12/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/12/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, xcbuild, libllvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, xcbuild, libllvm, libcxxabi, libxcrypt }: let @@ -26,6 +26,8 @@ stdenv.mkDerivation { "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" + ] ++ lib.optionals (haveLibc && !isMusl) [ + "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" "-DCOMPILER_RT_BUILD_XRAY=OFF" From 716a31527a077445eba266b58dcc8ae31afb36da Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 1 Oct 2022 14:35:25 +0200 Subject: [PATCH 240/318] llvmPackages_10.compiler-rt: fix build with libxcrypt --- pkgs/development/compilers/llvm/10/compiler-rt/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/10/compiler-rt/default.nix b/pkgs/development/compilers/llvm/10/compiler-rt/default.nix index d74aa519b769e..4ae59a4317705 100644 --- a/pkgs/development/compilers/llvm/10/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/10/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, libllvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, libllvm, libcxxabi, libxcrypt }: let @@ -25,6 +25,8 @@ stdenv.mkDerivation { "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" + ] ++ lib.optionals (haveLibc && !isMusl) [ + "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" "-DCOMPILER_RT_BUILD_XRAY=OFF" From 842a2c2399ae1557d4543a76d65b900d9ffe8d52 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 1 Oct 2022 16:56:31 +0200 Subject: [PATCH 241/318] llvmPackages_rocm.llvm: fix build with libxcrypt --- pkgs/development/compilers/llvm/rocm/llvm.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/rocm/llvm.nix b/pkgs/development/compilers/llvm/rocm/llvm.nix index 557d194668606..c5ad96a6a1892 100644 --- a/pkgs/development/compilers/llvm/rocm/llvm.nix +++ b/pkgs/development/compilers/llvm/rocm/llvm.nix @@ -9,6 +9,7 @@ , libxml2 , libffi , libbfd +, libxcrypt , ncurses , zlib , debugVersion ? false @@ -32,7 +33,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ninja python3 ]; - buildInputs = [ libxml2 ]; + buildInputs = [ libxml2 libxcrypt ]; propagatedBuildInputs = [ ncurses zlib ]; From 284396cf040776e401f309701f490d273c5c7d6b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 20:12:48 +0200 Subject: [PATCH 242/318] haskellPackages.crypt-sha512: fix build with libxcrypt and disable tests due to different ehaviour exhibited compared to glibc when a low number of rounds is passed. https://github.com/phadej/crypt-sha512/issues/13 --- .../haskell-modules/configuration-common.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 1f056ac25ef3c..5b84de8037666 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -2531,6 +2531,16 @@ self: super: { # Restrictive upper bound on base. # Remove once version 1.* is released monad-bayes = doJailbreak super.monad-bayes; + + crypt-sha512 = overrideCabal (drv: { + librarySystemDepends = [ + pkgs.libxcrypt + ]; + # Test failure after libxcrypt migration, reported upstrem at + # https://github.com/phadej/crypt-sha512/issues/13 + doCheck = false; + }) super.crypt-sha512; + } // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super // (let # We need to build purescript with these dependencies and thus also its reverse # dependencies to avoid version mismatches in their dependency closure. From 76700598c58e2ac10d382bcf717222e637bc918d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 3 Oct 2022 16:47:50 +0200 Subject: [PATCH 243/318] freeswitch: fix build with libxcrypt --- pkgs/servers/sip/freeswitch/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sip/freeswitch/default.nix b/pkgs/servers/sip/freeswitch/default.nix index 66c294f5d4a89..2eb7e24ab380e 100644 --- a/pkgs/servers/sip/freeswitch/default.nix +++ b/pkgs/servers/sip/freeswitch/default.nix @@ -1,7 +1,7 @@ { fetchFromGitHub, stdenv, lib, pkg-config, autoreconfHook , ncurses, gnutls, readline , openssl, perl, sqlite, libjpeg, speex, pcre, libuuid -, ldns, libedit, yasm, which, libsndfile, libtiff +, ldns, libedit, yasm, which, libsndfile, libtiff, libxcrypt , callPackage @@ -116,7 +116,7 @@ stdenv.mkDerivation rec { openssl ncurses gnutls readline libjpeg sqlite pcre speex ldns libedit libsndfile libtiff - libuuid + libuuid libxcrypt ] ++ lib.unique (lib.concatMap (mod: mod.inputs) enabledModules) ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ]; From 6f1812a59512f79526a1abbf0cd38b0ce089d999 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 3 Oct 2022 17:05:48 +0200 Subject: [PATCH 244/318] haskellPackages.Unixutils: fix build with libxcrypt --- pkgs/development/haskell-modules/configuration-common.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 5b84de8037666..3da5b58900a69 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -2541,6 +2541,13 @@ self: super: { doCheck = false; }) super.crypt-sha512; + Unixutils = overrideCabal (drv: { + librarySystemDepends = [ + pkgs.libxcrypt + ]; + }) super.Unixutils; + + } // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super // (let # We need to build purescript with these dependencies and thus also its reverse # dependencies to avoid version mismatches in their dependency closure. From 3f4de6d4ca71d9219bf68f32a6c8f36838a43111 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 3 Oct 2022 17:06:28 +0200 Subject: [PATCH 245/318] thttpd: fix build with libxcrypt --- pkgs/servers/http/thttpd/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/http/thttpd/default.nix b/pkgs/servers/http/thttpd/default.nix index 64e7309bc9bf2..c7a92bbf5f1ca 100644 --- a/pkgs/servers/http/thttpd/default.nix +++ b/pkgs/servers/http/thttpd/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl }: +{ lib, stdenv, fetchurl, libxcrypt }: stdenv.mkDerivation rec { pname = "thttpd"; @@ -14,6 +14,10 @@ stdenv.mkDerivation rec { sed -i -e 's/chmod 2755/chmod 755/' extras/Makefile.in ''; + buildInputs = [ + libxcrypt + ]; + preInstall = '' mkdir -p "$out/man/man1" sed -i -e 's/-o bin -g bin *//' Makefile From 2d19e7cf6b87a754952c038fdc39f82004f5e402 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 3 Oct 2022 17:13:29 +0200 Subject: [PATCH 246/318] haskellPackages.nano-cryptr: fix build with libxcrypt --- pkgs/development/haskell-modules/configuration-common.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 3da5b58900a69..f6e6692f96e4b 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -2541,6 +2541,12 @@ self: super: { doCheck = false; }) super.crypt-sha512; + nano-cryptr = overrideCabal (drv: { + librarySystemDepends = [ + pkgs.libxcrypt + ]; + }) super.nano-cryptr; + Unixutils = overrideCabal (drv: { librarySystemDepends = [ pkgs.libxcrypt From 9001f0dcd7a1adeec190d71b31c800ac31d1755b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 3 Oct 2022 17:16:08 +0200 Subject: [PATCH 247/318] haskellPackages.xmonad-utils: fix build with libxcrypt --- pkgs/development/haskell-modules/configuration-common.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index f6e6692f96e4b..ccf0bdaeda855 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -2553,6 +2553,11 @@ self: super: { ]; }) super.Unixutils; + xmonad-utils = overrideCabal (drv: { + librarySystemDepends = [ + pkgs.libxcrypt + ]; + }) super.xmonad-utils; } // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super // (let # We need to build purescript with these dependencies and thus also its reverse From e02766bc32b8743b3c52c2e129dad3d9e753b023 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 3 Oct 2022 17:26:05 +0200 Subject: [PATCH 248/318] ocserv: fix build with libxcrypt --- pkgs/tools/networking/ocserv/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/ocserv/default.nix b/pkgs/tools/networking/ocserv/default.nix index 067c614f58509..29801eebbd78d 100644 --- a/pkgs/tools/networking/ocserv/default.nix +++ b/pkgs/tools/networking/ocserv/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchFromGitLab, autoreconfHook, pkg-config, nettle, gnutls , libev, protobufc, guile, geoip, libseccomp, gperf, readline -, lz4, libgssglue, ronn, pam +, lz4, libgssglue, ronn, pam, libxcrypt }: stdenv.mkDerivation rec { @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ autoreconfHook gperf pkg-config ronn ]; - buildInputs = [ nettle gnutls libev protobufc guile geoip libseccomp readline lz4 libgssglue pam ]; + buildInputs = [ nettle gnutls libev protobufc guile geoip libseccomp readline lz4 libgssglue pam libxcrypt ]; meta = with lib; { homepage = "https://gitlab.com/openconnect/ocserv"; From 2b83e042065f2b07c5e88aa732cd11743f1fd081 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 3 Oct 2022 17:34:20 +0200 Subject: [PATCH 249/318] ladybird: fix build with libxcrypt --- pkgs/applications/networking/browsers/ladybird/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/networking/browsers/ladybird/default.nix b/pkgs/applications/networking/browsers/ladybird/default.nix index e5d7b8524a135..0bd3cc79df257 100644 --- a/pkgs/applications/networking/browsers/ladybird/default.nix +++ b/pkgs/applications/networking/browsers/ladybird/default.nix @@ -5,6 +5,7 @@ , ninja , unzip , wrapQtAppsHook +, libxcrypt , qtbase , qttools , nixosTests @@ -37,6 +38,7 @@ in gcc11Stdenv.mkDerivation { ]; buildInputs = [ + libxcrypt qtbase ]; From 0f7ef684887a5d108166b5679b607864365ef559 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 3 Oct 2022 17:51:47 +0200 Subject: [PATCH 250/318] cdesktopenv: fix build with libxcrypt --- pkgs/desktops/cdesktopenv/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/cdesktopenv/default.nix b/pkgs/desktops/cdesktopenv/default.nix index acb423f44bd35..2eb54d018bc69 100644 --- a/pkgs/desktops/cdesktopenv/default.nix +++ b/pkgs/desktops/cdesktopenv/default.nix @@ -3,7 +3,7 @@ , xorgproto, libX11, bison, ksh, perl, gnum4 , libXinerama, libXt, libXext, libtirpc, motif, libXft, xbitmaps , libjpeg, libXmu, libXdmcp, libXScrnSaver, symlinkJoin, bdftopcf -, ncompress, mkfontdir, tcl, libXaw, gcc, glibcLocales +, ncompress, mkfontdir, tcl, libXaw, libxcrypt, gcc, glibcLocales , autoPatchelfHook, libredirect, makeWrapper, xset, xrdb, fakeroot , rpcsvc-proto }: @@ -40,7 +40,7 @@ in stdenv.mkDerivation rec { buildInputs = [ libX11 libXinerama libXt libXext libtirpc motif libXft xbitmaps - libjpeg libXmu libXdmcp libXScrnSaver tcl libXaw ksh + libjpeg libXmu libXdmcp libXScrnSaver tcl libXaw ksh libxcrypt ]; nativeBuildInputs = [ bison ncompress autoPatchelfHook makeWrapper fakeroot From 01f94c290d5112eec07b8df56a4b86bfa7ff1d22 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 3 Oct 2022 18:16:53 +0200 Subject: [PATCH 251/318] wiringpi: fix build with libxcrypt --- pkgs/os-specific/linux/wiringpi/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/os-specific/linux/wiringpi/default.nix b/pkgs/os-specific/linux/wiringpi/default.nix index a06e25b9eb8eb..eed71188eb075 100644 --- a/pkgs/os-specific/linux/wiringpi/default.nix +++ b/pkgs/os-specific/linux/wiringpi/default.nix @@ -2,6 +2,7 @@ , stdenv , symlinkJoin , fetchFromGitHub +, libxcrypt }: let @@ -35,6 +36,9 @@ let inherit mkSubProject; wiringPi = mkSubProject { subprj = "wiringPi"; + buildInputs = [ + libxcrypt + ]; }; devLib = mkSubProject { subprj = "devLib"; @@ -45,6 +49,7 @@ let wiringPiD = mkSubProject { subprj = "wiringPiD"; buildInputs = [ + libxcrypt passthru.wiringPi passthru.devLib ]; @@ -52,6 +57,7 @@ let gpio = mkSubProject { subprj = "gpio"; buildInputs = [ + libxcrypt passthru.wiringPi passthru.devLib ]; From 3cedef1b6ac07f55786c21bf65f0445720a94326 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 3 Oct 2022 18:48:56 +0200 Subject: [PATCH 252/318] swift: fix build with libxcrypt --- pkgs/development/compilers/swift/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/compilers/swift/default.nix b/pkgs/development/compilers/swift/default.nix index 4109d6ee6dac6..0ea6e7b075969 100644 --- a/pkgs/development/compilers/swift/default.nix +++ b/pkgs/development/compilers/swift/default.nix @@ -14,6 +14,7 @@ , python3 , ncurses , libuuid +, libxcrypt , icu , libgcc , libblocksruntime @@ -195,6 +196,7 @@ let libedit libgcc libuuid + libxcrypt libxml2 ncurses sqlite From 73ffee897887c5ae7d5077ad5255ecb818ea79eb Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 5 Oct 2022 00:20:57 +0200 Subject: [PATCH 253/318] util-linux: pass libxcrypt, so sulogin gets built Util-linux does not fail when crypt() isn't available. It just doesn't build sulogin, which in turn breaks the initrd-builder for the systemd-stage-1 tests. --- pkgs/os-specific/linux/util-linux/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index d57fdba7310be..8df231c961e22 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -1,6 +1,7 @@ { lib, stdenv, fetchurl, pkg-config, zlib, shadow , capabilitiesSupport ? true , libcap_ng +, libxcrypt , ncursesSupport ? true , ncurses , pamSupport ? true @@ -68,7 +69,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ] ++ lib.optionals translateManpages [ po4a ]; - buildInputs = [ zlib ] + buildInputs = [ zlib libxcrypt ] ++ lib.optionals pamSupport [ pam ] ++ lib.optionals capabilitiesSupport [ libcap_ng ] ++ lib.optionals ncursesSupport [ ncurses ] From 1b8d6d359f1284b7ede0ce2ac152c74fb1a83f31 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 6 Oct 2022 04:09:44 +0200 Subject: [PATCH 254/318] python3Packages.twisted: Disable failing crypt test Fails due to a combination of libxcrypt and python upstream crypt changes. https://github.com/python/cpython/commit/0d3fe8ae4961bf551e7d5e42559e2ede1a08fd7c --- pkgs/development/python-modules/twisted/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/twisted/default.nix b/pkgs/development/python-modules/twisted/default.nix index fa6c4726222c9..fae5ef8cf1039 100644 --- a/pkgs/development/python-modules/twisted/default.nix +++ b/pkgs/development/python-modules/twisted/default.nix @@ -97,6 +97,9 @@ buildPythonPackage rec { echo 'MulticastTests.test_multicast.skip = "Reactor was unclean"'>> src/twisted/test/test_udp.py echo 'MulticastTests.test_multiListen.skip = "No such device"'>> src/twisted/test/test_udp.py + # fails since migrating to libxcrypt + echo 'HelperTests.test_refuteCryptedPassword.skip = "OSError: Invalid argument"' >> src/twisted/conch/test/test_checkers.py + # not packaged substituteInPlace src/twisted/test/test_failure.py \ --replace "from cython_test_exception_raiser import raiser # type: ignore[import]" "raiser = None" From 322b510d6b8d74bd701e5a5c3d9d7575383863cc Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 7 Oct 2022 03:55:32 +0200 Subject: [PATCH 255/318] python3Packages.pillow{,-simd}: fix build with libxcrypt --- pkgs/development/python-modules/pillow-simd/default.nix | 2 +- pkgs/development/python-modules/pillow/default.nix | 2 +- pkgs/development/python-modules/pillow/generic.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pillow-simd/default.nix b/pkgs/development/python-modules/pillow-simd/default.nix index e856c2f578528..b39a86a7fbfcc 100644 --- a/pkgs/development/python-modules/pillow-simd/default.nix +++ b/pkgs/development/python-modules/pillow-simd/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, buildPythonPackage, fetchFromGitHub, isPyPy, isPy3k -, olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2 +, olefile, freetype, libjpeg, zlib, libtiff, libwebp, libxcrypt, tcl, lcms2 , libxcb, tk, libX11, openjpeg, libimagequant, pyroma, numpy, defusedxml , pytestCheckHook }@args: diff --git a/pkgs/development/python-modules/pillow/default.nix b/pkgs/development/python-modules/pillow/default.nix index 017069a7dd2d4..6e50be53f99d0 100644 --- a/pkgs/development/python-modules/pillow/default.nix +++ b/pkgs/development/python-modules/pillow/default.nix @@ -4,7 +4,7 @@ , pythonOlder , fetchPypi , isPyPy -, defusedxml, olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11 +, defusedxml, olefile, freetype, libjpeg, zlib, libtiff, libwebp, libxcrypt, tcl, lcms2, tk, libX11 , libxcb, openjpeg, libimagequant, pyroma, numpy, pytestCheckHook # for passthru.tests , imageio, matplotlib, pilkit, pydicom, reportlab diff --git a/pkgs/development/python-modules/pillow/generic.nix b/pkgs/development/python-modules/pillow/generic.nix index ec4f052638206..54f730751076e 100644 --- a/pkgs/development/python-modules/pillow/generic.nix +++ b/pkgs/development/python-modules/pillow/generic.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook pyroma numpy ]; - buildInputs = [ freetype libjpeg openjpeg libimagequant zlib libtiff libwebp tcl lcms2 ] + buildInputs = [ freetype libjpeg openjpeg libimagequant zlib libtiff libwebp libxcrypt tcl lcms2 ] ++ lib.optionals (lib.versionAtLeast version "7.1.0") [ libxcb ] ++ lib.optionals (isPyPy) [ tk libX11 ]; From 338d0cc6ea6c4f157709498bcaf16d26e7239a52 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 8 Oct 2022 20:29:29 +0200 Subject: [PATCH 256/318] libxcrypt: Fix static build by using perl from buildPackages --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0b8a1145c78e3..5deee78f02318 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20711,7 +20711,7 @@ with pkgs; libxcrypt = callPackage ../development/libraries/libxcrypt { fetchurl = stdenv.fetchurlBoot; - perl = perl.override { + perl = buildPackages.perl.override { enableCrypt = false; fetchurl = stdenv.fetchurlBoot; }; From 195aa5887d64007b544311bb6701e2e54cd01714 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 8 Oct 2022 21:07:48 +0200 Subject: [PATCH 257/318] boost: fix build with enablePython by passing libxcrypt --- pkgs/development/libraries/boost/generic.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 9c2072179b26d..38631d3242d32 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, icu, expat, zlib, bzip2, python ? null, fixDarwinDylibNames, libiconv +{ lib, stdenv, icu, expat, zlib, bzip2, python ? null, fixDarwinDylibNames, libiconv, libxcrypt , boost-build , fetchpatch , which @@ -214,7 +214,7 @@ stdenv.mkDerivation { ++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; buildInputs = [ expat zlib bzip2 libiconv ] ++ optional (stdenv.hostPlatform == stdenv.buildPlatform) icu - ++ optional enablePython python + ++ optionals enablePython [ libxcrypt python ] ++ optional enableNumpy python.pkgs.numpy; configureScript = "./bootstrap.sh"; From 9b734d1239f65432072e9b7bcc4216081fd91245 Mon Sep 17 00:00:00 2001 From: Jan Solanti Date: Tue, 4 Oct 2022 21:27:19 +0300 Subject: [PATCH 258/318] liblc3: init at 1.0.1 --- pkgs/development/libraries/liblc3/default.nix | 36 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/libraries/liblc3/default.nix diff --git a/pkgs/development/libraries/liblc3/default.nix b/pkgs/development/libraries/liblc3/default.nix new file mode 100644 index 0000000000000..d0d95fd47da76 --- /dev/null +++ b/pkgs/development/libraries/liblc3/default.nix @@ -0,0 +1,36 @@ +{ lib +, stdenv +, fetchFromGitHub +, meson +, ninja +}: + +let + name = "liblc3"; + version = "1.0.1"; +in +stdenv.mkDerivation { + pname = name; + version = version; + + src = fetchFromGitHub { + owner = "google"; + repo = "liblc3"; + rev = "v${version}"; + sha256 = "sha256-W0pCfFmM+6N6+HdGdQ/GBNHjBspkwtlxZC2m2noKGx0="; + }; + + nativeBuildInputs = [ + meson + ninja + ]; + + meta = with lib; { + description = "LC3 (Low Complexity Communication Codec) is an efficient low latency audio codec"; + homepage = "https://github.com/google/liblc3"; + license = licenses.asl20; + platforms = platforms.linux; + maintainers = with maintainers; [ jansol ]; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f949ac5879465..462c23dab27e3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20034,6 +20034,8 @@ with pkgs; liblcf = callPackage ../development/libraries/liblcf { }; + liblc3 = callPackage ../development/libraries/liblc3 { }; + libliftoff = callPackage ../development/libraries/libliftoff { }; liblqr1 = callPackage ../development/libraries/liblqr-1 { From 96dd839e8f34eadbba1ab425eaa03bcbb72de8a5 Mon Sep 17 00:00:00 2001 From: Jan Solanti Date: Tue, 4 Oct 2022 21:27:48 +0300 Subject: [PATCH 259/318] pipewire: 0.3.58 -> 0.3.59 --- .../pipewire/daemon/filter-chain.conf.json | 28 ++++++++++++++ .../pipewire/daemon/pipewire-avb.conf.json | 38 +++++++++++++++++++ .../libraries/pipewire/default.nix | 15 ++++++-- 3 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 nixos/modules/services/desktops/pipewire/daemon/filter-chain.conf.json create mode 100644 nixos/modules/services/desktops/pipewire/daemon/pipewire-avb.conf.json diff --git a/nixos/modules/services/desktops/pipewire/daemon/filter-chain.conf.json b/nixos/modules/services/desktops/pipewire/daemon/filter-chain.conf.json new file mode 100644 index 0000000000000..689fca88359ba --- /dev/null +++ b/nixos/modules/services/desktops/pipewire/daemon/filter-chain.conf.json @@ -0,0 +1,28 @@ +{ + "context.properties": { + "log.level": 0 + }, + "context.spa-libs": { + "audio.convert.*": "audioconvert/libspa-audioconvert", + "support.*": "support/libspa-support" + }, + "context.modules": [ + { + "name": "libpipewire-module-rt", + "args": {}, + "flags": [ + "ifexists", + "nofail" + ] + }, + { + "name": "libpipewire-module-protocol-native" + }, + { + "name": "libpipewire-module-client-node" + }, + { + "name": "libpipewire-module-adapter" + } + ] +} diff --git a/nixos/modules/services/desktops/pipewire/daemon/pipewire-avb.conf.json b/nixos/modules/services/desktops/pipewire/daemon/pipewire-avb.conf.json new file mode 100644 index 0000000000000..4f669895d87b6 --- /dev/null +++ b/nixos/modules/services/desktops/pipewire/daemon/pipewire-avb.conf.json @@ -0,0 +1,38 @@ +{ + "context.properties": {}, + "context.spa-libs": { + "audio.convert.*": "audioconvert/libspa-audioconvert", + "support.*": "support/libspa-support" + }, + "context.modules": [ + { + "name": "libpipewire-module-rt", + "args": { + "nice.level": -11 + }, + "flags": [ + "ifexists", + "nofail" + ] + }, + { + "name": "libpipewire-module-protocol-native" + }, + { + "name": "libpipewire-module-client-node" + }, + { + "name": "libpipewire-module-adapter" + }, + { + "name": "libpipewire-module-avb", + "args": {} + } + ], + "context.exec": [], + "stream.properties": {}, + "avb.properties": { + "ifname": "enp3s0", + "vm.overrides": {} + } +} diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix index a02ecc1e9b743..f2907afab0188 100644 --- a/pkgs/development/libraries/pipewire/default.nix +++ b/pkgs/development/libraries/pipewire/default.nix @@ -2,6 +2,7 @@ , lib , buildPackages , fetchFromGitLab +, fetchpatch , removeReferencesTo , python3 , meson @@ -45,6 +46,7 @@ , sbc , libfreeaptx , ldacbt +, liblc3 , fdk_aac , libopus , nativeHspSupport ? true @@ -70,7 +72,7 @@ let self = stdenv.mkDerivation rec { pname = "pipewire"; - version = "0.3.58"; + version = "0.3.59"; outputs = [ "out" @@ -88,7 +90,7 @@ let owner = "pipewire"; repo = "pipewire"; rev = version; - sha256 = "sha256-r8sDXyXwtA2o2xqglOI8XflttSScrqJ57cj1//k2tZ8="; + sha256 = "sha256-4wDtdgkjBRlthhwbI3cSQFnbr+gxPQP5j5YnrWiQVp4="; }; patches = [ @@ -104,6 +106,12 @@ let ./0090-pipewire-config-template-paths.patch # Place SPA data files in lib output to avoid dependency cycles ./0095-spa-data-dir.patch + + # remove when updating to 0.3.60 + (fetchpatch { # filter-chain: iterate the port correctly + url = "https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/94a64268613adac8ef6f3e6c1f04468220540d00.patch"; + sha256 = "sha256-IDTB7NgadgR3vKv97Nvd9pBfnOnMi21YsvLdD1Ew7HE="; + }) ]; nativeBuildInputs = [ @@ -134,7 +142,7 @@ let ++ lib.optionals gstreamerSupport [ gst_all_1.gst-plugins-base gst_all_1.gstreamer ] ++ lib.optionals libcameraSupport [ libcamera libdrm ] ++ lib.optional ffmpegSupport ffmpeg - ++ lib.optionals bluezSupport [ bluez libfreeaptx ldacbt sbc fdk_aac libopus ] + ++ lib.optionals bluezSupport [ bluez libfreeaptx ldacbt liblc3 sbc fdk_aac libopus ] ++ lib.optional pulseTunnelSupport libpulseaudio ++ lib.optional zeroconfSupport avahi ++ lib.optional raopSupport openssl @@ -167,6 +175,7 @@ let "-Dbluez5-backend-ofono=${mesonEnableFeature ofonoSupport}" "-Dbluez5-backend-hsphfpd=${mesonEnableFeature hsphfpdSupport}" "-Dbluez5-codec-lc3plus=disabled" + "-Dbluez5-codec-lc3=${mesonEnableFeature bluezSupport}" "-Dsysconfdir=/etc" "-Dpipewire_confdata_dir=${placeholder "lib"}/share/pipewire" "-Draop=${mesonEnableFeature raopSupport}" From bdb347b42cf507871d5b0c0a3bd632ba0cec8018 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 9 Oct 2022 19:33:30 +0200 Subject: [PATCH 260/318] dbus: 1.14.0 -> 1.14.4 https://gitlab.freedesktop.org/dbus/dbus/-/blob/dbus-1.14.4/NEWS Fixes: CVE-2022-42010, CVE-2022-42011, CVE-2022-42012 --- pkgs/development/libraries/dbus/default.nix | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index 075f2a67b70e6..2cd6463d5c21a 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -1,6 +1,5 @@ { stdenv , lib -, fetchpatch , fetchurl , pkg-config , expat @@ -20,27 +19,16 @@ stdenv.mkDerivation rec { pname = "dbus"; - version = "1.14.0"; + version = "1.14.4"; src = fetchurl { url = "https://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.xz"; - sha256 = "sha256-zNfM43WW4KGVWP1mSNEnKrQ/AR2AyGNa6o/QutWK69Q="; + sha256 = "sha256-fA+bjl7A/yR5OD5iwAhKOimvme3xUU6fZZuBsw1ONT4="; }; - patches = [ - # Fix dbus-daemon crashing when running tests due to long XDG_DATA_DIRS. - # https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/302 - (fetchpatch { - url = "https://gitlab.freedesktop.org/dbus/dbus/-/commit/b551b3e9737958216a1a9d359150a4110a9d0549.patch"; - sha256 = "kOVjlklZzKvBZXmmrE1UiO4XWRoBLViGwdn6/eDH+DY="; - }) - ] ++ (lib.optional stdenv.isSunOS ./implement-getgrouplist.patch); + patches = lib.optional stdenv.isSunOS ./implement-getgrouplist.patch; postPatch = '' - # We need to generate the file ourselves. - # https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/317 - rm doc/catalog.xml - substituteInPlace bus/Makefile.am \ --replace 'install-data-hook:' 'disabled:' \ --replace '$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus' ':' From 41c09640e7315be703af7840cf33e606c220beea Mon Sep 17 00:00:00 2001 From: adisbladis Date: Mon, 10 Oct 2022 14:21:06 +1300 Subject: [PATCH 261/318] autoPatchelfHook: fix turning `[ "*" ]` into bash array Previously globs were incorrectly handled and expanded by bash into the files in the temporary build directory. --- pkgs/build-support/setup-hooks/auto-patchelf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/setup-hooks/auto-patchelf.sh b/pkgs/build-support/setup-hooks/auto-patchelf.sh index b56f9ce2dbf4c..7f5ff146e30b6 100644 --- a/pkgs/build-support/setup-hooks/auto-patchelf.sh +++ b/pkgs/build-support/setup-hooks/auto-patchelf.sh @@ -53,7 +53,7 @@ autoPatchelf() { esac done - local ignoreMissingDepsArray=($autoPatchelfIgnoreMissingDeps) + readarray -td' ' ignoreMissingDepsArray < <(echo -n "$autoPatchelfIgnoreMissingDeps") if [ "$autoPatchelfIgnoreMissingDeps" == "1" ]; then echo "autoPatchelf: WARNING: setting 'autoPatchelfIgnoreMissingDeps" \ "= true;' is deprecated and will be removed in a future release." \ From 01535ff0b07a73c94a3831a2f68bede5a1652ae1 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Mon, 10 Oct 2022 14:22:58 +1300 Subject: [PATCH 262/318] autoPatchelfHook: support glob patterns so for example cuda could be ignored by setting: ``` nix autoPatchelfIgnoreMissingDeps = [ "*cuda*.so*" ]; ``` --- pkgs/build-support/setup-hooks/auto-patchelf.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/setup-hooks/auto-patchelf.py b/pkgs/build-support/setup-hooks/auto-patchelf.py index 861d772698d04..efb65a809962d 100644 --- a/pkgs/build-support/setup-hooks/auto-patchelf.py +++ b/pkgs/build-support/setup-hooks/auto-patchelf.py @@ -5,6 +5,7 @@ import pprint import subprocess import sys +from fnmatch import fnmatch from collections import defaultdict from contextlib import contextmanager from dataclasses import dataclass @@ -265,8 +266,10 @@ def auto_patchelf( print(f"auto-patchelf: {len(missing)} dependencies could not be satisfied") failure = False for dep in missing: - if dep.name.name in ignore_missing or "*" in ignore_missing: - print(f"warn: auto-patchelf ignoring missing {dep.name} wanted by {dep.file}") + for pattern in ignore_missing: + if fnmatch(dep.name.name, pattern): + print(f"warn: auto-patchelf ignoring missing {dep.name} wanted by {dep.file}") + break else: print(f"error: auto-patchelf could not satisfy dependency {dep.name} wanted by {dep.file}") failure = True From 039e1a05f5db32f5e9ff9dfe13501d631b7001bf Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Mon, 10 Oct 2022 09:17:41 +0200 Subject: [PATCH 263/318] avahi: add patch for CVE-2021-3468 --- pkgs/development/libraries/avahi/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/avahi/default.nix b/pkgs/development/libraries/avahi/default.nix index e24217434557f..fe9ce9a42dcbf 100644 --- a/pkgs/development/libraries/avahi/default.nix +++ b/pkgs/development/libraries/avahi/default.nix @@ -31,10 +31,16 @@ stdenv.mkDerivation rec { }; patches = [ + # CVE-2021-36217 / CVE-2021-3502 (fetchpatch { url = "https://github.com/lathiat/avahi/commit/9d31939e55280a733d930b15ac9e4dda4497680c.patch"; sha256 = "sha256-BXWmrLWUvDxKPoIPRFBpMS3T4gijRw0J+rndp6iDybU="; }) + # CVE-2021-3468 + (fetchpatch { + url = "https://github.com/lathiat/avahi/commit/447affe29991ee99c6b9732fc5f2c1048a611d3b.patch"; + sha256 = "sha256-qWaCU1ZkCg2PmijNto7t8E3pYRN/36/9FrG8okd6Gu8="; + }) ]; depsBuildBuild = [ From f4ea1208ec732d423a784bbb2b882f997b6af902 Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 3 Oct 2022 16:56:51 +0300 Subject: [PATCH 264/318] treewide: *Flags convert to list from str *Flags implies a list slightly relevant: > stdenv: start deprecating non-list configureFlags https://github.com/NixOS/nixpkgs/pull/173172 the makeInstalledTests function in `nixos/tests/installed-tests/default.nix` isn't available outside of nixpkgs so it's not a breaking change --- .../services/networking/ntp/chrony.nix | 4 +- .../modules/services/networking/ntp/ntpd.nix | 4 +- nixos/tests/installed-tests/default.nix | 4 +- .../tests/installed-tests/flatpak-builder.nix | 2 +- nixos/tests/installed-tests/flatpak.nix | 2 +- nixos/tests/installed-tests/gdk-pixbuf.nix | 2 +- nixos/tests/k3s/multi-node.nix | 41 ++++++++------- nixos/tests/k3s/single-node.nix | 17 +++---- .../blockchains/openethereum/default.nix | 2 +- .../graphics/xournalpp/default.nix | 2 +- .../terminal-emulators/x3270/default.nix | 2 +- .../git-and-tools/tig/default.nix | 2 +- .../version-management/gitlab/default.nix | 2 +- pkgs/build-support/release/default.nix | 2 +- pkgs/build-support/release/maven-build.nix | 7 ++- .../compilers/manticore/default.nix | 2 +- .../coq-modules/coq-record-update/default.nix | 2 +- .../development/interpreters/acl2/default.nix | 2 +- .../python-cosmopolitan/default.nix | 2 +- .../python/rustpython/default.nix | 2 +- .../libraries/cosmopolitan/default.nix | 2 +- .../libraries/hunspell/default.nix | 2 +- .../libraries/libeatmydata/default.nix | 2 +- .../libraries/rustc-demangle/default.nix | 2 +- pkgs/development/node-packages/overrides.nix | 2 +- .../development/ocaml-modules/bz2/default.nix | 2 +- .../ocaml-modules/cudf/default.nix | 2 +- .../python-modules/python-csxcad/default.nix | 2 +- .../python-modules/python-openems/default.nix | 2 +- .../python-telegram-bot/default.nix | 2 +- .../tools/analysis/rr/zen_workaround.nix | 2 +- .../tools/analysis/sparse/default.nix | 2 +- .../tools/database/prisma-engines/default.nix | 8 ++- pkgs/development/tools/godot/default.nix | 2 +- .../tools/godot/export-templates.nix | 2 +- pkgs/development/tools/godot/headless.nix | 2 +- pkgs/development/tools/godot/server.nix | 2 +- .../development/tools/misc/bashdb/default.nix | 2 +- pkgs/development/tools/ocaml/dune/2.nix | 2 +- pkgs/development/tools/ocaml/dune/3.nix | 2 +- pkgs/games/darkplaces/default.nix | 2 +- pkgs/games/gimx/default.nix | 2 +- pkgs/misc/jackaudio/default.nix | 2 +- .../os-specific/linux/gobi_loader/default.nix | 2 +- pkgs/servers/dns/knot-dns/default.nix | 2 +- pkgs/servers/matrix-conduit/default.nix | 2 +- .../misc/oven-media-engine/default.nix | 2 +- pkgs/servers/nosql/dragonflydb/default.nix | 2 +- pkgs/tools/X11/find-cursor/default.nix | 2 +- pkgs/tools/X11/xmousepasteblock/default.nix | 2 +- pkgs/tools/networking/bore/default.nix | 2 +- .../networking/wg-netmanager/default.nix | 2 +- pkgs/tools/system/chase/default.nix | 3 +- pkgs/tools/system/tre-command/default.nix | 2 +- pkgs/top-level/perl-packages.nix | 50 +++++++++++-------- 55 files changed, 124 insertions(+), 106 deletions(-) diff --git a/nixos/modules/services/networking/ntp/chrony.nix b/nixos/modules/services/networking/ntp/chrony.nix index a89c7769152e6..7e3bb565d10bf 100644 --- a/nixos/modules/services/networking/ntp/chrony.nix +++ b/nixos/modules/services/networking/ntp/chrony.nix @@ -27,7 +27,7 @@ let ${cfg.extraConfig} ''; - chronyFlags = "-n -m -u chrony -f ${configFile} ${toString cfg.extraFlags}"; + chronyFlags = [ "-n" "-m" "-u" "chrony" "-f" "${configFile}" ] ++ cfg.extraFlags; in { options = { @@ -166,7 +166,7 @@ in unitConfig.ConditionCapability = "CAP_SYS_TIME"; serviceConfig = { Type = "simple"; - ExecStart = "${chronyPkg}/bin/chronyd ${chronyFlags}"; + ExecStart = "${chronyPkg}/bin/chronyd ${builtins.toString chronyFlags}"; ProtectHome = "yes"; ProtectSystem = "full"; diff --git a/nixos/modules/services/networking/ntp/ntpd.nix b/nixos/modules/services/networking/ntp/ntpd.nix index a9dae2c8667aa..036a8df635db0 100644 --- a/nixos/modules/services/networking/ntp/ntpd.nix +++ b/nixos/modules/services/networking/ntp/ntpd.nix @@ -25,7 +25,7 @@ let ${cfg.extraConfig} ''; - ntpFlags = "-c ${configFile} -u ntp:ntp ${toString cfg.extraFlags}"; + ntpFlags = [ "-c" "${configFile}" "-u" "ntp:ntp" ] ++ cfg.extraFlags; in @@ -137,7 +137,7 @@ in ''; serviceConfig = { - ExecStart = "@${ntp}/bin/ntpd ntpd -g ${ntpFlags}"; + ExecStart = "@${ntp}/bin/ntpd ntpd -g ${builtins.toString ntpFlags}"; Type = "forking"; }; }; diff --git a/nixos/tests/installed-tests/default.nix b/nixos/tests/installed-tests/default.nix index b2c1b43f90ee9..2eaa980052093 100644 --- a/nixos/tests/installed-tests/default.nix +++ b/nixos/tests/installed-tests/default.nix @@ -28,7 +28,7 @@ let , withX11 ? false # Extra flags to pass to gnome-desktop-testing-runner. - , testRunnerFlags ? "" + , testRunnerFlags ? [] # Extra attributes to pass to makeTest. # They will be recursively merged into the attrset created by this function. @@ -67,7 +67,7 @@ let '' + '' machine.succeed( - "gnome-desktop-testing-runner ${testRunnerFlags} -d '${tested.installedTests}/share'" + "gnome-desktop-testing-runner ${escapeShellArgs testRunnerFlags} -d '${tested.installedTests}/share'" ) ''; } diff --git a/nixos/tests/installed-tests/flatpak-builder.nix b/nixos/tests/installed-tests/flatpak-builder.nix index 41f4060fb69e5..d5e04fcf975ce 100644 --- a/nixos/tests/installed-tests/flatpak-builder.nix +++ b/nixos/tests/installed-tests/flatpak-builder.nix @@ -11,5 +11,5 @@ makeInstalledTest { virtualisation.diskSize = 2048; }; - testRunnerFlags = "--timeout 3600"; + testRunnerFlags = [ "--timeout" "3600" ]; } diff --git a/nixos/tests/installed-tests/flatpak.nix b/nixos/tests/installed-tests/flatpak.nix index c7fe9cf458822..9524d890c4025 100644 --- a/nixos/tests/installed-tests/flatpak.nix +++ b/nixos/tests/installed-tests/flatpak.nix @@ -13,5 +13,5 @@ makeInstalledTest { virtualisation.diskSize = 3072; }; - testRunnerFlags = "--timeout 3600"; + testRunnerFlags = [ "--timeout" "3600" ]; } diff --git a/nixos/tests/installed-tests/gdk-pixbuf.nix b/nixos/tests/installed-tests/gdk-pixbuf.nix index 3d0011a427a44..110efdbf710f2 100644 --- a/nixos/tests/installed-tests/gdk-pixbuf.nix +++ b/nixos/tests/installed-tests/gdk-pixbuf.nix @@ -9,5 +9,5 @@ makeInstalledTest { virtualisation.memorySize = if pkgs.stdenv.isi686 then 2047 else 4096; }; - testRunnerFlags = "--timeout 1800"; + testRunnerFlags = [ "--timeout" "1800" ]; } diff --git a/nixos/tests/k3s/multi-node.nix b/nixos/tests/k3s/multi-node.nix index ce7e4b6ead148..2a3aa22b96bf9 100644 --- a/nixos/tests/k3s/multi-node.nix +++ b/nixos/tests/k3s/multi-node.nix @@ -54,15 +54,15 @@ import ../make-test-python.nix ({ pkgs, lib, ... }: role = "server"; package = pkgs.k3s; clusterInit = true; - extraFlags = '' - --disable coredns \ - --disable local-storage \ - --disable metrics-server \ - --disable servicelb \ - --disable traefik \ - --node-ip 192.168.1.1 \ - --pause-image test.local/pause:local - ''; + extraFlags = builtins.toString [ + "--disable" "coredns" + "--disable" "local-storage" + "--disable" "metrics-server" + "--disable" "servicelb" + "--disable" "traefik" + "--node-ip" "192.168.1.1" + "--pause-image" "test.local/pause:local" + ]; }; networking.firewall.allowedTCPPorts = [ 2379 2380 6443 ]; networking.firewall.allowedUDPPorts = [ 8472 ]; @@ -84,15 +84,15 @@ import ../make-test-python.nix ({ pkgs, lib, ... }: enable = true; serverAddr = "https://192.168.1.1:6443"; clusterInit = false; - extraFlags = '' - --disable coredns \ - --disable local-storage \ - --disable metrics-server \ - --disable servicelb \ - --disable traefik \ - --node-ip 192.168.1.3 \ - --pause-image test.local/pause:local - ''; + extraFlags = builtins.toString [ + "--disable" "coredns" + "--disable" "local-storage" + "--disable" "metrics-server" + "--disable" "servicelb" + "--disable" "traefik" + "--node-ip" "192.168.1.3" + "--pause-image" "test.local/pause:local" + ]; }; networking.firewall.allowedTCPPorts = [ 2379 2380 6443 ]; networking.firewall.allowedUDPPorts = [ 8472 ]; @@ -112,7 +112,10 @@ import ../make-test-python.nix ({ pkgs, lib, ... }: enable = true; role = "agent"; serverAddr = "https://192.168.1.3:6443"; - extraFlags = "--pause-image test.local/pause:local --node-ip 192.168.1.2"; + extraFlags = lib.toString [ + "--pause-image" "test.local/pause:local" + "--node-ip" "192.168.1.2" + ]; }; networking.firewall.allowedTCPPorts = [ 6443 ]; networking.firewall.allowedUDPPorts = [ 8472 ]; diff --git a/nixos/tests/k3s/single-node.nix b/nixos/tests/k3s/single-node.nix index ab562500f5d21..a95fa4a031e3f 100644 --- a/nixos/tests/k3s/single-node.nix +++ b/nixos/tests/k3s/single-node.nix @@ -40,15 +40,14 @@ import ../make-test-python.nix ({ pkgs, lib, ... }: services.k3s.role = "server"; services.k3s.package = pkgs.k3s; # Slightly reduce resource usage - services.k3s.extraFlags = '' - --disable coredns \ - --disable local-storage \ - --disable metrics-server \ - --disable servicelb \ - --disable traefik \ - --pause-image \ - test.local/pause:local - ''; + services.k3s.extraFlags = builtins.toString [ + "--disable" "coredns" + "--disable" "local-storage" + "--disable" "metrics-server" + "--disable" "servicelb" + "--disable" "traefik" + "--pause-image" "test.local/pause:local" + ]; users.users = { noprivs = { diff --git a/pkgs/applications/blockchains/openethereum/default.nix b/pkgs/applications/blockchains/openethereum/default.nix index a1b9f8348b6a1..865cd3b8a7193 100644 --- a/pkgs/applications/blockchains/openethereum/default.nix +++ b/pkgs/applications/blockchains/openethereum/default.nix @@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec { # Exclude some tests that don't work in the sandbox # - Nat test requires network access - checkFlags = "--skip configuration::tests::should_resolve_external_nat_hosts"; + checkFlags = [ "--skip" "configuration::tests::should_resolve_external_nat_hosts" ]; meta = with lib; { broken = stdenv.isDarwin; diff --git a/pkgs/applications/graphics/xournalpp/default.nix b/pkgs/applications/graphics/xournalpp/default.nix index 5fd139b8de4a7..db9e2e71ed143 100644 --- a/pkgs/applications/graphics/xournalpp/default.nix +++ b/pkgs/applications/graphics/xournalpp/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { ] ++ lib.optional withLua lua; - buildFlags = "translations"; + buildFlags = [ "translations" ]; hardeningDisable = [ "format" ]; diff --git a/pkgs/applications/terminal-emulators/x3270/default.nix b/pkgs/applications/terminal-emulators/x3270/default.nix index 7bc4941caf195..3c9b31258e783 100644 --- a/pkgs/applications/terminal-emulators/x3270/default.nix +++ b/pkgs/applications/terminal-emulators/x3270/default.nix @@ -18,7 +18,7 @@ in stdenv.mkDerivation rec { sha256 = "0km24rgll0s4ji6iz8lvy5ra76ds162s95y33w5px6697cwqkp9j"; }; - buildFlags = "unix"; + buildFlags = [ "unix" ]; postConfigure = '' pushd c3270 ; ./configure ; popd diff --git a/pkgs/applications/version-management/git-and-tools/tig/default.nix b/pkgs/applications/version-management/git-and-tools/tig/default.nix index 344a10cf2ec56..cfce8a35f9e12 100644 --- a/pkgs/applications/version-management/git-and-tools/tig/default.nix +++ b/pkgs/applications/version-management/git-and-tools/tig/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper autoreconfHook asciidoc xmlto docbook_xsl docbook_xml_dtd_45 findXMLCatalogs pkg-config ]; - autoreconfFlags = "-I tools -v"; + autoreconfFlags = [ "-I" "tools" "-v" ]; buildInputs = [ ncurses readline git ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; diff --git a/pkgs/applications/version-management/gitlab/default.nix b/pkgs/applications/version-management/gitlab/default.nix index 47ca0f4f48d3c..88f2a5f4cd0e1 100644 --- a/pkgs/applications/version-management/gitlab/default.nix +++ b/pkgs/applications/version-management/gitlab/default.nix @@ -37,7 +37,7 @@ let railties = x.railties // { dontBuild = false; patches = [ ./railties-remove-yarn-install-enhancement.patch ]; - patchFlags = "-p2"; + patchFlags = [ "-p2" ]; }; }; groups = [ diff --git a/pkgs/build-support/release/default.nix b/pkgs/build-support/release/default.nix index d593ec81197e4..da1078369a584 100644 --- a/pkgs/build-support/release/default.nix +++ b/pkgs/build-support/release/default.nix @@ -15,7 +15,7 @@ rec { } // args); mvnBuild = args: import ./maven-build.nix ( - { inherit stdenv; + { inherit lib stdenv; } // args); nixBuild = args: import ./nix-build.nix ( diff --git a/pkgs/build-support/release/maven-build.nix b/pkgs/build-support/release/maven-build.nix index eaa47647287c6..daee44b85accd 100644 --- a/pkgs/build-support/release/maven-build.nix +++ b/pkgs/build-support/release/maven-build.nix @@ -1,4 +1,5 @@ { stdenv +, lib , name , src , doTest ? true @@ -12,7 +13,11 @@ } @ args : let - mvnFlags = "-Dmaven.repo.local=$M2_REPO ${if doTest then "" else "-Dmaven.test.skip.exec=true"} ${extraMvnFlags}"; + mvnFlags = lib.escapeShellArgs [ + "-Dmaven.repo.local=$M2_REPO" + (lib.optionalString (!doTest) "-Dmaven.test.skip.exec=true") + "${extraMvnFlags}" + ]; in stdenv.mkDerivation ( { diff --git a/pkgs/development/compilers/manticore/default.nix b/pkgs/development/compilers/manticore/default.nix index 1919f99980586..b767ccf150a69 100644 --- a/pkgs/development/compilers/manticore/default.nix +++ b/pkgs/development/compilers/manticore/default.nix @@ -19,7 +19,7 @@ in stdenv.mkDerivation { buildInputs = [ coreutils smlnj ]; - autoreconfFlags = "-Iconfig -vfi"; + autoreconfFlags = [ "-Iconfig" "-vfi" ]; unpackPhase = '' mkdir -p $out diff --git a/pkgs/development/coq-modules/coq-record-update/default.nix b/pkgs/development/coq-modules/coq-record-update/default.nix index fcc7b0362a0b6..77c42fb48d4eb 100644 --- a/pkgs/development/coq-modules/coq-record-update/default.nix +++ b/pkgs/development/coq-modules/coq-record-update/default.nix @@ -10,7 +10,7 @@ with lib; mkCoqDerivation rec { release."0.3.1".sha256 = "sha256-DyGxO2tqmYZZluXN6Oy5Tw6fuLMyuyxonj8CCToWKkk="; release."0.3.0".sha256 = "1ffr21dd6hy19gxnvcd4if2450iksvglvkd6q5713fajd72hmc0z"; releaseRev = v: "v${v}"; - buildFlags = "NO_TEST=1"; + buildFlags = [ "NO_TEST=1" ]; meta = { description = "Library to create Coq record update functions"; maintainers = with maintainers; [ ineol ]; diff --git a/pkgs/development/interpreters/acl2/default.nix b/pkgs/development/interpreters/acl2/default.nix index 1ca3742e737b6..e42f26f0bdaf7 100644 --- a/pkgs/development/interpreters/acl2/default.nix +++ b/pkgs/development/interpreters/acl2/default.nix @@ -77,7 +77,7 @@ in stdenv.mkDerivation rec { ''; preBuild = "mkdir -p $HOME"; - makeFlags = "LISP=${sbcl}/bin/sbcl ACL2_MAKE_LOG=NONE"; + makeFlags = [ "LISP=${sbcl}/bin/sbcl" "ACL2_MAKE_LOG=NONE" ]; doCheck = true; checkTarget = "mini-proveall"; diff --git a/pkgs/development/interpreters/python-cosmopolitan/default.nix b/pkgs/development/interpreters/python-cosmopolitan/default.nix index a2a512b9cdf0d..a513c097fbcbe 100644 --- a/pkgs/development/interpreters/python-cosmopolitan/default.nix +++ b/pkgs/development/interpreters/python-cosmopolitan/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ bintools-unwrapped unzip ]; # slashes are significant because upstream uses o/$(MODE)/foo.o - buildFlags = "o//third_party/python"; + buildFlags = [ "o//third_party/python" ]; checkTarget = "o//third_party/python/test"; enableParallelBuilding = true; diff --git a/pkgs/development/interpreters/python/rustpython/default.nix b/pkgs/development/interpreters/python/rustpython/default.nix index ad4382203223f..bbc2fef46cf28 100644 --- a/pkgs/development/interpreters/python/rustpython/default.nix +++ b/pkgs/development/interpreters/python/rustpython/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-T85kiPG80oZ4mwpb8Ag40wDHKx2Aens+gM7NGXan5lM="; # freeze the stdlib into the rustpython binary - cargoBuildFlags = "--features=freeze-stdlib"; + cargoBuildFlags = [ "--features=freeze-stdlib" ]; buildInputs = lib.optionals stdenv.isDarwin [ SystemConfiguration ]; diff --git a/pkgs/development/libraries/cosmopolitan/default.nix b/pkgs/development/libraries/cosmopolitan/default.nix index 63f45f62fd145..88e5bcf5d9d7b 100644 --- a/pkgs/development/libraries/cosmopolitan/default.nix +++ b/pkgs/development/libraries/cosmopolitan/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dist" ]; # slashes are significant because upstream uses o/$(MODE)/foo.o - buildFlags = "o/cosmopolitan.h o//cosmopolitan.a o//libc/crt/crt.o o//ape/ape.o o//ape/ape.lds"; + buildFlags = [ "o/cosmopolitan.h" "o//cosmopolitan.a" "o//libc/crt/crt.o" "o//ape/ape.o" "o//ape/ape.lds" ]; checkTarget = "o//test"; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/hunspell/default.nix b/pkgs/development/libraries/hunspell/default.nix index baaa07d7e7ea7..8b82af586704e 100644 --- a/pkgs/development/libraries/hunspell/default.nix +++ b/pkgs/development/libraries/hunspell/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { patchShebangs tests ''; - autoreconfFlags = "-vfi"; + autoreconfFlags = [ "-vfi" ]; configureFlags = [ "--with-ui" "--with-readline" ]; diff --git a/pkgs/development/libraries/libeatmydata/default.nix b/pkgs/development/libraries/libeatmydata/default.nix index 3a3abdc5e9ac1..886caaada47b2 100644 --- a/pkgs/development/libraries/libeatmydata/default.nix +++ b/pkgs/development/libraries/libeatmydata/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { patches = [ ./find-shell-lib.patch ]; - patchFlags = "-p0"; + patchFlags = [ "-p0" ]; postPatch = '' substituteInPlace eatmydata.in \ diff --git a/pkgs/development/libraries/rustc-demangle/default.nix b/pkgs/development/libraries/rustc-demangle/default.nix index be02fedfde717..e0329085bd56e 100644 --- a/pkgs/development/libraries/rustc-demangle/default.nix +++ b/pkgs/development/libraries/rustc-demangle/default.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { ./add-Cargo.lock.patch ]; cargoSha256 = "sha256-1tW5TOap5MstxTXAFij3IB8TIpI+FryEX9TXlVXjRl4="; - cargoBuildFlags = "-p rustc-demangle-capi"; + cargoBuildFlags = [ "-p" "rustc-demangle-capi" ]; postInstall = '' mkdir -p $out/lib cp target/${rust.toRustTargetSpec stdenv.hostPlatform}/release/librustc_demangle.so $out/lib diff --git a/pkgs/development/node-packages/overrides.nix b/pkgs/development/node-packages/overrides.nix index a66eada91b48e..57cb62dc52d1d 100644 --- a/pkgs/development/node-packages/overrides.nix +++ b/pkgs/development/node-packages/overrides.nix @@ -423,7 +423,7 @@ final: prev: { pulp = prev.pulp.override { # tries to install purescript - npmFlags = "--ignore-scripts"; + npmFlags = builtins.toString [ "--ignore-scripts" ]; nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; postInstall = '' diff --git a/pkgs/development/ocaml-modules/bz2/default.nix b/pkgs/development/ocaml-modules/bz2/default.nix index 6d8b56ae232dd..835570dc9ab6b 100644 --- a/pkgs/development/ocaml-modules/bz2/default.nix +++ b/pkgs/development/ocaml-modules/bz2/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-jBFEkLN2fbC3LxTu7C0iuhvNg64duuckBHWZoBxrV/U="; }; - autoreconfFlags = "-I ."; + autoreconfFlags = [ "-I" "." ]; nativeBuildInputs = [ autoreconfHook diff --git a/pkgs/development/ocaml-modules/cudf/default.nix b/pkgs/development/ocaml-modules/cudf/default.nix index fe9793ea532f6..54e96e047e5d4 100644 --- a/pkgs/development/ocaml-modules/cudf/default.nix +++ b/pkgs/development/ocaml-modules/cudf/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation { doCheck = true; preInstall = "mkdir -p $OCAMLFIND_DESTDIR"; - installFlags = "BINDIR=$(out)/bin"; + installFlags = [ "BINDIR=$(out)/bin" ]; meta = with lib; { description = "A library for CUDF format"; diff --git a/pkgs/development/python-modules/python-csxcad/default.nix b/pkgs/development/python-modules/python-csxcad/default.nix index e6f22d37b55dd..66c1939c7edc1 100644 --- a/pkgs/development/python-modules/python-csxcad/default.nix +++ b/pkgs/development/python-modules/python-csxcad/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { matplotlib ]; - setupPyBuildFlags = "-I${openems}/include -L${openems}/lib -R${openems}/lib"; + setupPyBuildFlags = [ "-I${openems}/include" "-L${openems}/lib" "-R${openems}/lib" ]; meta = with lib; { description = "Python interface to CSXCAD"; diff --git a/pkgs/development/python-modules/python-openems/default.nix b/pkgs/development/python-modules/python-openems/default.nix index dd669cf547545..348f10b3aeede 100644 --- a/pkgs/development/python-modules/python-openems/default.nix +++ b/pkgs/development/python-modules/python-openems/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { h5py ]; - setupPyBuildFlags = "-I${openems}/include -L${openems}/lib -R${openems}/lib"; + setupPyBuildFlags = [ "-I${openems}/include" "-L${openems}/lib" "-R${openems}/lib" ]; pythonImportsCheck = [ "openEMS" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/python-telegram-bot/default.nix b/pkgs/development/python-modules/python-telegram-bot/default.nix index 677322fc50d12..47d716d1c8685 100644 --- a/pkgs/development/python-modules/python-telegram-bot/default.nix +++ b/pkgs/development/python-modules/python-telegram-bot/default.nix @@ -43,7 +43,7 @@ buildPythonPackage rec { --replace "tornado==6.1" "tornado" ''; - setupPyGlobalFlags = "--with-upstream-urllib3"; + setupPyGlobalFlags = [ "--with-upstream-urllib3" ]; # tests not included with release doCheck = false; diff --git a/pkgs/development/tools/analysis/rr/zen_workaround.nix b/pkgs/development/tools/analysis/rr/zen_workaround.nix index 193e70d0d95dc..3ec69aabf8d2c 100644 --- a/pkgs/development/tools/analysis/rr/zen_workaround.nix +++ b/pkgs/development/tools/analysis/rr/zen_workaround.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { postConfigure = '' makeFlags="$makeFlags M=$(pwd)" ''; - buildFlags = "modules"; + buildFlags = [ "modules" ]; installPhase = let modDestDir = "$out/lib/modules/${kernel.modDirVersion}/kernel"; #TODO: longer path? diff --git a/pkgs/development/tools/analysis/sparse/default.nix b/pkgs/development/tools/analysis/sparse/default.nix index ecc57a58b4b2b..7842954cde6a7 100644 --- a/pkgs/development/tools/analysis/sparse/default.nix +++ b/pkgs/development/tools/analysis/sparse/default.nix @@ -20,7 +20,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ gtk3 libxml2 llvm perl sqlite ]; doCheck = true; - buildFlags = "GCC_BASE:=${GCC_BASE}"; + buildFlags = [ "GCC_BASE:=${GCC_BASE}" ]; passthru.tests = { simple-execution = callPackage ./tests.nix { }; diff --git a/pkgs/development/tools/database/prisma-engines/default.nix b/pkgs/development/tools/database/prisma-engines/default.nix index fd25a497dc003..984b94cdc107c 100644 --- a/pkgs/development/tools/database/prisma-engines/default.nix +++ b/pkgs/development/tools/database/prisma-engines/default.nix @@ -45,7 +45,13 @@ rustPlatform.buildRustPackage rec { export SQLITE_MAX_EXPR_DEPTH=10000 ''; - cargoBuildFlags = "-p query-engine -p query-engine-node-api -p migration-engine-cli -p introspection-core -p prisma-fmt"; + cargoBuildFlags = [ + "-p" "query-engine" + "-p" "query-engine-node-api" + "-p" "migration-engine-cli" + "-p" "introspection-core" + "-p" "prisma-fmt" + ]; postInstall = '' mv $out/lib/libquery_engine${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/libquery_engine.node diff --git a/pkgs/development/tools/godot/default.nix b/pkgs/development/tools/godot/default.nix index f04d4e9ab7c32..97c9786e8fd22 100644 --- a/pkgs/development/tools/godot/default.nix +++ b/pkgs/development/tools/godot/default.nix @@ -67,7 +67,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - sconsFlags = "target=release_debug platform=x11"; + sconsFlags = [ "target=release_debug" "platform=x11" ]; preConfigure = '' sconsFlags+=" ${ lib.concatStringsSep " " diff --git a/pkgs/development/tools/godot/export-templates.nix b/pkgs/development/tools/godot/export-templates.nix index 9d306365f1901..74a78573a9837 100644 --- a/pkgs/development/tools/godot/export-templates.nix +++ b/pkgs/development/tools/godot/export-templates.nix @@ -3,7 +3,7 @@ # https://docs.godotengine.org/en/stable/development/compiling/compiling_for_x11.html#building-export-templates godot.overrideAttrs (oldAttrs: rec { pname = "godot-export-templates"; - sconsFlags = "target=release platform=x11 tools=no"; + sconsFlags = [ "target=release" "platform=x11" "tools=no" ]; installPhase = '' # The godot export command expects the export templates at # .../share/godot/templates/3.2.3.stable with 3.2.3 being the godot version. diff --git a/pkgs/development/tools/godot/headless.nix b/pkgs/development/tools/godot/headless.nix index a8d640eba1aa8..3e43a4f27f0c9 100644 --- a/pkgs/development/tools/godot/headless.nix +++ b/pkgs/development/tools/godot/headless.nix @@ -1,7 +1,7 @@ { godot, lib }: godot.overrideAttrs (oldAttrs: rec { pname = "godot-headless"; - sconsFlags = "target=release_debug platform=server tools=yes"; + sconsFlags = [ "target=release_debug" "platform=server" "tools=yes" ]; installPhase = '' mkdir -p "$out/bin" cp bin/godot_server.* $out/bin/godot-headless diff --git a/pkgs/development/tools/godot/server.nix b/pkgs/development/tools/godot/server.nix index 4254dc746b66c..06adf1bbfeb7f 100644 --- a/pkgs/development/tools/godot/server.nix +++ b/pkgs/development/tools/godot/server.nix @@ -1,7 +1,7 @@ { godot, lib }: godot.overrideAttrs (oldAttrs: rec { pname = "godot-server"; - sconsFlags = "target=release platform=server tools=no"; + sconsFlags = [ "target=release" "platform=server" "tools=no" ]; installPhase = '' mkdir -p "$out/bin" cp bin/godot_server.* $out/bin/godot-server diff --git a/pkgs/development/tools/misc/bashdb/default.nix b/pkgs/development/tools/misc/bashdb/default.nix index 918dd90aa83fe..c7d261e6f5ac8 100644 --- a/pkgs/development/tools/misc/bashdb/default.nix +++ b/pkgs/development/tools/misc/bashdb/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { sha256 = "19zfzcnxavndyn6kfxp775kjcd0gigsm4y3bnh6fz5ilhnnbbbgr"; }) ]; - patchFlags = "-p0"; + patchFlags = [ "-p0" ]; nativeBuildInputs = [ makeWrapper diff --git a/pkgs/development/tools/ocaml/dune/2.nix b/pkgs/development/tools/ocaml/dune/2.nix index 30962eeba3113..65f8c7eda3ca1 100644 --- a/pkgs/development/tools/ocaml/dune/2.nix +++ b/pkgs/development/tools/ocaml/dune/2.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ ocaml findlib ]; strictDeps = true; - buildFlags = "release"; + buildFlags = [ "release" ]; dontAddPrefix = true; dontAddStaticConfigureFlags = true; diff --git a/pkgs/development/tools/ocaml/dune/3.nix b/pkgs/development/tools/ocaml/dune/3.nix index 2917a4905bda0..01145e0237cb5 100644 --- a/pkgs/development/tools/ocaml/dune/3.nix +++ b/pkgs/development/tools/ocaml/dune/3.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { strictDeps = true; - buildFlags = "release"; + buildFlags = [ "release" ]; dontAddPrefix = true; dontAddStaticConfigureFlags = true; diff --git a/pkgs/games/darkplaces/default.nix b/pkgs/games/darkplaces/default.nix index e7b70036cdff8..86e2a57274709 100644 --- a/pkgs/games/darkplaces/default.nix +++ b/pkgs/games/darkplaces/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { SDL2 ]; - buildFlags = "release"; + buildFlags = [ "release" ]; installPhase = '' runHook preInstall diff --git a/pkgs/games/gimx/default.nix b/pkgs/games/gimx/default.nix index 2728afe2c4920..785d38a759a02 100644 --- a/pkgs/games/gimx/default.nix +++ b/pkgs/games/gimx/default.nix @@ -37,7 +37,7 @@ in stdenv.mkDerivation rec { --replace "5E048E021001" "6F0E13020001" ''; - makeFlags = "build-core"; + makeFlags = [ "build-core" ]; installPhase = '' runHook preInstall diff --git a/pkgs/misc/jackaudio/default.nix b/pkgs/misc/jackaudio/default.nix index 2f7ffeb89f32a..441f3ccb37f4e 100644 --- a/pkgs/misc/jackaudio/default.nix +++ b/pkgs/misc/jackaudio/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { --replace /bin/bash ${bash}/bin/bash ''; - dontAddWafCrossFlags = "true"; + dontAddWafCrossFlags = true; wafConfigureFlags = [ "--classic" "--autostart=${if (optDbus != null) then "dbus" else "classic"}" diff --git a/pkgs/os-specific/linux/gobi_loader/default.nix b/pkgs/os-specific/linux/gobi_loader/default.nix index b7972007719c9..2b251242119c8 100644 --- a/pkgs/os-specific/linux/gobi_loader/default.nix +++ b/pkgs/os-specific/linux/gobi_loader/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { substituteInPlace 60-gobi.rules --replace "/lib/firmware" "/run/current-system/firmware" ''; - makeFlags = "prefix=${placeholder "out"}"; + makeFlags = [ "prefix=${placeholder "out"}" ]; meta = with lib; { description = "Firmware loader for Qualcomm Gobi USB chipsets"; diff --git a/pkgs/servers/dns/knot-dns/default.nix b/pkgs/servers/dns/knot-dns/default.nix index 6ed706c537868..286d2f2e93e0c 100644 --- a/pkgs/servers/dns/knot-dns/default.nix +++ b/pkgs/servers/dns/knot-dns/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { CFLAGS = [ "-O2" "-DNDEBUG" ]; doCheck = true; - checkFlags = "V=1"; # verbose output in case some test fails + checkFlags = [ "V=1" ]; # verbose output in case some test fails doInstallCheck = true; postInstall = '' diff --git a/pkgs/servers/matrix-conduit/default.nix b/pkgs/servers/matrix-conduit/default.nix index d328a8d5c2332..1d42d887891e5 100644 --- a/pkgs/servers/matrix-conduit/default.nix +++ b/pkgs/servers/matrix-conduit/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { rocksdb ]; - cargoBuildFlags = "--bin conduit"; + cargoBuildFlags = [ "--bin" "conduit" ]; meta = with lib; { broken = stdenv.isDarwin; diff --git a/pkgs/servers/misc/oven-media-engine/default.nix b/pkgs/servers/misc/oven-media-engine/default.nix index 2c49da6846168..bcba5ce243aae 100644 --- a/pkgs/servers/misc/oven-media-engine/default.nix +++ b/pkgs/servers/misc/oven-media-engine/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { }; sourceRoot = "source/src"; - makeFlags = "release CONFIG_LIBRARY_PATHS= CONFIG_PKG_PATHS= GLOBAL_CC=$(CC) GLOBAL_CXX=$(CXX) GLOBAL_LD=$(CXX) SHELL=${stdenv.shell}"; + makeFlags = [ "release" "CONFIG_LIBRARY_PATHS=" "CONFIG_PKG_PATHS=" "GLOBAL_CC=$(CC)" "GLOBAL_CXX=$(CXX)" "GLOBAL_LD=$(CXX)" "SHELL=${stdenv.shell}" ]; enableParallelBuilding = true; nativeBuildInputs = [ bc pkg-config perl ]; diff --git a/pkgs/servers/nosql/dragonflydb/default.nix b/pkgs/servers/nosql/dragonflydb/default.nix index ff4833cfaa603..db00061348018 100644 --- a/pkgs/servers/nosql/dragonflydb/default.nix +++ b/pkgs/servers/nosql/dragonflydb/default.nix @@ -87,7 +87,7 @@ stdenv.mkDerivation { "-DCMAKE_RANLIB=${gcc-unwrapped}/bin/gcc-ranlib" ]; - ninjaFlags = "dragonfly"; + ninjaFlags = [ "dragonfly" ]; doCheck = false; dontUseNinjaInstall = true; diff --git a/pkgs/tools/X11/find-cursor/default.nix b/pkgs/tools/X11/find-cursor/default.nix index c99c86a714e25..44a7c7662152c 100644 --- a/pkgs/tools/X11/find-cursor/default.nix +++ b/pkgs/tools/X11/find-cursor/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ installShellFiles git ]; buildInputs = [ libX11 libXdamage libXrender libXcomposite libXext ]; preInstall = "mkdir -p $out/share/man/man1"; - installFlags = "PREFIX=${placeholder "out"}"; + installFlags = [ "PREFIX=${placeholder "out"}" ]; meta = with lib; { description = "Simple XLib program to highlight the cursor position"; diff --git a/pkgs/tools/X11/xmousepasteblock/default.nix b/pkgs/tools/X11/xmousepasteblock/default.nix index 35db8a133a23c..984f6ac70a6b7 100644 --- a/pkgs/tools/X11/xmousepasteblock/default.nix +++ b/pkgs/tools/X11/xmousepasteblock/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "0vidckfp277cg2gsww8a8q5b18m10iy4ppyp2qipr89771nrcmns"; rev = version; }; - makeFlags = "PREFIX=$(out)"; + makeFlags = [ "PREFIX=$(out)" ]; buildInputs = with xorg; [ libX11 libXext libXi libev ]; nativeBuildInputs = [ pkg-config ]; meta = with lib; { diff --git a/pkgs/tools/networking/bore/default.nix b/pkgs/tools/networking/bore/default.nix index 66334e0621034..e7934428a958d 100644 --- a/pkgs/tools/networking/bore/default.nix +++ b/pkgs/tools/networking/bore/default.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec { }; cargoSha256 = "1xlbfzmy0wjyz3jpr17r4ma4i79d9b32yqwwi10vrcjzr7vsyhmx"; - cargoBuildFlags = "-p ${pname}"; + cargoBuildFlags = [ "-p" pname ]; # FIXME can’t test --all-targets and --doc in a single invocation cargoTestFlags = [ "--all-targets" "--workspace" ]; diff --git a/pkgs/tools/networking/wg-netmanager/default.nix b/pkgs/tools/networking/wg-netmanager/default.nix index 0c74fe4ad04c9..15dc7b163b573 100644 --- a/pkgs/tools/networking/wg-netmanager/default.nix +++ b/pkgs/tools/networking/wg-netmanager/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { # Test 01 tries to create a wireguard interface, which requires sudo. doCheck = true; - checkFlags = "--skip device"; + checkFlags = [ "--skip" "device" ]; meta = with lib; { description = "Wireguard network manager"; diff --git a/pkgs/tools/system/chase/default.nix b/pkgs/tools/system/chase/default.nix index ff4885b088d5f..d20d33235cf87 100644 --- a/pkgs/tools/system/chase/default.nix +++ b/pkgs/tools/system/chase/default.nix @@ -12,8 +12,7 @@ stdenv.mkDerivation rec { }; doCheck = true; - makeFlags = [ "-e" ]; - makeFlagsArray="LIBS=-lgc"; + makeFlags = [ "-e" "LIBS=-lgc" ]; meta = with lib ; { description = "Follow a symlink and print out its target file"; diff --git a/pkgs/tools/system/tre-command/default.nix b/pkgs/tools/system/tre-command/default.nix index f79c1625fbf25..971aa29b9644a 100644 --- a/pkgs/tools/system/tre-command/default.nix +++ b/pkgs/tools/system/tre-command/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { ''; # this test requires package to be in a git repo to succeed - checkFlags = "--skip respect_git_ignore"; + checkFlags = [ "--skip" "respect_git_ignore" ]; meta = with lib; { description = "Tree command, improved"; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 5384881159288..7d44b42e389f8 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -5288,7 +5288,7 @@ let hash = "sha256-+OzKRch+uRMlmSsT8FlPgI5vG8TDuafxQbmoODhNJSw="; }; - makeMakerFlags = "--libpath=${lib.getLib pkgs.openssl}/lib --incpath=${pkgs.openssl.dev}/include"; + makeMakerFlags = [ "--libpath=${lib.getLib pkgs.openssl}/lib" "--incpath=${pkgs.openssl.dev}/include" ]; buildInputs = [ PathClass ]; propagatedBuildInputs = [ BytesRandomSecure LWPProtocolHttps ]; meta = { @@ -6697,7 +6697,7 @@ let }) ]; - makeMakerFlags = "SQLITE_INC=${pkgs.sqlite.dev}/include SQLITE_LIB=${pkgs.sqlite.out}/lib"; + makeMakerFlags = [ "SQLITE_INC=${pkgs.sqlite.dev}/include" "SQLITE_LIB=${pkgs.sqlite.out}/lib" ]; postInstall = '' # Get rid of a pointless copy of the SQLite sources. @@ -6786,7 +6786,7 @@ let buildInputs = [ pkgs.postgresql ]; propagatedBuildInputs = [ DBI ]; - makeMakerFlags = "POSTGRES_HOME=${pkgs.postgresql}"; + makeMakerFlags = [ "POSTGRES_HOME=${pkgs.postgresql}" ]; # tests freeze in a sandbox doCheck = false; @@ -9310,7 +9310,7 @@ let hash = "sha256-Uuax3Hyy2HpM30OboUXguejPKMwmpIo8+Zd8g0Y5Z+4="; }; buildInputs = [ pkgs.file ConfigAutoConf TestFatal ]; - makeMakerFlags = "--lib=${pkgs.file}/lib"; + makeMakerFlags = [ "--lib=${pkgs.file}/lib" ]; preCheck = '' substituteInPlace t/oo-api.t \ --replace "/usr/share/file/magic.mgc" "${pkgs.file}/share/misc/magic.mgc" @@ -9958,7 +9958,7 @@ let # otherwise "cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]" hardeningDisable = [ "format" ]; - makeMakerFlags = "--lib_png_path=${pkgs.libpng.out} --lib_jpeg_path=${pkgs.libjpeg.out} --lib_zlib_path=${pkgs.zlib.out} --lib_ft_path=${pkgs.freetype.out} --lib_fontconfig_path=${pkgs.fontconfig.lib} --lib_xpm_path=${pkgs.xorg.libXpm.out}"; + makeMakerFlags = [ "--lib_png_path=${pkgs.libpng.out}" "--lib_jpeg_path=${pkgs.libjpeg.out}" "--lib_zlib_path=${pkgs.zlib.out}" "--lib_ft_path=${pkgs.freetype.out}" "--lib_fontconfig_path=${pkgs.fontconfig.lib}" "--lib_xpm_path=${pkgs.xorg.libXpm.out}" ]; meta = { description = "Perl interface to the gd2 graphics library"; @@ -10017,7 +10017,7 @@ let url = "mirror://cpan/authors/id/M/MA/MAXMIND/Geo-IP-1.51.tar.gz"; hash = "sha256-FjAgMV1cVEGDaseeCKd7Qo8nf9CQvqT6gNpwd7JDaro="; }; - makeMakerFlags = "LIBS=-L${pkgs.geoip}/lib INC=-I${pkgs.geoip}/include"; + makeMakerFlags = [ "LIBS=-L${pkgs.geoip}/lib" "INC=-I${pkgs.geoip}/include" ]; doCheck = false; # seems to access the network meta = { description = "Look up location and network information by IP Address"; @@ -10510,7 +10510,7 @@ let hash = "sha256-fY8se2F2L7TsctLsKBKQ8vh/nH0pgnPaRSVDKmXncNY="; }; propagatedBuildInputs = [ pkgs.krb5Full.dev ]; - makeMakerFlags = "--gssapiimpl ${pkgs.krb5Full.dev}"; + makeMakerFlags = [ "--gssapiimpl" "${pkgs.krb5Full.dev}" ]; meta = { description = "Perl extension providing access to the GSSAPIv2 library"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -11783,7 +11783,7 @@ let hash = "sha256-dNRNcBwfFPxLmE+toelVcmtQTC2LBtJl56hh+llDy0g="; }; buildInputs = [ pkgs.freetype pkgs.fontconfig pkgs.libjpeg pkgs.libpng ]; - makeMakerFlags = "--incpath ${pkgs.libjpeg.dev}/include --libpath ${pkgs.libjpeg.out}/lib --incpath ${pkgs.libpng.dev}/include --libpath ${pkgs.libpng.out}/lib"; + makeMakerFlags = [ "--incpath ${pkgs.libjpeg.dev}/include" "--libpath ${pkgs.libjpeg.out}/lib" "--incpath" "${pkgs.libpng.dev}/include" "--libpath" "${pkgs.libpng.out}/lib" ]; meta = { description = "Perl extension for Generating 24 bit Images"; homepage = "http://imager.perl.org"; @@ -11844,7 +11844,7 @@ let }; buildInputs = [ pkgs.libpng pkgs.libjpeg TestNoWarnings ]; propagatedBuildInputs = [ pkgs.zlib ]; - makeMakerFlags = "--with-jpeg-includes=${pkgs.libjpeg.dev}/include --with-jpeg-libs=${pkgs.libjpeg.out}/lib --with-png-includes=${pkgs.libpng.dev}/include --with-png-libs=${pkgs.libpng.out}/lib"; + makeMakerFlags = [ "--with-jpeg-includes=${pkgs.libjpeg.dev}/include" "--with-jpeg-libs=${pkgs.libjpeg.out}/lib" "--with-png-includes=${pkgs.libpng.dev}/include" "--with-png-libs=${pkgs.libpng.out}/lib" ]; meta = { description = "Fast, high-quality fixed-point image resizing"; license = with lib.licenses; [ gpl2Plus ]; @@ -12574,7 +12574,7 @@ let propagatedBuildInputs = [ Inline ]; # TODO: upgrade https://github.com/NixOS/nixpkgs/pull/89731 - makeMakerFlags = "J2SDK=${pkgs.jdk8}"; + makeMakerFlags = [ "J2SDK=${pkgs.jdk8}" ]; # FIXME: Apparently tests want to access the network. doCheck = false; @@ -12831,7 +12831,7 @@ let outputs = [ "out" "tex" ]; propagatedBuildInputs = [ ArchiveZip DBFile FileWhich IOString ImageMagick ImageSize JSONXS LWP ParseRecDescent PodParser TextUnidecode XMLLibXSLT ]; nativeBuildInputs = [ pkgs.makeWrapper ] ++ lib.optional stdenv.isDarwin shortenPerlShebang; - makeMakerFlags = "TEXMF=\${tex} NOMKTEXLSR"; + makeMakerFlags = [ "TEXMF=\${tex}" "NOMKTEXLSR" ]; # shebangs need to be patched before executables are copied to $out preBuild = '' patchShebangs bin/ @@ -12909,7 +12909,13 @@ let outputs = [ "out" ]; buildInputs = [ pkgs.apacheHttpd pkgs.apr pkgs.aprutil ApacheTest ExtUtilsXSBuilder ]; propagatedBuildInputs = [ (pkgs.apacheHttpdPackages.mod_perl.override { inherit perl; }) ]; - makeMakerFlags = "--with-apache2-src=${pkgs.apacheHttpd.dev} --with-apache2-apxs=${pkgs.apacheHttpd.dev}/bin/apxs --with-apache2-httpd=${pkgs.apacheHttpd.out}/bin/httpd --with-apr-config=${pkgs.apr.dev}/bin/apr-1-config --with-apu-config=${pkgs.aprutil.dev}/bin/apu-1-config"; + makeMakerFlags = [ + "--with-apache2-src=${pkgs.apacheHttpd.dev}" + "--with-apache2-apxs=${pkgs.apacheHttpd.dev}/bin/apxs" + "--with-apache2-httpd=${pkgs.apacheHttpd.out}/bin/httpd" + "--with-apr-config=${pkgs.apr.dev}/bin/apr-1-config" + "--with-apu-config=${pkgs.aprutil.dev}/bin/apu-1-config" + ]; preConfigure = '' # override broken prereq check substituteInPlace configure --replace "prereq_check=\"\$PERL \$PERL_OPTS build/version_check.pl\"" "prereq_check=\"echo\"" @@ -14573,7 +14579,7 @@ let # `overflow'; Pari.o:(.bss+0x80): first defined here NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure = "cp ${pari_tgz} pari-${pariversion}.tgz"; - makeMakerFlags = "pari_tgz=pari-${pariversion}.tgz"; + makeMakerFlags = [ "pari_tgz=pari-${pariversion}.tgz" ]; src = fetchurl { url = "mirror://cpan/authors/id/I/IL/ILYAZ/modules/Math-Pari-2.030518.zip"; hash = "sha256-3DiVWpaQvmuvqN4lJiEjd8Psn+jaXsAiY6nK+UtYu5E="; @@ -15739,7 +15745,7 @@ let hash = "sha256-9bghtZsP3JZw5G7Q/PMtiRHyUSYYmotowWUvkiHu4mk="; }; - makeMakerFlags = "MP_AP_DESTDIR=$out"; + makeMakerFlags = [ "MP_AP_DESTDIR=$out" ]; buildInputs = [ pkgs.apacheHttpd ]; doCheck = false; # would try to start Apache HTTP server passthru.tests = nixosTests.mod_perl; @@ -16437,7 +16443,7 @@ let buildInputs = [ ModuleBuildTiny TestSharedFork pkgs.postgresql ]; propagatedBuildInputs = [ DBDPg DBI FileWhich FunctionParameters Moo TieHashMethod TryTiny TypeTiny ]; - makeMakerFlags = "POSTGRES_HOME=${pkgs.postgresql}"; + makeMakerFlags = [ "POSTGRES_HOME=${pkgs.postgresql}" ]; meta = { description = "PostgreSQL runner for tests"; @@ -17578,7 +17584,7 @@ let hash = "sha256-hS1u6H6PDQFCIwJlgcu1aSS6jN3TzrKcYZHbthItQ8U="; }; propagatedBuildInputs = [ DigestHMAC ]; - makeMakerFlags = "--noonline-tests"; + makeMakerFlags = [ "--noonline-tests" ]; meta = { description = "Perl Interface to the Domain Name System"; license = with lib.licenses; [ mit ]; @@ -22734,8 +22740,8 @@ let pkgs.tk ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; - makeMakerFlags = lib.optionalString stdenv.isLinux - "--tclsh=${pkgs.tcl}/bin/tclsh --nousestubs"; + makeMakerFlags = lib.optionals stdenv.isLinux + [ "--tclsh=${pkgs.tcl}/bin/tclsh" "--nousestubs" ]; meta = { description = "Tcl extension module for Perl"; license = with lib.licenses; [ artistic1 gpl1Plus ]; @@ -26156,7 +26162,7 @@ let url = "mirror://cpan/authors/id/S/SR/SREZIC/Tk-804.035.tar.gz"; hash = "sha256-TSuAKRum3jTY7IhqCFptvSt5C5JgNaCH6ZAlYUxf/dQ="; }; - makeMakerFlags = "X11INC=${pkgs.xorg.libX11.dev}/include X11LIB=${pkgs.xorg.libX11.out}/lib"; + makeMakerFlags = [ "X11INC=${pkgs.xorg.libX11.dev}/include" "X11LIB=${pkgs.xorg.libX11.out}/lib" ]; buildInputs = [ pkgs.xorg.libX11 pkgs.libpng ]; doCheck = false; # Expects working X11. meta = { @@ -26172,7 +26178,7 @@ let url = "mirror://cpan/authors/id/A/AS/ASB/Tk-ToolBar-0.12.tar.gz"; hash = "sha256-Rj4oTsRxN+fEJclpGwKo3sXOJytY6h9jWa6AQaI53Q8="; }; - makeMakerFlags = "X11INC=${pkgs.xorg.libX11.dev}/include X11LIB=${pkgs.xorg.libX11.out}/lib"; + makeMakerFlags = [ "X11INC=${pkgs.xorg.libX11.dev}/include" "X11LIB=${pkgs.xorg.libX11.out}/lib" ]; buildInputs = [ Tk ]; doCheck = false; # Expects working X11. meta = { @@ -27279,7 +27285,7 @@ let '' + lib.optionalString stdenv.isCygwin '' sed -i"" -e "s@my \$compiler = File::Spec->catfile(\$path, \$cc\[0\]) \. \$Config{_exe};@my \$compiler = File::Spec->catfile(\$path, \$cc\[0\]) \. (\$^O eq 'cygwin' ? \"\" : \$Config{_exe});@" inc/Devel/CheckLib.pm ''; - makeMakerFlags = "EXPATLIBPATH=${pkgs.expat.out}/lib EXPATINCPATH=${pkgs.expat.dev}/include"; + makeMakerFlags = [ "EXPATLIBPATH=${pkgs.expat.out}/lib" "EXPATINCPATH=${pkgs.expat.dev}/include" ]; propagatedBuildInputs = [ LWP ]; meta = { description = "A perl module for parsing XML documents"; @@ -27806,7 +27812,7 @@ let NIX_CFLAGS_COMPILE = "-I${pkgs.openssl_1_1.dev}/include -I${pkgs.libidn2}.dev}/include"; NIX_CFLAGS_LINK = "-L${lib.getLib pkgs.openssl_1_1}/lib -L${lib.getLib pkgs.libidn2}/lib -lcrypto -lidn2"; - makeMakerFlags = "--prefix-openssl=${pkgs.openssl_1_1.dev}"; + makeMakerFlags = [ "--prefix-openssl=${pkgs.openssl_1_1.dev}" ]; nativeBuildInputs = [ pkgs.pkg-config ]; buildInputs = [ DevelChecklib ModuleInstall ModuleInstallXSUtil TestFatal pkgs.ldns pkgs.libidn2 pkgs.openssl_1_1 ]; From 7e49471316373c471a3bf4b78c130ebc907ae2d2 Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 6 Oct 2022 19:38:53 +0300 Subject: [PATCH 265/318] treewide: optional -> optionals where the argument is a list the argument to optional should not be list --- lib/generators.nix | 2 +- nixos/modules/hardware/video/nvidia.nix | 2 +- nixos/modules/services/misc/ethminer.nix | 2 +- nixos/modules/services/misc/podgrab.nix | 2 +- nixos/modules/services/networking/hostapd.nix | 2 +- nixos/modules/services/security/tor.nix | 4 ++-- nixos/modules/services/web-apps/netbox.nix | 2 +- pkgs/applications/audio/chuck/default.nix | 2 +- pkgs/applications/audio/grandorgue/default.nix | 2 +- pkgs/applications/audio/snapcast/default.nix | 2 +- .../blockchains/polkadot/default.nix | 2 +- pkgs/applications/editors/rstudio/default.nix | 4 ++-- pkgs/applications/editors/vim/configurable.nix | 2 +- pkgs/applications/editors/vscode/generic.nix | 2 +- pkgs/applications/emulators/retroarch/cores.nix | 2 +- pkgs/applications/file-managers/nnn/default.nix | 4 ++-- pkgs/applications/gis/gmt/default.nix | 2 +- pkgs/applications/graphics/kcc/default.nix | 2 +- pkgs/applications/misc/audio/sox/default.nix | 2 +- pkgs/applications/misc/blender/default.nix | 2 +- .../networking/browsers/links2/default.nix | 2 +- .../networking/cluster/hadoop/default.nix | 2 +- pkgs/applications/networking/firehol/default.nix | 2 +- .../instant-messengers/pantalaimon/default.nix | 2 +- .../networking/irc/convos/default.nix | 2 +- .../networking/mailreaders/alot/default.nix | 2 +- .../networking/mailreaders/meli/default.nix | 2 +- pkgs/applications/networking/mpop/default.nix | 4 ++-- .../networking/sync/lsyncd/default.nix | 2 +- pkgs/applications/networking/znc/default.nix | 4 ++-- pkgs/applications/radio/rtl-sdr/default.nix | 2 +- .../science/biology/megahit/default.nix | 2 +- .../science/biology/neuron/default.nix | 2 +- .../science/biology/samtools/default.nix | 2 +- .../science/logic/fast-downward/default.nix | 2 +- .../science/math/ratpoints/default.nix | 2 +- .../version-management/datalad/default.nix | 4 ++-- .../version-management/dvc/default.nix | 8 ++++---- .../version-management/subversion/default.nix | 2 +- pkgs/applications/video/kodi/unwrapped.nix | 6 +++--- .../skaware/build-skaware-package.nix | 2 +- pkgs/data/fonts/iosevka/default.nix | 2 +- pkgs/desktops/gnome-2/platform/GConf/default.nix | 2 +- pkgs/development/compilers/dmd/default.nix | 2 +- pkgs/development/compilers/edk2/default.nix | 2 +- pkgs/development/compilers/gforth/boot-forth.nix | 2 +- pkgs/development/compilers/ghdl/default.nix | 2 +- pkgs/development/compilers/idris2/default.nix | 2 +- pkgs/development/compilers/idris2/tests.nix | 2 +- .../compilers/llvm/10/libcxx/default.nix | 2 +- .../compilers/llvm/11/libcxx/default.nix | 2 +- .../compilers/llvm/12/libcxx/default.nix | 2 +- .../compilers/llvm/8/libcxx/default.nix | 2 +- .../compilers/llvm/9/libcxx/default.nix | 2 +- pkgs/development/compilers/orc/default.nix | 2 +- pkgs/development/compilers/p4c/default.nix | 4 ++-- pkgs/development/compilers/sbcl/2.x.nix | 2 +- pkgs/development/interpreters/kerf/default.nix | 6 +++--- pkgs/development/interpreters/php/generic.nix | 4 ++-- .../interpreters/python/cpython/2.7/default.nix | 2 +- pkgs/development/interpreters/racket/default.nix | 4 ++-- .../interpreters/racket/racket_7_9.nix | 4 ++-- .../interpreters/spidermonkey/common.nix | 2 +- pkgs/development/libraries/ada/gnatcoll/db.nix | 2 +- pkgs/development/libraries/apr/default.nix | 2 +- pkgs/development/libraries/cxxopts/default.nix | 4 ++-- .../development/libraries/cyrus-sasl/default.nix | 2 +- pkgs/development/libraries/drogon/default.nix | 2 +- pkgs/development/libraries/galario/default.nix | 4 ++-- pkgs/development/libraries/gnutls/default.nix | 2 +- .../libraries/gstreamer/base/default.nix | 2 +- pkgs/development/libraries/json-glib/default.nix | 2 +- pkgs/development/libraries/kerberos/krb5.nix | 2 +- pkgs/development/libraries/libav/default.nix | 4 ++-- pkgs/development/libraries/libdaemon/default.nix | 2 +- .../development/libraries/libdeflate/default.nix | 2 +- pkgs/development/libraries/libff/default.nix | 2 +- pkgs/development/libraries/libmcrypt/default.nix | 2 +- .../libraries/libpam-wrapper/default.nix | 2 +- pkgs/development/libraries/libvdpau/default.nix | 2 +- .../libraries/libvncserver/default.nix | 2 +- pkgs/development/libraries/libxslt/default.nix | 2 +- pkgs/development/libraries/mimalloc/default.nix | 2 +- pkgs/development/libraries/nng/default.nix | 2 +- pkgs/development/libraries/openbsm/default.nix | 2 +- pkgs/development/libraries/opencv/3.x.nix | 2 +- pkgs/development/libraries/openmpi/default.nix | 2 +- pkgs/development/libraries/openvino/default.nix | 4 ++-- pkgs/development/libraries/pangomm/2.48.nix | 2 +- pkgs/development/libraries/poppler/default.nix | 2 +- pkgs/development/libraries/precice/default.nix | 2 +- .../libraries/qt-5/modules/qtlocation.nix | 2 +- .../libraries/redis-plus-plus/default.nix | 4 ++-- .../libraries/science/math/faiss/default.nix | 2 +- .../science/networking/ns-3/default.nix | 4 ++-- pkgs/development/libraries/speechd/default.nix | 16 ++++++++-------- pkgs/development/libraries/vtk/generic.nix | 2 +- pkgs/development/mobile/androidenv/cmake.nix | 2 +- .../mobile/androidenv/ndk-bundle/default.nix | 2 +- pkgs/development/mobile/androidenv/tools/25.nix | 2 +- .../python-modules/aiodns/default.nix | 2 +- .../python-modules/ansible-runner/default.nix | 2 +- .../aspy-refactor-imports/default.nix | 2 +- .../python-modules/asyncio_mqtt/default.nix | 2 +- .../python-modules/azure-core/default.nix | 2 +- .../python-modules/betterproto/default.nix | 2 +- .../python-modules/catboost/default.nix | 2 +- .../python-modules/ciso8601/default.nix | 2 +- .../python-modules/deprecation/default.nix | 2 +- .../python-modules/dnspython/default.nix | 2 +- .../python-modules/enlighten/default.nix | 2 +- .../python-modules/fixtures/default.nix | 2 +- .../python-modules/funcsigs/default.nix | 2 +- .../python-modules/glymur/default.nix | 2 +- .../python-modules/hupper/default.nix | 2 +- .../importlib-resources/default.nix | 2 +- .../python-modules/jaraco_text/default.nix | 4 ++-- .../python-modules/jaxlib/default.nix | 6 +++--- .../python-modules/lightgbm/default.nix | 2 +- .../python-modules/markdown-it-py/default.nix | 2 +- .../python-modules/matplotlib/default.nix | 4 ++-- pkgs/development/python-modules/nipy/default.nix | 2 +- .../python-modules/notebook/default.nix | 2 +- .../development/python-modules/numba/default.nix | 2 +- .../python-modules/paho-mqtt/default.nix | 2 +- .../python-modules/peewee/default.nix | 4 ++-- .../python-modules/pygit2/default.nix | 4 ++-- .../python-modules/pyls-mypy/default.nix | 2 +- .../python-modules/python-miio/default.nix | 2 +- .../development/python-modules/qutip/default.nix | 2 +- .../python-modules/rdflib/default.nix | 2 +- pkgs/development/python-modules/rich/default.nix | 4 ++-- .../python-modules/simple-di/default.nix | 2 +- .../development/python-modules/spacy/default.nix | 2 +- .../python-modules/sphinx/default.nix | 2 +- .../python-modules/starlette/default.nix | 2 +- .../python-modules/tensorflow/bin.nix | 2 +- .../python-modules/tensorflow/default.nix | 2 +- .../development/python-modules/thinc/default.nix | 4 ++-- .../python-modules/tzdata/default.nix | 2 +- .../development/python-modules/wandb/default.nix | 2 +- pkgs/development/python-modules/web3/default.nix | 2 +- .../python-modules/yamllint/default.nix | 2 +- .../tools/analysis/radare2/default.nix | 8 ++++---- pkgs/development/tools/misc/pahole/default.nix | 2 +- .../tools/misc/pkg-config/default.nix | 4 ++-- pkgs/development/tools/parsing/ragel/default.nix | 2 +- .../poetry2nix/poetry2nix/overrides/default.nix | 10 +++++----- pkgs/development/tools/summon/default.nix | 2 +- pkgs/games/anki/default.nix | 2 +- pkgs/games/blightmud/default.nix | 2 +- pkgs/games/freeciv/default.nix | 4 ++-- pkgs/games/xonotic/default.nix | 4 ++-- .../darwin/apple-source-releases/ICU/default.nix | 2 +- .../darwin/apple-source-releases/xnu/default.nix | 2 +- pkgs/os-specific/darwin/libtapi/default.nix | 4 ++-- pkgs/os-specific/linux/exfat/default.nix | 2 +- .../os-specific/linux/kernel-headers/default.nix | 2 +- pkgs/os-specific/linux/nvidia-x11/generic.nix | 2 +- pkgs/os-specific/linux/rtl8812au/default.nix | 2 +- pkgs/servers/dante/default.nix | 2 +- pkgs/servers/foundationdb/cmake.nix | 2 +- pkgs/servers/foundationdb/vsmake.nix | 4 ++-- pkgs/servers/geospatial/mapserver/default.nix | 2 +- pkgs/servers/nosql/redis/default.nix | 2 +- pkgs/servers/samba/4.x.nix | 2 +- pkgs/servers/sql/mariadb/default.nix | 12 ++++++------ pkgs/shells/bash/5.1.nix | 2 +- pkgs/shells/ion/default.nix | 2 +- pkgs/tools/cd-dvd/dvdisaster/default.nix | 2 +- pkgs/tools/compression/bsdiff/default.nix | 2 +- pkgs/tools/graphics/mangohud/default.nix | 2 +- pkgs/tools/misc/hiksink/default.nix | 2 +- pkgs/tools/misc/jsonwatch/default.nix | 2 +- pkgs/tools/misc/less/default.nix | 2 +- pkgs/tools/misc/man-db/default.nix | 2 +- pkgs/tools/misc/otfcc/default.nix | 2 +- pkgs/tools/misc/pre-commit/default.nix | 4 ++-- pkgs/tools/misc/rust-motd/default.nix | 2 +- pkgs/tools/misc/sheldon/default.nix | 2 +- pkgs/tools/misc/ttwatch/default.nix | 2 +- pkgs/tools/networking/bore-cli/default.nix | 2 +- .../networking/eternal-terminal/default.nix | 2 +- pkgs/tools/networking/ipv6calc/default.nix | 6 +++--- pkgs/tools/networking/rathole/default.nix | 2 +- pkgs/tools/networking/termscp/default.nix | 2 +- pkgs/tools/networking/toxvpn/default.nix | 2 +- pkgs/tools/networking/unbound/default.nix | 2 +- pkgs/tools/networking/vde2/default.nix | 2 +- pkgs/tools/package-management/nix/common.nix | 2 +- .../security/asc-key-to-qr-code-gif/default.nix | 2 +- pkgs/tools/security/chipsec/default.nix | 2 +- pkgs/tools/security/rhash/default.nix | 2 +- pkgs/tools/security/sudo/default.nix | 4 ++-- pkgs/tools/system/fio/default.nix | 2 +- pkgs/tools/system/netdata/default.nix | 4 ++-- pkgs/top-level/perl-packages.nix | 2 +- 197 files changed, 257 insertions(+), 257 deletions(-) diff --git a/lib/generators.nix b/lib/generators.nix index 28b2e39bf6464..b77cca75010f9 100644 --- a/lib/generators.nix +++ b/lib/generators.nix @@ -378,7 +378,7 @@ rec { attr = let attrFilter = name: value: name != "_module" && value != null; in ind: x: libStr.concatStringsSep "\n" (lib.flatten (lib.mapAttrsToList - (name: value: lib.optional (attrFilter name value) [ + (name: value: lib.optionals (attrFilter name value) [ (key "\t${ind}" name) (expr "\t${ind}" value) ]) x)); diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index 25cab06119751..cee230ac41cb1 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -261,7 +261,7 @@ in in optional primeEnabled { name = igpuDriver; display = offloadCfg.enable; - modules = optional (igpuDriver == "amdgpu") [ pkgs.xorg.xf86videoamdgpu ]; + modules = optionals (igpuDriver == "amdgpu") [ pkgs.xorg.xf86videoamdgpu ]; deviceSection = '' BusID "${igpuBusId}" ${optionalString (syncCfg.enable && igpuDriver != "amdgpu") ''Option "AccelMethod" "none"''} diff --git a/nixos/modules/services/misc/ethminer.nix b/nixos/modules/services/misc/ethminer.nix index 909c49866e543..c9b2e24b8bf1b 100644 --- a/nixos/modules/services/misc/ethminer.nix +++ b/nixos/modules/services/misc/ethminer.nix @@ -85,7 +85,7 @@ in config = mkIf cfg.enable { systemd.services.ethminer = { - path = optional (cfg.toolkit == "cuda") [ pkgs.cudaPackages.cudatoolkit ]; + path = optionals (cfg.toolkit == "cuda") [ pkgs.cudaPackages.cudatoolkit ]; description = "ethminer ethereum mining service"; wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; diff --git a/nixos/modules/services/misc/podgrab.nix b/nixos/modules/services/misc/podgrab.nix index 10c7bc96b8f04..c0a1247185050 100644 --- a/nixos/modules/services/misc/podgrab.nix +++ b/nixos/modules/services/misc/podgrab.nix @@ -36,7 +36,7 @@ in }; serviceConfig = { DynamicUser = true; - EnvironmentFile = lib.optional (cfg.passwordFile != null) [ + EnvironmentFile = lib.optionals (cfg.passwordFile != null) [ cfg.passwordFile ]; ExecStart = "${pkgs.podgrab}/bin/podgrab"; diff --git a/nixos/modules/services/networking/hostapd.nix b/nixos/modules/services/networking/hostapd.nix index ec1a7a58b1e09..63bb44256dd69 100644 --- a/nixos/modules/services/networking/hostapd.nix +++ b/nixos/modules/services/networking/hostapd.nix @@ -199,7 +199,7 @@ in environment.systemPackages = [ pkgs.hostapd ]; - services.udev.packages = optional (cfg.countryCode != null) [ pkgs.crda ]; + services.udev.packages = optionals (cfg.countryCode != null) [ pkgs.crda ]; systemd.services.hostapd = { description = "hostapd wireless AP"; diff --git a/nixos/modules/services/security/tor.nix b/nixos/modules/services/security/tor.nix index 730802d92cfa8..b85b78f269a1d 100644 --- a/nixos/modules/services/security/tor.nix +++ b/nixos/modules/services/security/tor.nix @@ -816,13 +816,13 @@ in always create a container/VM with a separate Tor daemon instance. '' ++ flatten (mapAttrsToList (n: o: - optional (o.settings.HiddenServiceVersion == 2) [ + optionals (o.settings.HiddenServiceVersion == 2) [ (optional (o.settings.HiddenServiceExportCircuitID != null) '' HiddenServiceExportCircuitID is used in the HiddenService: ${n} but this option is only for v3 hidden services. '') ] ++ - optional (o.settings.HiddenServiceVersion != 2) [ + optionals (o.settings.HiddenServiceVersion != 2) [ (optional (o.settings.HiddenServiceAuthorizeClient != null) '' HiddenServiceAuthorizeClient is used in the HiddenService: ${n} but this option is only for v2 hidden services. diff --git a/nixos/modules/services/web-apps/netbox.nix b/nixos/modules/services/web-apps/netbox.nix index 2826e57f2c776..f09a8dfc5b215 100644 --- a/nixos/modules/services/web-apps/netbox.nix +++ b/nixos/modules/services/web-apps/netbox.nix @@ -46,7 +46,7 @@ let ''; })).override { plugins = ps: ((cfg.plugins ps) - ++ optional cfg.enableLdap [ ps.django-auth-ldap ]); + ++ optionals cfg.enableLdap [ ps.django-auth-ldap ]); }; netboxManageScript = with pkgs; (writeScriptBin "netbox-manage" '' #!${stdenv.shell} diff --git a/pkgs/applications/audio/chuck/default.nix b/pkgs/applications/audio/chuck/default.nix index a6509256881b3..21d58eccb741a 100644 --- a/pkgs/applications/audio/chuck/default.nix +++ b/pkgs/applications/audio/chuck/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ libsndfile ] ++ lib.optional (!stdenv.isDarwin) alsa-lib - ++ lib.optional stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel ]; + ++ lib.optionals stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel ]; patches = [ ./darwin-limits.patch ]; diff --git a/pkgs/applications/audio/grandorgue/default.nix b/pkgs/applications/audio/grandorgue/default.nix index 954a2265312e4..5940e353042cb 100644 --- a/pkgs/applications/audio/grandorgue/default.nix +++ b/pkgs/applications/audio/grandorgue/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { buildInputs = [ fftwFloat alsa-lib zlib wavpack wxGTK31 udev ] ++ lib.optional jackaudioSupport libjack2; - cmakeFlags = lib.optional (!jackaudioSupport) [ + cmakeFlags = lib.optionals (!jackaudioSupport) [ "-DRTAUDIO_USE_JACK=OFF" "-DRTMIDI_USE_JACK=OFF" ] ++ lib.optional (!includeDemo) "-DINSTALL_DEMO=OFF"; diff --git a/pkgs/applications/audio/snapcast/default.nix b/pkgs/applications/audio/snapcast/default.nix index bbaa3fe839b1a..612d18f13571a 100644 --- a/pkgs/applications/audio/snapcast/default.nix +++ b/pkgs/applications/audio/snapcast/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { aixlog popl soxr ] ++ lib.optional pulseaudioSupport libpulseaudio ++ lib.optional stdenv.isLinux alsa-lib - ++ lib.optional stdenv.isDarwin [darwin.apple_sdk.frameworks.IOKit darwin.apple_sdk.frameworks.AudioToolbox]; + ++ lib.optionals stdenv.isDarwin [darwin.apple_sdk.frameworks.IOKit darwin.apple_sdk.frameworks.AudioToolbox]; TARGET=lib.optionalString stdenv.isDarwin "MACOS"; diff --git a/pkgs/applications/blockchains/polkadot/default.nix b/pkgs/applications/blockchains/polkadot/default.nix index 92342bfda7856..22d2f05112ca2 100644 --- a/pkgs/applications/blockchains/polkadot/default.nix +++ b/pkgs/applications/blockchains/polkadot/default.nix @@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-mI8VvTlM9ynstDBC0ubQkzg3D2ZXuWqJGS/Y23D6dU0="; - buildInputs = lib.optional stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.isDarwin [ Security ]; nativeBuildInputs = [ clang ]; diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix index 50f69300aa04f..70e69503749b9 100644 --- a/pkgs/applications/editors/rstudio/default.nix +++ b/pkgs/applications/editors/rstudio/default.nix @@ -85,7 +85,7 @@ in makeWrapper pandoc nodejs - ] ++ lib.optional (!server) [ + ] ++ lib.optionals (!server) [ copyDesktopItems ]; @@ -118,7 +118,7 @@ in "-DQUARTO_ENABLED=FALSE" "-DPANDOC_VERSION=${pandoc.version}" "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}/lib/rstudio" - ] ++ lib.optional (!server) [ + ] ++ lib.optionals (!server) [ "-DQT_QMAKE_EXECUTABLE=${qmake}/bin/qmake" ]; diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix index d5dd00b4aa603..11ddddaefc24c 100644 --- a/pkgs/applications/editors/vim/configurable.nix +++ b/pkgs/applications/editors/vim/configurable.nix @@ -109,7 +109,7 @@ in stdenv.mkDerivation rec { ++ lib.optionals luaSupport [ "--with-lua-prefix=${lua}" "--enable-luainterp" - ] ++ lib.optional lua.pkgs.isLuaJIT [ + ] ++ lib.optionals lua.pkgs.isLuaJIT [ "--with-luajit" ] ++ lib.optionals pythonSupport [ diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix index 71c0f3bb55e3b..f8808e033ed4d 100644 --- a/pkgs/applications/editors/vscode/generic.nix +++ b/pkgs/applications/editors/vscode/generic.nix @@ -66,7 +66,7 @@ let buildInputs = [ libsecret libXScrnSaver libxshmfence ] ++ lib.optionals (!stdenv.isDarwin) ([ at-spi2-atk ] ++ atomEnv.packages); - runtimeDependencies = lib.optional stdenv.isLinux [ (lib.getLib systemd) fontconfig.lib libdbusmenu ]; + runtimeDependencies = lib.optionals stdenv.isLinux [ (lib.getLib systemd) fontconfig.lib libdbusmenu ]; nativeBuildInputs = [ unzip ] ++ lib.optionals stdenv.isLinux [ diff --git a/pkgs/applications/emulators/retroarch/cores.nix b/pkgs/applications/emulators/retroarch/cores.nix index 57ae88dbd42ce..1224aa74f29cc 100644 --- a/pkgs/applications/emulators/retroarch/cores.nix +++ b/pkgs/applications/emulators/retroarch/cores.nix @@ -676,7 +676,7 @@ in description = "Fast MegaDrive/MegaCD/32X emulator"; license = "MAME"; dontConfigure = true; - makeFlags = lib.optional stdenv.hostPlatform.isAarch64 [ "platform=aarch64" ]; + makeFlags = lib.optionals stdenv.hostPlatform.isAarch64 [ "platform=aarch64" ]; }; play = mkLibRetroCore { diff --git a/pkgs/applications/file-managers/nnn/default.nix b/pkgs/applications/file-managers/nnn/default.nix index 85c372f004068..05f65df87b951 100644 --- a/pkgs/applications/file-managers/nnn/default.nix +++ b/pkgs/applications/file-managers/nnn/default.nix @@ -40,8 +40,8 @@ stdenv.mkDerivation rec { NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-lfts"; makeFlags = [ "PREFIX=${placeholder "out"}" ] - ++ lib.optional withIcons [ "O_ICONS=1" ] - ++ lib.optional withNerdIcons [ "O_NERD=1" ]; + ++ lib.optionals withIcons [ "O_ICONS=1" ] + ++ lib.optionals withNerdIcons [ "O_NERD=1" ]; binPath = lib.makeBinPath [ file which ]; diff --git a/pkgs/applications/gis/gmt/default.nix b/pkgs/applications/gis/gmt/default.nix index c6e0846e54dc3..3cc04e3744400 100644 --- a/pkgs/applications/gis/gmt/default.nix +++ b/pkgs/applications/gis/gmt/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { "-DGMT_INSTALL_MODULE_LINKS:BOOL=FALSE" "-DLICENSE_RESTRICTED=LGPL" # "GPL" and "no" also valid ] ++ (with stdenv; - lib.optional (!isDarwin) [ + lib.optionals (!isDarwin) [ "-DFFTW3_ROOT=${fftwSinglePrec.dev}" "-DLAPACK_LIBRARY=${lapack}/lib/liblapack.so" "-DBLAS_LIBRARY=${blas}/lib/libblas.so" diff --git a/pkgs/applications/graphics/kcc/default.nix b/pkgs/applications/graphics/kcc/default.nix index bbbd4ed351bc2..2f481252d881d 100644 --- a/pkgs/applications/graphics/kcc/default.nix +++ b/pkgs/applications/graphics/kcc/default.nix @@ -23,7 +23,7 @@ mkDerivationWith python3Packages.buildPythonApplication rec { raven ]; - qtWrapperArgs = lib.optional archiveSupport [ "--prefix" "PATH" ":" "${ lib.makeBinPath [ p7zip ] }" ]; + qtWrapperArgs = lib.optionals archiveSupport [ "--prefix" "PATH" ":" "${ lib.makeBinPath [ p7zip ] }" ]; postFixup = '' wrapProgram $out/bin/kcc "''${qtWrapperArgs[@]}" diff --git a/pkgs/applications/misc/audio/sox/default.nix b/pkgs/applications/misc/audio/sox/default.nix index d82658f529e44..9ddcdc92c5bda 100644 --- a/pkgs/applications/misc/audio/sox/default.nix +++ b/pkgs/applications/misc/audio/sox/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook autoconf-archive - ] ++ lib.optional enableOpusfile [ + ] ++ lib.optionals enableOpusfile [ # configure.ac uses pkg-config only to locate libopusfile pkg-config ]; diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix index c6f16733cc21c..e6bdd340c9795 100644 --- a/pkgs/applications/misc/blender/default.nix +++ b/pkgs/applications/misc/blender/default.nix @@ -127,7 +127,7 @@ stdenv.mkDerivation rec { # Clang doesn't support "-export-dynamic" ++ optional stdenv.cc.isClang "-DPYTHON_LINKFLAGS=" ++ optional jackaudioSupport "-DWITH_JACK=ON" - ++ optional cudaSupport [ + ++ optionals cudaSupport [ "-DWITH_CYCLES_CUDA_BINARIES=ON" "-DWITH_CYCLES_DEVICE_OPTIX=ON" "-DOPTIX_ROOT_DIR=${optix}" diff --git a/pkgs/applications/networking/browsers/links2/default.nix b/pkgs/applications/networking/browsers/links2/default.nix index e01131e193e09..4dc06cd466b50 100644 --- a/pkgs/applications/networking/browsers/links2/default.nix +++ b/pkgs/applications/networking/browsers/links2/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { [ libev librsvg libpng libjpeg libtiff openssl xz bzip2 zlib ] ++ optionals stdenv.isLinux [ gpm ] ++ optionals enableX11 [ libX11 libXau libXt ] - ++ optional enableDirectFB [ directfb ]; + ++ optionals enableDirectFB [ directfb ]; nativeBuildInputs = [ pkg-config bzip2 ]; diff --git a/pkgs/applications/networking/cluster/hadoop/default.nix b/pkgs/applications/networking/cluster/hadoop/default.nix index 365cac59f41ad..ebe21a2da45ea 100644 --- a/pkgs/applications/networking/cluster/hadoop/default.nix +++ b/pkgs/applications/networking/cluster/hadoop/default.nix @@ -37,7 +37,7 @@ let doCheck = true; nativeBuildInputs = [ makeWrapper ] - ++ optional (stdenv.isLinux && (nativeLibs != [ ] || libPatches != "")) [ autoPatchelfHook ]; + ++ optionals (stdenv.isLinux && (nativeLibs != [ ] || libPatches != "")) [ autoPatchelfHook ]; buildInputs = [ openssl ] ++ nativeLibs; installPhase = '' diff --git a/pkgs/applications/networking/firehol/default.nix b/pkgs/applications/networking/firehol/default.nix index 145fae2553a20..81c82dcbe1b0f 100644 --- a/pkgs/applications/networking/firehol/default.nix +++ b/pkgs/applications/networking/firehol/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--localstatedir=/var" "--disable-doc" "--disable-man" "--disable-update-ipsets" ] ++ - lib.optional onlyQOS [ "--disable-firehol" ]; + lib.optionals onlyQOS [ "--disable-firehol" ]; meta = with lib; { description = "A firewall for humans"; diff --git a/pkgs/applications/networking/instant-messengers/pantalaimon/default.nix b/pkgs/applications/networking/instant-messengers/pantalaimon/default.nix index 41eef4e204570..49114903a59ac 100644 --- a/pkgs/applications/networking/instant-messengers/pantalaimon/default.nix +++ b/pkgs/applications/networking/instant-messengers/pantalaimon/default.nix @@ -34,7 +34,7 @@ buildPythonApplication rec { peewee prompt-toolkit setuptools - ] ++ lib.optional enableDbusUi [ + ] ++ lib.optionals enableDbusUi [ dbus-python notify2 pygobject3 diff --git a/pkgs/applications/networking/irc/convos/default.nix b/pkgs/applications/networking/irc/convos/default.nix index 7b2a8c3f24707..30aac1cb11787 100644 --- a/pkgs/applications/networking/irc/convos/default.nix +++ b/pkgs/applications/networking/irc/convos/default.nix @@ -16,7 +16,7 @@ perlPackages.buildPerlPackage rec { }; nativeBuildInputs = [ makeWrapper ] - ++ optional stdenv.isDarwin [ shortenPerlShebang ]; + ++ optionals stdenv.isDarwin [ shortenPerlShebang ]; buildInputs = with perlPackages; [ CryptPassphrase CryptPassphraseArgon2 CryptPassphraseBcrypt diff --git a/pkgs/applications/networking/mailreaders/alot/default.nix b/pkgs/applications/networking/mailreaders/alot/default.nix index d8a4d1066ecb2..889b893ea9cff 100644 --- a/pkgs/applications/networking/mailreaders/alot/default.nix +++ b/pkgs/applications/networking/mailreaders/alot/default.nix @@ -15,7 +15,7 @@ with python3.pkgs; buildPythonApplication rec { outputs = [ "out" - ] ++ lib.optional withManpage [ + ] ++ lib.optionals withManpage [ "man" ]; diff --git a/pkgs/applications/networking/mailreaders/meli/default.nix b/pkgs/applications/networking/mailreaders/meli/default.nix index f998a4366b39e..e3da77531a114 100644 --- a/pkgs/applications/networking/mailreaders/meli/default.nix +++ b/pkgs/applications/networking/mailreaders/meli/default.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec { checkInputs = [ file ]; - buildFeatures = lib.optional withNotmuch [ "notmuch" ]; + buildFeatures = lib.optionals withNotmuch [ "notmuch" ]; postInstall = '' mkdir -p $out/share/man/man1 diff --git a/pkgs/applications/networking/mpop/default.nix b/pkgs/applications/networking/mpop/default.nix index 21d9d19e03b3e..7e89603827456 100644 --- a/pkgs/applications/networking/mpop/default.nix +++ b/pkgs/applications/networking/mpop/default.nix @@ -25,11 +25,11 @@ stdenv.mkDerivation rec { gnutls gsasl libidn - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ Security ]; - configureFlags = lib.optional stdenv.isDarwin [ + configureFlags = lib.optionals stdenv.isDarwin [ "--with-macosx-keyring" ]; diff --git a/pkgs/applications/networking/sync/lsyncd/default.nix b/pkgs/applications/networking/sync/lsyncd/default.nix index 3e52d664d5265..ed4de44049d3b 100644 --- a/pkgs/applications/networking/sync/lsyncd/default.nix +++ b/pkgs/applications/networking/sync/lsyncd/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { # Special flags needed on Darwin: # https://github.com/axkibe/lsyncd/blob/42413cabbedca429d55a5378f6e830f191f3cc86/INSTALL#L51 - cmakeFlags = lib.optional stdenv.isDarwin [ "-DWITH_INOTIFY=OFF" "-DWITH_FSEVENTS=ON" ]; + cmakeFlags = lib.optionals stdenv.isDarwin [ "-DWITH_INOTIFY=OFF" "-DWITH_FSEVENTS=ON" ]; dontUseCmakeBuildDir = true; diff --git a/pkgs/applications/networking/znc/default.nix b/pkgs/applications/networking/znc/default.nix index e5aec9117068b..f73bb1c4bf73e 100644 --- a/pkgs/applications/networking/znc/default.nix +++ b/pkgs/applications/networking/znc/default.nix @@ -36,8 +36,8 @@ stdenv.mkDerivation rec { (lib.enableFeature withTcl "tcl") (lib.withFeatureAs withTcl "tcl" "${tcl}/lib") (lib.enableFeature withCyrus "cyrus") - ] ++ optional (!withIPv6) [ "--disable-ipv6" ] - ++ optional withDebug [ "--enable-debug" ]; + ] ++ optionals (!withIPv6) [ "--disable-ipv6" ] + ++ optionals withDebug [ "--enable-debug" ]; enableParallelBuilding = true; diff --git a/pkgs/applications/radio/rtl-sdr/default.nix b/pkgs/applications/radio/rtl-sdr/default.nix index e7fbb50cfd086..d8180750c7a1c 100644 --- a/pkgs/applications/radio/rtl-sdr/default.nix +++ b/pkgs/applications/radio/rtl-sdr/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { buildInputs = [ libusb1 ]; - cmakeFlags = lib.optional stdenv.isLinux [ + cmakeFlags = lib.optionals stdenv.isLinux [ "-DINSTALL_UDEV_RULES=ON" "-DWITH_RPC=ON" ]; diff --git a/pkgs/applications/science/biology/megahit/default.nix b/pkgs/applications/science/biology/megahit/default.nix index 45cb7560502dc..7f054a51d5e05 100644 --- a/pkgs/applications/science/biology/megahit/default.nix +++ b/pkgs/applications/science/biology/megahit/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ zlib ]; - cmakeFlags = lib.optional stdenv.hostPlatform.isStatic [ + cmakeFlags = lib.optionals stdenv.hostPlatform.isStatic [ "-DSTATIC_BUILD=ON" ]; meta = with lib; { diff --git a/pkgs/applications/science/biology/neuron/default.nix b/pkgs/applications/science/biology/neuron/default.nix index 36f1b4c699a82..a35d586b9ac3f 100644 --- a/pkgs/applications/science/biology/neuron/default.nix +++ b/pkgs/applications/science/biology/neuron/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { sha256 = "0f26v3qvzblcdjg7isq0m9j2q8q7x3vhmkfllv8lsr3gyj44lljf"; }; - patches = (lib.optional (stdenv.isDarwin) [ ./neuron-carbon-disable.patch ]); + patches = (lib.optionals (stdenv.isDarwin) [ ./neuron-carbon-disable.patch ]); # With LLVM 3.8 and above, clang (really libc++) gets upset if you attempt to redefine these... postPatch = lib.optionalString stdenv.cc.isClang '' diff --git a/pkgs/applications/science/biology/samtools/default.nix b/pkgs/applications/science/biology/samtools/default.nix index 29ba667b05527..41129a667e914 100644 --- a/pkgs/applications/science/biology/samtools/default.nix +++ b/pkgs/applications/science/biology/samtools/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-htslib=${htslib}" ] ++ lib.optional (ncurses == null) "--without-curses" - ++ lib.optional stdenv.hostPlatform.isStatic ["--without-curses" ] + ++ lib.optionals stdenv.hostPlatform.isStatic ["--without-curses" ] ; preCheck = '' diff --git a/pkgs/applications/science/logic/fast-downward/default.nix b/pkgs/applications/science/logic/fast-downward/default.nix index 1d7c51e64e9d4..ba0f3ee2e255f 100644 --- a/pkgs/applications/science/logic/fast-downward/default.nix +++ b/pkgs/applications/science/logic/fast-downward/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake python3.pkgs.wrapPython ]; buildInputs = [ python3 osi ]; - cmakeFlags = lib.optional osi.withCplex [ "-DDOWNWARD_CPLEX_ROOT=${cplex}/cplex" ]; + cmakeFlags = lib.optionals osi.withCplex [ "-DDOWNWARD_CPLEX_ROOT=${cplex}/cplex" ]; configurePhase = '' python build.py release diff --git a/pkgs/applications/science/math/ratpoints/default.nix b/pkgs/applications/science/math/ratpoints/default.nix index dd8258a3456d7..44c68ebcdceaf 100644 --- a/pkgs/applications/science/math/ratpoints/default.nix +++ b/pkgs/applications/science/math/ratpoints/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { buildInputs = [ gmp ]; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; - buildFlags = lib.optional stdenv.isDarwin ["CCFLAGS2=-lgmp -lc -lm" "CCFLAGS=-UUSE_SSE"]; + buildFlags = lib.optionals stdenv.isDarwin ["CCFLAGS2=-lgmp -lc -lm" "CCFLAGS=-UUSE_SSE"]; installFlags = [ "INSTALL_DIR=$(out)" ]; preInstall = ''mkdir -p "$out"/{bin,share,lib,include}''; diff --git a/pkgs/applications/version-management/datalad/default.nix b/pkgs/applications/version-management/datalad/default.nix index 65561aded31fe..cd2c26ea8d422 100644 --- a/pkgs/applications/version-management/datalad/default.nix +++ b/pkgs/applications/version-management/datalad/default.nix @@ -59,8 +59,8 @@ python3.pkgs.buildPythonApplication rec { # python>=3.8 distro - ] ++ lib.optional stdenv.hostPlatform.isWindows [ colorama ] - ++ lib.optional (python3.pythonOlder "3.10") [ importlib-metadata ]; + ] ++ lib.optionals stdenv.hostPlatform.isWindows [ colorama ] + ++ lib.optionals (python3.pythonOlder "3.10") [ importlib-metadata ]; postInstall = '' installShellCompletion --cmd datalad \ diff --git a/pkgs/applications/version-management/dvc/default.nix b/pkgs/applications/version-management/dvc/default.nix index 6f1c4fe185773..40b550cb9e389 100644 --- a/pkgs/applications/version-management/dvc/default.nix +++ b/pkgs/applications/version-management/dvc/default.nix @@ -72,17 +72,17 @@ python3.pkgs.buildPythonApplication rec { typing-extensions voluptuous zc_lockfile - ] ++ lib.optional enableGoogle [ + ] ++ lib.optionals enableGoogle [ gcsfs google-cloud-storage - ] ++ lib.optional enableAWS [ + ] ++ lib.optionals enableAWS [ aiobotocore boto3 s3fs - ] ++ lib.optional enableAzure [ + ] ++ lib.optionals enableAzure [ azure-identity knack - ] ++ lib.optional enableSSH [ + ] ++ lib.optionals enableSSH [ bcrypt ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata diff --git a/pkgs/applications/version-management/subversion/default.nix b/pkgs/applications/version-management/subversion/default.nix index 5731ef59deb79..69a2bce490606 100644 --- a/pkgs/applications/version-management/subversion/default.nix +++ b/pkgs/applications/version-management/subversion/default.nix @@ -40,7 +40,7 @@ let ++ lib.optionals pythonBindings [ python3 py3c ] ++ lib.optional perlBindings perl ++ lib.optional saslSupport sasl - ++ lib.optional stdenv.hostPlatform.isDarwin [ CoreServices Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security ]; patches = [ ./apr-1.patch ] ++ extraPatches; diff --git a/pkgs/applications/video/kodi/unwrapped.nix b/pkgs/applications/video/kodi/unwrapped.nix index a272f90bd3334..6eadd06af0fb1 100644 --- a/pkgs/applications/video/kodi/unwrapped.nix +++ b/pkgs/applications/video/kodi/unwrapped.nix @@ -138,7 +138,7 @@ in stdenv.mkDerivation { lirc mesa # for libEGL ] - ++ lib.optional x11Support [ + ++ lib.optionals x11Support [ libX11 xorgproto libXt libXmu libXext.dev libXdmcp libXinerama libXrandr.dev libXtst libXfixes ] @@ -158,7 +158,7 @@ in stdenv.mkDerivation { # Not sure why ".dev" is needed here, but CMake doesn't find libxkbcommon otherwise libxkbcommon.dev ] - ++ lib.optional gbmSupport [ + ++ lib.optionals gbmSupport [ libxkbcommon.dev mesa.dev libinput.dev @@ -200,7 +200,7 @@ in stdenv.mkDerivation { # whitelisted directories). This adds the entire nix store to the Kodi # webserver whitelist to avoid this problem. "-DKODI_WEBSERVER_EXTRA_WHITELIST=${builtins.storeDir}" - ] ++ lib.optional waylandSupport [ + ] ++ lib.optionals waylandSupport [ "-DWAYLANDPP_SCANNER=${buildPackages.waylandpp}/bin/wayland-scanner++" ]; diff --git a/pkgs/build-support/skaware/build-skaware-package.nix b/pkgs/build-support/skaware/build-skaware-package.nix index 1988d95212c30..3ae9b7ce8aac2 100644 --- a/pkgs/build-support/skaware/build-skaware-package.nix +++ b/pkgs/build-support/skaware/build-skaware-package.nix @@ -87,7 +87,7 @@ stdenv.mkDerivation { inherit postConfigure; - makeFlags = lib.optional stdenv.cc.isClang [ "AR=${stdenv.cc.targetPrefix}ar" "RANLIB=${stdenv.cc.targetPrefix}ranlib" ]; + makeFlags = lib.optionals stdenv.cc.isClang [ "AR=${stdenv.cc.targetPrefix}ar" "RANLIB=${stdenv.cc.targetPrefix}ranlib" ]; # TODO(Profpatsch): ensure that there is always a $doc output! postInstall = '' diff --git a/pkgs/data/fonts/iosevka/default.nix b/pkgs/data/fonts/iosevka/default.nix index 53e5b4a3db767..d9efb0eedcd7d 100644 --- a/pkgs/data/fonts/iosevka/default.nix +++ b/pkgs/data/fonts/iosevka/default.nix @@ -86,7 +86,7 @@ stdenv.mkDerivation rec { inherit extraParameters; passAsFile = [ "extraParameters" - ] ++ lib.optional (! (builtins.isString privateBuildPlan && lib.hasPrefix builtins.storeDir privateBuildPlan)) [ + ] ++ lib.optionals (! (builtins.isString privateBuildPlan && lib.hasPrefix builtins.storeDir privateBuildPlan)) [ "buildPlan" ]; diff --git a/pkgs/desktops/gnome-2/platform/GConf/default.nix b/pkgs/desktops/gnome-2/platform/GConf/default.nix index ec8deb537d08a..8419c1a7d730e 100644 --- a/pkgs/desktops/gnome-2/platform/GConf/default.nix +++ b/pkgs/desktops/gnome-2/platform/GConf/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { configureFlags = # fixes the "libgconfbackend-oldxml.so is not portable" error on darwin - lib.optional stdenv.isDarwin [ "--enable-static" ]; + lib.optionals stdenv.isDarwin [ "--enable-static" ]; postPatch = '' 2to3 --write --nobackup gsettings/gsettings-schema-convert diff --git a/pkgs/development/compilers/dmd/default.nix b/pkgs/development/compilers/dmd/default.nix index 1c15e8b970b70..b29190b9b8342 100644 --- a/pkgs/development/compilers/dmd/default.nix +++ b/pkgs/development/compilers/dmd/default.nix @@ -129,7 +129,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper unzip which git ]; buildInputs = [ gdb curl tzdata ] - ++ lib.optional stdenv.isDarwin [ Foundation gdb ]; + ++ lib.optionals stdenv.isDarwin [ Foundation gdb ]; osname = if stdenv.isDarwin then diff --git a/pkgs/development/compilers/edk2/default.nix b/pkgs/development/compilers/edk2/default.nix index 90e570f7da408..d516014048684 100644 --- a/pkgs/development/compilers/edk2/default.nix +++ b/pkgs/development/compilers/edk2/default.nix @@ -61,7 +61,7 @@ edk2 = buildStdenv.mkDerivation { ${"GCC5_${targetArch}_PREFIX"}=stdenv.cc.targetPrefix; makeFlags = [ "-C BaseTools" ] - ++ lib.optional (stdenv.cc.isClang) [ "BUILD_CC=clang BUILD_CXX=clang++ BUILD_AS=clang" ]; + ++ lib.optionals (stdenv.cc.isClang) [ "BUILD_CC=clang BUILD_CXX=clang++ BUILD_AS=clang" ]; NIX_CFLAGS_COMPILE = "-Wno-return-type" + lib.optionalString (stdenv.cc.isGNU) " -Wno-error=stringop-truncation"; diff --git a/pkgs/development/compilers/gforth/boot-forth.nix b/pkgs/development/compilers/gforth/boot-forth.nix index fc7b5ffa982d7..74a267687b8f2 100644 --- a/pkgs/development/compilers/gforth/boot-forth.nix +++ b/pkgs/development/compilers/gforth/boot-forth.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation { buildInputs = [ m4 ]; - configureFlags = lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ]; + configureFlags = lib.optionals stdenv.isDarwin [ "--build=x86_64-apple-darwin" ]; meta = { description = "The Forth implementation of the GNU project (outdated version used to bootstrap)"; diff --git a/pkgs/development/compilers/ghdl/default.nix b/pkgs/development/compilers/ghdl/default.nix index 383fec786b916..0e11c703d7b6c 100644 --- a/pkgs/development/compilers/ghdl/default.nix +++ b/pkgs/development/compilers/ghdl/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ zlib - ] ++ lib.optional (backend == "llvm") [ + ] ++ lib.optionals (backend == "llvm") [ llvm ]; propagatedBuildInputs = [ diff --git a/pkgs/development/compilers/idris2/default.nix b/pkgs/development/compilers/idris2/default.nix index 9c7a9e53a2e6a..bb7d7a7a131c8 100644 --- a/pkgs/development/compilers/idris2/default.nix +++ b/pkgs/development/compilers/idris2/default.nix @@ -34,7 +34,7 @@ in stdenv.mkDerivation rec { strictDeps = true; nativeBuildInputs = [ makeWrapper clang platformChez ] - ++ lib.optional stdenv.isDarwin [ zsh ]; + ++ lib.optionals stdenv.isDarwin [ zsh ]; buildInputs = [ platformChez gmp ]; prePatch = '' diff --git a/pkgs/development/compilers/idris2/tests.nix b/pkgs/development/compilers/idris2/tests.nix index a8d48c26ca6f5..54bb6d29eeef0 100644 --- a/pkgs/development/compilers/idris2/tests.nix +++ b/pkgs/development/compilers/idris2/tests.nix @@ -11,7 +11,7 @@ let # is not the case with pure nix environments. Thus, we need to include zsh # when we build for darwin in tests. While this is impure, this is also what # we find in real darwin hosts. - nativeBuildInputs = lib.optional stdenv.isDarwin [ zsh ]; + nativeBuildInputs = lib.optionals stdenv.isDarwin [ zsh ]; buildCommand = '' set -eo pipefail diff --git a/pkgs/development/compilers/llvm/10/libcxx/default.nix b/pkgs/development/compilers/llvm/10/libcxx/default.nix index d438294bdd0b6..6a4e645bb3004 100644 --- a/pkgs/development/compilers/llvm/10/libcxx/default.nix +++ b/pkgs/development/compilers/llvm/10/libcxx/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation { "-DLIBCXX_CXX_ABI=libcxxabi" ] ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1" ++ lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON" - ++ lib.optional stdenv.hostPlatform.isWasm [ + ++ lib.optionals stdenv.hostPlatform.isWasm [ "-DLIBCXX_ENABLE_THREADS=OFF" "-DLIBCXX_ENABLE_FILESYSTEM=OFF" "-DLIBCXX_ENABLE_EXCEPTIONS=OFF" diff --git a/pkgs/development/compilers/llvm/11/libcxx/default.nix b/pkgs/development/compilers/llvm/11/libcxx/default.nix index 9aa49c9a009e6..2a83b36fc4252 100644 --- a/pkgs/development/compilers/llvm/11/libcxx/default.nix +++ b/pkgs/development/compilers/llvm/11/libcxx/default.nix @@ -48,7 +48,7 @@ stdenv.mkDerivation { "-DLIBCXX_CXX_ABI=libcxxabi" ] ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1" ++ lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON" - ++ lib.optional stdenv.hostPlatform.isWasm [ + ++ lib.optionals stdenv.hostPlatform.isWasm [ "-DLIBCXX_ENABLE_THREADS=OFF" "-DLIBCXX_ENABLE_FILESYSTEM=OFF" "-DLIBCXX_ENABLE_EXCEPTIONS=OFF" diff --git a/pkgs/development/compilers/llvm/12/libcxx/default.nix b/pkgs/development/compilers/llvm/12/libcxx/default.nix index 3ddcb79975050..1386d3680f916 100644 --- a/pkgs/development/compilers/llvm/12/libcxx/default.nix +++ b/pkgs/development/compilers/llvm/12/libcxx/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation { "-DLIBCXX_CXX_ABI=libcxxabi" ] ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1" ++ lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON" - ++ lib.optional stdenv.hostPlatform.isWasm [ + ++ lib.optionals stdenv.hostPlatform.isWasm [ "-DLIBCXX_ENABLE_THREADS=OFF" "-DLIBCXX_ENABLE_FILESYSTEM=OFF" "-DLIBCXX_ENABLE_EXCEPTIONS=OFF" diff --git a/pkgs/development/compilers/llvm/8/libcxx/default.nix b/pkgs/development/compilers/llvm/8/libcxx/default.nix index 87cd734899fa2..5368011292186 100644 --- a/pkgs/development/compilers/llvm/8/libcxx/default.nix +++ b/pkgs/development/compilers/llvm/8/libcxx/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation { "-DLIBCXX_CXX_ABI=libcxxabi" ] ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1" ++ lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON" - ++ lib.optional stdenv.hostPlatform.isWasm [ + ++ lib.optionals stdenv.hostPlatform.isWasm [ "-DLIBCXX_ENABLE_THREADS=OFF" "-DLIBCXX_ENABLE_FILESYSTEM=OFF" "-DLIBCXX_ENABLE_EXCEPTIONS=OFF" diff --git a/pkgs/development/compilers/llvm/9/libcxx/default.nix b/pkgs/development/compilers/llvm/9/libcxx/default.nix index 2719711031070..31a00ba548591 100644 --- a/pkgs/development/compilers/llvm/9/libcxx/default.nix +++ b/pkgs/development/compilers/llvm/9/libcxx/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation { "-DLIBCXX_CXX_ABI=libcxxabi" ] ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1" ++ lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON" - ++ lib.optional stdenv.hostPlatform.isWasm [ + ++ lib.optionals stdenv.hostPlatform.isWasm [ "-DLIBCXX_ENABLE_THREADS=OFF" "-DLIBCXX_ENABLE_FILESYSTEM=OFF" "-DLIBCXX_ENABLE_EXCEPTIONS=OFF" diff --git a/pkgs/development/compilers/orc/default.nix b/pkgs/development/compilers/orc/default.nix index fa4bf686a2aca..5ea72781e41f8 100644 --- a/pkgs/development/compilers/orc/default.nix +++ b/pkgs/development/compilers/orc/default.nix @@ -26,7 +26,7 @@ in stdenv.mkDerivation rec { outputBin = "dev"; # compilation tools mesonFlags = - optional (!buildDevDoc) [ "-Dgtk_doc=disabled" ] + optionals (!buildDevDoc) [ "-Dgtk_doc=disabled" ] ; nativeBuildInputs = [ meson ninja ] diff --git a/pkgs/development/compilers/p4c/default.nix b/pkgs/development/compilers/p4c/default.nix index 9233489b06aeb..cf02a656b770b 100644 --- a/pkgs/development/compilers/p4c/default.nix +++ b/pkgs/development/compilers/p4c/default.nix @@ -66,8 +66,8 @@ stdenv.mkDerivation rec { flex cmake ] - ++ lib.optional enableDocumentation [ doxygen graphviz ] - ++ lib.optional enableBPF [ libllvm libbpf ]; + ++ lib.optionals enableDocumentation [ doxygen graphviz ] + ++ lib.optionals enableBPF [ libllvm libbpf ]; buildInputs = [ protobuf diff --git a/pkgs/development/compilers/sbcl/2.x.nix b/pkgs/development/compilers/sbcl/2.x.nix index cfc9d34a4da81..ec12ccf17b722 100644 --- a/pkgs/development/compilers/sbcl/2.x.nix +++ b/pkgs/development/compilers/sbcl/2.x.nix @@ -153,7 +153,7 @@ stdenv.mkDerivation rec { optional (!threadSupport) "sb-thread" ++ optionals disableImmobileSpace [ "immobile-space" "immobile-code" "compact-instance-header" ]; - NIX_CFLAGS_COMPILE = lib.optional (lib.versionOlder version "2.1.10") [ + NIX_CFLAGS_COMPILE = lib.optionals (lib.versionOlder version "2.1.10") [ # Workaround build failure on -fno-common toolchains like upstream # clang-13. Without the change build fails as: # duplicate symbol '_static_code_space_free_pointer' in: alloc.o traceroot.o diff --git a/pkgs/development/interpreters/kerf/default.nix b/pkgs/development/interpreters/kerf/default.nix index 5b605c6564b3b..96db9bbaeb137 100644 --- a/pkgs/development/interpreters/kerf/default.nix +++ b/pkgs/development/interpreters/kerf/default.nix @@ -18,9 +18,9 @@ stdenv.mkDerivation rec { sourceRoot = "source/src"; buildInputs = [ libedit zlib ncurses ] - ++ lib.optional stdenv.isDarwin ([ + ++ lib.optionals stdenv.isDarwin ([ Accelerate - ] ++ lib.optional stdenv.isx86_64 /* && isDarwin */ [ + ] ++ lib.optionals stdenv.isx86_64 /* && isDarwin */ [ CoreGraphics CoreVideo ]); @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { "implicit-function-declaration" "gnu-variable-sized-type-not-at-end" "unused-result" - ] ++ lib.optional stdenv.isDarwin [ "-fcommon" ]; + ] ++ lib.optionals stdenv.isDarwin [ "-fcommon" ]; patchPhase = '' substituteInPlace ./Makefile \ diff --git a/pkgs/development/interpreters/php/generic.nix b/pkgs/development/interpreters/php/generic.nix index 5984113574c26..d1b7c68295578 100644 --- a/pkgs/development/interpreters/php/generic.nix +++ b/pkgs/development/interpreters/php/generic.nix @@ -206,7 +206,7 @@ let [ pcre2 ] # Enable sapis - ++ lib.optional pearSupport [ libxml2.dev ] + ++ lib.optionals pearSupport [ libxml2.dev ] # Misc deps ++ lib.optional apxs2Support apacheHttpd @@ -230,7 +230,7 @@ let ++ lib.optional (!cgiSupport) "--disable-cgi" ++ lib.optional (!cliSupport) "--disable-cli" ++ lib.optional fpmSupport "--enable-fpm" - ++ lib.optional pearSupport [ "--with-pear" "--enable-xml" "--with-libxml" ] + ++ lib.optionals pearSupport [ "--with-pear" "--enable-xml" "--with-libxml" ] ++ lib.optional pharSupport "--enable-phar" ++ lib.optional (!phpdbgSupport) "--disable-phpdbg" diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 25446f5fca899..7da2a0047f331 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -166,7 +166,7 @@ let # only works for GCC and Apple Clang. This makes distutils to call C++ # compiler when needed. ./python-2.7-distutils-C++.patch - ] ++ optional (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ ./cross-compile.patch ]; diff --git a/pkgs/development/interpreters/racket/default.nix b/pkgs/development/interpreters/racket/default.nix index 67609132c80d6..479557e0890f0 100644 --- a/pkgs/development/interpreters/racket/default.nix +++ b/pkgs/development/interpreters/racket/default.nix @@ -128,8 +128,8 @@ stdenv.mkDerivation rec { shared = if stdenv.isDarwin then "dylib" else "shared"; configureFlags = [ "--enable-${shared}" "--enable-lt=${libtool}/bin/libtool" ] - ++ lib.optional disableDocs [ "--disable-docs" ] - ++ lib.optional stdenv.isDarwin [ "--enable-xonx" ]; + ++ lib.optionals disableDocs [ "--disable-docs" ] + ++ lib.optionals stdenv.isDarwin [ "--enable-xonx" ]; configureScript = "../configure"; diff --git a/pkgs/development/interpreters/racket/racket_7_9.nix b/pkgs/development/interpreters/racket/racket_7_9.nix index 07c0376b42aa7..ac4b6b5ba1800 100644 --- a/pkgs/development/interpreters/racket/racket_7_9.nix +++ b/pkgs/development/interpreters/racket/racket_7_9.nix @@ -83,8 +83,8 @@ stdenv.mkDerivation rec { shared = if stdenv.isDarwin then "dylib" else "shared"; configureFlags = [ "--enable-${shared}" "--enable-lt=${libtool}/bin/libtool" ] - ++ lib.optional disableDocs [ "--disable-docs" ] - ++ lib.optional stdenv.isDarwin [ "--enable-xonx" ]; + ++ lib.optionals disableDocs [ "--disable-docs" ] + ++ lib.optionals stdenv.isDarwin [ "--enable-xonx" ]; configureScript = "../configure"; diff --git a/pkgs/development/interpreters/spidermonkey/common.nix b/pkgs/development/interpreters/spidermonkey/common.nix index 1272e061b0d90..d12396396da4b 100644 --- a/pkgs/development/interpreters/spidermonkey/common.nix +++ b/pkgs/development/interpreters/spidermonkey/common.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: rec { inherit hash; }; - patches = lib.optional (lib.versionOlder version "91") [ + patches = lib.optionals (lib.versionOlder version "91") [ # Fix build failure on armv7l using Debian patch # Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1526653 (fetchpatch { diff --git a/pkgs/development/libraries/ada/gnatcoll/db.nix b/pkgs/development/libraries/ada/gnatcoll/db.nix index 0c597f199c34d..6c87d63063fac 100644 --- a/pkgs/development/libraries/ada/gnatcoll/db.nix +++ b/pkgs/development/libraries/ada/gnatcoll/db.nix @@ -95,7 +95,7 @@ stdenv.mkDerivation rec { # confusingly, for gprbuild --target is autoconf --host "TARGET=${stdenv.hostPlatform.config}" "prefix=${placeholder "out"}" - ] ++ lib.optional (component == "sqlite") [ + ] ++ lib.optionals (component == "sqlite") [ # link against packaged, not vendored libsqlite3 "GNATCOLL_SQLITE=external" ]; diff --git a/pkgs/development/libraries/apr/default.nix b/pkgs/development/libraries/apr/default.nix index 536c8a5613a9e..0d980db9b5a8b 100644 --- a/pkgs/development/libraries/apr/default.nix +++ b/pkgs/development/libraries/apr/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { configureFlagsArray+=("--with-installbuilddir=$dev/share/build") ''; - configureFlags = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ + configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ # For cross builds, provide answers to the configure time tests. # These answers are valid on x86_64-linux and aarch64-linux. "ac_cv_file__dev_zero=yes" diff --git a/pkgs/development/libraries/cxxopts/default.nix b/pkgs/development/libraries/cxxopts/default.nix index cf36a88a35be9..a24127ab56d8b 100644 --- a/pkgs/development/libraries/cxxopts/default.nix +++ b/pkgs/development/libraries/cxxopts/default.nix @@ -21,10 +21,10 @@ stdenv.mkDerivation rec { # CMake does not set CMAKE_LIBRARY_ARCHITECTURE variable in Nix, which breaks architecture-independent library path generation patches = [ ./fix-install-path.patch ]; - buildInputs = lib.optional enableUnicodeHelp [ icu.dev ]; + buildInputs = lib.optionals enableUnicodeHelp [ icu.dev ]; cmakeFlags = [ "-DCXXOPTS_BUILD_EXAMPLES=OFF" ] ++ lib.optional enableUnicodeHelp "-DCXXOPTS_USE_UNICODE_HELP=TRUE"; - nativeBuildInputs = [ cmake ] ++ lib.optional enableUnicodeHelp [ pkg-config ]; + nativeBuildInputs = [ cmake ] ++ lib.optionals enableUnicodeHelp [ pkg-config ]; doCheck = true; diff --git a/pkgs/development/libraries/cyrus-sasl/default.nix b/pkgs/development/libraries/cyrus-sasl/default.nix index 170b9a0fba4a2..632c8427e4db6 100644 --- a/pkgs/development/libraries/cyrus-sasl/default.nix +++ b/pkgs/development/libraries/cyrus-sasl/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { "--enable-shared" ] ++ lib.optional enableLdap "--with-ldap=${openldap.dev}"; - installFlags = lib.optional stdenv.isDarwin [ "framedir=$(out)/Library/Frameworks/SASL2.framework" ]; + installFlags = lib.optionals stdenv.isDarwin [ "framedir=$(out)/Library/Frameworks/SASL2.framework" ]; passthru.tests = { inherit (nixosTests) parsedmarc postfix; diff --git a/pkgs/development/libraries/drogon/default.nix b/pkgs/development/libraries/drogon/default.nix index 9cc3503acd6e2..de4aaf32d980b 100644 --- a/pkgs/development/libraries/drogon/default.nix +++ b/pkgs/development/libraries/drogon/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { ++ lib.optional postgresSupport postgresql ++ lib.optional redisSupport hiredis # drogon uses mariadb for mysql (see https://github.com/drogonframework/drogon/wiki/ENG-02-Installation#Library-Dependencies) - ++ lib.optional mysqlSupport [ libmysqlclient mariadb ]; + ++ lib.optionals mysqlSupport [ libmysqlclient mariadb ]; patches = [ # this part of the test would normally fail because it attempts to configure a CMake project that uses find_package on itself diff --git a/pkgs/development/libraries/galario/default.nix b/pkgs/development/libraries/galario/default.nix index ac7e4f4255e84..7f757fd48197f 100644 --- a/pkgs/development/libraries/galario/default.nix +++ b/pkgs/development/libraries/galario/default.nix @@ -34,13 +34,13 @@ stdenv.mkDerivation rec { ++ lib.optional stdenv.isDarwin llvmPackages.openmp ; - propagatedBuildInputs = lib.optional enablePython [ + propagatedBuildInputs = lib.optionals enablePython [ pythonPackages.numpy pythonPackages.cython pythonPackages.pytest ]; - checkInputs = lib.optional enablePython [ pythonPackages.scipy pythonPackages.pytest-cov ]; + checkInputs = lib.optionals enablePython [ pythonPackages.scipy pythonPackages.pytest-cov ]; preConfigure = '' mkdir -p build/external/src diff --git a/pkgs/development/libraries/gnutls/default.nix b/pkgs/development/libraries/gnutls/default.nix index d04fda98c7fe5..f1ec87ba008db 100644 --- a/pkgs/development/libraries/gnutls/default.nix +++ b/pkgs/development/libraries/gnutls/default.nix @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { "--with-unbound-root-key-file=${dns-root-data}/root.key" (lib.withFeature withP11-kit "p11-kit") (lib.enableFeature cxxBindings "cxx") - ] ++ lib.optional guileBindings [ + ] ++ lib.optionals guileBindings [ "--enable-guile" "--with-guile-site-dir=\${out}/share/guile/site" "--with-guile-site-ccache-dir=\${out}/share/guile/site" diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix index a53ffb4f1b3a5..dac712e823877 100644 --- a/pkgs/development/libraries/gstreamer/base/default.nix +++ b/pkgs/development/libraries/gstreamer/base/default.nix @@ -79,7 +79,7 @@ stdenv.mkDerivation rec { libjpeg tremor libGL - ] ++ lib.optional (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.isDarwin) [ libvisual ] ++ lib.optionals stdenv.isDarwin [ pango diff --git a/pkgs/development/libraries/json-glib/default.nix b/pkgs/development/libraries/json-glib/default.nix index e095945dabaac..9885384e00e19 100644 --- a/pkgs/development/libraries/json-glib/default.nix +++ b/pkgs/development/libraries/json-glib/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { libxslt gobject-introspection gi-docgen - ] ++ lib.optional stdenv.hostPlatform.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; diff --git a/pkgs/development/libraries/kerberos/krb5.nix b/pkgs/development/libraries/kerberos/krb5.nix index a7197f9ff9846..fc8fb73987017 100644 --- a/pkgs/development/libraries/kerberos/krb5.nix +++ b/pkgs/development/libraries/kerberos/krb5.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--localstatedir=/var/lib" ] # krb5's ./configure does not allow passing --enable-shared and --enable-static at the same time. # See https://bbs.archlinux.org/viewtopic.php?pid=1576737#p1576737 - ++ lib.optional staticOnly [ "--enable-static" "--disable-shared" ] + ++ lib.optionals staticOnly [ "--enable-static" "--disable-shared" ] ++ lib.optional stdenv.isFreeBSD ''WARN_CFLAGS=""'' ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "krb5_cv_attr_constructor_destructor=yes,yes" diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix index a3de9225d1cef..283c2034be7e4 100644 --- a/pkgs/development/libraries/libav/default.nix +++ b/pkgs/development/libraries/libav/default.nix @@ -17,7 +17,7 @@ assert faacSupport -> enableUnfree; -let inherit (lib) optional hasPrefix enableFeature; in +let inherit (lib) optional optionals hasPrefix enableFeature; in /* ToDo: - more deps, inspiration: https://packages.ubuntu.com/raring/libav-tools @@ -77,7 +77,7 @@ let (enableFeature vaapiSupport "vaapi") (enableFeature vdpauSupport "vdpau") (enableFeature freetypeSupport "libfreetype") - ] ++ optional (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--cross-prefix=${stdenv.cc.targetPrefix}" "--enable-cross-compile" ]; diff --git a/pkgs/development/libraries/libdaemon/default.nix b/pkgs/development/libraries/libdaemon/default.nix index 51df458097890..581cc723dc414 100644 --- a/pkgs/development/libraries/libdaemon/default.nix +++ b/pkgs/development/libraries/libdaemon/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { patches = [ ./fix-includes.patch ]; configureFlags = [ "--disable-lynx" ] - ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) + ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ # Can't run this test while cross-compiling "ac_cv_func_setpgrp_void=yes" ]; diff --git a/pkgs/development/libraries/libdeflate/default.nix b/pkgs/development/libraries/libdeflate/default.nix index 449a3d309cd17..39b80238b7191 100644 --- a/pkgs/development/libraries/libdeflate/default.nix +++ b/pkgs/development/libraries/libdeflate/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { substituteInPlace Makefile --replace /usr/local $out ''; - makeFlags = lib.optional stdenv.hostPlatform.isStatic [ "DISABLE_SHARED=1"]; + makeFlags = lib.optionals stdenv.hostPlatform.isStatic [ "DISABLE_SHARED=1"]; nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; diff --git a/pkgs/development/libraries/libff/default.nix b/pkgs/development/libraries/libff/default.nix index 35b7a33cc38f8..36e8bb78c8398 100644 --- a/pkgs/development/libraries/libff/default.nix +++ b/pkgs/development/libraries/libff/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { }; cmakeFlags = [ "-DWITH_PROCPS=Off" ] - ++ lib.optional stdenv.isAarch64 [ "-DCURVE=ALT_BN128" "-DUSE_ASM=OFF" ]; + ++ lib.optionals stdenv.isAarch64 [ "-DCURVE=ALT_BN128" "-DUSE_ASM=OFF" ]; # CMake is hardcoded to always build static library which causes linker # failure for Haskell applications depending on haskellPackages.hevm on macOS. diff --git a/pkgs/development/libraries/libmcrypt/default.nix b/pkgs/development/libraries/libmcrypt/default.nix index 50bbf8383e610..953a6d03e5e6c 100644 --- a/pkgs/development/libraries/libmcrypt/default.nix +++ b/pkgs/development/libraries/libmcrypt/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { buildInputs = optional stdenv.isDarwin darwin.cctools; - configureFlags = optional disablePosixThreads + configureFlags = optionals disablePosixThreads [ "--disable-posix-threads" ]; meta = { diff --git a/pkgs/development/libraries/libpam-wrapper/default.nix b/pkgs/development/libraries/libpam-wrapper/default.nix index 10d5c98b6687c..0701ae0fc55f5 100644 --- a/pkgs/development/libraries/libpam-wrapper/default.nix +++ b/pkgs/development/libraries/libpam-wrapper/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { sha256 = "00mqhsashx7njrvxz085d0b88nizhdy7m3x17ip5yhvwsl63km6p"; }; - nativeBuildInputs = [ cmake ] ++ lib.optional enablePython [ python ]; + nativeBuildInputs = [ cmake ] ++ lib.optionals enablePython [ python ]; # We must use linux-pam, using openpam will result in broken fprintd. buildInputs = [ linux-pam ]; diff --git a/pkgs/development/libraries/libvdpau/default.nix b/pkgs/development/libraries/libvdpau/default.nix index e3be4db26cd84..906a3c59234a3 100644 --- a/pkgs/development/libraries/libvdpau/default.nix +++ b/pkgs/development/libraries/libvdpau/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ xorg.libX11 ]; - mesonFlags = lib.optional stdenv.isLinux + mesonFlags = lib.optionals stdenv.isLinux [ "-Dmoduledir=${mesa.drivers.driverLink}/lib/vdpau" ]; NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-lX11"; diff --git a/pkgs/development/libraries/libvncserver/default.nix b/pkgs/development/libraries/libvncserver/default.nix index b9da7135f92e5..c111a81b0ccb5 100644 --- a/pkgs/development/libraries/libvncserver/default.nix +++ b/pkgs/development/libraries/libvncserver/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { libpng ] ++ lib.optionals stdenv.isLinux [ systemd - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ Carbon ]; diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix index a3bb7128c0f10..5e520c315f7df 100644 --- a/pkgs/development/libraries/libxslt/default.nix +++ b/pkgs/development/libraries/libxslt/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { buildInputs = [ libxml2.dev libxcrypt - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ gettext ] ++ lib.optionals pythonSupport [ libxml2.py diff --git a/pkgs/development/libraries/mimalloc/default.nix b/pkgs/development/libraries/mimalloc/default.nix index cc67e2070949a..6dcf1978edcfb 100644 --- a/pkgs/development/libraries/mimalloc/default.nix +++ b/pkgs/development/libraries/mimalloc/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ cmake ninja ]; - cmakeFlags = [ "-DMI_INSTALL_TOPLEVEL=ON" ] ++ lib.optional secureBuild [ "-DMI_SECURE=ON" ]; + cmakeFlags = [ "-DMI_INSTALL_TOPLEVEL=ON" ] ++ lib.optionals secureBuild [ "-DMI_SECURE=ON" ]; postInstall = let rel = lib.versions.majorMinor version; diff --git a/pkgs/development/libraries/nng/default.nix b/pkgs/development/libraries/nng/default.nix index 9acc64fea6423..7f0bd15aa542e 100644 --- a/pkgs/development/libraries/nng/default.nix +++ b/pkgs/development/libraries/nng/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ninja ] ++ lib.optionals mbedtlsSupport [ mbedtls ]; - buildInputs = lib.optional mbedtlsSupport [ mbedtls ]; + buildInputs = lib.optionals mbedtlsSupport [ mbedtls ]; cmakeFlags = [ "-G Ninja" "-DNNG_ENABLE_TLS=ON" ] ++ lib.optionals mbedtlsSupport [ "-DMBEDTLS_ROOT_DIR=${mbedtls}" ]; diff --git a/pkgs/development/libraries/openbsm/default.nix b/pkgs/development/libraries/openbsm/default.nix index 4719b7fb74704..627e9b830714c 100644 --- a/pkgs/development/libraries/openbsm/default.nix +++ b/pkgs/development/libraries/openbsm/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "0b98359hd8mm585sh145ss828pg2y8vgz38lqrb7nypapiyqdnd1"; }; - patches = lib.optional stdenv.isDarwin [ ./bsm-add-audit_token_to_pid.patch ]; + patches = lib.optionals stdenv.isDarwin [ ./bsm-add-audit_token_to_pid.patch ]; preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") '' MACOSX_DEPLOYMENT_TARGET=10.16 diff --git a/pkgs/development/libraries/opencv/3.x.nix b/pkgs/development/libraries/opencv/3.x.nix index 550a7f39373a0..56b022d03b9b5 100644 --- a/pkgs/development/libraries/opencv/3.x.nix +++ b/pkgs/development/libraries/opencv/3.x.nix @@ -248,7 +248,7 @@ stdenv.mkDerivation { "-DBUILD_opencv_videoio=OFF" ] ++ lib.optionals enablePython [ "-DOPENCV_SKIP_PYTHON_LOADER=ON" - ] ++ lib.optional enableEigen [ + ] ++ lib.optionals enableEigen [ # Autodetection broken by https://github.com/opencv/opencv/pull/13337 "-DEIGEN_INCLUDE_PATH=${eigen}/include/eigen3" ]; diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index 723f1848c6a06..f2392bb00726a 100644 --- a/pkgs/development/libraries/openmpi/default.nix +++ b/pkgs/development/libraries/openmpi/default.nix @@ -50,7 +50,7 @@ in stdenv.mkDerivation rec { ++ lib.optionals cudaSupport [ cudatoolkit ] ++ [ libevent hwloc ] ++ lib.optional (stdenv.isLinux || stdenv.isFreeBSD) rdma-core - ++ lib.optional fabricSupport [ libpsm2 libfabric ]; + ++ lib.optionals fabricSupport [ libpsm2 libfabric ]; nativeBuildInputs = [ perl ] ++ lib.optionals fortranSupport [ gfortran ]; diff --git a/pkgs/development/libraries/openvino/default.nix b/pkgs/development/libraries/openvino/default.nix index dabf56d9056b1..e3ebb97cbdff4 100644 --- a/pkgs/development/libraries/openvino/default.nix +++ b/pkgs/development/libraries/openvino/default.nix @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { "-DNGRAPH_UNIT_TEST_ENABLE:BOOL=OFF" "-DENABLE_SAMPLES:BOOL=OFF" "-DENABLE_CPPLINT:BOOL=OFF" - ] ++ lib.optional enablePython [ + ] ++ lib.optionals enablePython [ "-DENABLE_PYTHON:BOOL=ON" ]; @@ -106,7 +106,7 @@ stdenv.mkDerivation rec { python tbb shellcheck - ] ++ lib.optional enablePython (with python.pkgs; [ + ] ++ lib.optionals enablePython (with python.pkgs; [ cython pybind11 ]); diff --git a/pkgs/development/libraries/pangomm/2.48.nix b/pkgs/development/libraries/pangomm/2.48.nix index cdc644ec9cd9f..12aec5bd68eab 100644 --- a/pkgs/development/libraries/pangomm/2.48.nix +++ b/pkgs/development/libraries/pangomm/2.48.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { meson ninja python3 - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ ApplicationServices ]; diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix index cba1af7046079..8ff218b79316c 100644 --- a/pkgs/development/libraries/poppler/default.nix +++ b/pkgs/development/libraries/poppler/default.nix @@ -77,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: rec { pcre libiconv libintl - ] ++ lib.optional withData [ + ] ++ lib.optionals withData [ poppler_data ]; diff --git a/pkgs/development/libraries/precice/default.nix b/pkgs/development/libraries/precice/default.nix index bc6a9359e614f..01ab32577cb26 100644 --- a/pkgs/development/libraries/precice/default.nix +++ b/pkgs/development/libraries/precice/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { "-DPYTHON_INCLUDE_DIR=${python3}/include/${python3.libPrefix}" ]; - NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin [ "-D_GNU_SOURCE" ]; + NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ "-D_GNU_SOURCE" ]; nativeBuildInputs = [ cmake gcc ]; buildInputs = [ boost eigen libxml2 mpi python3 python3.pkgs.numpy ]; diff --git a/pkgs/development/libraries/qt-5/modules/qtlocation.nix b/pkgs/development/libraries/qt-5/modules/qtlocation.nix index 687571f18d296..b5fdc918dc69a 100644 --- a/pkgs/development/libraries/qt-5/modules/qtlocation.nix +++ b/pkgs/development/libraries/qt-5/modules/qtlocation.nix @@ -4,7 +4,7 @@ qtModule { pname = "qtlocation"; qtInputs = [ qtbase qtmultimedia ]; outputs = [ "bin" "out" "dev" ]; - qmakeFlags = lib.optional stdenv.isDarwin [ + qmakeFlags = lib.optionals stdenv.isDarwin [ # boost uses std::auto_ptr which has been disabled in clang with libcxx # This flag re-enables this feature # https://libcxx.llvm.org/docs/UsingLibcxx.html#c-17-specific-configuration-macros diff --git a/pkgs/development/libraries/redis-plus-plus/default.nix b/pkgs/development/libraries/redis-plus-plus/default.nix index 7d3d7d486714e..61e593d28c930 100644 --- a/pkgs/development/libraries/redis-plus-plus/default.nix +++ b/pkgs/development/libraries/redis-plus-plus/default.nix @@ -22,9 +22,9 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DREDIS_PLUS_PLUS_BUILD_TEST=OFF" - ] ++ lib.optional (!enableShared) [ + ] ++ lib.optionals (!enableShared) [ "-DREDIS_PLUS_PLUS_BUILD_SHARED=OFF" - ] ++ lib.optional (!enableStatic) [ + ] ++ lib.optionals (!enableStatic) [ "-DREDIS_PLUS_PLUS_BUILD_STATIC=OFF" ]; diff --git a/pkgs/development/libraries/science/math/faiss/default.nix b/pkgs/development/libraries/science/math/faiss/default.nix index f2d5e29f6a4a7..9c83a1220e461 100644 --- a/pkgs/development/libraries/science/math/faiss/default.nix +++ b/pkgs/development/libraries/science/math/faiss/default.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake ] ++ lib.optionals cudaSupport [ cudatoolkit addOpenGLRunpath - ] ++ lib.optional pythonSupport [ + ] ++ lib.optionals pythonSupport [ pythonPackages.python ]; diff --git a/pkgs/development/libraries/science/networking/ns-3/default.nix b/pkgs/development/libraries/science/networking/ns-3/default.nix index b9f7946f71611..9f80470eff2c6 100644 --- a/pkgs/development/libraries/science/networking/ns-3/default.nix +++ b/pkgs/development/libraries/science/networking/ns-3/default.nix @@ -53,8 +53,8 @@ stdenv.mkDerivation rec { # ncurses is a hidden dependency of waf when checking python buildInputs = lib.optionals pythonSupport [ castxml ncurses ] - ++ lib.optional enableDoxygen [ doxygen graphviz imagemagick ] - ++ lib.optional withManual [ dia tetex ghostscript texlive.combined.scheme-medium ]; + ++ lib.optionals enableDoxygen [ doxygen graphviz imagemagick ] + ++ lib.optionals withManual [ dia tetex ghostscript texlive.combined.scheme-medium ]; propagatedBuildInputs = [ pythonEnv ]; diff --git a/pkgs/development/libraries/speechd/default.nix b/pkgs/development/libraries/speechd/default.nix index d27eabecf4651..021246d73028f 100644 --- a/pkgs/development/libraries/speechd/default.nix +++ b/pkgs/development/libraries/speechd/default.nix @@ -69,9 +69,9 @@ in stdenv.mkDerivation rec { espeak sonic pcaudiolib - ] ++ lib.optional withFlite [ + ] ++ lib.optionals withFlite [ flite - ] ++ lib.optional withPico [ + ] ++ lib.optionals withPico [ svox ]; @@ -83,17 +83,17 @@ in stdenv.mkDerivation rec { # Audio method falls back from left to right. "--with-default-audio-method=\"libao,pulse,alsa,oss\"" "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system" - ] ++ lib.optional withPulse [ + ] ++ lib.optionals withPulse [ "--with-pulse" - ] ++ lib.optional withAlsa [ + ] ++ lib.optionals withAlsa [ "--with-alsa" - ] ++ lib.optional withLibao [ + ] ++ lib.optionals withLibao [ "--with-libao" - ] ++ lib.optional withOss [ + ] ++ lib.optionals withOss [ "--with-oss" - ] ++ lib.optional withEspeak [ + ] ++ lib.optionals withEspeak [ "--with-espeak-ng" - ] ++ lib.optional withPico [ + ] ++ lib.optionals withPico [ "--with-pico" ]; diff --git a/pkgs/development/libraries/vtk/generic.nix b/pkgs/development/libraries/vtk/generic.nix index b88ddee6b249b..555e7d0a45de6 100644 --- a/pkgs/development/libraries/vtk/generic.nix +++ b/pkgs/development/libraries/vtk/generic.nix @@ -48,7 +48,7 @@ in stdenv.mkDerivation rec { ImageIO OpenGL GLUT - ] ++ optional enablePython [ + ] ++ optionals enablePython [ pythonInterpreter ]; propagatedBuildInputs = optionals stdenv.isDarwin [ libobjc ]; diff --git a/pkgs/development/mobile/androidenv/cmake.nix b/pkgs/development/mobile/androidenv/cmake.nix index 3abad6b41f626..7df24ad4cc223 100644 --- a/pkgs/development/mobile/androidenv/cmake.nix +++ b/pkgs/development/mobile/androidenv/cmake.nix @@ -3,7 +3,7 @@ deployAndroidPackage { inherit package os; nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; - buildInputs = lib.optional (os == "linux") [ pkgs.stdenv.cc.libc pkgs.stdenv.cc.cc pkgs.ncurses5 ]; + buildInputs = lib.optionals (os == "linux") [ pkgs.stdenv.cc.libc pkgs.stdenv.cc.cc pkgs.ncurses5 ]; patchInstructions = lib.optionalString (os == "linux") '' autoPatchelf $packageBaseDir/bin ''; diff --git a/pkgs/development/mobile/androidenv/ndk-bundle/default.nix b/pkgs/development/mobile/androidenv/ndk-bundle/default.nix index 0f3e7e4faa231..ad729e24fb8aa 100644 --- a/pkgs/development/mobile/androidenv/ndk-bundle/default.nix +++ b/pkgs/development/mobile/androidenv/ndk-bundle/default.nix @@ -12,7 +12,7 @@ deployAndroidPackage { nativeBuildInputs = [ makeWrapper ] ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; autoPatchelfIgnoreMissingDeps = true; - buildInputs = lib.optional (os == "linux") [ pkgs.zlib ]; + buildInputs = lib.optionals (os == "linux") [ pkgs.zlib ]; patchInstructions = lib.optionalString (os == "linux") ('' patchShebangs . diff --git a/pkgs/development/mobile/androidenv/tools/25.nix b/pkgs/development/mobile/androidenv/tools/25.nix index 28ea249df25c1..82642e04280b6 100644 --- a/pkgs/development/mobile/androidenv/tools/25.nix +++ b/pkgs/development/mobile/androidenv/tools/25.nix @@ -3,7 +3,7 @@ deployAndroidPackage { name = "androidsdk"; nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; - buildInputs = lib.optional (os == "linux") [ pkgs.glibc pkgs.xorg.libX11 pkgs.xorg.libXext pkgs.xorg.libXdamage pkgs.xorg.libxcb pkgs.xorg.libXfixes pkgs.xorg.libXrender pkgs.fontconfig.lib pkgs.freetype pkgs.libGL pkgs.zlib pkgs.ncurses5 pkgs.libpulseaudio pkgs_i686.glibc pkgs_i686.xorg.libX11 pkgs_i686.xorg.libXrender pkgs_i686.fontconfig pkgs_i686.freetype pkgs_i686.zlib ]; + buildInputs = lib.optionals (os == "linux") [ pkgs.glibc pkgs.xorg.libX11 pkgs.xorg.libXext pkgs.xorg.libXdamage pkgs.xorg.libxcb pkgs.xorg.libXfixes pkgs.xorg.libXrender pkgs.fontconfig.lib pkgs.freetype pkgs.libGL pkgs.zlib pkgs.ncurses5 pkgs.libpulseaudio pkgs_i686.glibc pkgs_i686.xorg.libX11 pkgs_i686.xorg.libXrender pkgs_i686.fontconfig pkgs_i686.freetype pkgs_i686.zlib ]; inherit package os; patchInstructions = '' diff --git a/pkgs/development/python-modules/aiodns/default.nix b/pkgs/development/python-modules/aiodns/default.nix index 9c626618ff0a9..a5cf035aa0602 100644 --- a/pkgs/development/python-modules/aiodns/default.nix +++ b/pkgs/development/python-modules/aiodns/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ pycares - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ typing ]; diff --git a/pkgs/development/python-modules/ansible-runner/default.nix b/pkgs/development/python-modules/ansible-runner/default.nix index c261e5b163b73..14dfb65cfea8b 100644 --- a/pkgs/development/python-modules/ansible-runner/default.nix +++ b/pkgs/development/python-modules/ansible-runner/default.nix @@ -65,7 +65,7 @@ buildPythonPackage rec { "test_large_stdout_blob" # Failed: DID NOT RAISE "test_validate_pattern" - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ # test_process_isolation_settings is currently broken on Darwin Catalina # https://github.com/ansible/ansible-runner/issues/413 "process_isolation_settings" diff --git a/pkgs/development/python-modules/aspy-refactor-imports/default.nix b/pkgs/development/python-modules/aspy-refactor-imports/default.nix index cfe935e16e808..a19002449dfaf 100644 --- a/pkgs/development/python-modules/aspy-refactor-imports/default.nix +++ b/pkgs/development/python-modules/aspy-refactor-imports/default.nix @@ -27,7 +27,7 @@ buildPythonPackage rec { ]; # fails on darwin due to case-insensitive file system - disabledTests = lib.optional stdenv.isDarwin ["test_application_directory_case"]; + disabledTests = lib.optionals stdenv.isDarwin ["test_application_directory_case"]; meta = with lib; { description = "Utilities for refactoring imports in python-like syntax."; diff --git a/pkgs/development/python-modules/asyncio_mqtt/default.nix b/pkgs/development/python-modules/asyncio_mqtt/default.nix index c0ae1cea95f72..a87bca4396433 100644 --- a/pkgs/development/python-modules/asyncio_mqtt/default.nix +++ b/pkgs/development/python-modules/asyncio_mqtt/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ paho-mqtt - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ async_generator ]; diff --git a/pkgs/development/python-modules/azure-core/default.nix b/pkgs/development/python-modules/azure-core/default.nix index 5237130f59f80..75cf395876153 100644 --- a/pkgs/development/python-modules/azure-core/default.nix +++ b/pkgs/development/python-modules/azure-core/default.nix @@ -63,7 +63,7 @@ buildPythonPackage rec { # disable 8 tests failing on some darwin machines with errors: # azure.core.polling.base_polling.BadStatus: Invalid return status 403 for 'GET' operation # azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Forbidden' - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ "location_polling_fail" ]; disabledTestPaths = [ diff --git a/pkgs/development/python-modules/betterproto/default.nix b/pkgs/development/python-modules/betterproto/default.nix index 2f6ba2e29a236..b49204ee8c440 100644 --- a/pkgs/development/python-modules/betterproto/default.nix +++ b/pkgs/development/python-modules/betterproto/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ grpclib python-dateutil - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ dataclasses ]; diff --git a/pkgs/development/python-modules/catboost/default.nix b/pkgs/development/python-modules/catboost/default.nix index 02e107f27e19c..9a395bc6c98e2 100644 --- a/pkgs/development/python-modules/catboost/default.nix +++ b/pkgs/development/python-modules/catboost/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { nativeBuildInputs = [ clang_12 python2 ]; propagatedBuildInputs = [ graphviz matplotlib numpy pandas scipy plotly six ] - ++ lib.optional withCuda [ cudatoolkit ]; + ++ lib.optionals withCuda [ cudatoolkit ]; patches = [ ./nix-support.patch diff --git a/pkgs/development/python-modules/ciso8601/default.nix b/pkgs/development/python-modules/ciso8601/default.nix index e210e974414d4..79afe8500072d 100644 --- a/pkgs/development/python-modules/ciso8601/default.nix +++ b/pkgs/development/python-modules/ciso8601/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { checkInputs = [ pytz - ] ++ lib.optional (isPy27) [ + ] ++ lib.optionals (isPy27) [ unittest2 ]; diff --git a/pkgs/development/python-modules/deprecation/default.nix b/pkgs/development/python-modules/deprecation/default.nix index 441971fa6e709..0e15f2d74c612 100644 --- a/pkgs/development/python-modules/deprecation/default.nix +++ b/pkgs/development/python-modules/deprecation/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { # avoiding mass rebuilds for python3.9, but no longer # needed with patch - checkInputs = [ unittestCheckHook ] ++ lib.optional (pythonOlder "3.10") [ + checkInputs = [ unittestCheckHook ] ++ lib.optionals (pythonOlder "3.10") [ unittest2 ]; diff --git a/pkgs/development/python-modules/dnspython/default.nix b/pkgs/development/python-modules/dnspython/default.nix index 1dbbba48b1048..4b71485964920 100644 --- a/pkgs/development/python-modules/dnspython/default.nix +++ b/pkgs/development/python-modules/dnspython/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ cacert ]; diff --git a/pkgs/development/python-modules/enlighten/default.nix b/pkgs/development/python-modules/enlighten/default.nix index b6d31ddaf9478..e970aaee3375d 100644 --- a/pkgs/development/python-modules/enlighten/default.nix +++ b/pkgs/development/python-modules/enlighten/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { disabledTests = [ # AssertionError: <_io.TextIOWrapper name='' mode='w' encoding='utf-8'> is not... "test_init" - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ # https://github.com/Rockhopper-Technologies/enlighten/issues/44 "test_autorefresh" ]; diff --git a/pkgs/development/python-modules/fixtures/default.nix b/pkgs/development/python-modules/fixtures/default.nix index 3e9f9943327d5..2bc6612ba70d4 100644 --- a/pkgs/development/python-modules/fixtures/default.nix +++ b/pkgs/development/python-modules/fixtures/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { sha256 = "fcf0d60234f1544da717a9738325812de1f42c2fa085e2d9252d8fff5712b2ef"; }; - patches = lib.optional (pythonAtLeast "3.9") [ + patches = lib.optionals (pythonAtLeast "3.9") [ # drop tests that try to monkeypatch a classmethod, which fails on python3.9 # https://github.com/testing-cabal/fixtures/issues/44 (fetchpatch { diff --git a/pkgs/development/python-modules/funcsigs/default.nix b/pkgs/development/python-modules/funcsigs/default.nix index 115d358cb7869..a59b6f33b5f69 100644 --- a/pkgs/development/python-modules/funcsigs/default.nix +++ b/pkgs/development/python-modules/funcsigs/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { }; # https://github.com/testing-cabal/funcsigs/issues/10 - patches = lib.optional (isPyPy && isPy3k) [ ./fix-pypy3-tests.patch ]; + patches = lib.optionals (isPyPy && isPy3k) [ ./fix-pypy3-tests.patch ]; # requires, unittest2 and package hasn't been maintained since 2013 doCheck = false; diff --git a/pkgs/development/python-modules/glymur/default.nix b/pkgs/development/python-modules/glymur/default.nix index 40748f86954e1..9c652994a8c3d 100644 --- a/pkgs/development/python-modules/glymur/default.nix +++ b/pkgs/development/python-modules/glymur/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy - ] ++ lib.optional isPy27 [ contextlib2 mock importlib-resources ]; + ] ++ lib.optionals isPy27 [ contextlib2 mock importlib-resources ]; checkInputs = [ scikitimage diff --git a/pkgs/development/python-modules/hupper/default.nix b/pkgs/development/python-modules/hupper/default.nix index 9726069746023..a9e8bd112163e 100644 --- a/pkgs/development/python-modules/hupper/default.nix +++ b/pkgs/development/python-modules/hupper/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { # segfaults in the testsuite that end up failing the tests in a background thread (in myapp) checkInputs = [ pytestCheckHook - ] ++ lib.optional (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.isDarwin) [ watchdog ]; diff --git a/pkgs/development/python-modules/importlib-resources/default.nix b/pkgs/development/python-modules/importlib-resources/default.nix index 7e5d7e1448acb..1247335687237 100644 --- a/pkgs/development/python-modules/importlib-resources/default.nix +++ b/pkgs/development/python-modules/importlib-resources/default.nix @@ -27,7 +27,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ importlib-metadata - ] ++ lib.optional (pythonOlder "3.5") [ + ] ++ lib.optionals (pythonOlder "3.5") [ typing ]; diff --git a/pkgs/development/python-modules/jaraco_text/default.nix b/pkgs/development/python-modules/jaraco_text/default.nix index 341c744a42934..4891b2ea38c5f 100644 --- a/pkgs/development/python-modules/jaraco_text/default.nix +++ b/pkgs/development/python-modules/jaraco_text/default.nix @@ -37,13 +37,13 @@ buildPythonPackage rec { jaraco-context jaraco_functools inflect - ] ++ lib.optional (pythonOlder "3.9") [ + ] ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ]; checkInputs = [ pytestCheckHook - ] ++ lib.optional (pythonOlder "3.10") [ + ] ++ lib.optionals (pythonOlder "3.10") [ pathlib2 ]; diff --git a/pkgs/development/python-modules/jaxlib/default.nix b/pkgs/development/python-modules/jaxlib/default.nix index 12ba67b712446..c745737d35235 100644 --- a/pkgs/development/python-modules/jaxlib/default.nix +++ b/pkgs/development/python-modules/jaxlib/default.nix @@ -219,11 +219,11 @@ let # relevant dependencies can be downloaded. bazelFlags = [ "-c opt" - ] ++ lib.optional (stdenv.targetPlatform.isx86_64 && stdenv.targetPlatform.isUnix) [ + ] ++ lib.optionals (stdenv.targetPlatform.isx86_64 && stdenv.targetPlatform.isUnix) [ "--config=avx_posix" - ] ++ lib.optional cudaSupport [ + ] ++ lib.optionals cudaSupport [ "--config=cuda" - ] ++ lib.optional mklSupport [ + ] ++ lib.optionals mklSupport [ "--config=mkl_open_source_only" ] ++ lib.optionals stdenv.cc.isClang [ # bazel depends on the compiler frontend automatically selecting these flags based on file diff --git a/pkgs/development/python-modules/lightgbm/default.nix b/pkgs/development/python-modules/lightgbm/default.nix index 015417151b7a2..ad54268c8cf59 100644 --- a/pkgs/development/python-modules/lightgbm/default.nix +++ b/pkgs/development/python-modules/lightgbm/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { dontUseCmakeConfigure = true; - buildInputs = lib.optional stdenv.cc.isClang [ llvmPackages.openmp ]; + buildInputs = lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ]; propagatedBuildInputs = [ numpy scipy diff --git a/pkgs/development/python-modules/markdown-it-py/default.nix b/pkgs/development/python-modules/markdown-it-py/default.nix index f4c83d5df3486..d408c00710037 100644 --- a/pkgs/development/python-modules/markdown-it-py/default.nix +++ b/pkgs/development/python-modules/markdown-it-py/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { attrs linkify-it-py mdurl - ] ++ lib.optional (pythonOlder "3.8") [ + ] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ]; diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix index ad32c3db7eb60..6a507d01ef3b0 100644 --- a/pkgs/development/python-modules/matplotlib/default.nix +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -39,9 +39,9 @@ buildPythonPackage rec { buildInputs = [ which sphinx - ] ++ lib.optional enableGhostscript [ + ] ++ lib.optionals enableGhostscript [ ghostscript - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ Cocoa ]; diff --git a/pkgs/development/python-modules/nipy/default.nix b/pkgs/development/python-modules/nipy/default.nix index 5bdf6fdcd4436..d5e399701dc86 100644 --- a/pkgs/development/python-modules/nipy/default.nix +++ b/pkgs/development/python-modules/nipy/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { sha256 = "a8a2c97ce854fece4aced5a6394b9fdca5846150ad6d2a36b86590924af3c848"; }; - buildInputs = lib.optional doCheck [ nose ]; + buildInputs = lib.optionals doCheck [ nose ]; propagatedBuildInputs = [ matplotlib nibabel numpy scipy sympy ]; checkPhase = '' # wants to be run in a different directory diff --git a/pkgs/development/python-modules/notebook/default.nix b/pkgs/development/python-modules/notebook/default.nix index 4efaaf3f9ec94..fdb599466ff2b 100644 --- a/pkgs/development/python-modules/notebook/default.nix +++ b/pkgs/development/python-modules/notebook/default.nix @@ -68,7 +68,7 @@ buildPythonPackage rec { "sock_server" "test_list_formats" # tries to find python MIME type "KernelCullingTest" # has a race condition failing on slower hardware - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ "test_delete" "test_checkpoints_follow_file" ]; diff --git a/pkgs/development/python-modules/numba/default.nix b/pkgs/development/python-modules/numba/default.nix index 2ca0e08ba5b1a..965130658c444 100644 --- a/pkgs/development/python-modules/numba/default.nix +++ b/pkgs/development/python-modules/numba/default.nix @@ -40,7 +40,7 @@ in buildPythonPackage rec { NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; - nativeBuildInputs = lib.optional cudaSupport [ + nativeBuildInputs = lib.optionals cudaSupport [ addOpenGLRunpath ]; diff --git a/pkgs/development/python-modules/paho-mqtt/default.nix b/pkgs/development/python-modules/paho-mqtt/default.nix index fb249acf63333..e25f54748685a 100644 --- a/pkgs/development/python-modules/paho-mqtt/default.nix +++ b/pkgs/development/python-modules/paho-mqtt/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook six - ] ++ lib.optional (!isPy3k) [ + ] ++ lib.optionals (!isPy3k) [ mock ]; diff --git a/pkgs/development/python-modules/peewee/default.nix b/pkgs/development/python-modules/peewee/default.nix index 86fcd3948a6c7..bb1370fe07376 100644 --- a/pkgs/development/python-modules/peewee/default.nix +++ b/pkgs/development/python-modules/peewee/default.nix @@ -34,9 +34,9 @@ buildPythonPackage rec { propagatedBuildInputs = [ apsw - ] ++ lib.optional withPostgres [ + ] ++ lib.optionals withPostgres [ psycopg2 - ] ++ lib.optional withMysql [ + ] ++ lib.optionals withMysql [ mysql-connector ]; diff --git a/pkgs/development/python-modules/pygit2/default.nix b/pkgs/development/python-modules/pygit2/default.nix index 565cd6d67ec9d..413b79c562b1b 100644 --- a/pkgs/development/python-modules/pygit2/default.nix +++ b/pkgs/development/python-modules/pygit2/default.nix @@ -35,11 +35,11 @@ buildPythonPackage rec { propagatedBuildInputs = [ cached-property pycparser - ] ++ lib.optional (!isPyPy) [ + ] ++ lib.optionals (!isPyPy) [ cffi ]; - propagatedNativeBuildInputs = lib.optional (!isPyPy) [ + propagatedNativeBuildInputs = lib.optionals (!isPyPy) [ cffi ]; diff --git a/pkgs/development/python-modules/pyls-mypy/default.nix b/pkgs/development/python-modules/pyls-mypy/default.nix index acce4469eed4d..ad387106e8854 100644 --- a/pkgs/development/python-modules/pyls-mypy/default.nix +++ b/pkgs/development/python-modules/pyls-mypy/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ mypy python-language-server configparser - ] ++ lib.optional (isPy27) [ + ] ++ lib.optionals (isPy27) [ future ]; diff --git a/pkgs/development/python-modules/python-miio/default.nix b/pkgs/development/python-modules/python-miio/default.nix index d1497c43bcb73..32d5d542c30ae 100644 --- a/pkgs/development/python-modules/python-miio/default.nix +++ b/pkgs/development/python-modules/python-miio/default.nix @@ -54,7 +54,7 @@ buildPythonPackage rec { pyyaml tqdm zeroconf - ] ++ lib.optional (pythonOlder "3.8") [ + ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; diff --git a/pkgs/development/python-modules/qutip/default.nix b/pkgs/development/python-modules/qutip/default.nix index e99deef489f32..519cb9957bcc8 100644 --- a/pkgs/development/python-modules/qutip/default.nix +++ b/pkgs/development/python-modules/qutip/default.nix @@ -46,7 +46,7 @@ buildPythonPackage rec { ] ++ passthru.optional-dependencies.graphics; # Disabling OpenMP support on Darwin. - setupPyGlobalFlags = lib.optional (!stdenv.isDarwin) [ + setupPyGlobalFlags = lib.optionals (!stdenv.isDarwin) [ "--with-openmp" ]; diff --git a/pkgs/development/python-modules/rdflib/default.nix b/pkgs/development/python-modules/rdflib/default.nix index 1aa995d85d772..27356390cfdab 100644 --- a/pkgs/development/python-modules/rdflib/default.nix +++ b/pkgs/development/python-modules/rdflib/default.nix @@ -68,7 +68,7 @@ buildPythonPackage rec { # Requires network access "test_service" "testGuessFormatForParse" - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ # Require loopback network access "TestGraphHTTP" ]; diff --git a/pkgs/development/python-modules/rich/default.nix b/pkgs/development/python-modules/rich/default.nix index 36e7ca24fbdb1..c2cd935c651f0 100644 --- a/pkgs/development/python-modules/rich/default.nix +++ b/pkgs/development/python-modules/rich/default.nix @@ -35,9 +35,9 @@ buildPythonPackage rec { propagatedBuildInputs = [ CommonMark pygments - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ dataclasses - ] ++ lib.optional (pythonOlder "3.9") [ + ] ++ lib.optionals (pythonOlder "3.9") [ typing-extensions ]; diff --git a/pkgs/development/python-modules/simple-di/default.nix b/pkgs/development/python-modules/simple-di/default.nix index c79b58f8a6296..150eb52f8d4ed 100644 --- a/pkgs/development/python-modules/simple-di/default.nix +++ b/pkgs/development/python-modules/simple-di/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ setuptools typing-extensions - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ dataclasses ]; diff --git a/pkgs/development/python-modules/spacy/default.nix b/pkgs/development/python-modules/spacy/default.nix index cc1c01adf288e..f197b1080fb3e 100644 --- a/pkgs/development/python-modules/spacy/default.nix +++ b/pkgs/development/python-modules/spacy/default.nix @@ -63,7 +63,7 @@ buildPythonPackage rec { tqdm typer wasabi - ] ++ lib.optional (pythonOlder "3.8") [ + ] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ]; diff --git a/pkgs/development/python-modules/sphinx/default.nix b/pkgs/development/python-modules/sphinx/default.nix index 0983fb7e7a738..5a27f04bd0ee0 100644 --- a/pkgs/development/python-modules/sphinx/default.nix +++ b/pkgs/development/python-modules/sphinx/default.nix @@ -107,7 +107,7 @@ buildPythonPackage rec { # requires imagemagick (increases build closure size), doesn't # test anything substantial "test_ext_imgconverter" - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ # Due to lack of network sandboxing can't guarantee port 7777 isn't bound "test_inspect_main_url" "test_auth_header_uses_first_match" diff --git a/pkgs/development/python-modules/starlette/default.nix b/pkgs/development/python-modules/starlette/default.nix index d1e8f789fc38c..78a428a2a724c 100644 --- a/pkgs/development/python-modules/starlette/default.nix +++ b/pkgs/development/python-modules/starlette/default.nix @@ -50,7 +50,7 @@ buildPythonPackage rec { typing-extensions ] ++ lib.optionals (pythonOlder "3.7") [ contextlib2 - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ ApplicationServices ]; diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix index b266f837f8499..ca3c818d34afa 100644 --- a/pkgs/development/python-modules/tensorflow/bin.nix +++ b/pkgs/development/python-modules/tensorflow/bin.nix @@ -82,7 +82,7 @@ in buildPythonPackage { ++ lib.optionals (pythonOlder "3.4") [ backports_weakref ]; # remove patchelfUnstable once patchelf 0.14 with https://github.com/NixOS/patchelf/pull/256 becomes the default - nativeBuildInputs = [ wheel ] ++ lib.optional cudaSupport [ addOpenGLRunpath patchelfUnstable ]; + nativeBuildInputs = [ wheel ] ++ lib.optionals cudaSupport [ addOpenGLRunpath patchelfUnstable ]; preConfigure = '' unset SOURCE_DATE_EPOCH diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index 31fff4832052e..c8308b2f80ac1 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -483,7 +483,7 @@ in buildPythonPackage { ]; # remove patchelfUnstable once patchelf 0.14 with https://github.com/NixOS/patchelf/pull/256 becomes the default - nativeBuildInputs = lib.optional cudaSupport [ addOpenGLRunpath patchelfUnstable ]; + nativeBuildInputs = lib.optionals cudaSupport [ addOpenGLRunpath patchelfUnstable ]; postFixup = lib.optionalString cudaSupport '' find $out -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do diff --git a/pkgs/development/python-modules/thinc/default.nix b/pkgs/development/python-modules/thinc/default.nix index 51ee2803f3cfd..6da1ae8944508 100644 --- a/pkgs/development/python-modules/thinc/default.nix +++ b/pkgs/development/python-modules/thinc/default.nix @@ -66,9 +66,9 @@ buildPythonPackage rec { tqdm pydantic wasabi - ] ++ lib.optional (pythonOlder "3.8") [ + ] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ contextvars dataclasses ]; diff --git a/pkgs/development/python-modules/tzdata/default.nix b/pkgs/development/python-modules/tzdata/default.nix index c701d3683cdb5..d1fed0b21fa96 100644 --- a/pkgs/development/python-modules/tzdata/default.nix +++ b/pkgs/development/python-modules/tzdata/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook pytest-subtests - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ importlib-resources ]; diff --git a/pkgs/development/python-modules/wandb/default.nix b/pkgs/development/python-modules/wandb/default.nix index b1ad380f04b96..090b7a247651a 100644 --- a/pkgs/development/python-modules/wandb/default.nix +++ b/pkgs/development/python-modules/wandb/default.nix @@ -157,7 +157,7 @@ buildPythonPackage rec { # Disable test that fails on darwin due to issue with python3Packages.psutil: # https://github.com/giampaolo/psutil/issues/1219 - disabledTests = lib.optional stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.isDarwin [ "test_tpu_system_stats" ]; diff --git a/pkgs/development/python-modules/web3/default.nix b/pkgs/development/python-modules/web3/default.nix index b07bc9cee9d75..8515ccda36254 100644 --- a/pkgs/development/python-modules/web3/default.nix +++ b/pkgs/development/python-modules/web3/default.nix @@ -56,7 +56,7 @@ buildPythonPackage rec { protobuf requests websockets - ] ++ lib.optional (pythonOlder "3.8") [ + ] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ] ++ eth-hash.optional-dependencies.pycryptodome; diff --git a/pkgs/development/python-modules/yamllint/default.nix b/pkgs/development/python-modules/yamllint/default.nix index 58d47d1fff9ca..ca092cef8c72e 100644 --- a/pkgs/development/python-modules/yamllint/default.nix +++ b/pkgs/development/python-modules/yamllint/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { disabledTests = [ # test failure reported upstream: https://github.com/adrienverge/yamllint/issues/373 "test_find_files_recursively" - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ # locale tests are broken on BSDs; see https://github.com/adrienverge/yamllint/issues/307 "test_locale_accents" "test_locale_case" diff --git a/pkgs/development/tools/analysis/radare2/default.nix b/pkgs/development/tools/analysis/radare2/default.nix index 63594300e835d..905e78fd76554 100644 --- a/pkgs/development/tools/analysis/radare2/default.nix +++ b/pkgs/development/tools/analysis/radare2/default.nix @@ -97,10 +97,10 @@ stdenv.mkDerivation rec { zlib openssl libuv - ] ++ lib.optional useX11 [ gtkdialog vte gtk2 ] - ++ lib.optional rubyBindings [ ruby ] - ++ lib.optional pythonBindings [ python3 ] - ++ lib.optional luaBindings [ lua ]; + ] ++ lib.optionals useX11 [ gtkdialog vte gtk2 ] + ++ lib.optionals rubyBindings [ ruby ] + ++ lib.optionals pythonBindings [ python3 ] + ++ lib.optionals luaBindings [ lua ]; propagatedBuildInputs = [ # radare2 exposes r_lib which depends on these libraries diff --git a/pkgs/development/tools/misc/pahole/default.nix b/pkgs/development/tools/misc/pahole/default.nix index 1e923c380d6d8..7a60da1e53a3c 100644 --- a/pkgs/development/tools/misc/pahole/default.nix +++ b/pkgs/development/tools/misc/pahole/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ elfutils zlib libbpf ] - ++ lib.optional stdenv.hostPlatform.isMusl [ + ++ lib.optionals stdenv.hostPlatform.isMusl [ argp-standalone musl-obstack ]; diff --git a/pkgs/development/tools/misc/pkg-config/default.nix b/pkgs/development/tools/misc/pkg-config/default.nix index 70370e421261b..f2721ab952c64 100644 --- a/pkgs/development/tools/misc/pkg-config/default.nix +++ b/pkgs/development/tools/misc/pkg-config/default.nix @@ -28,9 +28,9 @@ stdenv.mkDerivation rec { buildInputs = optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv; configureFlags = [ "--with-internal-glib" ] - ++ optional (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ] + ++ optionals (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ] # Can't run these tests while cross-compiling - ++ optional (stdenv.hostPlatform != stdenv.buildPlatform) + ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "glib_cv_stack_grows=no" "glib_cv_uscore=no" "ac_cv_func_posix_getpwuid_r=yes" diff --git a/pkgs/development/tools/parsing/ragel/default.nix b/pkgs/development/tools/parsing/ragel/default.nix index 81d7d9f0b35e2..0e8777e9f3f92 100644 --- a/pkgs/development/tools/parsing/ragel/default.nix +++ b/pkgs/development/tools/parsing/ragel/default.nix @@ -13,7 +13,7 @@ let inherit sha256; }; - buildInputs = lib.optional build-manual [ fig2dev ghostscript tex ]; + buildInputs = lib.optionals build-manual [ fig2dev ghostscript tex ]; preConfigure = lib.optionalString build-manual '' sed -i "s/build_manual=no/build_manual=yes/g" DIST diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix b/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix index a3204dd014773..d1a009f32c3ff 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix @@ -385,7 +385,7 @@ lib.composeManyExtensions [ ( old: { nativeBuildInputs = (old.nativeBuildInputs or [ ]) - ++ lib.optional (lib.versionAtLeast old.version "3.4") [ self.setuptools-rust ] + ++ lib.optionals (lib.versionAtLeast old.version "3.4") [ self.setuptools-rust ] ++ lib.optional (!self.isPyPy) pyBuildPackages.cffi ++ lib.optional (lib.versionAtLeast old.version "3.5" && !isWheel) (with pkgs.rustPlatform; [ cargoSetupHook rust.cargo rust.rustc ]); @@ -1061,9 +1061,9 @@ lib.composeManyExtensions [ buildInputs = old.buildInputs or [ ] ++ [ pkgs.which - ] ++ lib.optional enableGhostscript [ + ] ++ lib.optionals enableGhostscript [ pkgs.ghostscript - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ Cocoa ]; @@ -1080,7 +1080,7 @@ lib.composeManyExtensions [ nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkg-config - ] ++ lib.optional (lib.versionAtLeast super.matplotlib.version "3.5.0") [ + ] ++ lib.optionals (lib.versionAtLeast super.matplotlib.version "3.5.0") [ self.setuptools-scm self.setuptools-scm-git-archive ]; @@ -2029,7 +2029,7 @@ lib.composeManyExtensions [ if old.format != "wheel" then { nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.gfortran ] ++ - lib.optional (lib.versionAtLeast super.scipy.version "1.7.0") [ self.pythran ]; + lib.optionals (lib.versionAtLeast super.scipy.version "1.7.0") [ self.pythran ]; propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.pybind11 ]; setupPyBuildFlags = [ "--fcompiler='gnu95'" ]; enableParallelBuilding = true; diff --git a/pkgs/development/tools/summon/default.nix b/pkgs/development/tools/summon/default.nix index 5c811aaf23912..2ed17061c2198 100644 --- a/pkgs/development/tools/summon/default.nix +++ b/pkgs/development/tools/summon/default.nix @@ -19,7 +19,7 @@ buildGoModule rec { # Patches provider resolver to support resolving unqualified names # from $PATH, e.g. `summon -p gopass` instead of `summon -p $(which gopass)` - patches = optional patchResolver [ ./resolve-paths.patch ]; + patches = optionals patchResolver [ ./resolve-paths.patch ]; postInstall = '' mv $out/bin/cmd $out/bin/summon diff --git a/pkgs/games/anki/default.nix b/pkgs/games/anki/default.nix index 3796741f96ca2..71575c35fd37d 100644 --- a/pkgs/games/anki/default.nix +++ b/pkgs/games/anki/default.nix @@ -101,7 +101,7 @@ buildPythonApplication rec { setuptools ] ++ lib.optional plotsSupport matplotlib - ++ lib.optional stdenv.isDarwin [ CoreAudio ] + ++ lib.optionals stdenv.isDarwin [ CoreAudio ] ; checkInputs = [ pytest glibcLocales nose ]; diff --git a/pkgs/games/blightmud/default.nix b/pkgs/games/blightmud/default.nix index 32c9ddb653472..d737c4c282d21 100644 --- a/pkgs/games/blightmud/default.nix +++ b/pkgs/games/blightmud/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ alsa-lib openssl ] ++ lib.optional withTTS [ speechd ]; + buildInputs = [ alsa-lib openssl ] ++ lib.optionals withTTS [ speechd ]; # Building the speech-dispatcher-sys crate for TTS support requires setting # LIBCLANG_PATH. diff --git a/pkgs/games/freeciv/default.nix b/pkgs/games/freeciv/default.nix index abe8aff15806a..4c18190e4fcc8 100644 --- a/pkgs/games/freeciv/default.nix +++ b/pkgs/games/freeciv/default.nix @@ -27,8 +27,8 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ autoreconfHook pkg-config ] - ++ lib.optional qtClient [ qt5.wrapQtAppsHook ] - ++ lib.optional gtkClient [ wrapGAppsHook ]; + ++ lib.optionals qtClient [ qt5.wrapQtAppsHook ] + ++ lib.optionals gtkClient [ wrapGAppsHook ]; buildInputs = [ lua5_3 zlib bzip2 curl xz gettext libiconv icu ] ++ [ SDL2 SDL2_mixer SDL2_image SDL2_ttf SDL2_gfx freetype fluidsynth ] diff --git a/pkgs/games/xonotic/default.nix b/pkgs/games/xonotic/default.nix index d29e43850fbd3..cad021ff57051 100644 --- a/pkgs/games/xonotic/default.nix +++ b/pkgs/games/xonotic/default.nix @@ -66,8 +66,8 @@ let nativeBuildInputs = [ unzip ]; buildInputs = [ libjpeg zlib libvorbis curl gmp ] - ++ lib.optional withGLX [ libX11.dev libGLU.dev libGL.dev libXpm.dev libXext.dev libXxf86vm.dev alsa-lib.dev ] - ++ lib.optional withSDL [ SDL2.dev ]; + ++ lib.optionals withGLX [ libX11.dev libGLU.dev libGL.dev libXpm.dev libXext.dev libXxf86vm.dev alsa-lib.dev ] + ++ lib.optionals withSDL [ SDL2.dev ]; sourceRoot = "Xonotic/source/darkplaces"; diff --git a/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix b/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix index cdebfe6d2f727..ed5e998714afe 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix @@ -13,7 +13,7 @@ in appleDerivation { nativeBuildInputs = [ python3 ]; - depsBuildBuild = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ buildPackages.stdenv.cc ]; + depsBuildBuild = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ buildPackages.stdenv.cc ]; postPatch = '' substituteInPlace makefile \ diff --git a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix index 8b0d2054d58af..266c2ef4dfef5 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix @@ -12,7 +12,7 @@ appleDerivation' (if headersOnly then stdenvNoCC else stdenv) ( nativeBuildInputs = [ bootstrap_cmds bison flex gnum4 unifdef perl python3 ]; - patches = lib.optional stdenv.isx86_64 [ ./python3.patch ]; + patches = lib.optionals stdenv.isx86_64 [ ./python3.patch ]; postPatch = '' substituteInPlace Makefile \ diff --git a/pkgs/os-specific/darwin/libtapi/default.nix b/pkgs/os-specific/darwin/libtapi/default.nix index eba61a15ccb95..d109e0edcbd81 100644 --- a/pkgs/os-specific/darwin/libtapi/default.nix +++ b/pkgs/os-specific/darwin/libtapi/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation { # Also means we don't have to manually fix the result with install_name_tool. patches = [ ./disable-rpath.patch - ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ # TODO: make unconditional and rebuild the world # TODO: send upstream ./native-clang-tblgen.patch @@ -30,7 +30,7 @@ stdenv.mkDerivation { buildInputs = [ ncurses ]; cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=OFF" ] - ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) [ + ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "-DCMAKE_CROSSCOMPILING=True" # This package could probably have a llvm_6 llvm-tblgen and clang-tblgen # provided to reduce some building. This package seems intended to diff --git a/pkgs/os-specific/linux/exfat/default.nix b/pkgs/os-specific/linux/exfat/default.nix index d459d24084427..ee6f448112d88 100644 --- a/pkgs/os-specific/linux/exfat/default.nix +++ b/pkgs/os-specific/linux/exfat/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "ARCH=${stdenv.hostPlatform.linuxArch}" - ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix index 7e148b9145c65..ebf20a015c046 100644 --- a/pkgs/os-specific/linux/kernel-headers/default.nix +++ b/pkgs/os-specific/linux/kernel-headers/default.nix @@ -27,7 +27,7 @@ let flex bison python rsync ]; - extraIncludeDirs = lib.optional (with stdenvNoCC.hostPlatform; isPower && is32bit && isBigEndian) ["ppc"]; + extraIncludeDirs = lib.optionals (with stdenvNoCC.hostPlatform; isPower && is32bit && isBigEndian) ["ppc"]; inherit patches; diff --git a/pkgs/os-specific/linux/nvidia-x11/generic.nix b/pkgs/os-specific/linux/nvidia-x11/generic.nix index 351d71ab8e2d4..ea9dbcabd0e90 100644 --- a/pkgs/os-specific/linux/nvidia-x11/generic.nix +++ b/pkgs/os-specific/linux/nvidia-x11/generic.nix @@ -101,7 +101,7 @@ let nativeBuildInputs = [ perl nukeReferences ] ++ optionals (!libsOnly) kernel.moduleBuildDependencies; - disallowedReferences = optional (!libsOnly) [ kernel.dev ]; + disallowedReferences = optionals (!libsOnly) [ kernel.dev ]; passthru = { open = mapNullable (hash: callPackage ./open.nix { diff --git a/pkgs/os-specific/linux/rtl8812au/default.nix b/pkgs/os-specific/linux/rtl8812au/default.nix index 03a5c0f4aeb41..6a1c4fc80daeb 100644 --- a/pkgs/os-specific/linux/rtl8812au/default.nix +++ b/pkgs/os-specific/linux/rtl8812au/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ("CONFIG_PLATFORM_I386_PC=" + (if stdenv.hostPlatform.isx86 then "y" else "n")) ("CONFIG_PLATFORM_ARM_RPI=" + (if stdenv.hostPlatform.isAarch then "y" else "n")) - ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; diff --git a/pkgs/servers/dante/default.nix b/pkgs/servers/dante/default.nix index 742ee2a0e684c..f5b2e5a785fc2 100644 --- a/pkgs/servers/dante/default.nix +++ b/pkgs/servers/dante/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { dontAddDisableDepTrack = stdenv.isDarwin; - patches = lib.optional stdenv.hostPlatform.isMips64 [ + patches = lib.optionals stdenv.hostPlatform.isMips64 [ (fetchpatch { name = "0002-osdep-m4-Remove-getaddrinfo-too-low-checks.patch"; url = "https://raw.githubusercontent.com/buildroot/buildroot/master/package/dante/0002-osdep-m4-Remove-getaddrinfo-too-low-checks.patch"; diff --git a/pkgs/servers/foundationdb/cmake.nix b/pkgs/servers/foundationdb/cmake.nix index 98fd6ca79813e..9d65198c8cef3 100644 --- a/pkgs/servers/foundationdb/cmake.nix +++ b/pkgs/servers/foundationdb/cmake.nix @@ -33,7 +33,7 @@ let buildInputs = [ libressl boost ]; nativeBuildInputs = [ cmake ninja python3 openjdk mono ] - ++ lib.optional useClang [ llvmPackages.lld ]; + ++ lib.optionals useClang [ llvmPackages.lld ]; separateDebugInfo = true; dontFixCmake = true; diff --git a/pkgs/servers/foundationdb/vsmake.nix b/pkgs/servers/foundationdb/vsmake.nix index 284dc9fb3bd51..21ee2e4f8485e 100644 --- a/pkgs/servers/foundationdb/vsmake.nix +++ b/pkgs/servers/foundationdb/vsmake.nix @@ -84,11 +84,11 @@ let makeFlags = [ "all" "fdb_java" "fdb_python" ] # Don't compile FDBLibTLS if we don't need it in 6.0 or later; # it gets statically linked in - ++ lib.optional (lib.versionOlder version "6.0") [ "fdb_c" ] + ++ lib.optionals (lib.versionOlder version "6.0") [ "fdb_c" ] # Needed environment overrides ++ [ "KVRELEASE=1" "NOSTRIP=1" - ] ++ lib.optional officialRelease [ "RELEASE=true" ]; + ] ++ lib.optionals officialRelease [ "RELEASE=true" ]; # on 6.0 and later, we can specify all this information manually configurePhase = lib.optionalString (lib.versionAtLeast version "6.0") '' diff --git a/pkgs/servers/geospatial/mapserver/default.nix b/pkgs/servers/geospatial/mapserver/default.nix index d7012af0ffeea..ac8af5b7de0c6 100644 --- a/pkgs/servers/geospatial/mapserver/default.nix +++ b/pkgs/servers/geospatial/mapserver/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config - ] ++ lib.optional withPython [ swig python3.pkgs.setuptools ]; + ] ++ lib.optionals withPython [ swig python3.pkgs.setuptools ]; buildInputs = [ cairo diff --git a/pkgs/servers/nosql/redis/default.nix b/pkgs/servers/nosql/redis/default.nix index ab5a5672af692..d10d8b8c073d0 100644 --- a/pkgs/servers/nosql/redis/default.nix +++ b/pkgs/servers/nosql/redis/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { # It's weird that the build isn't failing because of failure to compile dependencies, it's from failure to link them! makeFlags = [ "PREFIX=${placeholder "out"}" ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "AR=${stdenv.cc.targetPrefix}ar" "RANLIB=${stdenv.cc.targetPrefix}ranlib" "MALLOC=libc" ] - ++ lib.optional withSystemd [ "USE_SYSTEMD=yes" ] + ++ lib.optionals withSystemd [ "USE_SYSTEMD=yes" ] ++ lib.optionals tlsSupport [ "BUILD_TLS=yes" ]; enableParallelBuilding = true; diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index e86527440cf44..c5607b4d037ed 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -141,7 +141,7 @@ stdenv.mkDerivation rec { ++ optional (!enablePam) "--without-pam" ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--bundled-libraries=!asn1_compile,!compile_et" - ] ++ optional stdenv.isAarch32 [ + ] ++ optionals stdenv.isAarch32 [ # https://bugs.gentoo.org/683148 "--jobs 1" ]; diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index 7190f1209e08d..f75fada0d8a02 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -44,7 +44,7 @@ commonOptions = packageSettings: rec { # attributes common to both builds ++ lib.optionals stdenv.hostPlatform.isLinux ([ libkrb5 systemd ] ++ (if (lib.versionOlder version "10.6") then [ libaio ] else [ liburing ])) ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices cctools perl libedit ] - ++ lib.optional (!stdenv.hostPlatform.isDarwin) [ jemalloc ] + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ jemalloc ] ++ (if (lib.versionOlder version "10.5") then [ pcre ] else [ pcre2 ]) ++ (if (lib.versionOlder version "10.6") then [ openssl_1_1 (curl.override { openssl = openssl_1_1; }) ] @@ -203,15 +203,15 @@ in stdenv.mkDerivation (common // { "-DWITHOUT_EXAMPLE=1" "-DWITHOUT_FEDERATED=1" "-DWITHOUT_TOKUDB=1" - ] ++ lib.optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) [ "-DWITH_NUMA=ON" - ] ++ lib.optional (!withStorageMroonga) [ + ] ++ lib.optionals (!withStorageMroonga) [ "-DWITHOUT_MROONGA=1" - ] ++ lib.optional (!withStorageRocks) [ + ] ++ lib.optionals (!withStorageRocks) [ "-DWITHOUT_ROCKSDB=1" - ] ++ lib.optional (!stdenv.hostPlatform.isDarwin && withStorageRocks) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin && withStorageRocks) [ "-DWITH_ROCKSDB_JEMALLOC=ON" - ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "-DWITH_JEMALLOC=yes" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DPLUGIN_AUTH_PAM=NO" diff --git a/pkgs/shells/bash/5.1.nix b/pkgs/shells/bash/5.1.nix index 390dab12c9476..0f50c72f5da0d 100644 --- a/pkgs/shells/bash/5.1.nix +++ b/pkgs/shells/bash/5.1.nix @@ -86,7 +86,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - makeFlags = optional stdenv.hostPlatform.isCygwin [ + makeFlags = optionals stdenv.hostPlatform.isCygwin [ "LOCAL_LDFLAGS=-Wl,--export-all,--out-implib,libbash.dll.a" "SHOBJ_LIBS=-lbash" ]; diff --git a/pkgs/shells/ion/default.nix b/pkgs/shells/ion/default.nix index f20c80810a0bc..ce15dbf2d2556 100644 --- a/pkgs/shells/ion/default.nix +++ b/pkgs/shells/ion/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { maintainers = with maintainers; [ dywedir ]; }; - buildInputs = lib.optional stdenv.hostPlatform.isDarwin [ + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security libiconv ]; diff --git a/pkgs/tools/cd-dvd/dvdisaster/default.nix b/pkgs/tools/cd-dvd/dvdisaster/default.nix index 72f8cc0be2e98..55e0e51e5f448 100644 --- a/pkgs/tools/cd-dvd/dvdisaster/default.nix +++ b/pkgs/tools/cd-dvd/dvdisaster/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gettext pkg-config which ]; buildInputs = [ glib gtk2 ]; - patches = lib.optional enableSoftening [ + patches = lib.optionals enableSoftening [ ./encryption.patch ./dvdrom.patch ]; diff --git a/pkgs/tools/compression/bsdiff/default.nix b/pkgs/tools/compression/bsdiff/default.nix index b8a86eae89bde..6db5d99246771 100644 --- a/pkgs/tools/compression/bsdiff/default.nix +++ b/pkgs/tools/compression/bsdiff/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { }) ./CVE-2020-14315.patch ./include-systypes.patch - ] ++ lib.optional stdenv.hostPlatform.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ (fetchpatch { url = "https://sources.debian.org/data/main/b/bsdiff/4.3-22/debian/patches/30-bug-632585-mmap-src-file-instead-of-malloc-read-it.patch"; sha256 = "sha256-esbhz2/efUiuQDuF7LGfSeEn3/f1WbqCxQpTs2A0ulI="; diff --git a/pkgs/tools/graphics/mangohud/default.nix b/pkgs/tools/graphics/mangohud/default.nix index 7202f9f8b5628..9639a7881f0f4 100644 --- a/pkgs/tools/graphics/mangohud/default.nix +++ b/pkgs/tools/graphics/mangohud/default.nix @@ -108,7 +108,7 @@ in stdenv.mkDerivation rec { libdbus = dbus.lib; inherit hwdata libX11; }) - ] ++ lib.optional (stdenv.hostPlatform.system == "x86_64-linux") [ + ] ++ lib.optionals (stdenv.hostPlatform.system == "x86_64-linux") [ # Support 32bit OpenGL applications by appending the mangohud32 # lib path to LD_LIBRARY_PATH. # diff --git a/pkgs/tools/misc/hiksink/default.nix b/pkgs/tools/misc/hiksink/default.nix index 9cc91035afe05..05d7e1c9f44ea 100644 --- a/pkgs/tools/misc/hiksink/default.nix +++ b/pkgs/tools/misc/hiksink/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ Security ]; diff --git a/pkgs/tools/misc/jsonwatch/default.nix b/pkgs/tools/misc/jsonwatch/default.nix index 3fe4f5008fd69..6f11e7d97e5da 100644 --- a/pkgs/tools/misc/jsonwatch/default.nix +++ b/pkgs/tools/misc/jsonwatch/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-Gjb7v3kz11iOml3Ykxhy43KNxzaprgMbb5DpPNChLTc="; - buildInputs = lib.optional stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.isDarwin [ Security ]; diff --git a/pkgs/tools/misc/less/default.nix b/pkgs/tools/misc/less/default.nix index df8d9eef22ac5..a7212ccf7648a 100644 --- a/pkgs/tools/misc/less/default.nix +++ b/pkgs/tools/misc/less/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; configureFlags = [ "--sysconfdir=/etc" ] # Look for ‘sysless’ in /etc. - ++ lib.optional lessSecure [ "--with-secure" ]; + ++ lib.optionals lessSecure [ "--with-secure" ]; buildInputs = [ ncurses ]; diff --git a/pkgs/tools/misc/man-db/default.nix b/pkgs/tools/misc/man-db/default.nix index 3e34a81cd4f82..4c23143b103ee 100644 --- a/pkgs/tools/misc/man-db/default.nix +++ b/pkgs/tools/misc/man-db/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { "--with-systemdtmpfilesdir=${placeholder "out"}/lib/tmpfiles.d" "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system" "--with-pager=less" - ] ++ lib.optional stdenv.hostPlatform.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "ac_cv_func__set_invalid_parameter_handler=no" "ac_cv_func_posix_fadvise=no" "ac_cv_func_mempcpy=no" diff --git a/pkgs/tools/misc/otfcc/default.nix b/pkgs/tools/misc/otfcc/default.nix index b233e94f4f60f..b6c971dd3c2ef 100644 --- a/pkgs/tools/misc/otfcc/default.nix +++ b/pkgs/tools/misc/otfcc/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { ./move-makefiles.patch ]; - buildFlags = lib.optional stdenv.isAarch64 [ "config=release_arm" ]; + buildFlags = lib.optionals stdenv.isAarch64 [ "config=release_arm" ]; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/tools/misc/pre-commit/default.nix b/pkgs/tools/misc/pre-commit/default.nix index 4c455d6fb2d7b..1d475ead4605a 100644 --- a/pkgs/tools/misc/pre-commit/default.nix +++ b/pkgs/tools/misc/pre-commit/default.nix @@ -37,9 +37,9 @@ buildPythonPackage rec { pyyaml toml virtualenv - ] ++ lib.optional (pythonOlder "3.8") [ + ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata - ] ++ lib.optional (pythonOlder "3.7") [ + ] ++ lib.optionals (pythonOlder "3.7") [ importlib-resources ]; diff --git a/pkgs/tools/misc/rust-motd/default.nix b/pkgs/tools/misc/rust-motd/default.nix index a2c7710984ea9..b881d94438cd7 100644 --- a/pkgs/tools/misc/rust-motd/default.nix +++ b/pkgs/tools/misc/rust-motd/default.nix @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ Security ]; diff --git a/pkgs/tools/misc/sheldon/default.nix b/pkgs/tools/misc/sheldon/default.nix index db6aa9d8f1708..8f2c458fe1d6f 100644 --- a/pkgs/tools/misc/sheldon/default.nix +++ b/pkgs/tools/misc/sheldon/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-uRcaHuDLQm6OYqt01kLbW/mfZnL4HaDabaweaw1EOfs="; - buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin [ Security curl ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security curl ]; nativeBuildInputs = [ installShellFiles pkg-config ]; # Needs network connection diff --git a/pkgs/tools/misc/ttwatch/default.nix b/pkgs/tools/misc/ttwatch/default.nix index ecfc40bdf6f34..273d34ffdb8e4 100644 --- a/pkgs/tools/misc/ttwatch/default.nix +++ b/pkgs/tools/misc/ttwatch/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake perl pkg-config ]; buildInputs = [ openssl curl libusb1 protobufc ]; - cmakeFlags = lib.optional enableUnsafe [ "-Dunsafe=on" ]; + cmakeFlags = lib.optionals enableUnsafe [ "-Dunsafe=on" ]; preFixup = '' chmod +x $out/bin/ttbin2mysports diff --git a/pkgs/tools/networking/bore-cli/default.nix b/pkgs/tools/networking/bore-cli/default.nix index 5ca16499fe823..ae39bfb6204fd 100644 --- a/pkgs/tools/networking/bore-cli/default.nix +++ b/pkgs/tools/networking/bore-cli/default.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-ZnEVTFiPo3AFyo1BoV88X2nCqYzRK6PkcbawiR+QnV0="; - buildInputs = lib.optional stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.isDarwin [ Security ]; diff --git a/pkgs/tools/networking/eternal-terminal/default.nix b/pkgs/tools/networking/eternal-terminal/default.nix index 05e3152bec192..96315e305ad56 100644 --- a/pkgs/tools/networking/eternal-terminal/default.nix +++ b/pkgs/tools/networking/eternal-terminal/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { "-DDISABLE_CRASH_LOG=TRUE" ]; - CXXFLAGS = lib.optional stdenv.cc.isClang [ + CXXFLAGS = lib.optionals stdenv.cc.isClang [ "-std=c++17" ]; diff --git a/pkgs/tools/networking/ipv6calc/default.nix b/pkgs/tools/networking/ipv6calc/default.nix index 6df96e268effa..8489ffd6f7074 100644 --- a/pkgs/tools/networking/ipv6calc/default.nix +++ b/pkgs/tools/networking/ipv6calc/default.nix @@ -43,11 +43,11 @@ stdenv.mkDerivation rec { "--disable-bundled-md5" "--disable-dynamic-load" "--enable-shared" - ] ++ lib.optional (libmaxminddb != null) [ + ] ++ lib.optionals (libmaxminddb != null) [ "--enable-mmdb" - ] ++ lib.optional (geolite-legacy != null) [ + ] ++ lib.optionals (geolite-legacy != null) [ "--with-geoip-db=${geolite-legacy}/share/GeoIP" - ] ++ lib.optional (ip2location-c != null) [ + ] ++ lib.optionals (ip2location-c != null) [ "--enable-ip2location" ]; diff --git a/pkgs/tools/networking/rathole/default.nix b/pkgs/tools/networking/rathole/default.nix index ceaf89ef92e96..cb392114e0627 100644 --- a/pkgs/tools/networking/rathole/default.nix +++ b/pkgs/tools/networking/rathole/default.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin [ CoreServices ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ CoreServices ]; __darwinAllowLocalNetworking = true; diff --git a/pkgs/tools/networking/termscp/default.nix b/pkgs/tools/networking/termscp/default.nix index 7fbf30614e7ac..70e1643199400 100644 --- a/pkgs/tools/networking/termscp/default.nix +++ b/pkgs/tools/networking/termscp/default.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { dbus libssh openssl - ] ++ lib.optional stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ AppKit Cocoa Foundation diff --git a/pkgs/tools/networking/toxvpn/default.nix b/pkgs/tools/networking/toxvpn/default.nix index 57a5510bd4306..633ecf654924e 100644 --- a/pkgs/tools/networking/toxvpn/default.nix +++ b/pkgs/tools/networking/toxvpn/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake ]; - cmakeFlags = lib.optional stdenv.isLinux [ "-DSYSTEMD=1" ]; + cmakeFlags = lib.optionals stdenv.isLinux [ "-DSYSTEMD=1" ]; postInstall = "$out/bin/toxvpn -h"; diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index 25fcc1bcc397e..5e44eb0dabf58 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -75,7 +75,7 @@ stdenv.mkDerivation rec { "--with-rootkey-file=${dns-root-data}/root.key" "--enable-pie" "--enable-relro-now" - ] ++ lib.optional stdenv.hostPlatform.isStatic [ + ] ++ lib.optionals stdenv.hostPlatform.isStatic [ "--disable-flto" ] ++ lib.optionals withSystemd [ "--enable-systemd" diff --git a/pkgs/tools/networking/vde2/default.nix b/pkgs/tools/networking/vde2/default.nix index c14aa8bb3c13b..83cee2e466af5 100644 --- a/pkgs/tools/networking/vde2/default.nix +++ b/pkgs/tools/networking/vde2/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-Yf6QB7j5lYld2XtqhYspK4037lTtimoFc7nCavCP+mU="; }; - patches = lib.optional stdenv.hostPlatform.isMusl [ + patches = lib.optionals stdenv.hostPlatform.isMusl [ (fetchpatch { url = "https://git.alpinelinux.org/aports/plain/main/vde2/musl-build-fix.patch?id=ddee2f86a48e087867d4a2c12849b2e3baccc238"; sha256 = "0b5382v541bkxhqylilcy34bh83ag96g71f39m070jzvi84kx8af"; diff --git a/pkgs/tools/package-management/nix/common.nix b/pkgs/tools/package-management/nix/common.nix index f69ee083af1f5..95fbd0782b798 100644 --- a/pkgs/tools/package-management/nix/common.nix +++ b/pkgs/tools/package-management/nix/common.nix @@ -113,7 +113,7 @@ self = stdenv.mkDerivation { propagatedBuildInputs = [ boehmgc - ] ++ lib.optional (atLeast27) [ + ] ++ lib.optionals (atLeast27) [ nlohmann_json ]; diff --git a/pkgs/tools/security/asc-key-to-qr-code-gif/default.nix b/pkgs/tools/security/asc-key-to-qr-code-gif/default.nix index 13327a84fff00..28913c685778b 100644 --- a/pkgs/tools/security/asc-key-to-qr-code-gif/default.nix +++ b/pkgs/tools/security/asc-key-to-qr-code-gif/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation { substitutions = [ ''--replace "convert" "${imagemagick}/bin/convert"'' ''--replace "qrencode" "${qrencode.bin}/bin/qrencode"'' - ] ++ lib.optional testQR [ + ] ++ lib.optionals testQR [ ''--replace "hash zbarimg" "true"'' # hash does not work on NixOS ''--replace "$(zbarimg --raw" "$(${zbar.out}/bin/zbarimg --raw"'' ]; diff --git a/pkgs/tools/security/chipsec/default.nix b/pkgs/tools/security/chipsec/default.nix index 5b4957139d753..64a4946136f09 100644 --- a/pkgs/tools/security/chipsec/default.nix +++ b/pkgs/tools/security/chipsec/default.nix @@ -48,7 +48,7 @@ python3.pkgs.buildPythonApplication rec { setupPyBuildFlags = [ "--build-lib=$CHIPSEC_BUILD_LIB" - ] ++ lib.optional (!withDriver) [ + ] ++ lib.optionals (!withDriver) [ "--skip-driver" ]; diff --git a/pkgs/tools/security/rhash/default.nix b/pkgs/tools/security/rhash/default.nix index e071f460b1aa9..b539772213bb6 100644 --- a/pkgs/tools/security/rhash/default.nix +++ b/pkgs/tools/security/rhash/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { installTargets = [ "install" "install-lib-headers" - ] ++ lib.optional (!enableStatic) [ + ] ++ lib.optionals (!enableStatic) [ "install-lib-so-link" ]; diff --git a/pkgs/tools/security/sudo/default.nix b/pkgs/tools/security/sudo/default.nix index 429027df872df..d667734ef9916 100644 --- a/pkgs/tools/security/sudo/default.nix +++ b/pkgs/tools/security/sudo/default.nix @@ -35,10 +35,10 @@ stdenv.mkDerivation rec { "--with-iologdir=/var/log/sudo-io" "--with-sendmail=${sendmailPath}" "--enable-tmpfiles.d=no" - ] ++ lib.optional withInsults [ + ] ++ lib.optionals withInsults [ "--with-insults" "--with-all-insults" - ] ++ lib.optional withSssd [ + ] ++ lib.optionals withSssd [ "--with-sssd" "--with-sssd-lib=${sssd}/lib" ]; diff --git a/pkgs/tools/system/fio/default.nix b/pkgs/tools/system/fio/default.nix index 0fc90be2dcbf1..c2c46e9a5d14e 100644 --- a/pkgs/tools/system/fio/default.nix +++ b/pkgs/tools/system/fio/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { pythonPath = [ python3.pkgs.six ]; - makeWrapperArgs = lib.optional withGnuplot [ + makeWrapperArgs = lib.optionals withGnuplot [ "--prefix PATH : ${lib.makeBinPath [ gnuplot ]}" ]; diff --git a/pkgs/tools/system/netdata/default.nix b/pkgs/tools/system/netdata/default.nix index 96ca146358d26..d27ebc4e2a64a 100644 --- a/pkgs/tools/system/netdata/default.nix +++ b/pkgs/tools/system/netdata/default.nix @@ -99,9 +99,9 @@ in stdenv.mkDerivation rec { "--sysconfdir=/etc" "--disable-ebpf" "--with-jemalloc=${jemalloc}" - ] ++ optional (!withDBengine) [ + ] ++ optionals (!withDBengine) [ "--disable-dbengine" - ] ++ optional (!withCloud) [ + ] ++ optionals (!withCloud) [ "--disable-cloud" ]; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 7d44b42e389f8..a2b547d5fbb70 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -849,7 +849,7 @@ let }; buildInputs = [ PodParser ]; propagatedBuildInputs = [ AppPackager FileLoadLines IOString ImageInfo PDFAPI2 StringInterpolateNamed TextLayout ] - ++ lib.optional (!stdenv.isDarwin) [ Wx ]; + ++ lib.optionals (!stdenv.isDarwin) [ Wx ]; nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; postInstall = lib.optionalString stdenv.isDarwin '' shortenPerlShebang $out/bin/chordpro From 94705be41876f2d5ae73f562ad93c54ba6d205f2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 10 Oct 2022 19:21:06 +0000 Subject: [PATCH 266/318] ethtool: 5.19 -> 6.0 --- pkgs/tools/misc/ethtool/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/ethtool/default.nix b/pkgs/tools/misc/ethtool/default.nix index d2c0dfe371666..5ebbbe1e118b4 100644 --- a/pkgs/tools/misc/ethtool/default.nix +++ b/pkgs/tools/misc/ethtool/default.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation rec { pname = "ethtool"; - version = "5.19"; + version = "6.0"; src = fetchurl { url = "mirror://kernel/software/network/${pname}/${pname}-${version}.tar.xz"; - sha256 = "sha256-O3UqMymCeQesOBLygx3+z1HIxBxV0tac+5xTygZEn8Y="; + sha256 = "sha256-1URsk95XDOaPOx6mnb+hL8/Wf8GYl/ZV0/GCMeK4GNY="; }; nativeBuildInputs = [ From 8918d77d2495baaa6b4d4d2f8dad3de3043d9946 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 9 Oct 2022 20:45:30 +0200 Subject: [PATCH 267/318] libxcrypt: divert manpages into man output --- pkgs/development/libraries/libxcrypt/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/libxcrypt/default.nix b/pkgs/development/libraries/libxcrypt/default.nix index dc2c5d3fb6ccb..44b906f0d2f68 100644 --- a/pkgs/development/libraries/libxcrypt/default.nix +++ b/pkgs/development/libraries/libxcrypt/default.nix @@ -9,6 +9,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-npNoEfn60R28ozyhm9l8VcUus8oVkB8nreBGzHnmnoc="; }; + outputs = [ + "out" + "man" + ]; + configureFlags = [ "--enable-hashes=all" "--enable-obsolete-api=glibc" From 9c6406d20fcc8c7b9545653fcabab510b65af63b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 9 Oct 2022 20:49:37 +0200 Subject: [PATCH 268/318] libxcrypt: add passthru tests The shadow test uses a password that is hashed with libxcrypt and the login test uses the passwd command. --- pkgs/development/libraries/libxcrypt/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libxcrypt/default.nix b/pkgs/development/libraries/libxcrypt/default.nix index 44b906f0d2f68..d5025bc38543d 100644 --- a/pkgs/development/libraries/libxcrypt/default.nix +++ b/pkgs/development/libraries/libxcrypt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, perl }: +{ lib, stdenv, fetchurl, perl, nixosTests }: stdenv.mkDerivation rec { pname = "libxcrypt"; @@ -30,6 +30,10 @@ stdenv.mkDerivation rec { doCheck = !stdenv.hostPlatform.isMusl; + passthru.tests = { + inherit (nixosTests) login shadow; + }; + meta = with lib; { description = "Extended crypt library for descrypt, md5crypt, bcrypt, and others"; homepage = "https://github.com/besser82/libxcrypt/"; From 5f7f739887155caf7a3b2c1bde2c418334244db7 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 9 Oct 2022 21:07:00 +0200 Subject: [PATCH 269/318] libxcrypt: adopt --- pkgs/development/libraries/libxcrypt/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libxcrypt/default.nix b/pkgs/development/libraries/libxcrypt/default.nix index d5025bc38543d..db5f5026f2c15 100644 --- a/pkgs/development/libraries/libxcrypt/default.nix +++ b/pkgs/development/libraries/libxcrypt/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { description = "Extended crypt library for descrypt, md5crypt, bcrypt, and others"; homepage = "https://github.com/besser82/libxcrypt/"; platforms = platforms.all; - maintainers = with maintainers; [ dottedmag ]; + maintainers = with maintainers; [ dottedmag hexa ]; license = licenses.lgpl21Plus; }; } From d26276e72563786fed06206897f05bf8ff088767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Sun, 9 Oct 2022 17:24:53 +0200 Subject: [PATCH 270/318] weechat: re-enable docs The doc build was failing because of an unpatched `/usr/bin/env` shebang in the `pygments.rb` gem, and weechat uses asciidoctor with the pygments highlighter. Adding `python3` to `pygments.rb`'s `buildInputs` fixes it. --- pkgs/applications/networking/irc/weechat/default.nix | 2 +- pkgs/development/ruby-modules/gem-config/default.nix | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix index 132504a20e164..7234d92840dca 100644 --- a/pkgs/applications/networking/irc/weechat/default.nix +++ b/pkgs/applications/networking/irc/weechat/default.nix @@ -50,7 +50,7 @@ let cmakeFlags = with lib; [ "-DENABLE_MAN=ON" - "-DENABLE_DOC=OFF" # TODO(@ncfavier): Documentation fails to build, was deactivated to push through security update + "-DENABLE_DOC=ON" "-DENABLE_TESTS=${if enableTests then "ON" else "OFF"}" ] ++ optionals stdenv.isDarwin ["-DICONV_LIBRARY=${libiconv}/lib/libiconv.dylib"] diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 12c24cd99a923..04602329ba617 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -545,6 +545,10 @@ in buildInputs = [ openssl ]; }; + "pygments.rb" = attrs: { + buildInputs = [ python3 ]; + }; + rack = attrs: { meta.mainProgram = "rackup"; }; From 27738d46f7691786b29edeb82c022d91d82311a4 Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Sun, 9 Oct 2022 11:25:05 +0200 Subject: [PATCH 271/318] wavpack: 5.4.0 -> 5.5.0 CVE-2021-44269 --- pkgs/development/libraries/wavpack/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/wavpack/default.nix b/pkgs/development/libraries/wavpack/default.nix index e3527ac32a464..67d8bccf51f04 100644 --- a/pkgs/development/libraries/wavpack/default.nix +++ b/pkgs/development/libraries/wavpack/default.nix @@ -1,19 +1,22 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, libiconv }: +{ lib, stdenv, fetchFromGitHub, gettext, autoreconfHook, libiconv }: stdenv.mkDerivation rec { pname = "wavpack"; - version = "5.4.0"; + version = "5.5.0"; enableParallelBuilding = true; nativeBuildInputs = [ autoreconfHook ]; buildInputs = lib.optional stdenv.isDarwin libiconv; + # autogen.sh:9 + preAutoreconf = "cp ${gettext}/share/gettext/config.rpath ."; + src = fetchFromGitHub { owner = "dbry"; repo = "WavPack"; rev = version; - sha256 = "1b6szk2vmnqnv5w7h8yc1iazjlidlraq1lwjbmc3fi0snbn6qj44"; + hash = "sha256-4QDtLywu0PT+YsMV26M74bL2P7p4s1tk8ZBQtQcubaU="; }; meta = with lib; { From 0c743ca36f22e962e9b7ab85cc10b1339c0a3e1a Mon Sep 17 00:00:00 2001 From: ajs124 Date: Tue, 11 Oct 2022 16:53:28 +0200 Subject: [PATCH 272/318] openssl: 3.0.5 -> 3.0.6 fixes CVE-2022-3358 https://www.openssl.org/news/secadv/20221011.txt --- .../openssl-disable-kernel-detection.patch | 33 ++++++++++--------- .../development/libraries/openssl/default.nix | 10 +++--- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch b/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch index baf162e88d09f..04585565a331a 100644 --- a/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch +++ b/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch @@ -1,22 +1,25 @@ diff --git a/Configure b/Configure -index f0ad787bc4..a48d2008c6 100755 +index a558e5ab1a..9a884f0b0f 100755 --- a/Configure +++ b/Configure -@@ -1688,17 +1688,6 @@ unless ($disabled{devcryptoeng}) { +@@ -1714,20 +1714,6 @@ unless ($disabled{devcryptoeng}) { + unless ($disabled{ktls}) { $config{ktls}=""; - if ($target =~ m/^linux/) { -- my $usr = "/usr/$config{cross_compile_prefix}"; -- chop($usr); -- if ($config{cross_compile_prefix} eq "") { -- $usr = "/usr"; -- } -- my $minver = (4 << 16) + (13 << 8) + 0; -- my @verstr = split(" ",`cat $usr/include/linux/version.h | grep LINUX_VERSION_CODE`); -- -- if ($verstr[2] < $minver) { +- my $cc = $config{CROSS_COMPILE}.$config{CC}; +- if ($target =~ m/^linux/) { +- system("printf '#include \n#include ' | $cc -E - >/dev/null 2>&1"); +- if ($? != 0) { - disable('too-old-kernel', 'ktls'); - } - } elsif ($target =~ m/^BSD/) { - my $cc = $config{CROSS_COMPILE}.$config{CC}; - system("printf '#include \n#include ' | $cc -E - >/dev/null 2>&1"); +- } elsif ($target =~ m/^BSD/) { +- system("printf '#include \n#include ' | $cc -E - >/dev/null 2>&1"); +- if ($? != 0) { +- disable('too-old-freebsd', 'ktls'); +- } +- } else { +- disable('not-linux-or-freebsd', 'ktls'); +- } + } + + push @{$config{openssl_other_defines}}, "OPENSSL_NO_KTLS" if ($disabled{ktls}); diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 78cc680c7be50..af1250af7807a 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -16,14 +16,14 @@ # files. let - common = { version, sha256, patches ? [], withDocs ? false, extraMeta ? {} }: + common = { version, hash, patches ? [], withDocs ? false, extraMeta ? {} }: stdenv.mkDerivation rec { pname = "openssl"; inherit version; src = fetchurl { url = "https://www.openssl.org/source/${pname}-${version}.tar.gz"; - inherit sha256; + inherit hash; }; inherit patches; @@ -214,7 +214,7 @@ in { openssl_1_1 = common rec { version = "1.1.1q"; - sha256 = "sha256-15Oc5hQCnN/wtsIPDi5XAxWKSJpyslB7i9Ub+Mj9EMo="; + hash = "sha256-15Oc5hQCnN/wtsIPDi5XAxWKSJpyslB7i9Ub+Mj9EMo="; patches = [ ./1.1/nix-ssl-cert-file.patch @@ -228,8 +228,8 @@ in { }; openssl_3 = common { - version = "3.0.5"; - sha256 = "sha256-qn2Nm+9xrWUlxVuhHl9Dl4ic5Jwsk0nc6m0+TwsCSno="; + version = "3.0.6"; + hash = "sha256-5KEKKYaUXj8aHy69aKx4BEmhdzuWtqF0/fZQ1ryWEfE="; patches = [ ./3.0/nix-ssl-cert-file.patch From c3ddd95cf24639a6115c7756d78d9946e609e554 Mon Sep 17 00:00:00 2001 From: figsoda Date: Tue, 11 Oct 2022 10:39:00 -0400 Subject: [PATCH 273/318] luarocks{,-nix}: add necessary programs to PATH --- .../tools/misc/luarocks/default.nix | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/pkgs/development/tools/misc/luarocks/default.nix b/pkgs/development/tools/misc/luarocks/default.nix index 01b0f39567eb6..da61e1f8a41d0 100644 --- a/pkgs/development/tools/misc/luarocks/default.nix +++ b/pkgs/development/tools/misc/luarocks/default.nix @@ -1,23 +1,30 @@ -{lib, stdenv, fetchFromGitHub, buildPackages +{ lib +, stdenv +, fetchFromGitHub , fetchpatch -, curl, makeWrapper, which, unzip +, curl +, makeWrapper +, which +, unzip , lua -# for 'luarocks pack' +, file +, nix-prefetch-git + # for 'luarocks pack' , zip , nix-update-script -# some packages need to be compiled with cmake + # some packages need to be compiled with cmake , cmake , installShellFiles }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (self: { pname = "luarocks"; version = "3.9.1"; src = fetchFromGitHub { owner = "luarocks"; repo = "luarocks"; - rev = "v${version}"; + rev = "v${self.version}"; sha256 = "sha256-G6HDap3pspeQtGDBq+ukN7kftDaT/CozMVdYM60F6HI="; }; @@ -67,12 +74,16 @@ stdenv.mkDerivation rec { --suffix LUA_PATH ";" "$(echo "$out"/share/lua/*/)?.lua" \ --suffix LUA_PATH ";" "$(echo "$out"/share/lua/*/)?/init.lua" \ --suffix LUA_CPATH ";" "$(echo "$out"/lib/lua/*/)?.so" \ - --suffix LUA_CPATH ";" "$(echo "$out"/share/lua/*/)?/init.lua" + --suffix LUA_CPATH ";" "$(echo "$out"/share/lua/*/)?/init.lua" \ + --suffix PATH : ${lib.makeBinPath ([ unzip ] ++ + lib.optionals (self.pname == "luarocks-nix") [ file nix-prefetch-git ])} } done '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' - installShellCompletion --cmd luarocks --bash <($out/bin/luarocks completion bash) - installShellCompletion --cmd luarocks --zsh <($out/bin/luarocks completion zsh) + installShellCompletion --cmd luarocks \ + --bash <($out/bin/luarocks completion bash) \ + --fish <($out/bin/luarocks completion fish) \ + --zsh <($out/bin/luarocks completion zsh) ''; propagatedBuildInputs = [ zip unzip cmake ]; @@ -94,15 +105,15 @@ stdenv.mkDerivation rec { passthru = { updateScript = nix-update-script { - attrPath = pname; + attrPath = self.pname; }; }; meta = with lib; { description = "A package manager for Lua"; - license = licenses.mit ; - maintainers = with maintainers; [raskin teto]; + license = licenses.mit; + maintainers = with maintainers; [ raskin teto ]; platforms = platforms.linux ++ platforms.darwin; downloadPage = "http://luarocks.org/releases/"; }; -} +}) From 0bf7095945924617004e34f83c38849eb360b186 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Tue, 11 Oct 2022 17:05:14 +0200 Subject: [PATCH 274/318] openssl: 1.1.1q -> 1.1.1r bugfix release, does not fix any security issues --- pkgs/development/libraries/openssl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 78cc680c7be50..3420cb657e503 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -213,8 +213,8 @@ in { openssl_1_1 = common rec { - version = "1.1.1q"; - sha256 = "sha256-15Oc5hQCnN/wtsIPDi5XAxWKSJpyslB7i9Ub+Mj9EMo="; + version = "1.1.1r"; + sha256 = "sha256-44k1KuPVrk04WXv4pU8dy2+zyLUPT+WKlLsb9/hdgqA="; patches = [ ./1.1/nix-ssl-cert-file.patch From 9247a6667c5e44bcd98f2f4415f0579bd0b1467a Mon Sep 17 00:00:00 2001 From: ajs124 Date: Tue, 11 Oct 2022 20:08:05 +0200 Subject: [PATCH 275/318] Revert "krb5: use openssl_1_1" This reverts commit 498d67e45efa175e324f0811a613f9b6c5a55212. not needed anymore after cfebc8fc6477d65cbb2387a715107a5eae60a298 This way, updating openssl_1_1 shouldn't be a darwin stdenv rebuild anymore. --- pkgs/top-level/all-packages.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 10cd802c22947..b123d2482ae94 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19410,8 +19410,6 @@ with pkgs; krb5 = callPackage ../development/libraries/kerberos/krb5.nix { inherit (buildPackages.darwin) bootstrap_cmds; - # TODO: can be removed once we have 1.20 - openssl = openssl_1_1; }; krb5Full = krb5; libkrb5 = krb5.override { type = "lib"; }; From 071773dc5d995edfc494a4bc46c5526833f12908 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Tue, 11 Oct 2022 22:23:04 +0200 Subject: [PATCH 276/318] ibm-sw-tpm2: 1661 -> 1682 --- pkgs/tools/security/ibm-sw-tpm2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/ibm-sw-tpm2/default.nix b/pkgs/tools/security/ibm-sw-tpm2/default.nix index c5b738678aa2c..92136ba92d575 100644 --- a/pkgs/tools/security/ibm-sw-tpm2/default.nix +++ b/pkgs/tools/security/ibm-sw-tpm2/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "ibm-sw-tpm2"; - version = "1661"; + version = "1682"; src = fetchurl { url = "mirror://sourceforge/ibmswtpm2/ibmtpm${version}.tar.gz"; - sha256 = "sha256-VRRZKK0rJPNL5qDqz5+0kuEODqkZuEKMch+pcOhdYUc="; + hash = "sha256-PLZC+HGheyPVCwRuX5X0ScIodBX8HnrrS9u4kg28s48="; }; patches = [ From c4849d44d40910624f28303b3bb5aa5240500595 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Tue, 11 Oct 2022 22:22:18 +0200 Subject: [PATCH 277/318] Revert "ibm-sw-tpm2: Fix build on RISC-V" This reverts commit 8524b11d557f17e66cd629b1f77527facd7abdf4. --- pkgs/tools/security/ibm-sw-tpm2/default.nix | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pkgs/tools/security/ibm-sw-tpm2/default.nix b/pkgs/tools/security/ibm-sw-tpm2/default.nix index 92136ba92d575..012d492aacad6 100644 --- a/pkgs/tools/security/ibm-sw-tpm2/default.nix +++ b/pkgs/tools/security/ibm-sw-tpm2/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, lib, openssl }: +{ stdenv, fetchurl, lib, openssl }: stdenv.mkDerivation rec { pname = "ibm-sw-tpm2"; @@ -9,15 +9,6 @@ stdenv.mkDerivation rec { hash = "sha256-PLZC+HGheyPVCwRuX5X0ScIodBX8HnrrS9u4kg28s48="; }; - patches = [ - (fetchpatch { - url = "https://github.com/kgoldman/ibmswtpm2/commit/e6684009aff9c1bad38875e3319c2e02ef791424.patch"; - sha256 = "1flzlri807c88agmpb0w8xvh5f16mmqv86xw4ic4z272iynzd40j"; - }) - ]; - - patchFlags = [ "-p2" ]; - buildInputs = [ openssl ]; sourceRoot = "src"; From 3b9c30a8d624b1ecc6d16115a2b8110f96f17e7e Mon Sep 17 00:00:00 2001 From: ajs124 Date: Tue, 11 Oct 2022 22:22:42 +0200 Subject: [PATCH 278/318] Revert "ibm-sw-tpm2: Pin OpenSSL 1.1.1" This reverts commit af91144ef52a2ccb929b7af29cd16a4cf689c5ea. --- pkgs/top-level/all-packages.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 10cd802c22947..9d991b7578a25 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7761,9 +7761,7 @@ with pkgs; jamulus = libsForQt5.callPackage ../applications/audio/jamulus { }; - ibm-sw-tpm2 = callPackage ../tools/security/ibm-sw-tpm2 { - openssl = openssl_1_1; - }; + ibm-sw-tpm2 = callPackage ../tools/security/ibm-sw-tpm2 { }; ibniz = callPackage ../tools/graphics/ibniz { }; From 8a2b098a1b94ed55efd4e627919da7aa89d0af49 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Tue, 11 Oct 2022 22:55:09 +0200 Subject: [PATCH 279/318] tzdata: 2022d -> 2022e https://mm.icann.org/pipermail/tz-announce/2022-October/000074.html --- pkgs/data/misc/tzdata/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/data/misc/tzdata/default.nix b/pkgs/data/misc/tzdata/default.nix index 41004243a5571..68183343cc2ec 100644 --- a/pkgs/data/misc/tzdata/default.nix +++ b/pkgs/data/misc/tzdata/default.nix @@ -2,16 +2,16 @@ stdenv.mkDerivation rec { pname = "tzdata"; - version = "2022d"; + version = "2022e"; srcs = [ (fetchurl { url = "https://data.iana.org/time-zones/releases/tzdata${version}.tar.gz"; - hash = "sha256-bs2+4n+kPc+knz1P2Lsd/vVMkNoavNgsmrzy3E8yHeA="; + hash = "sha256-jeTCaG3OPRqukDBxnmgUkxwhai1eiR7D0zLm9lFq7M0="; }) (fetchurl { url = "https://data.iana.org/time-zones/releases/tzcode${version}.tar.gz"; - hash = "sha256-1kS6D5OImTdOqMtVTjX7SvoPe9e3FsYXd80AUAuHWeA="; + hash = "sha256-1AKAJTmA6JFo5r5CdahSv5UhUk1HaE3jE1uaXKOHcQs="; }) ]; From ee639b42c6003dea2594739b10aaa4f71a9fbc47 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 12 Oct 2022 00:14:00 +0000 Subject: [PATCH 280/318] opencl-headers: 2022.09.23 -> 2022.09.30 --- pkgs/development/libraries/opencl-headers/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/opencl-headers/default.nix b/pkgs/development/libraries/opencl-headers/default.nix index 273cdea6f8c9b..e5300e9731ac2 100644 --- a/pkgs/development/libraries/opencl-headers/default.nix +++ b/pkgs/development/libraries/opencl-headers/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { pname = "opencl-headers"; - version = "2022.09.23"; + version = "2022.09.30"; src = fetchFromGitHub { owner = "KhronosGroup"; repo = "OpenCL-Headers"; rev = "v${version}"; - sha256 = "sha256-kBXkevcapVfpFmI5C77DwULrC8zjcoto+veb49Ksixk="; + sha256 = "sha256-Vbh+bt/g+7glEyqMYCKTANggaIOW/n1L3TaCNouc/28="; }; installPhase = '' From e264d5c77f87b43ffb77afeee7d6b433aefda797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 12 Oct 2022 13:02:23 +0200 Subject: [PATCH 281/318] muse: fixup build after `sord` update --- pkgs/applications/audio/muse/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/audio/muse/default.nix b/pkgs/applications/audio/muse/default.nix index 89ccf00c6d38f..065c943764ea1 100644 --- a/pkgs/applications/audio/muse/default.nix +++ b/pkgs/applications/audio/muse/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchFromGitHub, cmake, pkg-config, qttools, wrapQtAppsHook , alsa-lib, dssi, fluidsynth, ladspaH, lash, libinstpatch, libjack2, liblo -, libsamplerate, libsndfile, lilv, lrdf, lv2, qtsvg, rtaudio, rubberband, sord +, libsamplerate, libsndfile, lilv, lrdf, lv2, qtsvg, rtaudio, rubberband, sord, serd }: stdenv.mkDerivation rec { @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { libsamplerate libsndfile lilv lrdf lv2 qtsvg rtaudio rubberband sord ]; + NIX_CFLAGS_COMPILE = [ "-I${lib.getDev serd}/include/serd-0" ]; + meta = with lib; { homepage = "https://muse-sequencer.github.io/"; description = "MIDI/Audio sequencer with recording and editing capabilities"; From 9d24c1f09e487f6c92c18a0c924948b4c58b80a8 Mon Sep 17 00:00:00 2001 From: Yureka Date: Wed, 12 Oct 2022 20:10:07 +0200 Subject: [PATCH 282/318] linux: XFS_ONLINE_SCRUB=y (#195266) --- 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 3a71563593ef3..0c5cb6b73a5aa 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -411,6 +411,7 @@ let XFS_QUOTA = option yes; XFS_POSIX_ACL = option yes; XFS_RT = option yes; # XFS Realtime subvolume support + XFS_ONLINE_SCRUB = option yes; OCFS2_DEBUG_MASKLOG = option no; From 2aff11165bd2cbf7507a83054b80498921630cff Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 13 Oct 2022 00:00:24 +0000 Subject: [PATCH 283/318] =?UTF-8?q?libxml2:=202.10.0=20=E2=86=92=202.10.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://gitlab.gnome.org/GNOME/libxml2/-/tags/v2.10.1 https://gitlab.gnome.org/GNOME/libxml2/-/tags/v2.10.2 https://gitlab.gnome.org/GNOME/libxml2/-/compare/v2.10.0...v2.10.2 --- pkgs/development/libraries/libxml2/default.nix | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index 474afc4ba6ca2..6764904a5fc8a 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -1,7 +1,6 @@ { stdenv , lib , fetchurl -, fetchpatch , zlib , pkg-config , autoreconfHook @@ -22,7 +21,7 @@ stdenv.mkDerivation rec { pname = "libxml2"; - version = "2.10.0"; + version = "2.10.2"; outputs = [ "bin" "dev" "out" "doc" ] ++ lib.optional pythonSupport "py" @@ -31,7 +30,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "LdMxEOp3hnbeFL6kmZ7hFzxMpV1f8UUryiJOBvAVJZU="; + sha256 = "0kCr5tqcZcsZAN2b86NQHM+Is8Khy5gxfQPyct2lsmU="; }; patches = [ @@ -47,17 +46,6 @@ stdenv.mkDerivation rec { # https://github.com/NixOS/nixpkgs/pull/63174 # https://github.com/NixOS/nixpkgs/pull/72342 ./utf8-xmlErrorFuncHandler.patch - - # Fix PostgreSQL tests - # https://gitlab.gnome.org/GNOME/libxml2/-/issues/397 - (fetchpatch { - url = "https://gitlab.gnome.org/GNOME/libxml2/-/commit/4ad71c2d72beef0d10cf75aa417db10d77846f75.patch"; - sha256 = "gubGDhBhHNYdEty+sFQFd3pSWB9isN5AjD//ksujGQk="; - }) - (fetchpatch { - url = "https://gitlab.gnome.org/GNOME/libxml2/-/commit/5b2d07a72670513e41b481a9d922c983a64027ca.patch"; - sha256 = "7jYvMW6bgImXubbaWpQhrIw3xBBnaNn+iJt3EQiW3yU="; - }) ]; nativeBuildInputs = [ From f32e46451c4d020662eebdb4f26d0ee5d57965a4 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 13 Oct 2022 00:06:46 +0000 Subject: [PATCH 284/318] =?UTF-8?q?libxslt:=201.1.36=20=E2=86=92=201.1.37?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://gitlab.gnome.org/GNOME/libxslt/-/tags/v1.1.37 https://gitlab.gnome.org/GNOME/libxslt/-/compare/v1.1.36...v1.1.37 --- pkgs/development/libraries/libxslt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix index 29c6938911622..ed57ff7cae885 100644 --- a/pkgs/development/libraries/libxslt/default.nix +++ b/pkgs/development/libraries/libxslt/default.nix @@ -16,14 +16,14 @@ stdenv.mkDerivation rec { pname = "libxslt"; - version = "1.1.36"; + version = "1.1.37"; outputs = [ "bin" "dev" "out" "doc" "devdoc" ] ++ lib.optional pythonSupport "py"; outputMan = "bin"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "EoSPCkQI9ltTDTlizZ/2cLaueWGRz+/zdSK1dy3o3I4="; + sha256 = "Oksn3IAnzNYUZyWVAzbx7FIJKPMg8UTrX6eZCuYSOrQ="; }; nativeBuildInputs = [ From 1ee0e58e2285085014e90691d8a3dbfc72066c13 Mon Sep 17 00:00:00 2001 From: misuzu Date: Thu, 13 Oct 2022 15:39:37 +0300 Subject: [PATCH 285/318] xterm: 373 -> 374 --- pkgs/applications/terminal-emulators/xterm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/terminal-emulators/xterm/default.nix b/pkgs/applications/terminal-emulators/xterm/default.nix index 40bab79b89718..c277e241ca303 100644 --- a/pkgs/applications/terminal-emulators/xterm/default.nix +++ b/pkgs/applications/terminal-emulators/xterm/default.nix @@ -4,14 +4,14 @@ stdenv.mkDerivation rec { pname = "xterm"; - version = "373"; + version = "374"; src = fetchurl { urls = [ "ftp://ftp.invisible-island.net/xterm/${pname}-${version}.tgz" "https://invisible-mirror.net/archives/xterm/${pname}-${version}.tgz" ]; - sha256 = "sha256-3rCYlHOmOQi1qNRN/uqDAchxD2zgH7V86MMAAjdXRrY="; + sha256 = "sha256-EdTWJmcNTW17aft0Z+nsIxgX5a0iUC+RZ3aP2IrBvfU="; }; strictDeps = true; From 747e342075228644d57f39fe7e5d7f55c71b780f Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 13 Oct 2022 15:17:51 +0200 Subject: [PATCH 286/318] unbound: 1.16.3 -> 1.17.0 https://lists.nlnetlabs.nl/pipermail/unbound-users/2022-October/007913.html --- pkgs/tools/networking/unbound/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index 5e44eb0dabf58..3e42eaaaaf94a 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -48,11 +48,11 @@ stdenv.mkDerivation rec { pname = "unbound"; - version = "1.16.3"; + version = "1.17.0"; src = fetchurl { url = "https://nlnetlabs.nl/downloads/unbound/unbound-${version}.tar.gz"; - hash = "sha256-6gxmZeLDMlt2nqwd/M1g/hgo1fz2YmUAOezLP2ftso4="; + hash = "sha256-3LyV14kdn5EMZuTtyfHy/eTeou7Bjjr591rtRKAvE0E="; }; outputs = [ "out" "lib" "man" ]; # "dev" would only split ~20 kB From b30d687dd063b7b9737bedcdd45b3e3ee820fe9a Mon Sep 17 00:00:00 2001 From: ajs124 Date: Thu, 13 Oct 2022 18:10:13 +0200 Subject: [PATCH 287/318] Revert "openssl: 1.1.1q -> 1.1.1r" This reverts commit 0bf7095945924617004e34f83c38849eb360b186. https://mta.openssl.org/pipermail/openssl-announce/2022-October/000237.html --- pkgs/development/libraries/openssl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 689f74ee5c517..af1250af7807a 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -213,8 +213,8 @@ in { openssl_1_1 = common rec { - version = "1.1.1r"; - hash = "sha256-44k1KuPVrk04WXv4pU8dy2+zyLUPT+WKlLsb9/hdgqA="; + version = "1.1.1q"; + hash = "sha256-15Oc5hQCnN/wtsIPDi5XAxWKSJpyslB7i9Ub+Mj9EMo="; patches = [ ./1.1/nix-ssl-cert-file.patch From 0755f8c8f8212c5252f075a90062098346ec9f13 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Thu, 13 Oct 2022 18:10:42 +0200 Subject: [PATCH 288/318] Revert "openssl: 3.0.5 -> 3.0.6" This reverts commit 0c743ca36f22e962e9b7ab85cc10b1339c0a3e1a. https://mta.openssl.org/pipermail/openssl-announce/2022-October/000237.html --- .../openssl-disable-kernel-detection.patch | 33 +++++++++---------- .../development/libraries/openssl/default.nix | 10 +++--- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch b/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch index 04585565a331a..baf162e88d09f 100644 --- a/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch +++ b/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch @@ -1,25 +1,22 @@ diff --git a/Configure b/Configure -index a558e5ab1a..9a884f0b0f 100755 +index f0ad787bc4..a48d2008c6 100755 --- a/Configure +++ b/Configure -@@ -1714,20 +1714,6 @@ unless ($disabled{devcryptoeng}) { - +@@ -1688,17 +1688,6 @@ unless ($disabled{devcryptoeng}) { unless ($disabled{ktls}) { $config{ktls}=""; -- my $cc = $config{CROSS_COMPILE}.$config{CC}; -- if ($target =~ m/^linux/) { -- system("printf '#include \n#include ' | $cc -E - >/dev/null 2>&1"); -- if ($? != 0) { -- disable('too-old-kernel', 'ktls'); + if ($target =~ m/^linux/) { +- my $usr = "/usr/$config{cross_compile_prefix}"; +- chop($usr); +- if ($config{cross_compile_prefix} eq "") { +- $usr = "/usr"; - } -- } elsif ($target =~ m/^BSD/) { -- system("printf '#include \n#include ' | $cc -E - >/dev/null 2>&1"); -- if ($? != 0) { -- disable('too-old-freebsd', 'ktls'); +- my $minver = (4 << 16) + (13 << 8) + 0; +- my @verstr = split(" ",`cat $usr/include/linux/version.h | grep LINUX_VERSION_CODE`); +- +- if ($verstr[2] < $minver) { +- disable('too-old-kernel', 'ktls'); - } -- } else { -- disable('not-linux-or-freebsd', 'ktls'); -- } - } - - push @{$config{openssl_other_defines}}, "OPENSSL_NO_KTLS" if ($disabled{ktls}); + } elsif ($target =~ m/^BSD/) { + my $cc = $config{CROSS_COMPILE}.$config{CC}; + system("printf '#include \n#include ' | $cc -E - >/dev/null 2>&1"); diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index af1250af7807a..78cc680c7be50 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -16,14 +16,14 @@ # files. let - common = { version, hash, patches ? [], withDocs ? false, extraMeta ? {} }: + common = { version, sha256, patches ? [], withDocs ? false, extraMeta ? {} }: stdenv.mkDerivation rec { pname = "openssl"; inherit version; src = fetchurl { url = "https://www.openssl.org/source/${pname}-${version}.tar.gz"; - inherit hash; + inherit sha256; }; inherit patches; @@ -214,7 +214,7 @@ in { openssl_1_1 = common rec { version = "1.1.1q"; - hash = "sha256-15Oc5hQCnN/wtsIPDi5XAxWKSJpyslB7i9Ub+Mj9EMo="; + sha256 = "sha256-15Oc5hQCnN/wtsIPDi5XAxWKSJpyslB7i9Ub+Mj9EMo="; patches = [ ./1.1/nix-ssl-cert-file.patch @@ -228,8 +228,8 @@ in { }; openssl_3 = common { - version = "3.0.6"; - hash = "sha256-5KEKKYaUXj8aHy69aKx4BEmhdzuWtqF0/fZQ1ryWEfE="; + version = "3.0.5"; + sha256 = "sha256-qn2Nm+9xrWUlxVuhHl9Dl4ic5Jwsk0nc6m0+TwsCSno="; patches = [ ./3.0/nix-ssl-cert-file.patch From 2acce7dfdcf382757e6fe219e04668e7a63bf48a Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Sun, 11 Sep 2022 21:48:38 +0200 Subject: [PATCH 289/318] vimPlugins: make usage of luaPackages less confusing right now the src is ignored in: ``` lush-nvim = buildNeovimPlugin { pname = "lush.nvim"; version = "2022-08-09"; src = fetchFromGitHub { owner = "rktjmp"; repo = "lush.nvim"; rev = "6b9f399245de7bea8dac2c3bf91096ffdedfcbb7"; sha256 = "0rb77rwmbm438bmbjfk5hwrrcn5sihsa1413bdpc27rw3rrn8v8z"; }; meta.homepage = "https://github.com/rktjmp/lush.nvim/"; }; ``` which is very confusing. With this PR, we correctly override the src and the version of the package. We introduce a rockspecVersion attribute of lua package to be able to still find the rockspec when the "version" field needs to be different than "rockspecVersion". --- .../editors/neovim/build-neovim-plugin.nix | 17 ++++---- pkgs/applications/editors/neovim/utils.nix | 6 +-- .../interpreters/lua-5/build-lua-package.nix | 42 +++++++++---------- .../lua-5/hooks/luarocks-move-data.sh | 2 +- pkgs/top-level/all-packages.nix | 2 +- 5 files changed, 36 insertions(+), 33 deletions(-) diff --git a/pkgs/applications/editors/neovim/build-neovim-plugin.nix b/pkgs/applications/editors/neovim/build-neovim-plugin.nix index f89d36741e943..b99733523b87c 100644 --- a/pkgs/applications/editors/neovim/build-neovim-plugin.nix +++ b/pkgs/applications/editors/neovim/build-neovim-plugin.nix @@ -1,8 +1,6 @@ { lib , stdenv -, buildVimPluginFrom2Nix -, buildLuarocksPackage -, lua51Packages +, lua , toVimPlugin }: let @@ -19,16 +17,21 @@ in , ... }@attrs: let - originalLuaDrv = lua51Packages.${luaAttr}; - luaDrv = lua51Packages.luaLib.overrideLuarocks originalLuaDrv (drv: { + originalLuaDrv = lua.pkgs.${luaAttr}; + + luaDrv = (lua.pkgs.luaLib.overrideLuarocks originalLuaDrv (drv: { extraConfig = '' -- to create a flat hierarchy lua_modules_path = "lua" ''; + })).overrideAttrs (drv: { + version = attrs.version; + rockspecVersion = drv.rockspecVersion; }); - finalDrv = toVimPlugin (luaDrv.overrideAttrs(oa: { + + finalDrv = toVimPlugin (luaDrv.overrideAttrs(oa: attrs // { nativeBuildInputs = oa.nativeBuildInputs or [] ++ [ - lua51Packages.luarocksMoveDataFolder + lua.pkgs.luarocksMoveDataFolder ]; })); in diff --git a/pkgs/applications/editors/neovim/utils.nix b/pkgs/applications/editors/neovim/utils.nix index d5845ac4a66a0..05037eafcb871 100644 --- a/pkgs/applications/editors/neovim/utils.nix +++ b/pkgs/applications/editors/neovim/utils.nix @@ -1,11 +1,11 @@ { lib -, buildLuarocksPackage , callPackage , vimUtils , nodejs , neovim-unwrapped , bundlerEnv , ruby +, lua , python3Packages , writeText , wrapNeovimUnstable @@ -193,7 +193,7 @@ in inherit legacyWrapper; buildNeovimPluginFrom2Nix = callPackage ./build-neovim-plugin.nix { - inherit (vimUtils) buildVimPluginFrom2Nix toVimPlugin; - inherit buildLuarocksPackage; + inherit (vimUtils) toVimPlugin; + inherit lua; }; } diff --git a/pkgs/development/interpreters/lua-5/build-lua-package.nix b/pkgs/development/interpreters/lua-5/build-lua-package.nix index b2f82ddb4694f..d11c0d0f03906 100644 --- a/pkgs/development/interpreters/lua-5/build-lua-package.nix +++ b/pkgs/development/interpreters/lua-5/build-lua-package.nix @@ -8,9 +8,10 @@ , luaLib }: -{ -pname +{ pname , version +# we need rockspecVersion to find the .rockspec even when version changes +, rockspecVersion ? version # by default prefix `name` e.g. "lua5.2-${name}" , namePrefix ? "${lua.pname}${lua.sourceVersion.major}.${lua.sourceVersion.minor}-" @@ -72,7 +73,7 @@ pname # Keep extra attributes from `attrs`, e.g., `patchPhase', etc. let - generatedRockspecFilename = "${rockspecDir}/${pname}-${version}.rockspec"; + generatedRockspecFilename = "${rockspecDir}/${pname}-${rockspecVersion}.rockspec"; # TODO fix warnings "Couldn't load rockspec for ..." during manifest # construction -- from initial investigation, appears it will require @@ -80,20 +81,6 @@ let # luarocks only looks for rockspecs in the default/system tree instead of all # configured trees) luarocks_config = "luarocks-config.lua"; - luarocks_content = let - generatedConfig = luaLib.generateLuarocksConfig { - externalDeps = externalDeps ++ externalDepsGenerated; - inherit extraVariables; - inherit rocksSubdir; - inherit requiredLuaRocks; - }; - in - '' - ${generatedConfig} - ${extraConfig} - ''; - - rocksSubdir = "${attrs.pname}-${version}-rocks"; # Filter out the lua derivation itself from the Lua module dependency # closure, as it doesn't have a rock tree :) @@ -106,15 +93,28 @@ let ); externalDeps' = lib.filter (dep: !lib.isDerivation dep) externalDeps; - luarocksDrv = luaLib.toLuaModule ( lua.stdenv.mkDerivation ( -builtins.removeAttrs attrs ["disabled" "checkInputs" "externalDeps" "extraVariables"] // { + luarocksDrv = luaLib.toLuaModule ( lua.stdenv.mkDerivation (self: let - name = namePrefix + pname + "-" + version; + rocksSubdir = "${self.pname}-${self.version}-rocks"; + luarocks_content = let + generatedConfig = luaLib.generateLuarocksConfig { + externalDeps = externalDeps ++ externalDepsGenerated; + inherit extraVariables rocksSubdir requiredLuaRocks; + }; + in + '' + ${generatedConfig} + ${extraConfig} + ''; + in builtins.removeAttrs attrs ["disabled" "externalDeps" "extraVariables"] // { + + name = namePrefix + pname + "-" + self.version; + inherit rockspecVersion; nativeBuildInputs = [ wrapLua luarocks - ] ++ lib.optionals doCheck ([ luarocksCheckHook ] ++ checkInputs); + ] ++ lib.optionals doCheck ([ luarocksCheckHook ] ++ self.checkInputs); buildInputs = buildInputs ++ (map (d: d.dep) externalDeps'); diff --git a/pkgs/development/interpreters/lua-5/hooks/luarocks-move-data.sh b/pkgs/development/interpreters/lua-5/hooks/luarocks-move-data.sh index f0b56178f01e7..9870c9976eae5 100644 --- a/pkgs/development/interpreters/lua-5/hooks/luarocks-move-data.sh +++ b/pkgs/development/interpreters/lua-5/hooks/luarocks-move-data.sh @@ -5,7 +5,7 @@ echo "Sourcing luarocks-move-data-hook.sh" luarocksMoveDataHook () { echo "Executing luarocksMoveDataHook" if [ -d "$out/$rocksSubdir" ]; then - cp -rfv "$out/$rocksSubdir/$pname/$version/." "$out" + cp -rfv "$out/$rocksSubdir/$pname/$rockspecVersion/." "$out" fi echo "Finished executing luarocksMoveDataHook" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 33730884e91c1..d9794074a6432 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32314,7 +32314,7 @@ with pkgs; }; neovimUtils = callPackage ../applications/editors/neovim/utils.nix { - inherit (lua51Packages) buildLuarocksPackage; + lua = lua5_1; }; neovim = wrapNeovim neovim-unwrapped { }; From 445887f636e75d6d057d8d46980d442d7f1cd02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?PedroHLC=20=E2=98=AD?= Date: Wed, 21 Sep 2022 09:36:02 -0300 Subject: [PATCH 290/318] mesa: 22.1.7 -> 22.2.1 --- .../libraries/mesa/aarch64-darwin.patch | 33 --------------- pkgs/development/libraries/mesa/default.nix | 25 +++-------- ...include-dri-driver-path-in-cache-key.patch | 42 ++++++++----------- .../libraries/mesa/drop-dri2.patch | 40 ------------------ pkgs/development/libraries/mesa/opencl.patch | 9 ++-- 5 files changed, 27 insertions(+), 122 deletions(-) delete mode 100644 pkgs/development/libraries/mesa/aarch64-darwin.patch delete mode 100644 pkgs/development/libraries/mesa/drop-dri2.patch diff --git a/pkgs/development/libraries/mesa/aarch64-darwin.patch b/pkgs/development/libraries/mesa/aarch64-darwin.patch deleted file mode 100644 index e60a4ffa308ad..0000000000000 --- a/pkgs/development/libraries/mesa/aarch64-darwin.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 8ac29b952e638ec1ea8c3734a3b91253e50c336d Mon Sep 17 00:00:00 2001 -From: Jeremy Huddleston Sequoia -Date: Sun, 24 Jan 2021 21:10:29 -0800 -Subject: [PATCH 4/4] Hack to address build failure when using newer macOS SDKs - with older deployment targets - -Signed-off-by: Jeremy Huddleston Sequoia ---- - include/c11/threads_posix.h | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/include/c11/threads_posix.h b/include/c11/threads_posix.h -index 45cb6075e6e..355d725f7da 100644 ---- a/include/c11/threads_posix.h -+++ b/include/c11/threads_posix.h -@@ -382,7 +382,13 @@ tss_set(tss_t key, void *val) - - /*-------------------- 7.25.7 Time functions --------------------*/ - // 7.25.6.1 --#ifndef HAVE_TIMESPEC_GET -+#if !defined(HAVE_TIMESPEC_GET) || defined(__APPLE__) -+ -+#ifdef __APPLE__ -+#include -+#define timespec_get(ts, b) mesa_timespec_get(ts, b) -+#endif -+ - static inline int - timespec_get(struct timespec *ts, int base) - { --- -2.29.2 (Apple Git-129) - diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 65dd547c6ab7a..977a22e004671 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -5,7 +5,7 @@ , llvmPackages, libffi, libomxil-bellagio, libva-minimal , libelf, libvdpau , libglvnd, libunwind -, vulkan-loader +, vulkan-loader, glslang , galliumDrivers ? ["auto"] , vulkanDrivers ? ["auto"] , eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" ] @@ -34,7 +34,7 @@ with lib; let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "22.1.7"; + version = "22.2.1"; branch = versions.major version; self = stdenv.mkDerivation { @@ -43,12 +43,13 @@ self = stdenv.mkDerivation { src = fetchurl { urls = [ + "https://archive.mesa3d.org/mesa-${version}.tar.xz" "https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/mesa-${version}.tar.xz" "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 = "da838eb2cf11d0e08d0e9944f6bd4d96987fdc59ea2856f8c70a31a82b355d89"; + sha256 = "0079beac0a33f45e7e0aec59e6913eafbc4268a3f1e2e330017440494f91b13c"; }; # TODO: @@ -57,25 +58,9 @@ self = stdenv.mkDerivation { patches = [ # fixes pkgsMusl.mesa build ./musl.patch - (fetchpatch { - url = "https://raw.githubusercontent.com/void-linux/void-packages/b9f58f303ae23754c95d5d1fe87a98b5a2d8f271/srcpkgs/mesa/patches/musl-endian.patch"; - hash = "sha256-eRc91qCaFlVzrxFrNUPpAHd1gsqKsLCCN0IW8pBQcqk="; - }) - (fetchpatch { - url = "https://raw.githubusercontent.com/void-linux/void-packages/b9f58f303ae23754c95d5d1fe87a98b5a2d8f271/srcpkgs/mesa/patches/musl-stacksize.patch"; - hash = "sha256-bEp0AWddsw1Pc3rxdKN8fsrX4x2TQEzMUa5afhLXGsg="; - }) ./opencl.patch ./disk_cache-include-dri-driver-path-in-cache-key.patch - ] ++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ - # Fix aarch64-darwin build, remove when upstreaam supports it out of the box. - # See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1020 - ./aarch64-darwin.patch - ] ++ optionals stdenv.isDarwin [ - # 22.1 on darwin won't build: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6519 - # (already in-tree for 22.2) - ./drop-dri2.patch ]; postPatch = '' @@ -153,7 +138,7 @@ self = stdenv.mkDerivation { meson pkg-config ninja intltool bison flex file python3Packages.python python3Packages.Mako - jdupes + jdupes glslang ] ++ lib.optionals (elem "wayland" eglPlatforms) [ wayland-scanner ]; diff --git a/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch b/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch index fa78f4ae730ad..445f26c6bd109 100644 --- a/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch +++ b/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch @@ -1,21 +1,16 @@ -From 980164fd92f5c2302624cd046d30ff21e6e4ba8a Mon Sep 17 00:00:00 2001 -From: David McFarland -Date: Mon, 6 Aug 2018 15:52:11 -0300 -Subject: [PATCH] disk_cache: include dri driver path in cache key +Author: David McFarland +Date: Mon Aug 6 15:52:11 2018 -0300 -This fixes invalid cache hits on NixOS where all shared library -timestamps in /nix/store are zero. ---- - meson_options.txt | 6 ++++++ - src/util/disk_cache.c | 3 +++ - src/util/meson.build | 7 ++++++- - 3 files changed, 15 insertions(+), 1 deletion(-) + [PATCH] disk_cache: include dri driver path in cache key + + This fixes invalid cache hits on NixOS where all shared library + timestamps in /nix/store are zero. diff --git a/meson_options.txt b/meson_options.txt -index 2d39d13b6ad..daf06480a60 100644 +index b8f753e2e1a..70d9071c8be 100644 --- a/meson_options.txt +++ b/meson_options.txt -@@ -368,6 +368,12 @@ option( +@@ -452,6 +452,12 @@ option( value : true, description : 'Enable direct rendering in GLX and EGL for DRI', ) @@ -25,14 +20,14 @@ index 2d39d13b6ad..daf06480a60 100644 + value : '', + description : 'Mesa cache key.' +) - option( - 'prefer-iris', - type : 'boolean', + option('egl-lib-suffix', + type : 'string', + value : '', diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c -index a92d621927a..3bd65c6890c 100644 +index 8dbe0938d11..498fe42de70 100644 --- a/src/util/disk_cache.c +++ b/src/util/disk_cache.c -@@ -401,8 +401,10 @@ disk_cache_create(const char *gpu_name, const char *driver_id, +@@ -194,8 +194,10 @@ disk_cache_create(const char *gpu_name, const char *driver_id, /* Create driver id keys */ size_t id_size = strlen(driver_id) + 1; @@ -43,7 +38,7 @@ index a92d621927a..3bd65c6890c 100644 cache->driver_keys_blob_size += gpu_name_size; /* We sometimes store entire structs that contains a pointers in the cache, -@@ -423,6 +425,7 @@ disk_cache_create(const char *gpu_name, const char *driver_id, +@@ -216,6 +218,7 @@ disk_cache_create(const char *gpu_name, const char *driver_id, uint8_t *drv_key_blob = cache->driver_keys_blob; DRV_KEY_CPY(drv_key_blob, &cache_version, cv_size) DRV_KEY_CPY(drv_key_blob, driver_id, id_size) @@ -52,13 +47,13 @@ index a92d621927a..3bd65c6890c 100644 DRV_KEY_CPY(drv_key_blob, &ptr_size, ptr_size_size) DRV_KEY_CPY(drv_key_blob, &driver_flags, driver_flags_size) diff --git a/src/util/meson.build b/src/util/meson.build -index 0893f64793b..d46ce85a85f 100644 +index cd44e49bfb4..f17115515a5 100644 --- a/src/util/meson.build +++ b/src/util/meson.build -@@ -179,7 +179,12 @@ _libmesa_util = static_library( +@@ -268,7 +268,12 @@ _libmesa_util = static_library( include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], dependencies : deps_for_libmesa_util, - link_with: libmesa_format, + link_with: [libmesa_format, libmesa_util_sse41], - c_args : [c_msvc_compat_args], + c_args : [ + c_msvc_compat_args, @@ -69,6 +64,3 @@ index 0893f64793b..d46ce85a85f 100644 gnu_symbol_visibility : 'hidden', build_by_default : false ) --- -2.28.0 - diff --git a/pkgs/development/libraries/mesa/drop-dri2.patch b/pkgs/development/libraries/mesa/drop-dri2.patch deleted file mode 100644 index 8c2b85a55aae9..0000000000000 --- a/pkgs/development/libraries/mesa/drop-dri2.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/a/src/gallium/frontends/dri/dri_util.c b/b/src/gallium/frontends/dri/dri_util.c -index 8d60526..782360d 100644 ---- a/src/gallium/frontends/dri/dri_util.c -+++ b/src/gallium/frontends/dri/dri_util.c -@@ -808,35 +808,6 @@ const __DRIcoreExtension driCoreExtension = { - .unbindContext = driUnbindContext - }; - --/** DRI2 interface */ --const __DRIdri2Extension driDRI2Extension = { -- .base = { __DRI_DRI2, 4 }, -- -- .createNewScreen = dri2CreateNewScreen, -- .createNewDrawable = driCreateNewDrawable, -- .createNewContext = driCreateNewContext, -- .getAPIMask = driGetAPIMask, -- .createNewContextForAPI = driCreateNewContextForAPI, -- .allocateBuffer = dri2AllocateBuffer, -- .releaseBuffer = dri2ReleaseBuffer, -- .createContextAttribs = driCreateContextAttribs, -- .createNewScreen2 = driCreateNewScreen2, --}; -- --const __DRIdri2Extension swkmsDRI2Extension = { -- .base = { __DRI_DRI2, 4 }, -- -- .createNewScreen = swkmsCreateNewScreen, -- .createNewDrawable = driCreateNewDrawable, -- .createNewContext = driCreateNewContext, -- .getAPIMask = driGetAPIMask, -- .createNewContextForAPI = driCreateNewContextForAPI, -- .allocateBuffer = dri2AllocateBuffer, -- .releaseBuffer = dri2ReleaseBuffer, -- .createContextAttribs = driCreateContextAttribs, -- .createNewScreen2 = driCreateNewScreen2, --}; -- - const __DRIswrastExtension driSWRastExtension = { - .base = { __DRI_SWRAST, 4 }, - diff --git a/pkgs/development/libraries/mesa/opencl.patch b/pkgs/development/libraries/mesa/opencl.patch index ce6e3d575085b..d220239770d58 100644 --- a/pkgs/development/libraries/mesa/opencl.patch +++ b/pkgs/development/libraries/mesa/opencl.patch @@ -1,5 +1,5 @@ diff --git a/meson_options.txt b/meson_options.txt -index a7030aba31e..1d2d8814992 100644 +index b8f753e2e1a..2163e3ab7ee 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -18,6 +18,12 @@ @@ -16,7 +16,7 @@ index a7030aba31e..1d2d8814992 100644 'platforms', type : 'array', diff --git a/src/gallium/targets/opencl/meson.build b/src/gallium/targets/opencl/meson.build -index b77826b6e1e..14fa9ba7177 100644 +index 14df6b86f7f..adcd5110342 100644 --- a/src/gallium/targets/opencl/meson.build +++ b/src/gallium/targets/opencl/meson.build @@ -30,6 +30,7 @@ if with_ld_version_script @@ -60,11 +60,12 @@ index b77826b6e1e..14fa9ba7177 100644 polly_dep, polly_isl_dep, ] # check clang once more -@@ -120,6 +121,6 @@ if with_opencl_icd +@@ -112,7 +113,7 @@ if with_opencl_icd input : 'mesa.icd.in', output : 'mesa.icd', install : true, - install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'), + install_dir : join_paths(get_option('prefix'), 'etc', 'OpenCL', 'vendors'), ) - endif + + if meson.version().version_compare('>= 0.58') From b4b99f16da93514101caf5104644dc6456510bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?PedroHLC=20=E2=98=AD?= Date: Thu, 13 Oct 2022 15:55:51 -0300 Subject: [PATCH 291/318] mesa: re-enable video-codecs The release disables some codecs https://gitlab.freedesktop.org/mesa/mesa/-/commit/7d969fe9e91e39e03041cdfac69bf33337bc2c96. Since we are not Fedora, we should probably enable them https://lists.fedoraproject.org/archives/list/legal@lists.fedoraproject.org/thread/M4LTGLHY5JX42IHC45WNWB5FH2JIFMAS/. --- pkgs/development/libraries/mesa/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 977a22e004671..0fbc3f0c2164c 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -14,6 +14,7 @@ , enableGalliumNine ? stdenv.isLinux , enableOSMesa ? stdenv.isLinux , enableOpenCL ? stdenv.isLinux && stdenv.isx86_64 +, enablePatentEncumberedCodecs ? true , libclc , jdupes }: @@ -117,7 +118,8 @@ self = stdenv.mkDerivation { ] ++ optionals enableOpenCL [ "-Dgallium-opencl=icd" # Enable the gallium OpenCL frontend "-Dclang-libdir=${llvmPackages.clang-unwrapped.lib}/lib" - ]; + ] ++ optional enablePatentEncumberedCodecs + "-Dvideo-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec"; buildInputs = with xorg; [ expat llvmPackages.libllvm libglvnd xorgproto From e0d89909382d30d5d631969280f25b60562cfa5f Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 13 Sep 2022 17:51:32 -0700 Subject: [PATCH 292/318] c-ares: add cmake to default, c-aresMinimal: init --- pkgs/development/libraries/c-ares/default.nix | 16 +++++++++++++++- pkgs/development/libraries/nghttp2/default.nix | 4 ++-- pkgs/tools/networking/curl/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 8 +++++++- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/c-ares/default.nix b/pkgs/development/libraries/c-ares/default.nix index a5a41813bc3e7..9ea2aafd0693b 100644 --- a/pkgs/development/libraries/c-ares/default.nix +++ b/pkgs/development/libraries/c-ares/default.nix @@ -1,4 +1,7 @@ -{ lib, stdenv, fetchurl, writeTextDir }: +{ lib, stdenv, fetchurl, writeTextDir +, fetchpatch +, withCMake ? true, cmake +}: # Note: this package is used for bootstrapping fetchurl, and thus # cannot use fetchpatch! All mutable patches (generated by GitHub or @@ -15,6 +18,17 @@ stdenv.mkDerivation rec { sha256 = "sha256-Gn1SqKhKn7/7G+kTPA9uFyF9kepab6Yfa0cpzaeOu88="; }; + # c-ares is used for fetchpatch, so avoid using it for c-aresMinimal + patches = lib.optionals withCMake [ + # fix .pc paths created by cmake build + (fetchpatch { + url = "https://github.com/jonringer/c-ares/commit/9806a8a2f999a8a3efa3c893f2854dce6919d5bb.patch"; + sha256 = "sha256-nh/ZKdan2/FTrouApRQA7O8KGZrLEUuWhxGOktiiGwU="; + }) + ]; + + nativeBuildInputs = lib.optionals withCMake [ cmake ]; + enableParallelBuilding = true; meta = with lib; { diff --git a/pkgs/development/libraries/nghttp2/default.nix b/pkgs/development/libraries/nghttp2/default.nix index 6d28b79565e7f..8e3264dcbc510 100644 --- a/pkgs/development/libraries/nghttp2/default.nix +++ b/pkgs/development/libraries/nghttp2/default.nix @@ -6,7 +6,7 @@ # Optional dependencies , enableApp ? with stdenv.hostPlatform; !isWindows && !isStatic -, c-ares, libev, openssl, zlib +, c-aresMinimal, libev, openssl, zlib , enableAsioLib ? false, boost , enableGetAssets ? false, libxml2 , enableHpack ? false, jansson @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { ++ lib.optionals (enableApp) [ installShellFiles ] ++ lib.optionals (enablePython) [ python3Packages.cython ]; - buildInputs = lib.optionals enableApp [ c-ares libev openssl zlib ] + buildInputs = lib.optionals enableApp [ c-aresMinimal libev openssl zlib ] ++ lib.optionals (enableAsioLib) [ boost ] ++ lib.optionals (enableGetAssets) [ libxml2 ] ++ lib.optionals (enableHpack) [ jansson ] diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 07b9e58589a01..32d2fbb62de01 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, pkg-config, perl, nixosTests , brotliSupport ? false, brotli -, c-aresSupport ? false, c-ares +, c-aresSupport ? false, c-aresMinimal , gnutlsSupport ? false, gnutls , gsaslSupport ? false, gsasl , gssSupport ? with stdenv.hostPlatform; ( @@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: { # applications that use Curl. propagatedBuildInputs = with lib; optional brotliSupport brotli ++ - optional c-aresSupport c-ares ++ + optional c-aresSupport c-aresMinimal ++ optional gnutlsSupport gnutls ++ optional gsaslSupport gsasl ++ optional gssSupport libkrb5 ++ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 33730884e91c1..6336efbb09d3d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18032,7 +18032,13 @@ with pkgs; bzrtp = callPackage ../development/libraries/bzrtp { }; - c-ares = callPackage ../development/libraries/c-ares { }; + c-ares = callPackage ../development/libraries/c-ares { + inherit (buildPackages) cmake; + }; + + c-aresMinimal = callPackage ../development/libraries/c-ares { + withCMake = false; + }; c-blosc = callPackage ../development/libraries/c-blosc { }; From 4250a64798a900f66f5677a18535213ebdad118e Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 13 Sep 2022 17:52:26 -0700 Subject: [PATCH 293/318] c-ares: add dev output --- pkgs/development/libraries/c-ares/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/c-ares/default.nix b/pkgs/development/libraries/c-ares/default.nix index 9ea2aafd0693b..a7538a2615dde 100644 --- a/pkgs/development/libraries/c-ares/default.nix +++ b/pkgs/development/libraries/c-ares/default.nix @@ -12,6 +12,7 @@ let self = stdenv.mkDerivation rec { pname = "c-ares"; version = "1.18.1"; + outputs = [ "out" "dev" ]; src = fetchurl { url = "https://c-ares.haxx.se/download/${pname}-${version}.tar.gz"; From 74f7adf0be941e8e126532e1cc6f5202f7278c60 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 13 Sep 2022 17:52:45 -0700 Subject: [PATCH 294/318] c-ares: remove passthru.cmake-config --- pkgs/development/libraries/c-ares/default.nix | 31 +------------------ pkgs/development/libraries/grpc/default.nix | 2 +- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/pkgs/development/libraries/c-ares/default.nix b/pkgs/development/libraries/c-ares/default.nix index a7538a2615dde..23229fd3a1f8c 100644 --- a/pkgs/development/libraries/c-ares/default.nix +++ b/pkgs/development/libraries/c-ares/default.nix @@ -8,7 +8,6 @@ # cgit) that are needed here should be included directly in Nixpkgs as # files. -let self = stdenv.mkDerivation rec { pname = "c-ares"; version = "1.18.1"; @@ -38,32 +37,4 @@ stdenv.mkDerivation rec { license = licenses.mit; platforms = platforms.all; }; - - # Adapted from running a cmake build - passthru.cmake-config = let - extension = if stdenv.hostPlatform.isStatic then ".a" else stdenv.hostPlatform.extensions.sharedLibrary; - buildType = if stdenv.hostPlatform.isStatic then "STATIC" else "SHARED"; - buildTypeLower = if stdenv.hostPlatform.isStatic then "static" else "shared"; - in writeTextDir "c-ares-config.cmake" - '' - set(c-ares_INCLUDE_DIR "${self}/include") - - set(c-ares_LIBRARY c-ares::cares) - - add_library(c-ares::cares ${buildType} IMPORTED) - - set_target_properties(c-ares::cares PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${self}/include" - ${lib.optionalString stdenv.isLinux ''INTERFACE_LINK_LIBRARIES "nsl;rt"''} - ) - set_property(TARGET c-ares::cares APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(c-ares::cares PROPERTIES - IMPORTED_LOCATION_RELEASE "${self}/lib/libcares${extension}" - IMPORTED_SONAME_RELEASE "libcares${extension}" - ) - add_library(c-ares::cares_${buildTypeLower} INTERFACE IMPORTED) - set_target_properties(c-ares::cares_${buildTypeLower} PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares") - set(c-ares_${buildType}_LIBRARY c-ares::cares_${buildTypeLower}) - ''; - -}; in self +} diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index 4cba9c1b511b8..d44b85337ddcd 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) grpc; propagatedBuildInputs = [ c-ares re2 zlib abseil-cpp ]; - buildInputs = [ c-ares.cmake-config openssl protobuf ] + buildInputs = [ openssl protobuf ] ++ lib.optionals stdenv.isLinux [ libnsl ]; cmakeFlags = [ From fe2ffdcc5e8ad5ead79f1d65b7ce3229b6a0e78b Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Thu, 13 Oct 2022 13:00:09 -0700 Subject: [PATCH 295/318] c-ares: add downstream tests --- pkgs/development/libraries/c-ares/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/c-ares/default.nix b/pkgs/development/libraries/c-ares/default.nix index 23229fd3a1f8c..42023990c9e1e 100644 --- a/pkgs/development/libraries/c-ares/default.nix +++ b/pkgs/development/libraries/c-ares/default.nix @@ -1,6 +1,10 @@ { lib, stdenv, fetchurl, writeTextDir , fetchpatch , withCMake ? true, cmake + +# sensitive downstream packages +, curl +, grpc # consumes cmake config }: # Note: this package is used for bootstrapping fetchurl, and thus @@ -31,6 +35,10 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + passthru.tests = { + inherit curl grpc; + }; + meta = with lib; { description = "A C library for asynchronous DNS requests"; homepage = "https://c-ares.haxx.se"; From 58e3121fbd6cd692a192e6b673d7e49171b1cb4b Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Thu, 13 Oct 2022 22:35:23 +0200 Subject: [PATCH 296/318] speex: 1.2.0 -> 1.2.1 https://github.com/xiph/speex/releases/tag/Speex-1.2.1 --- pkgs/development/libraries/speex/default.nix | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/speex/default.nix b/pkgs/development/libraries/speex/default.nix index 5509be7822d7e..cc7f8abd670e8 100644 --- a/pkgs/development/libraries/speex/default.nix +++ b/pkgs/development/libraries/speex/default.nix @@ -1,26 +1,18 @@ -{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, pkg-config, fftw, speexdsp }: +{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, fftw, speexdsp }: stdenv.mkDerivation rec { pname = "speex"; - version = "1.2.0"; + version = "1.2.1"; src = fetchurl { url = "http://downloads.us.xiph.org/releases/speex/speex-${version}.tar.gz"; - sha256 = "150047wnllz4r94whb9r73l5qf0z5z3rlhy98bawfbblmkq8mbpa"; + sha256 = "sha256-S0TU8rOKNwotmKeDKf78VqDPk9HBvnACkhe6rmYo/uo="; }; postPatch = '' sed -i '/AC_CONFIG_MACRO_DIR/i PKG_PROG_PKG_CONFIG' configure.ac ''; - patches = [ - (fetchpatch { - name = "CVE-2020-23903.patch"; - url = "https://github.com/xiph/speex/commit/870ff845b32f314aec0036641ffe18aba4916887.patch"; - sha256 = "sha256-uEMDhDTw/LIWNPPCXW6kF+udBmNO88G/jJTojAA9fs8="; - }) - ]; - outputs = [ "out" "dev" "doc" ]; nativeBuildInputs = [ autoreconfHook pkg-config ]; From 8ec485f5142d9502e080e0318dba84e0a46f3f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 13 Oct 2022 20:01:53 +0200 Subject: [PATCH 297/318] libksba: 1.6.0 -> 1.6.2 Close #192215 Noteworthy changes in version 1.6.2 (2022-10-07) [C22/A14/R2] ------------------------------------------------ * Fix integer overflow in the CRL parser. [rK4b7d9cd4a0] Release-info: https://dev.gnupg.org/T6230 Noteworthy changes in version 1.6.1 (2022-09-16) [C22/A14/R1] ------------------------------------------------ * Allow an OCSP server not to return the sent nonce. [rK24992a4a7a] Release-info: https://dev.gnupg.org/T6210 --- pkgs/development/libraries/libksba/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libksba/default.nix b/pkgs/development/libraries/libksba/default.nix index e6fb5162b7a69..5bfb0d029cdf9 100644 --- a/pkgs/development/libraries/libksba/default.nix +++ b/pkgs/development/libraries/libksba/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "libksba"; - version = "1.6.0"; + version = "1.6.2"; src = fetchurl { url = "mirror://gnupg/libksba/libksba-${version}.tar.bz2"; - sha256 = "sha256-2taD5vLZFdiAqkvtXOqaEVaQuJNbeKG74BZpGJMHpIs="; + sha256 = "fce01ccac59812bddadffacff017dac2e4762bdb6ebc6ffe06f6ed4f6192c971"; }; outputs = [ "out" "dev" "info" ]; From 28d31e8fbb2cdf56c9a1f79dbfd05edd13aed94a Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 14 Oct 2022 02:00:16 +0200 Subject: [PATCH 298/318] python3Packages.pytz-deprecation-shim: Disable failing test --- .../python-modules/pytz-deprecation-shim/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/pytz-deprecation-shim/default.nix b/pkgs/development/python-modules/pytz-deprecation-shim/default.nix index e438936f7e496..6ea1c2c8f2e03 100644 --- a/pkgs/development/python-modules/pytz-deprecation-shim/default.nix +++ b/pkgs/development/python-modules/pytz-deprecation-shim/default.nix @@ -43,6 +43,10 @@ buildPythonPackage rec { # https://github.com/pganssle/pytz-deprecation-shim/issues/27 doCheck = pythonAtLeast "3.9"; + disabledTests = [ + "test_localize_explicit_is_dst" + ]; + meta = with lib; { description = "Shims to make deprecation of pytz easier"; homepage = "https://github.com/pganssle/pytz-deprecation-shim"; From d700d8e8a26427388cbe59149232ee104cf36644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 14 Oct 2022 09:33:15 +0200 Subject: [PATCH 299/318] stdenv cc-wrapper: revert a problematic change for non-Linux The change from 0bea4a194f71 (PR #191724) broke stdenv bootstap on *-darwin, and I didn't want to drop the *-linux binaries that we have already. --- pkgs/build-support/cc-wrapper/default.nix | 4 +- .../cc-wrapper/setup-hook-nonlinux.sh | 120 ++++++++++++++++++ 2 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 pkgs/build-support/cc-wrapper/setup-hook-nonlinux.sh diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 14cd1d4313916..f199b1d7e2476 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -274,7 +274,9 @@ stdenv.mkDerivation { setupHooks = [ ../setup-hooks/role.bash - ] ++ lib.optional (cc.langC or true) ./setup-hook.sh + ] ++ lib.optional (cc.langC or true) + # Temporary hack; see https://github.com/NixOS/nixpkgs/pull/191724#issuecomment-1278602576 + (if stdenv.isLinux then ./setup-hook.sh else ./setup-hook-nonlinux.sh) ++ lib.optional (cc.langFortran or false) ./fortran-hook.sh; postFixup = diff --git a/pkgs/build-support/cc-wrapper/setup-hook-nonlinux.sh b/pkgs/build-support/cc-wrapper/setup-hook-nonlinux.sh new file mode 100644 index 0000000000000..6a913cc4eac72 --- /dev/null +++ b/pkgs/build-support/cc-wrapper/setup-hook-nonlinux.sh @@ -0,0 +1,120 @@ +# CC Wrapper hygiene +# +# For at least cross compilation, we need to depend on multiple cc-wrappers at +# once---specifically up to one per sort of dependency. This follows from having +# different tools targeting different platforms, and different flags for those +# tools. For example: +# +# # Flags for compiling (whether or not linking) C code for the... +# NIX_CFLAGS_COMPILE_FOR_BUILD # ...build platform +# NIX_CFLAGS_COMPILE # ...host platform +# NIX_CFLAGS_COMPILE_FOR_TARGET # ...target platform +# +# Notice that these platforms are the 3 *relative* to the package using +# cc-wrapper, not absolute like `x86_64-pc-linux-gnu`. +# +# The simplest solution would be to have separate cc-wrappers per (3 intended +# use-cases * n absolute concrete platforms). For the use-case axis, we would +# @-splice in 'BUILD_' '' 'TARGET_' to use the write environment variables when +# building the cc-wrapper, and likewise prefix the binaries' names so they didn't +# clobber each other on the PATH. But the need for 3x cc-wrappers, along with +# non-standard name prefixes, is annoying and liable to break packages' build +# systems. +# +# Instead, we opt to have just one cc-wrapper per absolute platform. Matching +# convention, the binaries' names can just be prefixed with their target +# platform. On the other hand, that means packages will depend on not just +# multiple cc-wrappers, but the exact same cc-wrapper derivation multiple ways. +# That means the exact same cc-wrapper derivation must be able to avoid +# conflicting with itself, despite the fact that `setup-hook.sh`, the `addCvars` +# function, and `add-flags.sh` are all communicating with each other with +# environment variables. Yuck. +# +# The basic strategy is: +# +# - Everyone exclusively *adds information* to relative-platform-specific +# environment variables, like `NIX_CFLAGS_COMPILE_FOR_TARGET`, to communicate +# with the wrapped binaries. +# +# - The wrapped binaries will exclusively *read* cc-wrapper-derivation-specific +# environment variables distinguished with with `suffixSalt`, like +# `NIX_CFLAGS_COMPILE_@suffixSalt@`. +# +# - `add-flags`, beyond its old task of reading extra flags stuck inside the +# cc-wrapper derivation, will convert the relative-platform-specific +# variables to cc-wrapper-derivation-specific variables. This conversion is +# the only time all but one of the cc-wrapper-derivation-specific variables +# are set. +# +# This ensures the flow of information is exclusive from +# relative-platform-specific variables to cc-wrapper-derivation-specific +# variables. This allows us to support the general case of a many--many relation +# between relative platforms and cc-wrapper derivations. +# +# For more details, read the individual files where the mechanisms used to +# accomplish this will be individually documented. + +# Skip setup hook if we're neither a build-time dep, nor, temporarily, doing a +# native compile. +# +# TODO(@Ericson2314): No native exception +[[ -z ${strictDeps-} ]] || (( "$hostOffset" < 0 )) || return 0 + +# It's fine that any other cc-wrapper will redefine this. Bash functions close +# over no state, and there's no @-substitutions within, so any redefined +# function is guaranteed to be exactly the same. +ccWrapper_addCVars () { + # See ../setup-hooks/role.bash + local role_post + getHostRoleEnvHook + + if [ -d "$1/include" ]; then + export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include" + fi + + if [ -d "$1/Library/Frameworks" ]; then + export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks" + fi +} + +# See ../setup-hooks/role.bash +getTargetRole +getTargetRoleWrapper + +# We use the `targetOffset` to choose the right env hook to accumulate the right +# sort of deps (those with that offset). +addEnvHooks "$targetOffset" ccWrapper_addCVars + +# Note 1: these come *after* $out in the PATH (see setup.sh). +# Note 2: phase separation makes this look useless to shellcheck. + +# shellcheck disable=SC2157 +if [ -n "@cc@" ]; then + addToSearchPath _PATH @cc@/bin +fi + +# shellcheck disable=SC2157 +if [ -n "@libc_bin@" ]; then + addToSearchPath _PATH @libc_bin@/bin +fi + +# shellcheck disable=SC2157 +if [ -n "@coreutils_bin@" ]; then + addToSearchPath _PATH @coreutils_bin@/bin +fi + +# Export tool environment variables so various build systems use the right ones. + +export NIX_CC${role_post}=@out@ + +export CC${role_post}=@named_cc@ +export CXX${role_post}=@named_cxx@ +export CC${role_post}=@named_cc@ +export CXX${role_post}=@named_cxx@ + +# If unset, assume the default hardening flags. +: ${NIX_HARDENING_ENABLE="fortify stackprotector pic strictoverflow format relro bindnow"} +export NIX_HARDENING_ENABLE + +# No local scope in sourced file +unset -v role_post From f831be559a62a58fe9d2a02ea383894bbc028f10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 14 Oct 2022 10:16:56 +0200 Subject: [PATCH 300/318] bpftools: strip path to the binary from prints Otherwise meson's find_program() can get confused by the output; now in case of systemd build: meson.build:1059:16: ERROR: Invalid version of program, need 'bpftool' ['>= 5.6.0'] found '01'. --- pkgs/os-specific/linux/bpftools/default.nix | 2 ++ .../linux/bpftools/strip-binary-name.patch | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 pkgs/os-specific/linux/bpftools/strip-binary-name.patch diff --git a/pkgs/os-specific/linux/bpftools/default.nix b/pkgs/os-specific/linux/bpftools/default.nix index ec109753c208e..d3bb96afb3e78 100644 --- a/pkgs/os-specific/linux/bpftools/default.nix +++ b/pkgs/os-specific/linux/bpftools/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-xDalSMcxLOb8WjRyy+rYle749ShB++fHH9jki9/isLo="; }; + patches = [ ./strip-binary-name.patch ]; + nativeBuildInputs = [ python3 bison flex ]; buildInputs = (if (lib.versionAtLeast version "5.20") then [ libopcodes libbfd ] diff --git a/pkgs/os-specific/linux/bpftools/strip-binary-name.patch b/pkgs/os-specific/linux/bpftools/strip-binary-name.patch new file mode 100644 index 0000000000000..623e90963bd9b --- /dev/null +++ b/pkgs/os-specific/linux/bpftools/strip-binary-name.patch @@ -0,0 +1,15 @@ +Strip path to the binary from prints. + +I see no sense in including the full path in outputs like bpftool --version +Especially as argv[0] may not include it, based on calling via $PATH or not. +--- a/tools/bpf/bpftool/main.c ++++ b/tools/bpf/bpftool/main.c +@@ -443 +443,7 @@ +- bin_name = argv[0]; ++ /* Strip the path if any. */ ++ const char *bin_name_slash = strrchr(argv[0], '/'); ++ if (bin_name_slash) { ++ bin_name = bin_name_slash + 1; ++ } else { ++ bin_name = argv[0]; ++ } From c2474f9052c1f5bdb38e99b0a5867d4c87e91b2e Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 14 Oct 2022 15:02:44 +0200 Subject: [PATCH 301/318] Revert "modemmanager: fix and re-enable tests" This reverts commit c57078f858bd9df2fbbed1a0908ead7293628759. Modemmanager has started shipping these changes since the 1.18.12 release. https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/blob/1.18.12/NEWS --- pkgs/tools/networking/modemmanager/default.nix | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/pkgs/tools/networking/modemmanager/default.nix b/pkgs/tools/networking/modemmanager/default.nix index b57da7f7ffee2..72d599898e72c 100644 --- a/pkgs/tools/networking/modemmanager/default.nix +++ b/pkgs/tools/networking/modemmanager/default.nix @@ -1,5 +1,4 @@ { lib, stdenv, fetchurl -, fetchpatch , glib, udev, libgudev, polkit, ppp, gettext, pkg-config, python3 , libmbim, libqmi, systemd, vala, gobject-introspection, dbus }: @@ -13,19 +12,6 @@ stdenv.mkDerivation rec { sha256 = "sha256-tGTkkl2VWmyobdCGFudjsmrkbX/Tfb4oFnjjQGWx5DA="; }; - patches = [ - # Fix tests with GLib 2.73.2 - # https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/601 - (fetchpatch { - url = "https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/commit/79a5a4eed2189ea87d25cbe00bc824a2572cad66.patch"; - sha256 = "egGXkCzAMyqPjeO6ro23sdTddTDEGJUkV7rH8sSlSGE="; - }) - (fetchpatch { - url = "https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/commit/51a333cd9a6707de7c623fd4c94cb6032477572f.patch"; - sha256 = "1XyJ0GBmpBRwnsKPI4i/EBrF7W08HelL/PMDwmlQWcw="; - }) - ]; - nativeBuildInputs = [ vala gobject-introspection gettext pkg-config ]; buildInputs = [ glib udev libgudev polkit ppp libmbim libqmi systemd ]; @@ -54,7 +40,9 @@ stdenv.mkDerivation rec { # load libraries from the install path, which doesn't usually exist # when `make check' is run. So to work around that, we run it as an # install check instead, when those paths will have been created. - doInstallCheck = true; + # Failing with GLib 2.73.2 + # https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/601 + doInstallCheck = false; preInstallCheck = '' export G_TEST_DBUS_DAEMON="${dbus.daemon}/bin/dbus-daemon" patchShebangs tools/tests/test-wrapper.sh From d5d94626146cf34b92c3002cccc6554daf3948c9 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 14 Oct 2022 15:12:49 +0200 Subject: [PATCH 302/318] modemmanager: reenable install tests --- pkgs/tools/networking/modemmanager/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/tools/networking/modemmanager/default.nix b/pkgs/tools/networking/modemmanager/default.nix index 72d599898e72c..89ec8508bbfc3 100644 --- a/pkgs/tools/networking/modemmanager/default.nix +++ b/pkgs/tools/networking/modemmanager/default.nix @@ -40,9 +40,7 @@ stdenv.mkDerivation rec { # load libraries from the install path, which doesn't usually exist # when `make check' is run. So to work around that, we run it as an # install check instead, when those paths will have been created. - # Failing with GLib 2.73.2 - # https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/601 - doInstallCheck = false; + doInstallCheck = true; preInstallCheck = '' export G_TEST_DBUS_DAEMON="${dbus.daemon}/bin/dbus-daemon" patchShebangs tools/tests/test-wrapper.sh From 5f2785ce59eb194a8bcf656027ad80a8e5dd7785 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 14 Oct 2022 16:45:06 +0200 Subject: [PATCH 303/318] python3Packages.threadpoolctl: Disable failing tests --- .../python-modules/threadpoolctl/default.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/threadpoolctl/default.nix b/pkgs/development/python-modules/threadpoolctl/default.nix index 3a0b523784a36..c55bb1085309a 100644 --- a/pkgs/development/python-modules/threadpoolctl/default.nix +++ b/pkgs/development/python-modules/threadpoolctl/default.nix @@ -22,11 +22,25 @@ buildPythonPackage rec { sha256 = "sha256-/qt7cgFbvpc1BLZC7a4S0RToqSggKXAqF1Xr6xOqzw8="; }; - checkInputs = [ pytestCheckHook numpy scipy ]; + checkInputs = [ + pytestCheckHook + numpy + scipy + ]; + disabledTests = [ # accepts a limited set of cpu models based on project # developers' hardware "test_architecture" + # https://github.com/joblib/threadpoolctl/issues/128 + "test_threadpool_limits_by_prefix" + "test_controller_info_actualized" + "test_command_line_command_flag" + "test_command_line_import_flag" + ]; + + pythonImportsCheck = [ + "threadpoolctl" ]; meta = with lib; { From a247f35a4a7882dab5fb420c93fb81cc5291a3be Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 14 Oct 2022 17:11:42 +0200 Subject: [PATCH 304/318] python3Packages.poetry-plugin-export: 1.0.6 -> 1.1.2 --- .../python-modules/poetry-plugin-export/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/poetry-plugin-export/default.nix b/pkgs/development/python-modules/poetry-plugin-export/default.nix index bd953fb612782..bbf6013e4fd33 100644 --- a/pkgs/development/python-modules/poetry-plugin-export/default.nix +++ b/pkgs/development/python-modules/poetry-plugin-export/default.nix @@ -6,14 +6,14 @@ buildPythonPackage rec { pname = "poetry-plugin-export"; - version = "1.0.6"; + version = "1.1.2"; format = "pyproject"; src = fetchFromGitHub { owner = "python-poetry"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-wZbXIAGKTvbcYN1Sx9MCPVIiHxHzdpbLOVShHBEWUVU="; + hash = "sha256-+BDBQwYaiddq3OQDHKmLap3ehWJe+Gh5D3TwuNXycjg="; }; postPatch = '' From 844632d2c89f81782a4264bce91a2284db13a557 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 14 Oct 2022 17:23:16 +0200 Subject: [PATCH 305/318] python3Packages.poetry-core: 1.2.0 -> 1.3.2 https://github.com/python-poetry/poetry-core/releases/tag/1.3.0 https://github.com/python-poetry/poetry-core/releases/tag/1.3.1 https://github.com/python-poetry/poetry-core/releases/tag/1.3.2 --- pkgs/development/python-modules/poetry-core/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/poetry-core/default.nix b/pkgs/development/python-modules/poetry-core/default.nix index b009ec945724e..e90529dac6d0b 100644 --- a/pkgs/development/python-modules/poetry-core/default.nix +++ b/pkgs/development/python-modules/poetry-core/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "poetry-core"; - version = "1.2.0"; + version = "1.3.2"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "python-poetry"; repo = pname; rev = version; - hash = "sha256-d/VhnG+6qabgLMb8ki46R9+lpCwZNlS8QpM8u3VYmWs="; + hash = "sha256-3Ryfq0MwrL/mKP8DmkhLOyFlulf3c73z9fFIzMuqOrg="; }; propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ From 35b849d07b6d24e1a48b7ed53db2ef2160d73d5c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 14 Oct 2022 17:25:05 +0200 Subject: [PATCH 306/318] python3Packages.poetry: 1.2.0 -> 1.2.2 https://github.com/python-poetry/poetry/releases/tag/1.2.2 https://github.com/python-poetry/poetry/releases/tag/1.2.1 --- pkgs/development/python-modules/poetry/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/poetry/default.nix b/pkgs/development/python-modules/poetry/default.nix index 3105187c98a71..81766441aaa02 100644 --- a/pkgs/development/python-modules/poetry/default.nix +++ b/pkgs/development/python-modules/poetry/default.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { pname = "poetry"; - version = "1.2.0"; + version = "1.2.2"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -50,7 +50,7 @@ buildPythonPackage rec { owner = "python-poetry"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-+Nsg7oPh9tAHEKt1R9C+nY9UPy+9vbf/+A6vQWgTi+4="; + hash = "sha256-huIjLv1T42HEmePCQNJpKnNxJKdyD9MlEtc2WRPOjRE="; }; postPatch = '' From 53d33caa8c8a571b61e6c1e3271cbd7691187cdb Mon Sep 17 00:00:00 2001 From: Yureka Date: Fri, 14 Oct 2022 19:34:07 +0200 Subject: [PATCH 307/318] systemd: disable portabled on musl --- pkgs/os-specific/linux/systemd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 8c1532c2a7b24..9ccebdff2e063 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -94,7 +94,7 @@ , withOomd ? true , withPCRE2 ? true , withPolkit ? true -, withPortabled ? true +, withPortabled ? !stdenv.hostPlatform.isMusl , withRemote ? !stdenv.hostPlatform.isMusl , withResolved ? true , withShellCompletions ? true From 36bb8d969a76020c156530aed1d3fd1588842036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 15 Oct 2022 09:36:06 +0200 Subject: [PATCH 308/318] libxml2: use older version during stdenv bootstrap on darwin /cc the update PR #195748 --- pkgs/development/libraries/libxml2/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index cf19ec65d0832..ae97292b68307 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -19,9 +19,19 @@ , gnome }: +let + # Newer versions fail with minimal python, probably because + # https://gitlab.gnome.org/GNOME/libxml2/-/commit/b706824b612adb2c8255819c9a55e78b52774a3c + # This case is encountered "temporarily" during stdenv bootstrapping on darwin. + # Beware that the old version has known security issues, so the final set shouldn't use it. + oldVer = python.pname == "python3-minimal"; +in + assert oldVer -> stdenv.isDarwin; # reduce likelihood of using old libxml2 unintentionally + stdenv.mkDerivation rec { pname = "libxml2"; - version = "2.10.2"; + version = if oldVer then "2.10.1" else + "2.10.2"; outputs = [ "bin" "dev" "out" "doc" ] ++ lib.optional pythonSupport "py" @@ -30,7 +40,8 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "0kCr5tqcZcsZAN2b86NQHM+Is8Khy5gxfQPyct2lsmU="; + sha256 = if oldVer then "21a9e13cc7c4717a6c36268d0924f92c3f67a1ece6b7ff9d588958a6db9fb9d8" else + "0kCr5tqcZcsZAN2b86NQHM+Is8Khy5gxfQPyct2lsmU="; }; patches = [ From 017cc2d4b7454b63d68c8fe7a1182753304e6f13 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Sat, 15 Oct 2022 20:19:00 -0700 Subject: [PATCH 309/318] libical: fix tests with 32-bit time_t A test added in the latest version fails with 32-bit time_t. Use the upstream fix until the next version is released. Fixes pkgsi686Linux.libical and dependers, such as lutris --- pkgs/development/libraries/libical/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/libraries/libical/default.nix b/pkgs/development/libraries/libical/default.nix index 4dfb28108743d..3e03d18ced85a 100644 --- a/pkgs/development/libraries/libical/default.nix +++ b/pkgs/development/libraries/libical/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchurl , buildPackages , cmake , glib @@ -74,6 +75,17 @@ stdenv.mkDerivation rec { # Will appear in 3.1.0 # https://github.com/libical/libical/issues/350 ./respect-env-tzdir.patch + + # Fixes tests with 32-bit time_t + # Remove with next version update (v3.0.16+) + (fetchurl { + url = "https://github.com/libical/libical/commit/4adc6f1d2b39a1cc3363b57215e12fa81076498b.patch"; + sha256 = "1k3hav0z86kc1xd1sk23b57aqqjk4gf73574w7f1m66cyz98bxr3"; + }) + (fetchurl { + url = "https://github.com/libical/libical/commit/cce20bd051408b00521385c0bfb616ba068450d3.patch"; + sha256 = "097hqmagl0q5p38r1kvx0592cfac2y7jbdqlis6m8gbs812pbqfc"; + }) ]; # Using install check so we do not have to manually set From 3ec8d0d5586257ddde2f3c528a1bef6932fd3c6a Mon Sep 17 00:00:00 2001 From: Yureka Date: Sun, 16 Oct 2022 12:19:32 +0200 Subject: [PATCH 310/318] gptfdisk: fix runtime problems with popt 1.19 --- pkgs/tools/system/gptfdisk/default.nix | 5 +++++ pkgs/tools/system/gptfdisk/popt-1-19.patch | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/tools/system/gptfdisk/popt-1-19.patch diff --git a/pkgs/tools/system/gptfdisk/default.nix b/pkgs/tools/system/gptfdisk/default.nix index 871d309d53040..436aec4c552f7 100644 --- a/pkgs/tools/system/gptfdisk/default.nix +++ b/pkgs/tools/system/gptfdisk/default.nix @@ -12,6 +12,11 @@ stdenv.mkDerivation rec { }; patches = [ + # issues with popt 1.19 (from upstream but not yet released): + # https://sourceforge.net/p/gptfdisk/code/ci/5d5e76d369a412bfb3d2cebb5fc0a7509cef878d/ + # https://github.com/rpm-software-management/popt/issues/80 + ./popt-1-19.patch + # fix UUID generation (from upstream but not yet released): # https://sourceforge.net/p/gptfdisk/code/ci/6a8416cbd12d55f882bb751993b94f72d338d96f/ # https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1853985.html diff --git a/pkgs/tools/system/gptfdisk/popt-1-19.patch b/pkgs/tools/system/gptfdisk/popt-1-19.patch new file mode 100644 index 0000000000000..ae971362cdd5d --- /dev/null +++ b/pkgs/tools/system/gptfdisk/popt-1-19.patch @@ -0,0 +1,13 @@ +diff --git a/gptcl.cc b/gptcl.cc +index 34c9421..0d578eb 100644 +--- a/gptcl.cc ++++ b/gptcl.cc +@@ -155,7 +155,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { + } // while + + // Assume first non-option argument is the device filename.... +- device = (char*) poptGetArg(poptCon); ++ device = strdup((char*) poptGetArg(poptCon)); + poptResetContext(poptCon); + + if (device != NULL) { From 7993cdf2b1c27787e81be3b1caf23fce03deb97e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 18 Oct 2022 12:43:22 +0200 Subject: [PATCH 311/318] linuxHeaders_5_19: init at 5.19.16 Maybe multiple packages might use this temporarily, e.g. due "flexible array member" errors - consequence of: https://github.com/torvalds/linux/commit/94dfc73e7cf4a31da66b8843f0b9283ddd6b8381 --- pkgs/top-level/all-packages.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c2f77b9c3353b..f9561d5709adc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24894,6 +24894,14 @@ with pkgs; inherit (callPackages ../os-specific/linux/kernel-headers { }) linuxHeaders makeLinuxHeaders; + linuxHeaders_5_19 = linuxHeaders.overrideAttrs (_: rec { + version = "5.19.16"; + src = fetchurl { + url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; + sha256 = "13g0c6ljxk3sd0ja39ndih5vrzp2ssj78qxaf8nswn8hgrkazsx1"; + }; + }); + klibc = callPackage ../os-specific/linux/klibc { }; klibcShrunk = lowPrio (callPackage ../os-specific/linux/klibc/shrunk.nix { }); From 87d9283fb75a5740bbefec3f6d6bfa13f4a3ec5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 18 Oct 2022 12:46:24 +0200 Subject: [PATCH 312/318] python3Packages.torch: fix by using older kernel headers --- pkgs/development/python-modules/torch/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index 672fcf75d3316..2c619f46ac375 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -25,6 +25,8 @@ # ninja (https://ninja-build.org) must be available to run C++ extensions tests, ninja, + linuxHeaders_5_19, + # dependencies for torch.utils.tensorboard pillow, six, future, tensorboard, protobuf, @@ -224,6 +226,7 @@ in buildPythonPackage rec { ] ++ lib.optionals cudaSupport [ cudatoolkit_joined ]; buildInputs = [ blas blas.provider pybind11 ] + ++ [ linuxHeaders_5_19 ] # TMP: avoid "flexible array member" errors for now ++ lib.optionals cudaSupport [ cudnn magma nccl ] ++ lib.optionals stdenv.isLinux [ numactl ] ++ lib.optionals stdenv.isDarwin [ CoreServices libobjc ]; From a25e03e76ae1e0367419db1de009e1139d08de68 Mon Sep 17 00:00:00 2001 From: Yureka Date: Wed, 19 Oct 2022 00:22:54 +0200 Subject: [PATCH 313/318] pkgsMusl.netbsd.install: fix build (#196260) --- pkgs/os-specific/bsd/netbsd/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index c90de5067dc3f..51b6af0da1919 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -297,7 +297,11 @@ in lib.makeScopeWithSplicing mandoc groff rsync ]; skipIncludesPhase = true; - buildInputs = with self; compatIfNeeded; + buildInputs = with self; compatIfNeeded + # fts header is needed. glibc already has this header, but musl doesn't, + # so make sure pkgsMusl.netbsd.install still builds in case you want to + # remove it! + ++ [ fts ]; installPhase = '' runHook preInstall From 1511e469a69848e0a1a1b6ef1584557b30c96ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 18 Oct 2022 12:37:42 +0200 Subject: [PATCH 314/318] virtualbox: 6.1.36 -> 6.1.40 In particular this fixes build of linuxPackages*.virtualbox after updating linuxHeaders to 6.0 --- pkgs/applications/virtualization/virtualbox/default.nix | 4 ++-- pkgs/applications/virtualization/virtualbox/extpack.nix | 2 +- .../virtualization/virtualbox/guest-additions/default.nix | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index 83c48536b3077..d65f101b3774d 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -23,14 +23,14 @@ let buildType = "release"; # Use maintainers/scripts/update.nix to update the version and all related hashes or # change the hashes in extpack.nix and guest-additions/default.nix as well manually. - version = "6.1.36"; + version = "6.1.40"; in stdenv.mkDerivation { pname = "virtualbox"; inherit version; src = fetchurl { url = "https://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}.tar.bz2"; - sha256 = "e47942e42892c13c621869865e2b7b320340154f0fa74ecbdaf18fdaf70ef047"; + sha256 = "bc857555d3e836ad9350a8f7b03bb54d2fdc04dddb2043d09813f4634bca4814"; }; outputs = [ "out" "modsrc" ]; diff --git a/pkgs/applications/virtualization/virtualbox/extpack.nix b/pkgs/applications/virtualization/virtualbox/extpack.nix index 83861e648ceaa..7092ffb33dee4 100644 --- a/pkgs/applications/virtualization/virtualbox/extpack.nix +++ b/pkgs/applications/virtualization/virtualbox/extpack.nix @@ -12,7 +12,7 @@ fetchurl rec { # Manually sha256sum the extensionPack file, must be hex! # Thus do not use `nix-prefetch-url` but instead plain old `sha256sum`. # Checksums can also be found at https://www.virtualbox.org/download/hashes/${version}/SHA256SUMS - let value = "3c84f0177a47a1969aff7c98e01ddceedd50348f56cc52d63f4c2dd38ad2ca75"; + let value = "29cf8410e2514ea4393f63f5e955b8311787873679fc23ae9a897fb70ef3f84a"; in assert (builtins.stringLength value) == 64; value; meta = { diff --git a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix index 75684cb3b99c7..d6531452c760f 100644 --- a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix +++ b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix @@ -23,7 +23,7 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "http://download.virtualbox.org/virtualbox/${version}/VBoxGuestAdditions_${version}.iso"; - sha256 = "c987cdc8c08c579f56d921c85269aeeac3faf636babd01d9461ce579c9362cdd"; + sha256 = "d456c559926f1a8fdd7259056e0a50f12339fd494122cf30db7736e2032970c6"; }; KERN_DIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; From da85286b28f0be9029a514fcba29ee13d9762317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Wed, 19 Oct 2022 22:51:27 +0200 Subject: [PATCH 315/318] rustc: don't strip bootstrap on darwin --- pkgs/development/compilers/rust/binary.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/compilers/rust/binary.nix b/pkgs/development/compilers/rust/binary.nix index 6c3751cbb5757..1de90cdddacfc 100644 --- a/pkgs/development/compilers/rust/binary.nix +++ b/pkgs/development/compilers/rust/binary.nix @@ -52,6 +52,12 @@ rec { # https://github.com/rust-lang/rust/issues/34722#issuecomment-232164943 ''; + # The strip tool in cctools 973.0.1 and up appears to break rlibs in the + # binaries. The lib.rmeta object inside the ar archive should contain an + # .rmeta section, but it is removed. Luckily, this doesn't appear to be an + # issue for Rust builds produced by Nix. + dontStrip = stdenv.isDarwin; + setupHooks = ./setup-hook.sh; }; From b8dfd961548f17d988dba704acb19fe70b3b0d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 20 Oct 2022 09:50:42 +0200 Subject: [PATCH 316/318] openldap: fixup build on *-darwin https://hydra.nixos.org/build/195641103 This essentially partially reverts dd331ad1677. I don't expect issues, as libxcrypt it meant to replace parts dropped from glibc which's never been used on *-darwin anyway. --- pkgs/development/libraries/openldap/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/openldap/default.nix b/pkgs/development/libraries/openldap/default.nix index 64b6c8c234450..97a84356f8181 100644 --- a/pkgs/development/libraries/openldap/default.nix +++ b/pkgs/development/libraries/openldap/default.nix @@ -43,8 +43,8 @@ stdenv.mkDerivation rec { libsodium libtool openssl - libxcrypt ] ++ lib.optionals (stdenv.isLinux) [ + libxcrypt # causes linking issues on *-darwin systemdMinimal ]; From 9cf461a6450a2f741e9066a95f9f163c42960fe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 20 Oct 2022 18:07:15 +0200 Subject: [PATCH 317/318] rr: fix build with new linuxHeaders /cc PR #194199 which updated linuxHeaders --- pkgs/development/tools/analysis/rr/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/analysis/rr/default.nix b/pkgs/development/tools/analysis/rr/default.nix index 733bd2f969c7c..e9437d718cf7a 100644 --- a/pkgs/development/tools/analysis/rr/default.nix +++ b/pkgs/development/tools/analysis/rr/default.nix @@ -1,4 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, cmake, libpfm, zlib, pkg-config, python3Packages, which, procps, gdb, capnproto }: +{ lib, stdenv, fetchFromGitHub, fetchpatch +, cmake, libpfm, zlib, pkg-config, python3Packages, which, procps, gdb, capnproto +}: stdenv.mkDerivation rec { version = "5.6.0"; @@ -11,6 +13,14 @@ stdenv.mkDerivation rec { sha256 = "H39HPkAQGubXVQV3jCpH4Pz+7Q9n03PrS70utk7Tt2k="; }; + patches = [ + (fetchpatch { + name = "fix-flexible-array-member.patch"; + url = "https://github.com/rr-debugger/rr/commit/2979c60ef8bbf7c940afd90172ddc5d8863f766e.diff"; + sha256 = "cmdCJetQr3ELPOyWl37h1fGfG/xvaiJpywxIAnqb5YY="; + }) + ]; + postPatch = '' substituteInPlace src/Command.cc --replace '_BSD_SOURCE' '_DEFAULT_SOURCE' sed '7i#include ' -i src/Scheduler.cc From bb96577b51766adcda5a1ad5c9d3310ae276cc47 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 21 Oct 2022 21:56:52 +0200 Subject: [PATCH 318/318] calibre-web: don't rely on flask_login alias --- pkgs/servers/calibre-web/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/calibre-web/default.nix b/pkgs/servers/calibre-web/default.nix index 91a5e4fdd1c51..50198b3927978 100644 --- a/pkgs/servers/calibre-web/default.nix +++ b/pkgs/servers/calibre-web/default.nix @@ -21,7 +21,7 @@ python3.pkgs.buildPythonApplication rec { backports_abc chardet flask-babel - flask_login + flask-login flask_principal flask-wtf iso-639