From 7bec82f49e00b89a7f0c52e1a0c653138a2a77b1 Mon Sep 17 00:00:00 2001 From: = <=> Date: Mon, 26 Sep 2022 04:27:26 +0800 Subject: [PATCH 001/130] cmake: check if NIX_CC exists before using it --- .../build-managers/cmake/001-search-path.diff | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pkgs/development/tools/build-managers/cmake/001-search-path.diff b/pkgs/development/tools/build-managers/cmake/001-search-path.diff index 607668b13155..0fd8e381186c 100644 --- a/pkgs/development/tools/build-managers/cmake/001-search-path.diff +++ b/pkgs/development/tools/build-managers/cmake/001-search-path.diff @@ -12,7 +12,7 @@ index b9381c3d7d..5e944640b5 100644 # CMake install location "${_CMAKE_INSTALL_DIR}" ) -@@ -47,48 +44,48 @@ endif() +@@ -47,48 +44,50 @@ endif() # Non "standard" but common install prefixes list(APPEND CMAKE_SYSTEM_PREFIX_PATH @@ -22,14 +22,16 @@ index b9381c3d7d..5e944640b5 100644 ) # List common include file locations not under the common prefixes. -+if(IS_DIRECTORY $ENV{NIX_CC} -+ AND EXISTS $ENV{NIX_CC}/nix-support/orig-libc -+ AND EXISTS $ENV{NIX_CC}/nix-support/orig-libc-dev) -+ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc" _nix_cmake_libc) -+ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc-dev" _nix_cmake_libc_dev) -+else() -+ set(_nix_cmake_libc @libc_lib@) -+ set(_nix_cmake_libc_dev @libc_dev@) ++if(DEFINED ENV{NIX_CC}) ++ if(IS_DIRECTORY $ENV{NIX_CC} ++ AND EXISTS $ENV{NIX_CC}/nix-support/orig-libc ++ AND EXISTS $ENV{NIX_CC}/nix-support/orig-libc-dev) ++ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc" _nix_cmake_libc) ++ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc-dev" _nix_cmake_libc_dev) ++ else() ++ set(_nix_cmake_libc @libc_lib@) ++ set(_nix_cmake_libc_dev @libc_dev@) ++ endif() +endif() + list(APPEND CMAKE_SYSTEM_INCLUDE_PATH From 7a9d47dea69555e7e3e7fd45895bd4f35be8e53d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BE=E5=9C=B0=20=E5=B8=8C=E7=95=99=E8=80=B6?= <65301509+KiruyaMomochi@users.noreply.github.com> Date: Sat, 15 Oct 2022 16:09:03 +0800 Subject: [PATCH 002/130] cmake: check for `$ENV{NIX_CC}` with quotes Fixes #194929 --- .../tools/build-managers/cmake/001-search-path.diff | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/build-managers/cmake/001-search-path.diff b/pkgs/development/tools/build-managers/cmake/001-search-path.diff index 0fd8e381186c..8f62da333f0e 100644 --- a/pkgs/development/tools/build-managers/cmake/001-search-path.diff +++ b/pkgs/development/tools/build-managers/cmake/001-search-path.diff @@ -23,9 +23,9 @@ index b9381c3d7d..5e944640b5 100644 # List common include file locations not under the common prefixes. +if(DEFINED ENV{NIX_CC}) -+ if(IS_DIRECTORY $ENV{NIX_CC} -+ AND EXISTS $ENV{NIX_CC}/nix-support/orig-libc -+ AND EXISTS $ENV{NIX_CC}/nix-support/orig-libc-dev) ++ if(IS_DIRECTORY "$ENV{NIX_CC}" ++ AND EXISTS "$ENV{NIX_CC}/nix-support/orig-libc" ++ AND EXISTS "$ENV{NIX_CC}/nix-support/orig-libc-dev") + file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc" _nix_cmake_libc) + file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc-dev" _nix_cmake_libc_dev) + else() From 36ebfaf8938b852423863f37c18602ecc0a550b7 Mon Sep 17 00:00:00 2001 From: Jan Solanti Date: Thu, 20 Oct 2022 03:27:06 +0300 Subject: [PATCH 003/130] libcamera: unstable-2022-09-15 -> 0.0.1 --- pkgs/development/libraries/libcamera/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libcamera/default.nix b/pkgs/development/libraries/libcamera/default.nix index ab2095be8fcd..e64529defa8f 100644 --- a/pkgs/development/libraries/libcamera/default.nix +++ b/pkgs/development/libraries/libcamera/default.nix @@ -19,14 +19,14 @@ , systemd # for libudev }: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "libcamera"; - version = "unstable-2022-09-15"; + version = "0.0.1"; src = fetchgit { url = "https://git.libcamera.org/libcamera/libcamera.git"; - rev = "74ab3f778c848b20cbf8fe299170756ff6ebab1a"; - hash = "sha256-w0I4L6xXTBUdqj30LpVW/KZW6bdoUeoW9lnMOW0OLJY="; + rev = "v${version}"; + hash = "sha256-u5FnfXBCjwSp8QBrH8KIkVGV32/9pff41ZWjWXOwuMI="; }; postPatch = '' From 2610d7dee38c830e297a16ebbd490492f5243a19 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Thu, 15 Sep 2022 17:46:49 -0400 Subject: [PATCH 004/130] libcamera: fix IPA module signatures Nix modifies binaries after they are installed, which results in the wrong signature. There is no easy way to avoid these modifications, so the best fix is to simply regenerate the signatures after the fixup phase. --- pkgs/development/libraries/libcamera/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/libraries/libcamera/default.nix b/pkgs/development/libraries/libcamera/default.nix index ab2095be8fcd..0f465a4de6ed 100644 --- a/pkgs/development/libraries/libcamera/default.nix +++ b/pkgs/development/libraries/libcamera/default.nix @@ -85,6 +85,17 @@ stdenv.mkDerivation { # Silence fontconfig warnings about missing config FONTCONFIG_FILE = makeFontsConf { fontDirectories = []; }; + # libcamera signs the IPA module libraries at install time, but they are then + # modified by stripping and RPATH fixup. Therefore, we need to generate the + # signatures again ourselves. + # + # If this is not done, libcamera will still try to load them, but it will + # isolate them in separate processes, which can cause crashes for IPA modules + # that are not designed for this (notably ipa_rpi.so). + postFixup = '' + ../src/ipa/ipa-sign-install.sh src/ipa-priv-key.pem $out/lib/libcamera/ipa_*.so + ''; + meta = with lib; { description = "An open source camera stack and framework for Linux, Android, and ChromeOS"; homepage = "https://libcamera.org"; From e0c70d5e0fb18605ce70a00eb7f18743a1eee29a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Thu, 20 Oct 2022 12:42:47 +0200 Subject: [PATCH 005/130] stdenvBootstrapTools: fix cycle on aarch64-darwin --- .../compilers/llvm/10/compiler-rt/default.nix | 2 +- .../compilers/llvm/11/compiler-rt/default.nix | 2 +- .../compilers/llvm/12/compiler-rt/default.nix | 2 +- .../compilers/llvm/13/compiler-rt/default.nix | 2 +- .../compilers/llvm/14/compiler-rt/default.nix | 2 +- pkgs/development/tools/xcbuild/wrapper.nix | 18 +++++++++++++----- 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/pkgs/development/compilers/llvm/10/compiler-rt/default.nix b/pkgs/development/compilers/llvm/10/compiler-rt/default.nix index 4ae59a431770..0d5772467be0 100644 --- a/pkgs/development/compilers/llvm/10/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/10/compiler-rt/default.nix @@ -25,7 +25,7 @@ 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) [ + ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [ "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" diff --git a/pkgs/development/compilers/llvm/11/compiler-rt/default.nix b/pkgs/development/compilers/llvm/11/compiler-rt/default.nix index 6790910ee830..54b84fe02b15 100644 --- a/pkgs/development/compilers/llvm/11/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/11/compiler-rt/default.nix @@ -26,7 +26,7 @@ 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) [ + ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [ "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl || isNewDarwinBootstrap) [ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" diff --git a/pkgs/development/compilers/llvm/12/compiler-rt/default.nix b/pkgs/development/compilers/llvm/12/compiler-rt/default.nix index ed34d06ed986..a372030b3f87 100644 --- a/pkgs/development/compilers/llvm/12/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/12/compiler-rt/default.nix @@ -26,7 +26,7 @@ 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) [ + ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [ "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" diff --git a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix index 9124686705ae..798280f0c1c4 100644 --- a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix @@ -28,7 +28,7 @@ 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) [ + ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [ "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl || isAarch64) [ "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF" diff --git a/pkgs/development/compilers/llvm/14/compiler-rt/default.nix b/pkgs/development/compilers/llvm/14/compiler-rt/default.nix index ef2495714e45..669c6bbb9588 100644 --- a/pkgs/development/compilers/llvm/14/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/14/compiler-rt/default.nix @@ -38,7 +38,7 @@ 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) [ + ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [ "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" diff --git a/pkgs/development/tools/xcbuild/wrapper.nix b/pkgs/development/tools/xcbuild/wrapper.nix index cefda47cb5be..2dbea4e3833a 100644 --- a/pkgs/development/tools/xcbuild/wrapper.nix +++ b/pkgs/development/tools/xcbuild/wrapper.nix @@ -1,6 +1,5 @@ -{ lib, stdenv, makeWrapper, writeText, writeShellScriptBin, runCommand +{ lib, stdenv, makeWrapper, writeText, writeTextFile, runCommand, callPackage , CoreServices, ImageIO, CoreGraphics -, runtimeShell, callPackage , xcodePlatform ? stdenv.targetPlatform.xcodePlatform or "MacOSX" , xcodeVer ? stdenv.targetPlatform.xcodeVer or "9.4.1" , sdkVer ? stdenv.targetPlatform.darwinSdkVersion or "10.12" }: @@ -37,7 +36,7 @@ let ''; xcode-select = writeText "xcode-select" '' -#!${runtimeShell} +#!${stdenv.shell} while [ $# -gt 0 ]; do case "$1" in -h | --help) ;; # noop @@ -51,7 +50,12 @@ while [ $# -gt 0 ]; do done ''; - xcrun = writeShellScriptBin "xcrun" '' + xcrun = writeTextFile { + name = "xcrun"; + executable = true; + destination = "/bin/xcrun"; + text = '' +#!${stdenv.shell} args=( "$@" ) # If an SDK was requested, check that it matches. @@ -94,7 +98,11 @@ done if ! [[ -z "$@" ]]; then exec "$@" fi - ''; + ''; + checkPhase = '' + ${stdenv.shellDryRun} "$target" + ''; + }; in From 8fb885a19e05bcdebc0215a85cbd623c4227d25b Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Thu, 20 Oct 2022 20:55:29 -0500 Subject: [PATCH 006/130] qt{5,6}: disable QML disk cache by default Qt QML is a language for designing user interfaces. QML (and related JavaScript) source files are compiled into bytecode at runtime before execution. To save time, this bytecode is cached on disk. The cache is keyed primarily off the application name and mtime of the source file. Since application names rarely change, source files that have passed through the store have their mtimes fixed at 1, and SOURCE_DATE_EPOCH is also set to 1 during builds, compiled bytecode in this cache for Qt programs built by Nix is rarely or never invalidated. This results in programs running with QML bytecode that does not match their source code, which manifests as a constant source of random and unreproducible glitches, oddities, and crashes in Qt applications when they are upgraded. For applications like SDDM and Plasma, the user may be left with a completely broken system, and sometimes even rolling back doesn't fix the issue. This patch resolves the issue by simply patching Qt's QML module in all supported versions to disable the disk cache by default as if the environment variable QML_DISABLE_DISK_CACHE were always 1. Patching the code ensures consistent behavior for all Qt applications in all environments, including non-NixOS uses. Simple benchmarking suggests an approximate 10% CPU time penalty when launching QML-heavy applications, and no measurable penalty to booting into Plasma. This is considerably more benign than the earlier behavior. For testing or the performance conscious, use of the cache can be re-enabled after understanding the risks by setting the environment variable QML_FORCE_DISK_CACHE to 1. This can be done system-wide using e.g. the `environment.sessionVariables` NixOS option. Future work could change the cache key through source code changes or automatic generation of an appropriate SOURCE_DATE_EPOCH. Until then, this is a simple change which removes a large class of user frustration and headache for little penalty. --- .../libraries/qt-5/5.12/default.nix | 6 ++- ...declarative-default-disable-qmlcache.patch | 40 +++++++++++++++++++ .../libraries/qt-5/5.14/default.nix | 6 ++- ...declarative-default-disable-qmlcache.patch | 13 ++++++ .../libraries/qt-5/5.15/default.nix | 6 ++- ...declarative-default-disable-qmlcache.patch | 13 ++++++ .../libraries/qt-6/modules/qtdeclarative.nix | 4 ++ ...declarative-default-disable-qmlcache.patch | 13 ++++++ 8 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/libraries/qt-5/5.12/qtdeclarative-default-disable-qmlcache.patch create mode 100644 pkgs/development/libraries/qt-5/5.14/qtdeclarative-default-disable-qmlcache.patch create mode 100644 pkgs/development/libraries/qt-5/5.15/qtdeclarative-default-disable-qmlcache.patch create mode 100644 pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch diff --git a/pkgs/development/libraries/qt-5/5.12/default.nix b/pkgs/development/libraries/qt-5/5.12/default.nix index 5d7b7202945f..a93c2b67d43f 100644 --- a/pkgs/development/libraries/qt-5/5.12/default.nix +++ b/pkgs/development/libraries/qt-5/5.12/default.nix @@ -81,7 +81,11 @@ let sha256 = "0crkw3j1iwdc1pbf5dhar0b4q3h5gs2q1sika8m12y02yk3ns697"; }) ]; - qtdeclarative = [ ./qtdeclarative.patch ]; + qtdeclarative = [ + ./qtdeclarative.patch + # prevent headaches from stale qmlcache data + ./qtdeclarative-default-disable-qmlcache.patch + ]; qtlocation = [ ./qtlocation-gcc-9.patch ]; qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; diff --git a/pkgs/development/libraries/qt-5/5.12/qtdeclarative-default-disable-qmlcache.patch b/pkgs/development/libraries/qt-5/5.12/qtdeclarative-default-disable-qmlcache.patch new file mode 100644 index 000000000000..e9c3b7e22842 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.12/qtdeclarative-default-disable-qmlcache.patch @@ -0,0 +1,40 @@ +diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp +index 9e5bc0b0..9219def6 100644 +--- a/src/qml/qml/qqmltypeloader.cpp ++++ b/src/qml/qml/qqmltypeloader.cpp +@@ -2151,7 +2151,7 @@ void QQmlTypeData::unregisterCallback(TypeDataCallback *callback) + + bool QQmlTypeData::tryLoadFromDiskCache() + { +- if (disableDiskCache() && !forceDiskCache()) ++ if (!forceDiskCache()) + return false; + + if (isDebugging()) +@@ -2658,7 +2658,7 @@ void QQmlTypeData::compile(const QQmlRefPointer &typeNameCach + return; + } + +- const bool trySaveToDisk = (!disableDiskCache() || forceDiskCache()) && !m_document->jsModule.debugMode && !typeRecompilation; ++ const bool trySaveToDisk = (forceDiskCache()) && !m_document->jsModule.debugMode && !typeRecompilation; + if (trySaveToDisk) { + QString errorString; + if (m_compiledData->saveToDisk(url(), &errorString)) { +@@ -3014,7 +3014,7 @@ QQmlRefPointer QQmlScriptBlob::scriptData() const + + void QQmlScriptBlob::dataReceived(const SourceCodeData &data) + { +- if (!disableDiskCache() || forceDiskCache()) { ++ if (forceDiskCache()) { + QQmlRefPointer unit = QV4::Compiler::Codegen::createUnitForLoading(); + QString error; + if (unit->loadFromDisk(url(), data.sourceTimeStamp(), &error)) { +@@ -3077,7 +3077,7 @@ void QQmlScriptBlob::dataReceived(const SourceCodeData &data) + qmlGenerator.generate(irUnit); + } + +- if ((!disableDiskCache() || forceDiskCache()) && !isDebugging()) { ++ if ((forceDiskCache()) && !isDebugging()) { + QString errorString; + if (unit->saveToDisk(url(), &errorString)) { + QString error; diff --git a/pkgs/development/libraries/qt-5/5.14/default.nix b/pkgs/development/libraries/qt-5/5.14/default.nix index 32630810b49c..808562772f9e 100644 --- a/pkgs/development/libraries/qt-5/5.14/default.nix +++ b/pkgs/development/libraries/qt-5/5.14/default.nix @@ -68,7 +68,11 @@ let ./qtbase.patch.d/0010-qtbase-assert.patch ./qtbase.patch.d/0011-fix-header_module.patch ]; - qtdeclarative = [ ./qtdeclarative.patch ]; + qtdeclarative = [ + ./qtdeclarative.patch + # prevent headaches from stale qmlcache data + ./qtdeclarative-default-disable-qmlcache.patch + ]; qtlocation = [ ./qtlocation-gcc-9.patch ]; qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; diff --git a/pkgs/development/libraries/qt-5/5.14/qtdeclarative-default-disable-qmlcache.patch b/pkgs/development/libraries/qt-5/5.14/qtdeclarative-default-disable-qmlcache.patch new file mode 100644 index 000000000000..8ef5ef53dea3 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.14/qtdeclarative-default-disable-qmlcache.patch @@ -0,0 +1,13 @@ +diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp +index 6c12de92..fc67dc07 100644 +--- a/src/qml/qml/qqmltypeloader.cpp ++++ b/src/qml/qml/qqmltypeloader.cpp +@@ -705,7 +705,7 @@ bool QQmlTypeLoader::Blob::isDebugging() const + + bool QQmlTypeLoader::Blob::diskCacheEnabled() const + { +- return (!disableDiskCache() || forceDiskCache()) && !isDebugging(); ++ return (forceDiskCache()) && !isDebugging(); + } + + bool QQmlTypeLoader::Blob::qmldirDataAvailable(const QQmlRefPointer &data, QList *errors) diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index e3f94ba8ffef..616bf22ff13a 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -56,7 +56,11 @@ let ./qtbase.patch.d/0010-qtbase-assert.patch ./qtbase.patch.d/0011-fix-header_module.patch ]; - qtdeclarative = [ ./qtdeclarative.patch ]; + qtdeclarative = [ + ./qtdeclarative.patch + # prevent headaches from stale qmlcache data + ./qtdeclarative-default-disable-qmlcache.patch + ]; qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; qtwebengine = lib.optionals stdenv.isDarwin [ diff --git a/pkgs/development/libraries/qt-5/5.15/qtdeclarative-default-disable-qmlcache.patch b/pkgs/development/libraries/qt-5/5.15/qtdeclarative-default-disable-qmlcache.patch new file mode 100644 index 000000000000..03668d960c78 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtdeclarative-default-disable-qmlcache.patch @@ -0,0 +1,13 @@ +diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp +index 1d66e75..827567a 100644 +--- a/src/qml/qml/qqmltypeloader.cpp ++++ b/src/qml/qml/qqmltypeloader.cpp +@@ -727,7 +727,7 @@ bool QQmlTypeLoader::Blob::isDebugging() const + + bool QQmlTypeLoader::Blob::diskCacheEnabled() const + { +- return (!disableDiskCache() && !isDebugging()) || forceDiskCache(); ++ return forceDiskCache(); + } + + bool QQmlTypeLoader::Blob::qmldirDataAvailable(const QQmlRefPointer &data, QList *errors) diff --git a/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix b/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix index c8abc71a2235..76231f866efe 100644 --- a/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix +++ b/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix @@ -16,6 +16,10 @@ qtModule { "-DQT6_INSTALL_PREFIX=${placeholder "out"}" "-DQT_INSTALL_PREFIX=${placeholder "out"}" ]; + patches = [ + # prevent headaches from stale qmlcache data + ../patches/qtdeclarative-default-disable-qmlcache.patch + ]; postInstall = '' substituteInPlace "$out/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake" \ --replace ''\'''${QT6_INSTALL_PREFIX}' "$dev" diff --git a/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch b/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch new file mode 100644 index 000000000000..02e578f2d523 --- /dev/null +++ b/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch @@ -0,0 +1,13 @@ +diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp +index 852cde9e..165f1b57 100644 +--- a/src/qml/jsruntime/qv4engine.cpp ++++ b/src/qml/jsruntime/qv4engine.cpp +@@ -2093,7 +2093,7 @@ void ExecutionEngine::registerModule(const QString &_name, const QJSValue &modul + + bool ExecutionEngine::diskCacheEnabled() const + { +- return (!disableDiskCache() && !debugger()) || forceDiskCache(); ++ return forceDiskCache(); + } + + void ExecutionEngine::callInContext(QV4::Function *function, QObject *self, From 39d6cfd68f8bdb531034feaff8e5e95482123642 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Thu, 20 Oct 2022 21:55:12 -0500 Subject: [PATCH 007/130] nixos/sddm: remove stale qmlcache workaround --- .../services/x11/display-managers/sddm.nix | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/nixos/modules/services/x11/display-managers/sddm.nix b/nixos/modules/services/x11/display-managers/sddm.nix index 34239221315d..e86a18ff618e 100644 --- a/nixos/modules/services/x11/display-managers/sddm.nix +++ b/nixos/modules/services/x11/display-managers/sddm.nix @@ -269,20 +269,5 @@ in # To enable user switching, allow sddm to allocate TTYs/displays dynamically. services.xserver.tty = null; services.xserver.display = null; - - systemd.tmpfiles.rules = [ - # Prior to Qt 5.9.2, there is a QML cache invalidation bug which sometimes - # strikes new Plasma 5 releases. If the QML cache is not invalidated, SDDM - # will segfault without explanation. We really tore our hair out for awhile - # before finding the bug: - # https://bugreports.qt.io/browse/QTBUG-62302 - # We work around the problem by deleting the QML cache before startup. - # This was supposedly fixed in Qt 5.9.2 however it has been reported with - # 5.10 and 5.11 as well. The initial workaround was to delete the directory - # in the Xsetup script but that doesn't do anything. - # Instead we use tmpfiles.d to ensure it gets wiped. - # This causes a small but perceptible delay when SDDM starts. - "e ${config.users.users.sddm.home}/.cache - - - 0" - ]; }; } From 04706f6b127d7f48044269f4c985a88870d3006e Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Thu, 20 Oct 2022 22:08:19 -0500 Subject: [PATCH 008/130] release-notes: add info about disabled QML cache --- .../from_md/release-notes/rl-2211.section.xml | 13 +++++++++++++ nixos/doc/manual/release-notes/rl-2211.section.md | 8 ++++++++ 2 files changed, 21 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 8fbe6f7c37b6..341228e43875 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 @@ -937,6 +937,19 @@ Add udev rules for the Teensy family of microcontrollers. + + + The Qt QML disk cache is now disabled by default. This fixes a + long-standing issue where updating Qt/KDE apps would sometimes + cause them to crash or behave strangely without explanation. + Those concerned about the small (~10%) performance hit to + application startup can re-enable the cache (and expose + themselves to gremlins) by setting the envrionment variable + QML_FORCE_DISK_CACHE to + 1 using e.g. the + environment.sessionVariables NixOS option. + + systemd-oomd is enabled by default. Depending on which systemd diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md index 2570167e00ac..ff9400d5d1a7 100644 --- a/nixos/doc/manual/release-notes/rl-2211.section.md +++ b/nixos/doc/manual/release-notes/rl-2211.section.md @@ -298,6 +298,14 @@ Available as [services.patroni](options.html#opt-services.patroni.enable). - Add udev rules for the Teensy family of microcontrollers. +- The Qt QML disk cache is now disabled by default. This fixes a + long-standing issue where updating Qt/KDE apps would sometimes cause + them to crash or behave strangely without explanation. Those concerned + about the small (~10%) performance hit to application startup can + re-enable the cache (and expose themselves to gremlins) by setting the + envrionment variable `QML_FORCE_DISK_CACHE` to `1` using e.g. the + `environment.sessionVariables` NixOS option. + - systemd-oomd is enabled by default. Depending on which systemd units have `ManagedOOMSwap=kill` or `ManagedOOMMemoryPressure=kill`, systemd-oomd will SIGKILL all the processes under the appropriate descendant cgroups when the From bd7c85ecad8966b2ce706812944bf225ae20c635 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Tue, 25 Oct 2022 10:53:28 +0200 Subject: [PATCH 009/130] linuxPackages.perf: fix cross-compilation by providing HOSTLD --- pkgs/os-specific/linux/kernel/manual-config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 1049d1c62a9f..fc369487a6ec 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -384,6 +384,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPat "O=$(buildRoot)" "CC=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc" "HOSTCC=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc" + "HOSTLD=${buildPackages.stdenv.cc.bintools}/bin/${buildPackages.stdenv.cc.targetPrefix}ld" "ARCH=${stdenv.hostPlatform.linuxArch}" ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" From 0b5be61ca10651c60fb762e4332d9725a5cc4624 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 25 Oct 2022 14:24:51 +0000 Subject: [PATCH 010/130] =?UTF-8?q?glib:=202.74.0=20=E2=86=92=202.74.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://gitlab.gnome.org/GNOME/glib/-/compare/2.74.0...2.74.1 - Docs no longer can be generated in static builds. - Drop merged patches. - Add a comment to an undocumented patch. - Drop huge with statement. - Drop meson override not needed since https://github.com/NixOS/nixpkgs/commit/a4a300dfffa7f3fff348d22dda3ddd5abcfa62a2 Changelog-Reviewed-By: Jan Tojnar --- pkgs/development/libraries/glib/default.nix | 71 ++++----- ...hared-libs-if-default_library-static.patch | 141 ------------------ .../tools/build-managers/meson/default.nix | 1 - 3 files changed, 29 insertions(+), 184 deletions(-) delete mode 100644 pkgs/development/libraries/glib/tests-skip-shared-libs-if-default_library-static.patch diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 45d8ee69a022..8e3d1a45dbe1 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -7,11 +7,9 @@ # this is just for tests (not in the closure of any regular package) , coreutils, dbus, libxml2, tzdata , desktop-file-utils, shared-mime-info -, darwin, fetchpatch +, darwin }: -with lib; - assert stdenv.isLinux -> util-linuxMinimal != null; # TODO: @@ -40,20 +38,22 @@ let done ln -sr -t "''${!outputInclude}/include/" "''${!outputInclude}"/lib/*/include/* 2>/dev/null || true ''; + + buildDocs = stdenv.hostPlatform == stdenv.buildPlatform && !stdenv.hostPlatform.isStatic; in stdenv.mkDerivation (finalAttrs: { pname = "glib"; - version = "2.74.0"; + version = "2.74.1"; src = fetchurl { url = "mirror://gnome/sources/glib/${lib.versions.majorMinor finalAttrs.version}/glib-${finalAttrs.version}.tar.xz"; - sha256 = "NlLH8HLXsDGmte3WI/d+vF3NKuaYWYq8yJ/znKda3TA="; + sha256 = "CrmBYY0dtHhF5WQXsNfBI/gaNCeyuck/Wkb/W7uWSWQ="; }; - patches = optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.isDarwin [ ./darwin-compilation.patch - ] ++ optionals stdenv.hostPlatform.isMusl [ + ] ++ lib.optionals stdenv.hostPlatform.isMusl [ ./quark_init_on_demand.patch ./gobject_init_on_demand.patch ] ++ [ @@ -90,29 +90,8 @@ stdenv.mkDerivation (finalAttrs: { # * gio-launch-desktop ./split-dev-programs.patch - # Fix build on Darwin - # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2914 - (fetchpatch { - name = "gio-properly-guard-use-of-utimensat.patch"; - url = "https://gitlab.gnome.org/GNOME/glib/-/commit/7f7171e68a420991b537d3e9e63263a0b2871618.patch"; - sha256 = "kKEqmBqx/RlvFT3eixu+NnM7JXhHb34b9NLRfAt+9h0="; - }) - - # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2866 - (fetchpatch { - name = "tests-skip-g-file-info-test-if-atime-unsupported.patch"; - url = "https://gitlab.gnome.org/qyliss/glib/-/commit/339a06d66685107280ca6bdca5da5d96b8222fb5.patch"; - sha256 = "sha256-/NdFkuiJvyass3jTDEJPeciA2Lwe53IUd3kAnKAvTaw="; - }) - # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2867 - ./tests-skip-shared-libs-if-default_library-static.patch - - # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2921 - (fetchpatch { - url = "https://gitlab.gnome.org/GNOME/glib/-/commit/f0dd96c28751f15d0703b384bfc7c314af01caa8.patch"; - sha256 = "sha256-8ucHS6ZnJuP6ajGb4/L8QfhC49FTQG1kAGHVdww/YYE="; - }) - + # Disable flaky test. + # https://gitlab.gnome.org/GNOME/glib/-/issues/820 ./skip-timer-test.patch ]; @@ -124,14 +103,14 @@ stdenv.mkDerivation (finalAttrs: { libelf finalAttrs.setupHook pcre2 - ] ++ optionals (!stdenv.hostPlatform.isWindows) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isWindows) [ bash gnum4 # install glib-gettextize and m4 macros for other apps to use - ] ++ optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.isLinux [ libselinux util-linuxMinimal # for libmount - ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Carbon Cocoa CoreFoundation CoreServices Foundation - ]) ++ optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ + ]) ++ lib.optionals buildDocs [ # Note: this needs to be both in buildInputs and nativeBuildInputs. The # Meson gtkdoc module uses find_program to look it up (-> build dep), but # glib's own Meson configuration uses the host pkg-config to find its @@ -147,10 +126,18 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; nativeBuildInputs = [ - (buildPackages.meson.override { - withDarwinFrameworksGtkDocPatch = stdenv.isDarwin; - }) - ninja pkg-config perl python3 gettext gtk-doc docbook_xsl docbook_xml_dtd_45 libxml2 libxslt + meson + ninja + pkg-config + perl + python3 + gettext + ] ++ lib.optionals buildDocs [ + gtk-doc + docbook_xsl + docbook_xml_dtd_45 + libxml2 + libxslt ]; propagatedBuildInputs = [ zlib libffi gettext libiconv ]; @@ -158,10 +145,10 @@ stdenv.mkDerivation (finalAttrs: { mesonFlags = [ # Avoid the need for gobject introspection binaries in PATH in cross-compiling case. # Instead we just copy them over from the native output. - "-Dgtk_doc=${boolToString (stdenv.hostPlatform == stdenv.buildPlatform)}" + "-Dgtk_doc=${lib.boolToString buildDocs}" "-Dnls=enabled" "-Ddevbindir=${placeholder "dev"}/bin" - ] ++ optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.isDarwin) [ "-Dman=true" # broken on Darwin ]; @@ -215,7 +202,7 @@ stdenv.mkDerivation (finalAttrs: { for i in $dev/bin/*; do moveToOutput "share/bash-completion/completions/''${i##*/}" "$dev" done - '' + optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + '' + lib.optionalString (!buildDocs) '' cp -r ${buildPackages.glib.devdoc} $devdoc ''; @@ -230,7 +217,7 @@ stdenv.mkDerivation (finalAttrs: { checkInputs = [ tzdata desktop-file-utils shared-mime-info ]; - preCheck = optionalString finalAttrs.doCheck or config.doCheckByDefault or false '' + preCheck = lib.optionalString finalAttrs.doCheck or config.doCheckByDefault or false '' export LD_LIBRARY_PATH="$NIX_BUILD_TOP/glib-${finalAttrs.version}/glib/.libs''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" export TZDIR="${tzdata}/share/zoneinfo" export XDG_CACHE_HOME="$TMP" diff --git a/pkgs/development/libraries/glib/tests-skip-shared-libs-if-default_library-static.patch b/pkgs/development/libraries/glib/tests-skip-shared-libs-if-default_library-static.patch deleted file mode 100644 index 106ba4f99a97..000000000000 --- a/pkgs/development/libraries/glib/tests-skip-shared-libs-if-default_library-static.patch +++ /dev/null @@ -1,141 +0,0 @@ -From b804e4b82cd8e85631112d935543c62ef56783e5 Mon Sep 17 00:00:00 2001 -From: Alyssa Ross -Date: Tue, 23 Aug 2022 13:13:44 +0000 -Subject: [PATCH] tests: skip shared libs if default_library=static - -Otherwise, the build will fail when the toolchain is static-only, even -with -Ddefault_library=static. I talked to a Meson developer in their -IRC channel, who told me that the correct fix was to ensure that -shared_library is only used if default_library != static. - -Part-of: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2867 -[Backported to 2.72.3] ---- - gio/tests/meson.build | 43 +++++++++++++++++++++++------------------- - glib/tests/meson.build | 2 +- - gmodule/tests/meson.build | 30 +++++++++++++++-------------- - 3 files changed, 41 insertions(+), 34 deletions(-) - -diff --git a/gio/tests/meson.build b/gio/tests/meson.build -index 3ed23a5f2..7b1aba80d 100644 ---- a/gio/tests/meson.build -+++ b/gio/tests/meson.build -@@ -203,7 +203,7 @@ if host_machine.system() != 'windows' - } - - # LD_PRELOAD modules don't work so well with AddressSanitizer -- if have_rtld_next and get_option('b_sanitize') == 'none' -+ if have_rtld_next and get_option('default_library') != 'static' and get_option('b_sanitize') == 'none' - gio_tests += { - 'gsocketclient-slow' : { - 'depends' : [ -@@ -607,24 +607,26 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() - - compiler_type = '--compiler=@0@'.format(cc.get_id()) - -- plugin_resources_c = custom_target('plugin-resources.c', -- input : 'test4.gresource.xml', -- output : 'plugin-resources.c', -- command : [glib_compile_resources, -- compiler_type, -- '--target=@OUTPUT@', -- '--sourcedir=' + meson.current_source_dir(), -- '--internal', -- '--generate-source', -- '--c-name', '_g_plugin', -- '@INPUT@']) -+ if get_option('default_library') != 'static' -+ plugin_resources_c = custom_target('plugin-resources.c', -+ input : 'test4.gresource.xml', -+ output : 'plugin-resources.c', -+ command : [glib_compile_resources, -+ compiler_type, -+ '--target=@OUTPUT@', -+ '--sourcedir=' + meson.current_source_dir(), -+ '--internal', -+ '--generate-source', -+ '--c-name', '_g_plugin', -+ '@INPUT@']) - -- shared_module('resourceplugin', 'resourceplugin.c', plugin_resources_c, -- link_args : export_dynamic_ldflags, -- dependencies : common_gio_tests_deps, -- install_dir : installed_tests_execdir, -- install : installed_tests_enabled -- ) -+ shared_module('resourceplugin', 'resourceplugin.c', plugin_resources_c, -+ link_args : export_dynamic_ldflags, -+ dependencies : common_gio_tests_deps, -+ install_dir : installed_tests_execdir, -+ install : installed_tests_enabled -+ ) -+ endif - - # referenced by test2.gresource.xml - big_test_resource = custom_target( -@@ -917,4 +919,7 @@ if installed_tests_enabled - endif - - subdir('services') --subdir('modules') -+ -+if get_option('default_library') != 'static' -+ subdir('modules') -+endif -diff --git a/glib/tests/meson.build b/glib/tests/meson.build -index 301158e0f..6203ff45e 100644 ---- a/glib/tests/meson.build -+++ b/glib/tests/meson.build -@@ -172,7 +172,7 @@ else - 'include' : {}, - 'unix' : {}, - } -- if have_rtld_next -+ if have_rtld_next and get_option('default_library') != 'static' - glib_tests += { - 'gutils-user-database' : { - 'depends' : [ -diff --git a/gmodule/tests/meson.build b/gmodule/tests/meson.build -index c95fa1d00..25144c941 100644 ---- a/gmodule/tests/meson.build -+++ b/gmodule/tests/meson.build -@@ -72,20 +72,22 @@ if ['darwin', 'ios'].contains(host_machine.system()) - module_suffix = 'so' - endif - --foreach module : ['moduletestplugin_a', 'moduletestplugin_b'] -- shared_module(module + '_plugin', 'lib@0@.c'.format(module), -- dependencies : [libglib_dep, libgmodule_dep], -- install_dir : installed_tests_execdir, -- install : installed_tests_enabled, -- name_suffix : module_suffix -- ) -- shared_library(module + '_library', 'lib@0@.c'.format(module), -- dependencies : [libglib_dep, libgmodule_dep], -- install_dir : installed_tests_execdir, -- install : installed_tests_enabled, -- name_suffix : module_suffix -- ) --endforeach -+if get_option('default_library') != 'static' -+ foreach module : ['moduletestplugin_a', 'moduletestplugin_b'] -+ shared_module(module + '_plugin', 'lib@0@.c'.format(module), -+ dependencies : [libglib_dep, libgmodule_dep], -+ install_dir : installed_tests_execdir, -+ install : installed_tests_enabled, -+ name_suffix : module_suffix -+ ) -+ shared_library(module + '_library', 'lib@0@.c'.format(module), -+ dependencies : [libglib_dep, libgmodule_dep], -+ install_dir : installed_tests_execdir, -+ install : installed_tests_enabled, -+ name_suffix : module_suffix -+ ) -+ endforeach -+endif - - common_c_args = test_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS'] - common_deps = [libm, thread_dep, libglib_dep] --- -2.37.1 - diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index 5107438fe91d..635b1b9cedcf 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -5,7 +5,6 @@ , pkg-config , python3 , substituteAll -, withDarwinFrameworksGtkDocPatch ? false }: python3.pkgs.buildPythonApplication rec { From 77bd639c4c92c819c1f4444a112d2bcc72c5b92f Mon Sep 17 00:00:00 2001 From: Daniel Barter Date: Wed, 26 Oct 2022 08:54:52 -0700 Subject: [PATCH 011/130] cc-wrapper: adding a cc-wrapper-hook to the cc-wrapper --- doc/stdenv/stdenv.chapter.md | 7 +++++++ pkgs/build-support/cc-wrapper/cc-wrapper.sh | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/doc/stdenv/stdenv.chapter.md b/doc/stdenv/stdenv.chapter.md index 166587d3284c..4fad249097c6 100644 --- a/doc/stdenv/stdenv.chapter.md +++ b/doc/stdenv/stdenv.chapter.md @@ -1140,6 +1140,13 @@ Here are some more packages that provide a setup hook. Since the list of hooks i Many other packages provide hooks, that are not part of `stdenv`. You can find these in the [Hooks Reference](#chap-hooks). +### Compiler and Linker wrapper hooks {#compiler-linker-wrapper-hooks} + +If the file `${cc}/nix-support/cc-wrapper-hook` exists, it will be run at the end of the [compiler wrapper](#cc-wrapper). +If the file `${binutils}/nix-support/post-link-hook` exists, it will be run at the end of the linker wrapper. +These hooks allow a user to inject code into the wrappers. +As an example, these hooks can be used to extract `extraBefore`, `params` and `extraAfter` which store all the command line arguments passed to the compiler and linker respectively. + ## Purity in Nixpkgs {#sec-purity-in-nixpkgs} *Measures taken to prevent dependencies on packages outside the store, and what you can do to prevent them.* diff --git a/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh index 78759f2cfbbc..cf9a351f3950 100644 --- a/pkgs/build-support/cc-wrapper/cc-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh @@ -219,6 +219,12 @@ fi PATH="$path_backup" # Old bash workaround, see above. +# if a cc-wrapper-hook exists, run it. +if [[ -e @out@/nix-support/cc-wrapper-hook ]]; then + compiler=@prog@ + source @out@/nix-support/cc-wrapper-hook +fi + if (( "${NIX_CC_USE_RESPONSE_FILE:-@use_response_file_by_default@}" >= 1 )); then exec @prog@ @<(printf "%q\n" \ ${extraBefore+"${extraBefore[@]}"} \ From 1bab4177ac5dc56369910b03ab3cc37a231bf3cb Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 26 Oct 2022 20:27:18 +0000 Subject: [PATCH 012/130] =?UTF-8?q?tracker:=203.4.0=20=E2=86=92=203.4.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://gitlab.gnome.org/GNOME/tracker/-/compare/3.4.0...3.4.1 Changelog-Reviewed-By: Jan Tojnar --- pkgs/development/libraries/tracker/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/tracker/default.nix b/pkgs/development/libraries/tracker/default.nix index 2c4422d7a1f9..40744f987c8e 100644 --- a/pkgs/development/libraries/tracker/default.nix +++ b/pkgs/development/libraries/tracker/default.nix @@ -29,13 +29,13 @@ stdenv.mkDerivation rec { pname = "tracker"; - version = "3.4.0"; + version = "3.4.1"; outputs = [ "out" "dev" "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "s7OAyVcdfHQjtfQB5KLy143kcUOwNessEoHiQjxZIYs="; + sha256 = "6p1BqfucK0KtgPwsgjJ7XHE9WUyWmwnhpJvmP7dPT64="; }; postPatch = '' From f980fb0485b9d88f3a373c05c11ed73e4f482a8a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 28 Oct 2022 12:57:08 +0200 Subject: [PATCH 013/130] python310Packages.psutil: 5.9.2 -> 5.9.3 --- .../python-modules/psutil/default.nix | 62 +++++++++++-------- 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/pkgs/development/python-modules/psutil/default.nix b/pkgs/development/python-modules/psutil/default.nix index 088541552ec2..b461bc6fdcf0 100644 --- a/pkgs/development/python-modules/psutil/default.nix +++ b/pkgs/development/python-modules/psutil/default.nix @@ -1,29 +1,42 @@ -{ lib, stdenv, buildPythonPackage, fetchPypi, isPy27, python -, CoreFoundation, IOKit +{ lib +, stdenv +, buildPythonPackage +, CoreFoundation +, fetchPypi +, IOKit , pytestCheckHook -, mock -, unittest2 +, python +, pythonOlder }: buildPythonPackage rec { pname = "psutil"; - version = "5.9.2"; + version = "5.9.3"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-/rhhoQtsO7AHAQY7N+Svx1T4IX8PCcQigFhr1qxxK1w="; + hash = "sha256-fM/N/qT8SwoCyiwx3n/NGGvrnP+CB4AOFKtm95x3OvY="; }; - # We have many test failures on various parts of the package: - # - segfaults on darwin: - # https://github.com/giampaolo/psutil/issues/1715 - # - swap (on linux) might cause test failures if it is fully used: - # https://github.com/giampaolo/psutil/issues/1911 - # - some mount paths are required in the build sanbox to make the tests succeed: - # https://github.com/giampaolo/psutil/issues/1912 - doCheck = false; - checkInputs = [ pytestCheckHook ] - ++ lib.optionals isPy27 [ mock unittest2 ]; + buildInputs = + # workaround for https://github.com/NixOS/nixpkgs/issues/146760 + lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + CoreFoundation + ] ++ lib.optionals stdenv.isDarwin [ + IOKit + ]; + + checkInputs = [ + pytestCheckHook + ]; + + # Segfaults on darwin: + # https://github.com/giampaolo/psutil/issues/1715 + doCheck = !stdenv.isDarwin; + # In addition to the issues listed above there are some that occure due to # our sandboxing which we can work around by disabling some tests: # - cpu_times was flaky on darwin @@ -34,22 +47,19 @@ buildPythonPackage rec { # Note: $out must be referenced as test import paths are relative disabledTests = [ - "user" + "cpu_freq" + "cpu_times" "disk_io_counters" "sensors_battery" - "cpu_times" - "cpu_freq" + "user" ]; - buildInputs = - # workaround for https://github.com/NixOS/nixpkgs/issues/146760 - lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ CoreFoundation ] ++ - lib.optionals stdenv.isDarwin [ IOKit ]; - - pythonImportsCheck = [ "psutil" ]; + pythonImportsCheck = [ + "psutil" + ]; meta = with lib; { - description = "Process and system utilization information interface for python"; + description = "Process and system utilization information interface"; homepage = "https://github.com/giampaolo/psutil"; license = licenses.bsd3; maintainers = with maintainers; [ jonringer ]; From d982d062d80eaca95a4156b3eb1314f091a13cde Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 28 Oct 2022 13:03:15 +0200 Subject: [PATCH 014/130] python310Packages.exceptiongroup: 1.0.0rc9 -> 1.0.0 --- pkgs/development/python-modules/exceptiongroup/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/exceptiongroup/default.nix b/pkgs/development/python-modules/exceptiongroup/default.nix index 1475b44e0016..76c6f0e2d34e 100644 --- a/pkgs/development/python-modules/exceptiongroup/default.nix +++ b/pkgs/development/python-modules/exceptiongroup/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "exceptiongroup"; - version = "1.0.0rc9"; + version = "1.0.0"; format = "flit"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-kIakoh75sxxyGBx3wECgdLoIie5Wp7KJ/wr7DZdlX5Y="; + hash = "sha256-r/ur8T+26YmIw42cVlDnAVaf48HeMjPPthxfM3dGkK0="; }; nativeBuildInputs = [ From 867ebb3100f94a10f0975f3b4bb7235d6125c16a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 28 Oct 2022 13:25:40 +0200 Subject: [PATCH 015/130] python310Packages.cattrs: 22.1.0 -> 22.2.0 --- pkgs/development/python-modules/cattrs/default.nix | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/cattrs/default.nix b/pkgs/development/python-modules/cattrs/default.nix index 6584f5f15df1..8514190202e1 100644 --- a/pkgs/development/python-modules/cattrs/default.nix +++ b/pkgs/development/python-modules/cattrs/default.nix @@ -2,7 +2,6 @@ , attrs , buildPythonPackage , fetchFromGitHub -, fetchpatch , exceptiongroup , hypothesis , immutables @@ -21,7 +20,7 @@ buildPythonPackage rec { pname = "cattrs"; - version = "22.1.0"; + version = "22.2.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -30,17 +29,9 @@ buildPythonPackage rec { owner = "python-attrs"; repo = pname; rev = "v${version}"; - hash = "sha256-C8uIsewpgJfB1yYckWTwF5K32+2AAOrxFKB9I18RENg="; + hash = "sha256-Qnrq/mIA/t0mur6IAen4vTmMIhILWS6v5nuf+Via2hA="; }; - patches = [ - (fetchpatch { - url = "https://github.com/python-attrs/cattrs/commit/290d162a589acf10ea63b825b7b283e23ca7698a.diff"; - excludes = [ "poetry.lock" ]; - hash = "sha256-n6c3qVg9umGKAxeTALq3QTJgO9DIj3SY0ZHhtsDeW94="; - }) - ]; - nativeBuildInputs = [ poetry-core ]; From 31e379c2bbcc1ae6e6343d9374fdd68d72c25681 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 28 Oct 2022 13:32:34 +0200 Subject: [PATCH 016/130] python310Packages.requests-cache: 0.9.7 -> 0.9.7 --- pkgs/development/python-modules/requests-cache/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/requests-cache/default.nix b/pkgs/development/python-modules/requests-cache/default.nix index 45b03feb461d..21648484b2f6 100644 --- a/pkgs/development/python-modules/requests-cache/default.nix +++ b/pkgs/development/python-modules/requests-cache/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { pname = "requests-cache"; - version = "0.9.6"; + version = "0.9.7"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -35,7 +35,7 @@ buildPythonPackage rec { owner = "requests-cache"; repo = "requests-cache"; rev = "v${version}"; - hash = "sha256-oFI5Rv/MAiPHiZts0PrNS+YMDFD/RxnMJ6deTxZNkSM="; + hash = "sha256-HSYu4jOEMXI/zGuWI7invYVvVeeM5+dDlc+9h8TOGms="; }; nativeBuildInputs = [ From 8c6ed9a2496b215eb4ba6c86028b0089fe72537d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 28 Oct 2022 13:06:30 +0200 Subject: [PATCH 017/130] python310Packages.build: 0.8.0 -> 0.9.0 --- pkgs/development/python-modules/build/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/build/default.nix b/pkgs/development/python-modules/build/default.nix index 1ef401b8c0a2..efc1f2f45ad1 100644 --- a/pkgs/development/python-modules/build/default.nix +++ b/pkgs/development/python-modules/build/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "build"; - version = "0.8.0"; + version = "0.9.0"; format = "pyproject"; disabled = pythonOlder "3.6"; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = "pypa"; repo = pname; rev = version; - hash = "sha256-P0DFBYsL2Ce/JwfYss64+CY/IvzYZEiz9wuEslij+oU="; + hash = "sha256-iQvfZC/h9SbagExoG8dJ2A8G8gVRdMaRvEy9QcQIN5I="; }; nativeBuildInputs = [ From 2f054ca910062859398dc07753e083a96de67fa0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 26 Oct 2022 10:11:41 +0200 Subject: [PATCH 018/130] python310Packages.pymemcache: 3.5.2 -> 4.0.0 --- pkgs/development/python-modules/pymemcache/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pymemcache/default.nix b/pkgs/development/python-modules/pymemcache/default.nix index c9d3ef94d778..594964e66491 100644 --- a/pkgs/development/python-modules/pymemcache/default.nix +++ b/pkgs/development/python-modules/pymemcache/default.nix @@ -1,15 +1,17 @@ { lib , buildPythonPackage +, faker , fetchFromGitHub , mock , six , pytestCheckHook , pythonOlder +, zstd }: buildPythonPackage rec { pname = "pymemcache"; - version = "3.5.2"; + version = "4.0.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -18,7 +20,7 @@ buildPythonPackage rec { owner = "pinterest"; repo = pname; rev = "v${version}"; - hash = "sha256-bsiFWZHGJO/07w6mFXzf0JwftJWClE2mTv86h8zT1K0="; + hash = "sha256-WgtHhp7lE6StoOBfSy9+v3ODe/+zUC7lGrc2S4M68+M="; }; propagatedBuildInputs = [ @@ -26,8 +28,10 @@ buildPythonPackage rec { ]; checkInputs = [ + faker mock pytestCheckHook + zstd ]; postPatch = '' From ef5beda91c592e14bee1f2aee6bf333d3df1a2de Mon Sep 17 00:00:00 2001 From: Simon Kohlmeyer Date: Fri, 28 Oct 2022 17:42:13 +0200 Subject: [PATCH 019/130] python311Packages.cython: add patch for python3.11 compatibility --- .../python-modules/Cython/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/Cython/default.nix b/pkgs/development/python-modules/Cython/default.nix index 4a6c14b5709b..3065e822f6be 100644 --- a/pkgs/development/python-modules/Cython/default.nix +++ b/pkgs/development/python-modules/Cython/default.nix @@ -48,8 +48,20 @@ in buildPythonPackage rec { # trashcan support is needed to avoid stack overflows during object deallocation in sage (https://trac.sagemath.org/ticket/27267) (fetchpatch { name = "trashcan.patch"; - url = "https://git.sagemath.org/sage.git/plain/build/pkgs/cython/patches/trashcan.patch?id=4569a839f070a1a38d5dbce2a4d19233d25aeed2"; - sha256 = "sha256-+pOF1XNTEtNseLpqPzrc1Jfwt5hGx7doUoccIhNneYY="; + url = "https://github.com/cython/cython/commit/f781880b6780117660b2026caadf4a6d7905722f.patch"; + sha256 = "sha256-SnjaJdBZxm3O5gJ5Dxut6+eeVtZv+ygUUNwAwgoiFxg="; + }) + # The above commit introduces custom trashcan macros, as well as + # compiler changes to use them in Cython-emitted code. The latter + # change is still useful, but the former has been upstreamed as of + # Python 3.8, and the patch below makes Cython use the upstream + # trashcan macros whenever available. This is needed for Python + # 3.11 support, because the API used in Cython's implementation + # changed: https://github.com/cython/cython/pull/4475 + (fetchpatch { + name = "disable-trashcan.patch"; + url = "https://github.com/cython/cython/commit/e337825cdcf5e94d38ba06a0cb0188e99ce0cc92.patch"; + sha256 = "sha256-q0f63eetKrDpmP5Z4v8EuGxg26heSyp/62OYqhRoSso="; }) ]; From 1ee6495bfef025d834ef0949f8b8f3bac97d2fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 28 Oct 2022 12:24:21 -0700 Subject: [PATCH 020/130] python310Packages.jupyter_core: 4.9.2 -> 4.11.2 fixes CVE-2022-39286 --- .../python-modules/jupyter_core/default.nix | 48 ++++++++++--------- .../tests_respect_pythonpath.patch | 34 ++++++------- 2 files changed, 43 insertions(+), 39 deletions(-) diff --git a/pkgs/development/python-modules/jupyter_core/default.nix b/pkgs/development/python-modules/jupyter_core/default.nix index b7838ff5915f..56dc157a69d2 100644 --- a/pkgs/development/python-modules/jupyter_core/default.nix +++ b/pkgs/development/python-modules/jupyter_core/default.nix @@ -1,42 +1,44 @@ { lib , buildPythonPackage -, fetchPypi -, isPy3k -, fetchpatch -, python -, ipython +, pythonOlder +, fetchFromGitHub +, hatchling , traitlets -, glibcLocales -, mock , pytestCheckHook -, nose }: buildPythonPackage rec { pname = "jupyter_core"; - version = "4.9.2"; - disabled = !isPy3k; + version = "4.11.2"; + disabled = pythonOlder "3.7"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-1puuuf+xKLjNJlf88nA/icdp0Wc8hRgSEZ46Kg6TrZo="; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "jupyter"; + repo = "jupyter_core"; + rev = version; + hash = "sha256-lDhwvhsOxLHBC6CQjCW/rmtHSuMRPC2yaurBd5K3FLc="; }; - checkInputs = [ pytestCheckHook mock glibcLocales nose ]; - propagatedBuildInputs = [ ipython traitlets ]; - patches = [ - # install jupyter_core/*.py files - (fetchpatch { - url = "https://github.com/jupyter/jupyter_core/pull/253/commits/3bbeaebec0a53520523162d5e8d5c6ca02b1b782.patch"; - sha256 = "sha256-QeAfj7wLz4egVUPMAgrZ9Wn/Tv60LrIXLgHGVoH41wQ="; - }) ./tests_respect_pythonpath.patch ]; + nativeBuildInputs = [ + hatchling + ]; + + propagatedBuildInputs = [ + traitlets + ]; + + checkInputs = [ + pytestCheckHook + ]; + preCheck = '' export HOME=$TMPDIR - export LC_ALL=en_US.utf8 ''; disabledTests = [ @@ -51,7 +53,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "jupyter_core" ]; meta = with lib; { - description = "Jupyter core package. A base package on which Jupyter projects rely"; + description = "Base package on which Jupyter projects rely"; homepage = "https://jupyter.org/"; license = licenses.bsd3; maintainers = with maintainers; [ fridh ]; diff --git a/pkgs/development/python-modules/jupyter_core/tests_respect_pythonpath.patch b/pkgs/development/python-modules/jupyter_core/tests_respect_pythonpath.patch index 7e7e9ae93a09..eb061676c0e2 100644 --- a/pkgs/development/python-modules/jupyter_core/tests_respect_pythonpath.patch +++ b/pkgs/development/python-modules/jupyter_core/tests_respect_pythonpath.patch @@ -1,20 +1,22 @@ +diff --git a/jupyter_core/tests/test_command.py b/jupyter_core/tests/test_command.py +index 4ef38cd..08fba22 100644 --- a/jupyter_core/tests/test_command.py +++ b/jupyter_core/tests/test_command.py -@@ -131,7 +131,7 @@ def test_not_on_path(tmpdir): - witness_src = '#!%s\n%s\n' % (sys.executable, 'print("WITNESS ME")') +@@ -174,7 +174,7 @@ def test_not_on_path(tmpdir): + witness_src = "#!{}\n{}\n".format(sys.executable, 'print("WITNESS ME")') write_executable(witness, witness_src) - -- env = {'PATH': ''} -+ env = {'PATH': '', 'PYTHONPATH': os.environ['PYTHONPATH']} - if 'SYSTEMROOT' in os.environ: # Windows http://bugs.python.org/issue20614 - env[str('SYSTEMROOT')] = os.environ['SYSTEMROOT'] - if sys.platform == 'win32': -@@ -157,7 +157,7 @@ def test_path_priority(tmpdir): - witness_b_src = '#!%s\n%s\n' % (sys.executable, 'print("WITNESS B")') + +- env = {"PATH": ""} ++ env = {"PATH": "", "PYTHONPATH": os.environ["PYTHONPATH"]} + if "SYSTEMROOT" in os.environ: # Windows http://bugs.python.org/issue20614 + env["SYSTEMROOT"] = os.environ["SYSTEMROOT"] + if sys.platform == "win32": +@@ -198,7 +198,7 @@ def test_path_priority(tmpdir): + witness_b_src = "#!{}\n{}\n".format(sys.executable, 'print("WITNESS B")') write_executable(witness_b, witness_b_src) - -- env = {'PATH': str(b)} -+ env = {'PATH': str(b), 'PYTHONPATH': os.environ['PYTHONPATH']} - if 'SYSTEMROOT' in os.environ: # Windows http://bugs.python.org/issue20614 - env[str('SYSTEMROOT')] = os.environ['SYSTEMROOT'] - if sys.platform == 'win32': + +- env = {"PATH": str(b)} ++ env = {"PATH": str(b), "PYTHONPATH": os.environ["PYTHONPATH"]} + if "SYSTEMROOT" in os.environ: # Windows http://bugs.python.org/issue20614 + env["SYSTEMROOT"] = os.environ["SYSTEMROOT"] + if sys.platform == "win32": From d2cd38dd31451c6aaa0bda526af32ccceb4909fc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 29 Oct 2022 15:10:49 +0200 Subject: [PATCH 021/130] python310Packages.py-cpuinfo: 8.0.0 -> 9.0.0 --- .../python-modules/py-cpuinfo/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/py-cpuinfo/default.nix b/pkgs/development/python-modules/py-cpuinfo/default.nix index 12b9668f1edd..09f8ba4ad758 100644 --- a/pkgs/development/python-modules/py-cpuinfo/default.nix +++ b/pkgs/development/python-modules/py-cpuinfo/default.nix @@ -1,20 +1,24 @@ { lib , stdenv -, fetchFromGitHub , buildPythonPackage +, fetchFromGitHub , pytestCheckHook +, pythonOlder , sysctl }: buildPythonPackage rec { pname = "py-cpuinfo"; - version = "8.0.0"; + version = "9.0.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "workhorsy"; repo = pname; rev = "v${version}"; - sha256 = "sha256-Mgzj1HTasUNHeHMVwV6d+TeyVqnBNUwCJ1EC3kfovf8="; + hash = "sha256-Q5u0guAqDVhf6bvJTzNvCpWbIzjxxAjE7s0OuXj9T4Q="; }; checkInputs = [ @@ -28,7 +32,9 @@ buildPythonPackage rec { --replace "_run_and_get_stdout(['sysctl'" "_run_and_get_stdout(['${sysctl}/bin/sysctl'" ''; - pythonImportsCheck = [ "cpuinfo" ]; + pythonImportsCheck = [ + "cpuinfo" + ]; meta = with lib; { description = "Get CPU info with pure Python"; From 7d5f5e1f2a9cac7ca960e1aa757f3bdb28bfddd1 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Sat, 29 Oct 2022 16:54:28 +0200 Subject: [PATCH 022/130] tzdata: 2022e -> 2022f https://mm.icann.org/pipermail/tz-announce/2022-October/000075.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 2d5100906ed2..480535135952 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 = "2022e"; + version = "2022f"; srcs = [ (fetchurl { url = "https://data.iana.org/time-zones/releases/tzdata${version}.tar.gz"; - hash = "sha256-jeTCaG3OPRqukDBxnmgUkxwhai1eiR7D0zLm9lFq7M0="; + hash = "sha256-mZDXH2ddISVnuTH+iq4cq3An+J/vuKedgIppM6Z68AA="; }) (fetchurl { url = "https://data.iana.org/time-zones/releases/tzcode${version}.tar.gz"; - hash = "sha256-1AKAJTmA6JFo5r5CdahSv5UhUk1HaE3jE1uaXKOHcQs="; + hash = "sha256-5FQ+kPhPkfqCgJ6piTAFL9vBOIDIpiPuOk6qQvimTBU="; }) ]; From 9f11933b1eb65c276aeead6f0280ab9037e27675 Mon Sep 17 00:00:00 2001 From: Simon Kohlmeyer Date: Fri, 28 Oct 2022 20:55:16 +0200 Subject: [PATCH 023/130] python3Packages.pytest-subtests: 0.8.0 -> 0.9.0 --- pkgs/development/python-modules/pytest-subtests/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pytest-subtests/default.nix b/pkgs/development/python-modules/pytest-subtests/default.nix index 4b88991bb741..8ada20dce8f5 100644 --- a/pkgs/development/python-modules/pytest-subtests/default.nix +++ b/pkgs/development/python-modules/pytest-subtests/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "pytest-subtests"; - version = "0.8.0"; + version = "0.9.0"; format = "setuptools"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-Rus3YCLpJpUIFszCNQLeMnetzBOWZS3bMyjOAokFLE0="; + sha256 = "sha256-wDF81fal6z6Vfonb5PwzIqmv3botuEFDVe0qLLkahE4="; }; nativeBuildInputs = [ From d9246eabc6853a1bc8b1250555b8725e046c91f5 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 27 Oct 2022 23:29:59 +0000 Subject: [PATCH 024/130] taglib: 1.12 -> 1.13 --- pkgs/development/libraries/taglib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/taglib/default.nix b/pkgs/development/libraries/taglib/default.nix index 666d013adebc..0fb207e4e0f7 100644 --- a/pkgs/development/libraries/taglib/default.nix +++ b/pkgs/development/libraries/taglib/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "taglib"; - version = "1.12"; + version = "1.13"; src = fetchFromGitHub { owner = "taglib"; repo = "taglib"; rev = "v${version}"; - sha256 = "sha256-omErajnYgxbflsbe6pS2KsexZcXisso0WGYnmIud7WA="; + sha256 = "sha256-DRALRH+/7c2lBvCpLp8hop3Xxsf76F1q8L7F9qehqQA="; }; nativeBuildInputs = [ cmake ]; From b0bce6ae731d5be0aed3277eab29d7ae7491d08d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Oko=C5=84ski?= Date: Sat, 29 Oct 2022 22:22:43 +0200 Subject: [PATCH 025/130] maintainers: add farnoy --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 3e5cefc356cd..3e31fb0721cf 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4373,6 +4373,12 @@ githubId = 1276854; name = "Florian Peter"; }; + farnoy = { + email = "jakub@okonski.org"; + github = "farnoy"; + githubId = 345808; + name = "Jakub Okoński"; + }; fbeffa = { email = "beffa@fbengineering.ch"; github = "fedeinthemix"; From 4e74b20841728a352a4d6fc915b160b2c521d017 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 24 Oct 2022 10:38:35 +0000 Subject: [PATCH 026/130] flac: 1.4.1 -> 1.4.2 --- pkgs/applications/audio/flac/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/flac/default.nix b/pkgs/applications/audio/flac/default.nix index bebb35f45009..38054694e3b0 100644 --- a/pkgs/applications/audio/flac/default.nix +++ b/pkgs/applications/audio/flac/default.nix @@ -10,12 +10,12 @@ stdenv.mkDerivation rec { pname = "flac"; - version = "1.4.1"; + version = "1.4.2"; src = fetchurl { url = "http://downloads.xiph.org/releases/flac/${pname}-${version}.tar.xz"; # Official checksum is published at https://github.com/xiph/flac/releases/tag/${version} - sha256 = "91303c3e5dfde52c3e94e75976c0ab3ee14ced278ab8f60033a3a12db9209ae6"; + sha256 = "sha256-4yLVih9I0j2d049DJnKGX2955zpvnMWl9X/KqD61qOQ="; }; nativeBuildInputs = [ From 6f7a7cffd2a5cab4460c0722b7ac4ee8cf8d6f07 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sat, 29 Oct 2022 11:59:56 -0500 Subject: [PATCH 027/130] flac: add meta.changelog --- pkgs/applications/audio/flac/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/audio/flac/default.nix b/pkgs/applications/audio/flac/default.nix index 38054694e3b0..be987fccd66e 100644 --- a/pkgs/applications/audio/flac/default.nix +++ b/pkgs/applications/audio/flac/default.nix @@ -43,6 +43,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://xiph.org/flac/"; description = "Library and tools for encoding and decoding the FLAC lossless audio file format"; + changelog = "https://xiph.org/flac/changelog.html"; platforms = platforms.all; license = licenses.bsd3; maintainers = with maintainers; [ ruuda ]; From ccbce7e7eab24cb1e66e612ce39fbd62f5cc211f Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 30 Oct 2022 04:20:00 +0000 Subject: [PATCH 028/130] icu72: init at 72.1 https://icu.unicode.org/download/72 --- pkgs/development/libraries/icu/72.nix | 4 ++++ pkgs/top-level/all-packages.nix | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 pkgs/development/libraries/icu/72.nix diff --git a/pkgs/development/libraries/icu/72.nix b/pkgs/development/libraries/icu/72.nix new file mode 100644 index 000000000000..8eeb10138d12 --- /dev/null +++ b/pkgs/development/libraries/icu/72.nix @@ -0,0 +1,4 @@ +import ./base.nix { + version = "72.1"; + sha256 = "sha256-otLTghcJKn7VZjXjRGf5L5drNw4gGCrTJe3qZoGnHWg="; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2241ecf0f600..1413e29c8c18 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19472,6 +19472,9 @@ with pkgs; icu71 = callPackage ../development/libraries/icu/71.nix ({ nativeBuildRoot = buildPackages.icu71.override { buildRootOnly = true; }; }); + icu72 = callPackage ../development/libraries/icu/72.nix ({ + nativeBuildRoot = buildPackages.icu72.override { buildRootOnly = true; }; + }); icu = icu71; From aa09845c06698a8c696fadefc48b992b65d872d4 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 30 Oct 2022 04:20:00 +0000 Subject: [PATCH 029/130] icu: 71.1 -> 72.1 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1413e29c8c18..db17549a30c2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19476,7 +19476,7 @@ with pkgs; nativeBuildRoot = buildPackages.icu72.override { buildRootOnly = true; }; }); - icu = icu71; + icu = icu72; id3lib = callPackage ../development/libraries/id3lib { }; From 13736965d8378412fe16fc29bcf5fbfcc3bcb13f Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Sun, 30 Oct 2022 16:06:12 +1300 Subject: [PATCH 030/130] jekyll-favicon: init at 1.1.0 Closes #198542. --- .../ruby-modules/with-packages/Gemfile | 1 + pkgs/top-level/ruby-packages.nix | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/pkgs/development/ruby-modules/with-packages/Gemfile b/pkgs/development/ruby-modules/with-packages/Gemfile index d0c27c638589..f11828cb835e 100644 --- a/pkgs/development/ruby-modules/with-packages/Gemfile +++ b/pkgs/development/ruby-modules/with-packages/Gemfile @@ -77,6 +77,7 @@ gem 'iconv' gem 'idn-ruby' gem 'jbuilder' gem 'jekyll' +gem 'jekyll-favicon' gem 'jmespath' gem 'jwt' gem 'kramdown-rfc2629' diff --git a/pkgs/top-level/ruby-packages.nix b/pkgs/top-level/ruby-packages.nix index d8d4320f0c0b..bb25b2df7a08 100644 --- a/pkgs/top-level/ruby-packages.nix +++ b/pkgs/top-level/ruby-packages.nix @@ -1100,10 +1100,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "19ynyc7wzl71hn7jw467xr188v0az679l54167slm3jh5mx6rijf"; + sha256 = "03qiz6kbk260v3613z4wrk8iy1mi06j631fglcskfxyhf18lpy05"; type = "gem"; }; - version = "6.0.7"; + version = "6.0.8"; }; hashie = { groups = ["default"]; @@ -1325,6 +1325,17 @@ }; version = "0.1.4"; }; + jekyll-favicon = { + dependencies = ["jekyll" "mini_magick" "rexml"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0dyksm4i11n0qshd7wh6dvk8d0fc70dd32ir2dxs6igxq0gd6hi1"; + type = "gem"; + }; + version = "1.1.0"; + }; jekyll-feed = { dependencies = ["jekyll"]; groups = ["default"]; @@ -1752,10 +1763,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0rsgvdyh828k6bz95b4391ydv6710d4dsdrrfr684glks7599ldf"; + sha256 = "1jbqw7hkx08i5dj74fwfdc16980hsj3mhrxp4mmjxsdzw1kndrvp"; type = "gem"; }; - version = "3.2.3"; + version = "3.2.4"; }; liquid = { groups = ["default"]; From 845c39bab5865e0d73ed03ceeddaaa97fcb887be Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 30 Oct 2022 16:46:49 +0000 Subject: [PATCH 031/130] pythonFull: drop unused xlibsWrapper input Tested as no material change in `out` output with `diffoscope`. --- pkgs/development/interpreters/python/cpython/2.7/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 7da2a0047f33..30b7732ed51e 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -8,7 +8,7 @@ , openssl , readline , sqlite -, tcl ? null, tk ? null, tix ? null, xlibsWrapper ? null, libX11 ? null, x11Support ? false +, tcl ? null, tk ? null, tix ? null, libX11 ? null, x11Support ? false , zlib , self , configd, coreutils @@ -36,7 +36,6 @@ assert x11Support -> tcl != null && tk != null - && xlibsWrapper != null && libX11 != null; assert lib.assertMsg (enableOptimizations -> (!stdenv.cc.isClang)) @@ -234,7 +233,7 @@ let ++ optional (stdenv.hostPlatform.isCygwin || stdenv.hostPlatform.isAarch64) libffi ++ optional stdenv.hostPlatform.isCygwin expat ++ [ db gdbm ncurses sqlite readline ] - ++ optionals x11Support [ tcl tk xlibsWrapper libX11 ] + ++ optionals x11Support [ tcl tk libX11 ] ++ optional (stdenv.isDarwin && configd != null) configd; nativeBuildInputs = [ autoreconfHook ] From c2eaaae50d66a933e38256bdf5a3ae43430592a3 Mon Sep 17 00:00:00 2001 From: Yureka Date: Fri, 28 Oct 2022 20:34:04 +0200 Subject: [PATCH 032/130] cargoSetupHook: pass host config flags --- .../rust/hooks/cargo-setup-hook.sh | 2 +- pkgs/build-support/rust/hooks/default.nix | 36 +++++++++++++++---- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/pkgs/build-support/rust/hooks/cargo-setup-hook.sh b/pkgs/build-support/rust/hooks/cargo-setup-hook.sh index b85796e2a41b..aeddeef29d92 100644 --- a/pkgs/build-support/rust/hooks/cargo-setup-hook.sh +++ b/pkgs/build-support/rust/hooks/cargo-setup-hook.sh @@ -27,7 +27,7 @@ cargoSetupPostUnpackHook() { cat ${tmp_config} >> .cargo/config cat >> .cargo/config <<'EOF' - @rustTarget@ + @cargoConfig@ EOF echo "Finished cargoSetupPostUnpackHook" diff --git a/pkgs/build-support/rust/hooks/default.nix b/pkgs/build-support/rust/hooks/default.nix index 652b074c3020..9d3fc9b126ef 100644 --- a/pkgs/build-support/rust/hooks/default.nix +++ b/pkgs/build-support/rust/hooks/default.nix @@ -68,15 +68,37 @@ in { # The `.nativeDrv` stanza works like nativeBuildInputs and ensures cross-compiling has the right version available. diff = "${diffutils.nativeDrv or diffutils}/bin/diff"; - # Target platform - rustTarget = '' - [target."${rust.toRustTarget stdenv.buildPlatform}"] + # We want to specify the correct crt-static flag for both + # the build and host platforms. This is important when the wanted + # value for crt-static does not match the defaults in the rustc target, + # like for pkgsMusl or pkgsCross.musl64; Upstream rustc still assumes + # that musl = static[1]. + # + # By default, Cargo doesn't apply RUSTFLAGS when building build.rs + # if --target is passed, so the only good way to set crt-static for + # build.rs files is to use the unstable -Zhost-config Cargo feature. + # This allows us to specify flags that should be passed to rustc + # when building for the build platform. We also need to use + # -Ztarget-applies-to-host, because using -Zhost-config requires it. + # + # When doing this, we also have to specify the linker, or cargo + # won't pass a -C linker= argument to rustc. This will make rustc + # try to use its default value of "cc", which won't be available + # when cross-compiling. + # + # [1]: https://github.com/rust-lang/compiler-team/issues/422 + cargoConfig = '' + [host] "linker" = "${ccForBuild}" - ${lib.optionalString (stdenv.buildPlatform.config != stdenv.hostPlatform.config) '' - [target."${shortTarget}"] - "linker" = "${ccForHost}" - ''} + "rustflags" = [ "-C", "target-feature=${if stdenv.buildPlatform.isStatic then "+" else "-"}crt-static" ] + + [target."${shortTarget}"] + "linker" = "${ccForHost}" "rustflags" = [ "-C", "target-feature=${if stdenv.hostPlatform.isStatic then "+" else "-"}crt-static" ] + + [unstable] + host-config = true + target-applies-to-host = true ''; }; } ./cargo-setup-hook.sh) {}; From 7852c61b6ec7a4fb5f56b0bd06219224d9650dc8 Mon Sep 17 00:00:00 2001 From: Yureka Date: Fri, 28 Oct 2022 20:34:16 +0200 Subject: [PATCH 033/130] cargo: no longer broken on musl --- pkgs/development/compilers/rust/cargo.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/compilers/rust/cargo.nix b/pkgs/development/compilers/rust/cargo.nix index 6a4d01de5ef4..2c9a3b1af472 100644 --- a/pkgs/development/compilers/rust/cargo.nix +++ b/pkgs/development/compilers/rust/cargo.nix @@ -75,7 +75,5 @@ rustPlatform.buildRustPackage { maintainers = with maintainers; [ retrry ]; license = [ licenses.mit licenses.asl20 ]; platforms = platforms.unix; - # weird segfault in a build script - broken = stdenv.targetPlatform.isMusl && !stdenv.targetPlatform.isStatic; }; } From 6dbc4d9fba4fba735ba8018f091a54a38c7a6c1c Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sun, 30 Oct 2022 13:44:31 -0700 Subject: [PATCH 034/130] python3Packages.ruamel-yaml-clib: 0.2.6 -> 0.2.7 The new version generates code with a newer version of Cython, which fixes an incompatibility with Python 3.11. --- .../development/python-modules/ruamel-yaml-clib/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/ruamel-yaml-clib/default.nix b/pkgs/development/python-modules/ruamel-yaml-clib/default.nix index 143452274abb..a8f93d53f6f1 100644 --- a/pkgs/development/python-modules/ruamel-yaml-clib/default.nix +++ b/pkgs/development/python-modules/ruamel-yaml-clib/default.nix @@ -5,19 +5,19 @@ buildPythonPackage rec { pname = "ruamel-yaml-clib"; - version = "0.2.6"; + version = "0.2.7"; format = "setuptools"; src = fetchhg { url = "http://hg.code.sf.net/p/ruamel-yaml-clib/code"; rev = version; - sha256 = "sha256-mpkh9JhYKRX47jfKprjt1Vpm9DMz8LcWzkotJ+/xoxY="; + sha256 = "sha256-QNJyJWfCT8zEvrqI65zPlWIMSRZSoDwIAbFU48TfO4U="; }; # no tests doCheck = false; - # circular depedency with ruamel-yaml + # circular dependency with ruamel-yaml # pythonImportsCheck = [ "_ruamel_yaml" ]; meta = with lib; { From ab3e70ae07388b5f68edc82be64ccc827eee81fe Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Sat, 29 Oct 2022 19:02:22 +0200 Subject: [PATCH 035/130] inetutils: 2.3 -> 2.4 ``` GNU inetutils NEWS -- history of user-visible changes. * Noteworthy changes in release 2.4 (2022-10-25) [stable] ** ifconfig *** Support specifying prefix netmask lengths in -A. Patch by Samuel Thibault . ** Hurd: tell pfinet translator interfaces to configure Patch by Samuel Thibault . ** ftp *** Avoid crash caused by signed integer overflow resulting in out-of-bounds buffer access. Reported by AiDai in . *** Avoid crash caused by heap buffer overflow. Reported by ZFeiXQ in . *** Avoid crash caused by NULL pointer dereference. Reported by AiDai in . *** Avoid crash caused by infinite macro recursion. Reported by AiDai in . ** telnetd *** Avoid crash on 0xff 0xf7 (IAC EC) or 0xff 0xf8 (IAC EL). CVE-2022-39028 https://pierrekim.github.io/blog/2022-08-24-2-byte-dos-freebsd-netbsd-telnetd-netkit-telnetd-inetutils-telnetd-kerberos-telnetd.html ** telnet *** Fix a buffer overflow problem. CVE-2019-0053 https://cgit.freebsd.org/src/commit/?id=14aab889f4e50072a6b914eb95ebbfa939539dad ** tftp *** Avoid crashing when given unexpected or invalid commands from tty. Reported by AiDai in . ** Various bugs fixes, internal improvements and clean ups. Update of gnulib and build fixes for C23. ``` --- pkgs/tools/networking/inetutils/default.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/networking/inetutils/default.nix b/pkgs/tools/networking/inetutils/default.nix index c6362f544691..57ed93d8130e 100644 --- a/pkgs/tools/networking/inetutils/default.nix +++ b/pkgs/tools/networking/inetutils/default.nix @@ -1,14 +1,14 @@ { stdenv, lib, fetchurl, ncurses, perl, help2man -, apparmorRulesFromClosure, fetchpatch +, apparmorRulesFromClosure }: stdenv.mkDerivation rec { pname = "inetutils"; - version = "2.3"; + version = "2.4"; src = fetchurl { url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz"; - sha256 = "sha256-CwG7COKWI8TjuUDyM8lhRR2a+MUGYwGt12pSqV1Rdyw="; + sha256 = "sha256-F4nWsbGlff4qere1M+6fXf2cv1tZuxuzwmEu0I0PaLI="; }; outputs = ["out" "apparmor"]; @@ -16,11 +16,6 @@ stdenv.mkDerivation rec { patches = [ # https://git.congatec.com/yocto/meta-openembedded/commit/3402bfac6b595c622e4590a8ff5eaaa854e2a2a3 ./inetutils-1_9-PATH_PROCNET_DEV.patch - (fetchpatch { - name = "CVE-2022-39028.patch"; - url = "https://sources.debian.org/data/main/i/inetutils/2%3A2.3-5/debian/patches/inetutils-telnetd-EC_EL_null_deref.patch"; - sha256 = "sha256-NYNDbEk3q3EhQdJaR12JBbnjJIRRpOcKLBF/EJJPiGU="; - }) ]; nativeBuildInputs = [ help2man perl /* for `whois' */ ]; From 26e69f693f2b79d12282c759de54dc25a2b86c32 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 23 Oct 2022 19:21:06 +0000 Subject: [PATCH 036/130] libcpuid: 0.6.0 -> 0.6.1 --- pkgs/tools/misc/libcpuid/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/libcpuid/default.nix b/pkgs/tools/misc/libcpuid/default.nix index e7fb2b4da799..2dd591b5b3b9 100644 --- a/pkgs/tools/misc/libcpuid/default.nix +++ b/pkgs/tools/misc/libcpuid/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "libcpuid"; - version = "0.6.0"; + version = "0.6.1"; src = fetchFromGitHub { owner = "anrieff"; repo = "libcpuid"; rev = "v${version}"; - sha256 = "sha256-XX+XFd1ehahIUGONAx2iOxetU0s6vONc7m91zEOWz5o="; + sha256 = "sha256-KxG06a56XPa34IJGAJbBeHUKkCEba+R7HOSosTCwQKU="; }; nativeBuildInputs = [ autoreconfHook ]; From 065e2fe7fb35fb0a03db35136228dd9e68280e93 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 31 Oct 2022 09:00:32 -0500 Subject: [PATCH 037/130] libcpuid: add meta.changelog --- pkgs/tools/misc/libcpuid/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/misc/libcpuid/default.nix b/pkgs/tools/misc/libcpuid/default.nix index 2dd591b5b3b9..83f42dabebe0 100644 --- a/pkgs/tools/misc/libcpuid/default.nix +++ b/pkgs/tools/misc/libcpuid/default.nix @@ -16,6 +16,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "http://libcpuid.sourceforge.net/"; description = "A small C library for x86 CPU detection and feature extraction"; + changelog = "https://raw.githubusercontent.com/anrieff/libcpuid/master/ChangeLog"; license = licenses.bsd2; maintainers = with maintainers; [ orivej artuuge ]; platforms = platforms.x86; From 1f197e240e837cc9b21714b79441cf823f0db13a Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Mon, 31 Oct 2022 16:57:39 +0100 Subject: [PATCH 038/130] pythonRelaxDepsHook: improve Requires-Dist parsing Prior to this commit, pythonRelaxDeps would only support removing version constraints from "Requires-Dist" lines formatted in a particular way ("foo (>= 1.2.3)"). This way is deprecated as per PyPA Core Metadata Specs v2.1 [1]: > Tools parsing the format should accept optional parentheses around > this, but tools generating it should not use parentheses. Additionally, a "Requires-Dist" dependency specification can contain other metadata than just package name and version (extra names, environment marker). These were being silently dropped by the prior version of pythonRelaxDeps, or the version could not be relaxed. The actual grammar is defined in PEP 508 [2]. Our tool of choice here is sed extended regexps, so there's only so much we can do to be correct with this parser. The regexp implemented in this commit makes an attempt at supporting [extra] names, ; env_markers, as well as version specs without parentheses. There are still unsupported features (URL specs) as well as unhandled edge cases, but at some point trying to make the regexp better is bound to awake ZALGO [3]. [1] https://packaging.python.org/en/latest/specifications/core-metadata/#requires-dist-multiple-use [2] https://peps.python.org/pep-0508/#grammar [3] https://stackoverflow.com/a/1732454/179806 --- .../python/hooks/python-relax-deps-hook.sh | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh b/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh index d404c6021f4f..31bdec914f69 100644 --- a/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh @@ -22,6 +22,24 @@ # # pythonRemoveDeps = true; # … # } +# +# IMPLEMENTATION NOTES: +# +# The "Requires-Dist" dependency specification format is described in PEP 508. +# Examples that the regular expressions in this hook needs to support: +# +# Requires-Dist: foo +# -> foo +# Requires-Dist: foo[optional] +# -> foo[optional] +# Requires-Dist: foo[optional]~=1.2.3 +# -> foo[optional] +# Requires-Dist: foo[optional, xyz] (~=1.2.3) +# -> foo[optional, xyz] +# Requires-Dist: foo[optional]~=1.2.3 ; os_name = "posix" +# -> foo[optional] ; os_name = "posix" +# +# Currently unsupported: URL specs (foo @ https://example.com/a.zip). _pythonRelaxDeps() { local -r metadata_file="$1" @@ -30,11 +48,11 @@ _pythonRelaxDeps() { return elif [[ "$pythonRelaxDeps" == 1 ]]; then sed -i "$metadata_file" -r \ - -e 's/(Requires-Dist: \S*) \(.*\)/\1/' + -e 's/(Requires-Dist: [a-zA-Z0-9_.-]+\s*(\[[^]]+\])?)[^;]*(;.*)?/\1\3/' else for dep in $pythonRelaxDeps; do sed -i "$metadata_file" -r \ - -e "s/(Requires-Dist: $dep) \(.*\)/\1/" + -e "s/(Requires-Dist: $dep\s*(\[[^]]+\])?)[^;]*(;.*)?/\1\3/" done fi } From 7765dd12f1959dd5651bf9f113f3ee01598aa9b4 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 31 Oct 2022 22:44:46 +0100 Subject: [PATCH 039/130] libxcrypt: 4.4.28 -> 4.4.29 https://github.com/besser82/libxcrypt/releases/tag/v4.4.29 --- pkgs/development/libraries/libxcrypt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libxcrypt/default.nix b/pkgs/development/libraries/libxcrypt/default.nix index db5f5026f2c1..9a329ba24f17 100644 --- a/pkgs/development/libraries/libxcrypt/default.nix +++ b/pkgs/development/libraries/libxcrypt/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "libxcrypt"; - version = "4.4.28"; + version = "4.4.29"; src = fetchurl { url = "https://github.com/besser82/libxcrypt/releases/download/v${version}/libxcrypt-${version}.tar.xz"; - sha256 = "sha256-npNoEfn60R28ozyhm9l8VcUus8oVkB8nreBGzHnmnoc="; + sha256 = "sha256-de48/0ghSYxSNWOCxKHfV5mhvw1WrF6pTZVCt87p94Y="; }; outputs = [ From 32ebb91f4bee39fd1ff6f4ab0fcc78aa9c1856d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 1 Nov 2022 17:29:35 +0100 Subject: [PATCH 040/130] openssl_1_1: 1.1.1q -> 1.1.1s I believe this double version jump includes no security fixes. --- 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 78cc680c7be5..bc7d6abcde68 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.1s"; + sha256 = "sha256-xawB52Dub/Dath1rK70wFGck0GPrMiGAxvGKb3Tktqo="; patches = [ ./1.1/nix-ssl-cert-file.patch From 6aa0c5e9186dc9022fbab2290516aaa862add8b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 1 Nov 2022 17:32:27 +0100 Subject: [PATCH 041/130] openssl_1_1: drop a long unused patch --- .../openssl/1.1/macos-yosemite-compat.patch | 56 ------------------- .../development/libraries/openssl/default.nix | 4 +- 2 files changed, 1 insertion(+), 59 deletions(-) delete mode 100644 pkgs/development/libraries/openssl/1.1/macos-yosemite-compat.patch diff --git a/pkgs/development/libraries/openssl/1.1/macos-yosemite-compat.patch b/pkgs/development/libraries/openssl/1.1/macos-yosemite-compat.patch deleted file mode 100644 index b0e37e325611..000000000000 --- a/pkgs/development/libraries/openssl/1.1/macos-yosemite-compat.patch +++ /dev/null @@ -1,56 +0,0 @@ -From cef404f1e7a598166cbc2fd2e0048f7e2d752ad5 Mon Sep 17 00:00:00 2001 -From: David Carlier -Date: Tue, 24 Aug 2021 22:40:14 +0100 -Subject: [PATCH] Darwin platform allows to build on releases before - Yosemite/ios 8. - -issue #16407 #16408 ---- - crypto/rand/rand_unix.c | 5 +---- - include/crypto/rand.h | 10 ++++++++++ - 2 files changed, 11 insertions(+), 4 deletions(-) - -diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c -index 43f1069d151d..0f4525106af7 100644 ---- a/crypto/rand/rand_unix.c -+++ b/crypto/rand/rand_unix.c -@@ -34,9 +34,6 @@ - #if defined(__OpenBSD__) - # include - #endif --#if defined(__APPLE__) --# include --#endif - - #if defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__) - # include -@@ -381,7 +378,7 @@ static ssize_t syscall_random(void *buf, size_t buflen) - if (errno != ENOSYS) - return -1; - } --# elif defined(__APPLE__) -+# elif defined(OPENSSL_APPLE_CRYPTO_RANDOM) - if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess) - return (ssize_t)buflen; - -diff --git a/include/crypto/rand.h b/include/crypto/rand.h -index 5350d3a93119..674f840fd13c 100644 ---- a/include/crypto/rand.h -+++ b/include/crypto/rand.h -@@ -20,6 +20,16 @@ - - # include - -+# if defined(__APPLE__) && !defined(OPENSSL_NO_APPLE_CRYPTO_RANDOM) -+# include -+# if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000) || \ -+ (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) -+# define OPENSSL_APPLE_CRYPTO_RANDOM 1 -+# include -+# include -+# endif -+# endif -+ - /* forward declaration */ - typedef struct rand_pool_st RAND_POOL; - diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index bc7d6abcde68..f317f6c5d8be 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -212,7 +212,7 @@ let in { - openssl_1_1 = common rec { + openssl_1_1 = common { version = "1.1.1s"; sha256 = "sha256-xawB52Dub/Dath1rK70wFGck0GPrMiGAxvGKb3Tktqo="; patches = [ @@ -221,8 +221,6 @@ in { (if stdenv.hostPlatform.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch) - ] ++ lib.optionals (stdenv.isDarwin && (builtins.substring 5 5 version) < "m") [ - ./1.1/macos-yosemite-compat.patch ]; withDocs = true; }; From 5245e7324b185886a4627afcb19b137fe52bcb0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BE=E5=9C=B0=20=E5=B8=8C=E7=95=99=E8=80=B6?= <65301509+KiruyaMomochi@users.noreply.github.com> Date: Wed, 2 Nov 2022 02:26:33 +0800 Subject: [PATCH 042/130] cmake: put the `DEFINED` check in the same if-statement --- .../build-managers/cmake/001-search-path.diff | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/pkgs/development/tools/build-managers/cmake/001-search-path.diff b/pkgs/development/tools/build-managers/cmake/001-search-path.diff index 8f62da333f0e..04ab0847a707 100644 --- a/pkgs/development/tools/build-managers/cmake/001-search-path.diff +++ b/pkgs/development/tools/build-managers/cmake/001-search-path.diff @@ -12,7 +12,7 @@ index b9381c3d7d..5e944640b5 100644 # CMake install location "${_CMAKE_INSTALL_DIR}" ) -@@ -47,48 +44,50 @@ endif() +@@ -47,48 +44,49 @@ endif() # Non "standard" but common install prefixes list(APPEND CMAKE_SYSTEM_PREFIX_PATH @@ -22,16 +22,15 @@ index b9381c3d7d..5e944640b5 100644 ) # List common include file locations not under the common prefixes. -+if(DEFINED ENV{NIX_CC}) -+ if(IS_DIRECTORY "$ENV{NIX_CC}" -+ AND EXISTS "$ENV{NIX_CC}/nix-support/orig-libc" -+ AND EXISTS "$ENV{NIX_CC}/nix-support/orig-libc-dev") -+ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc" _nix_cmake_libc) -+ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc-dev" _nix_cmake_libc_dev) -+ else() -+ set(_nix_cmake_libc @libc_lib@) -+ set(_nix_cmake_libc_dev @libc_dev@) -+ endif() ++if(DEFINED ENV{NIX_CC} ++ AND IS_DIRECTORY "$ENV{NIX_CC}" ++ AND EXISTS "$ENV{NIX_CC}/nix-support/orig-libc" ++ AND EXISTS "$ENV{NIX_CC}/nix-support/orig-libc-dev") ++ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc" _nix_cmake_libc) ++ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc-dev" _nix_cmake_libc_dev) ++else() ++ set(_nix_cmake_libc @libc_lib@) ++ set(_nix_cmake_libc_dev @libc_dev@) +endif() + list(APPEND CMAKE_SYSTEM_INCLUDE_PATH From 86e8528f27efa9e10b8c07fcefb9c9420a049bef Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 1 Nov 2022 22:32:21 +0000 Subject: [PATCH 043/130] cppunit: disable blanket -Werror `-Werror` flag usually causes build failures due to minor changes in compiler versions. They might be useful for developers themselves but are rarely useful for distributions. For example right now `cppunit` fails to compile on `gcc-13` due to a `gcc` infelicity: https://gcc.gnu.org/PR107488 While this concrete instance is a compiler bug generally `-Werror` makes users' lives harder. Specific `-Werror=` are better way to prevent certain classes of bugs. The change removes planket `-Werror` with `--disable-werror` flag. --- pkgs/development/libraries/cppunit/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/cppunit/default.nix b/pkgs/development/libraries/cppunit/default.nix index 3cafa1c75d76..fba624a861d7 100644 --- a/pkgs/development/libraries/cppunit/default.nix +++ b/pkgs/development/libraries/cppunit/default.nix @@ -9,6 +9,10 @@ stdenv.mkDerivation rec { sha256 = "19qpqzy66bq76wcyadmi3zahk5v1ll2kig1nvg96zx9padkcdic9"; }; + # Avoid blanket -Werror to evade build failures on less + # tested compilers. + configureFlags = [ "--disable-werror" ]; + meta = with lib; { homepage = "https://freedesktop.org/wiki/Software/cppunit/"; description = "C++ unit testing framework"; From fb505678edb023279448a6144087c9cbb165d134 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 1 Nov 2022 17:28:49 +0100 Subject: [PATCH 044/130] libxcrypt: 4.4.29 -> 4.4.30 https://github.com/besser82/libxcrypt/releases/tag/v4.4.30 Also enables tests on musl, which now pass. --- pkgs/development/libraries/libxcrypt/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libxcrypt/default.nix b/pkgs/development/libraries/libxcrypt/default.nix index 9a329ba24f17..d4ce1f8bc735 100644 --- a/pkgs/development/libraries/libxcrypt/default.nix +++ b/pkgs/development/libraries/libxcrypt/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "libxcrypt"; - version = "4.4.29"; + version = "4.4.30"; src = fetchurl { url = "https://github.com/besser82/libxcrypt/releases/download/v${version}/libxcrypt-${version}.tar.xz"; - sha256 = "sha256-de48/0ghSYxSNWOCxKHfV5mhvw1WrF6pTZVCt87p94Y="; + sha256 = "sha256-s2Z/C6hdqtavJGukCQ++UxY62TyLaioSV9IqeLt87ro="; }; outputs = [ @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - doCheck = !stdenv.hostPlatform.isMusl; + doCheck = true; passthru.tests = { inherit (nixosTests) login shadow; From b6b54ccd0e17d2656773306cb133c8bd04330482 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 1 Nov 2022 22:59:31 +0000 Subject: [PATCH 045/130] spirv-tools: disable blanket -Werror `-Werror` flag usually causes build failures due to minor changes in compiler versions. They might be useful for developers themselves but are rarely useful for distributions. For example right now `spirv-tools` fails to compile on `gcc-13` due to a `gcc` infelicity: https://gcc.gnu.org/PR107488 While this concrete instance is a compiler bug generally `-Werror` makes users' lives harder. Specific `-Werror=` are better way to prevent certain classes of bugs. The change removes planket `-Werror` with `-DSPIRV_WERROR=OFF` flag. --- pkgs/development/tools/spirv-tools/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/spirv-tools/default.nix b/pkgs/development/tools/spirv-tools/default.nix index 2ac91924feba..3a64646ded63 100644 --- a/pkgs/development/tools/spirv-tools/default.nix +++ b/pkgs/development/tools/spirv-tools/default.nix @@ -15,7 +15,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake python3 ]; - cmakeFlags = [ "-DSPIRV-Headers_SOURCE_DIR=${spirv-headers.src}" ]; + cmakeFlags = [ + "-DSPIRV-Headers_SOURCE_DIR=${spirv-headers.src}" + # Avoid blanket -Werror to evade build failures on less + # tested compilers. + "-DSPIRV_WERROR=OFF" + ]; # https://github.com/KhronosGroup/SPIRV-Tools/issues/3905 postPatch = '' From 0b581a366f749250dd475790f1b76bb137149650 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 2 Nov 2022 04:22:46 +0000 Subject: [PATCH 046/130] libre: 2.8.0 -> 2.9.0 --- pkgs/development/libraries/libre/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libre/default.nix b/pkgs/development/libraries/libre/default.nix index 5f91b2ff8af9..7ed03f0af117 100644 --- a/pkgs/development/libraries/libre/default.nix +++ b/pkgs/development/libraries/libre/default.nix @@ -1,12 +1,12 @@ { lib, stdenv, fetchFromGitHub, zlib, openssl }: stdenv.mkDerivation rec { - version = "2.8.0"; + version = "2.9.0"; pname = "libre"; src = fetchFromGitHub { owner = "baresip"; repo = "re"; rev = "v${version}"; - sha256 = "sha256-mbPFaq49EI2BdhdQJwFaBxjAh2aKlcuFwoCTwhXRbUg="; + sha256 = "sha256-YNAfHmohMqGGF8N/VdndJJ32PF/GMBoNtjo/t2lt6HA="; }; buildInputs = [ zlib openssl ]; makeFlags = [ "USE_ZLIB=1" "USE_OPENSSL=1" "PREFIX=$(out)" ] From 9fa023faa50e3397655bb1a29098027076bc6935 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 2 Nov 2022 04:23:52 +0000 Subject: [PATCH 047/130] librem: 2.8.0 -> 2.9.0 --- pkgs/development/libraries/librem/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/librem/default.nix b/pkgs/development/libraries/librem/default.nix index 4375b2566622..6c7bdeec0bdf 100644 --- a/pkgs/development/libraries/librem/default.nix +++ b/pkgs/development/libraries/librem/default.nix @@ -1,12 +1,12 @@ { lib, stdenv, fetchFromGitHub, zlib, openssl, libre }: stdenv.mkDerivation rec { - version = "2.8.0"; + version = "2.9.0"; pname = "librem"; src = fetchFromGitHub { owner = "baresip"; repo = "rem"; rev = "v${version}"; - sha256 = "sha256-/DAJMudEEB/8IYl27SFRlD57dfhZrPA5I1ycL4lFXy8="; + sha256 = "sha256-HiVM/opZuR7Gkt421ps+nKiiKERG8sUD8qBLIMGNCJI="; }; buildInputs = [ zlib openssl libre ]; makeFlags = [ From a3c00da98305ca0239634383b8bb1991cbb105ca Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 2 Nov 2022 07:26:49 +0000 Subject: [PATCH 048/130] libcamera: disable blanket -Werror `-Werror` flag usually causes build failures due to minor changes in compiler versions. They might be useful for developers themselves but are rarely useful for distributions. For example right now `libcamera` fails to compile on `gcc-13` due to a `gcc` infelicity: https://gcc.gnu.org/PR107488 While this concrete instance is a compiler bug generally `-Werror` makes users' lives harder. Specific `-Werror=` are better way to prevent certain classes of bugs. The change removes planket `-Werror` with `-Dwerror=false` flag. --- pkgs/development/libraries/libcamera/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/libcamera/default.nix b/pkgs/development/libraries/libcamera/default.nix index c26dd91a2181..ff7cd7a193e3 100644 --- a/pkgs/development/libraries/libcamera/default.nix +++ b/pkgs/development/libraries/libcamera/default.nix @@ -77,6 +77,9 @@ stdenv.mkDerivation rec { "-Dv4l2=true" "-Dqcam=disabled" "-Dlc-compliance=disabled" # tries unconditionally to download gtest when enabled + # Avoid blanket -Werror to evade build failures on less + # tested compilers. + "-Dwerror=false" ]; # Fixes error on a deprecated declaration From 627b4dc438fdf3a6248cf5c833c153b942a8c469 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 2 Nov 2022 07:53:30 +0000 Subject: [PATCH 049/130] aws-sdk-cpp: disable blanket -Werror `-Werror` flag usually causes build failures due to minor changes in compiler versions. They might be useful for developers themselves but are rarely useful for distributions. For example right now `aws-sdk-cpp` fails to compile on `gcc-13` due to a `gcc` infelicity: https://gcc.gnu.org/PR107488 While this concrete instance is a compiler bug generally `-Werror` makes users' lives harder. Specific `-Werror=` are better way to prevent certain classes of bugs. The change removes blanket `-Werror` with a `substituteInPlace` call. --- pkgs/development/libraries/aws-sdk-cpp/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/aws-sdk-cpp/default.nix b/pkgs/development/libraries/aws-sdk-cpp/default.nix index 5d5c5e956026..efe8129d3b4f 100644 --- a/pkgs/development/libraries/aws-sdk-cpp/default.nix +++ b/pkgs/development/libraries/aws-sdk-cpp/default.nix @@ -45,6 +45,11 @@ stdenv.mkDerivation rec { ]; postPatch = '' + # Avoid blanket -Werror to evade build failures on less + # tested compilers. + substituteInPlace cmake/compiler_settings.cmake \ + --replace '"-Werror"' ' ' + # Missing includes for GCC11 sed '5i#include ' -i \ aws-cpp-sdk-cloudfront-integration-tests/CloudfrontOperationTest.cpp \ From 1cbf12663c52e38c9d35c92494b45d28664b5dfe Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 2 Nov 2022 08:02:42 +0000 Subject: [PATCH 050/130] cvise: disable blanket -Werror `-Werror` flag usually causes build failures due to minor changes in compiler versions. They might be useful for developers themselves but are rarely useful for distributions. For example right now `cvise` fails to compile on `gcc-13` due to a `gcc` infelicity: https://gcc.gnu.org/PR107488 While this concrete instance is a compiler bug generally `-Werror` makes users' lives harder. Specific `-Werror=` are better way to prevent certain classes of bugs. The change removes blanket `-Werror` with a `substituteInPlace` call. --- pkgs/development/tools/misc/cvise/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/tools/misc/cvise/default.nix b/pkgs/development/tools/misc/cvise/default.nix index cd3a38d300ef..ae0846f479ca 100644 --- a/pkgs/development/tools/misc/cvise/default.nix +++ b/pkgs/development/tools/misc/cvise/default.nix @@ -32,6 +32,11 @@ buildPythonApplication rec { ]; postPatch = '' + # Avoid blanket -Werror to evade build failures on less + # tested compilers. + substituteInPlace CMakeLists.txt \ + --replace " -Werror " " " + # 'cvise --command=...' generates a script with hardcoded shebang. substituteInPlace cvise.py \ --replace "#!/bin/bash" "#!${bash}/bin/bash" From 0e4af0e816cd7ce0b4165616662972bcc472680a Mon Sep 17 00:00:00 2001 From: Victor Fuentes Date: Sat, 30 Jul 2022 18:58:44 -0700 Subject: [PATCH 051/130] calamares: add locale path patch --- pkgs/tools/misc/calamares/default.nix | 2 ++ pkgs/tools/misc/calamares/supportedlocale.patch | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 pkgs/tools/misc/calamares/supportedlocale.patch diff --git a/pkgs/tools/misc/calamares/default.nix b/pkgs/tools/misc/calamares/default.nix index 22b5cde7f451..34d05852a7e8 100644 --- a/pkgs/tools/misc/calamares/default.nix +++ b/pkgs/tools/misc/calamares/default.nix @@ -36,6 +36,8 @@ mkDerivation rec { # Fix setting the kayboard layout on GNOME wayland # By default the module uses the setxkbmap, which will not change the keyboard ./waylandkbd.patch + # Change default location where calamares searches for locales + ./supportedlocale.patch ]; nativeBuildInputs = [ cmake extra-cmake-modules ]; diff --git a/pkgs/tools/misc/calamares/supportedlocale.patch b/pkgs/tools/misc/calamares/supportedlocale.patch new file mode 100644 index 000000000000..ab161ffdee7c --- /dev/null +++ b/pkgs/tools/misc/calamares/supportedlocale.patch @@ -0,0 +1,13 @@ +diff --git a/src/modules/locale/Config.cpp b/src/modules/locale/Config.cpp +index 2357019a7..75b547430 100644 +--- a/src/modules/locale/Config.cpp ++++ b/src/modules/locale/Config.cpp +@@ -48,7 +48,7 @@ loadLocales( const QString& localeGenPath ) + // supported locales. We first try that one, and if it doesn't exist, we fall back + // to parsing the lines from locale.gen + localeGenLines.clear(); +- QFile supported( "/usr/share/i18n/SUPPORTED" ); ++ QFile supported( "/run/current-system/sw/share/i18n/SUPPORTED" ); + QByteArray ba; + + if ( supported.exists() && supported.open( QIODevice::ReadOnly | QIODevice::Text ) ) From 40ade45200726769ce94a4f73a2a553f5373874d Mon Sep 17 00:00:00 2001 From: Victor Fuentes Date: Sat, 30 Jul 2022 18:59:17 -0700 Subject: [PATCH 052/130] glib-locales: store SUPPORTED locales file --- pkgs/development/libraries/glibc/locales.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/glibc/locales.nix b/pkgs/development/libraries/glibc/locales.nix index d2cf0f89cb07..ed6f0a5b32ca 100644 --- a/pkgs/development/libraries/glibc/locales.nix +++ b/pkgs/development/libraries/glibc/locales.nix @@ -64,8 +64,9 @@ callPackage ./common.nix { inherit stdenv; } { installPhase = '' - mkdir -p "$out/lib/locale" + mkdir -p "$out/lib/locale" "$out/share/i18n" cp -v "$TMPDIR/$NIX_STORE/"*"/lib/locale/locale-archive" "$out/lib/locale" + cp -v ../glibc-2*/localedata/SUPPORTED "$out/share/i18n/SUPPORTED" ''; setupHook = writeText "locales-setup-hook.sh" From f4e541427e33c16c7e574c3b5606d214e7a981c9 Mon Sep 17 00:00:00 2001 From: Victor Fuentes Date: Sat, 30 Jul 2022 18:59:52 -0700 Subject: [PATCH 053/130] calamares-cd: default supporting all locales --- .../installer/cd-dvd/installation-cd-graphical-calamares.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix index 8a6d30d1801a..288cbc94a321 100644 --- a/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix +++ b/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix @@ -16,5 +16,10 @@ in calamares-nixos-extensions # Needed for calamares QML module packagechooserq libsForQt5.full + # Get list of locales + glibcLocales ]; + + # Support choosing from any locale + i18n.supportedLocales = [ "all" ]; } From 57abb43cfccac8cc2eef14129201f977a162e6b2 Mon Sep 17 00:00:00 2001 From: Victor Fuentes Date: Sat, 30 Jul 2022 19:02:59 -0700 Subject: [PATCH 054/130] calamares-nixos-extensions: 0.3.10 -> 0.3.11 --- pkgs/tools/misc/calamares-nixos-extensions/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/calamares-nixos-extensions/default.nix b/pkgs/tools/misc/calamares-nixos-extensions/default.nix index a587cd585e1a..ad21c398fe9f 100644 --- a/pkgs/tools/misc/calamares-nixos-extensions/default.nix +++ b/pkgs/tools/misc/calamares-nixos-extensions/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "calamares-nixos-extensions"; - version = "0.3.10"; + version = "0.3.11"; src = fetchFromGitHub { owner = "NixOS"; repo = "calamares-nixos-extensions"; rev = version; - sha256 = "YJyK0rsrftrCwYD+aCAkPe/kAqUXsP/4WBAGtNKIGj8="; + sha256 = "NAHUU0tQLu8c2dke1V0aM3mHrNgM8ekHSB2Fo9dQUk8="; }; installPhase = '' From eb6caa8ddfe689cf49b006793ec22854a09ee4a4 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 2 Nov 2022 21:51:55 +0000 Subject: [PATCH 055/130] elfutils: 0.187 -> 0.188 Changes: https://sourceware.org/pipermail/elfutils-devel/2022q4/005561.html --- pkgs/development/tools/misc/elfutils/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/elfutils/default.nix b/pkgs/development/tools/misc/elfutils/default.nix index 60afcbf258a5..87271cf50ffa 100644 --- a/pkgs/development/tools/misc/elfutils/default.nix +++ b/pkgs/development/tools/misc/elfutils/default.nix @@ -8,11 +8,11 @@ # TODO: Look at the hardcoded paths to kernel, modules etc. stdenv.mkDerivation rec { pname = "elfutils"; - version = "0.187"; + version = "0.188"; src = fetchurl { url = "https://sourceware.org/elfutils/ftp/${version}/${pname}-${version}.tar.bz2"; - sha256 = "sha256-5wsN++YQ+QxNH+DXGvFCpOJcPE7566uNLXK2UVnUVMg="; + sha256 = "sha256-+4sOjQgCAFuaMJxgwdjeMt0pUbVvDDo8tW0hzgFZXf8="; }; patches = [ From 5924132e507dfda1b25039c47193776f76f77a78 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Fri, 4 Nov 2022 00:18:56 +0100 Subject: [PATCH 056/130] xorg.libXi: propagate libXext due to header dependencies While looking into #197407, I noticed that depends on which is found in libXext and thus needs to be propagated. --- pkgs/servers/x11/xorg/overrides.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index e261409d7d24..5ac7967c60f7 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -225,7 +225,7 @@ self: super: libXi = super.libXi.overrideAttrs (attrs: { outputs = [ "out" "dev" "man" "doc" ]; - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libXfixes ]; + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libXfixes self.libXext ]; configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "xorg_cv_malloc0_returns_null=no" ] ++ lib.optional stdenv.hostPlatform.isStatic "--disable-shared"; From dd3624849e79c8b9d2d63d5e6251a71092ab3390 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Mon, 31 Oct 2022 10:53:28 -0700 Subject: [PATCH 057/130] tzdata: fix build on darwin Version 2022f doesn't build on Darwin because its detection of whether getrandom is available doesn't work. This has been fixed upstream, and we can pull in the patches. --- pkgs/data/misc/tzdata/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/data/misc/tzdata/default.nix b/pkgs/data/misc/tzdata/default.nix index 480535135952..1453b3899ef7 100644 --- a/pkgs/data/misc/tzdata/default.nix +++ b/pkgs/data/misc/tzdata/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, buildPackages }: +{ lib, stdenv, fetchurl, fetchpatch, buildPackages }: stdenv.mkDerivation rec { pname = "tzdata"; @@ -19,6 +19,17 @@ stdenv.mkDerivation rec { patches = lib.optionals stdenv.hostPlatform.isWindows [ ./0001-Add-exe-extension-for-MS-Windows-binaries.patch + ] ++ [ + (fetchpatch { + name = "fix-get-random-on-osx-1.patch"; + url = "https://github.com/eggert/tz/commit/5db8b3ba4816ccb8f4ffeb84f05b99e87d3b1be6.patch"; + hash = "sha256-FevGjiSahYwEjRUTvRY0Y6/jUO4YHiTlAAPixzEy5hw="; + }) + (fetchpatch { + name = "fix-get-random-on-osx-2.patch"; + url = "https://github.com/eggert/tz/commit/841183210311b1d4ffb4084bfde8fa8bdf3e6757.patch"; + hash = "sha256-1tUTZBMT7V463P7eygpFS6/k5gTeeXumk5+V4gdKpEI="; + }) ]; outputs = [ "out" "bin" "man" "dev" ]; From 844a08cc06b5c0703ba37f2318ef5b7d90665d04 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Sat, 5 Nov 2022 11:01:05 +0900 Subject: [PATCH 058/130] systemd: 251.5 -> 251.7 systemd 251.6 added support for libbpf 1.0.0, so use new libbpf version. --- pkgs/os-specific/linux/systemd/default.nix | 10 ++++++---- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 5e5a758f302a..47dbbb21db38 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -122,7 +122,7 @@ assert withHomed -> withCryptsetup; let wantCurl = withRemote || withImportd; wantGcrypt = withResolved || withImportd; - version = "251.5"; + version = "251.7"; # Bump this variable on every (major) version change. See below (in the meson options list) for why. # command: @@ -139,7 +139,7 @@ stdenv.mkDerivation { owner = "systemd"; repo = "systemd-stable"; rev = "v${version}"; - sha256 = "sha256-2MEmvFT1D+9v8OazBwjnKc7i/x7i196Eoi8bODk1cM4="; + sha256 = "sha256-Sa5diyNFyYtREo1xSCcufAW83ZZGZvueoDVuQ2r8wno="; }; # On major changes, or when otherwise required, you *must* reformat the patches, @@ -243,12 +243,14 @@ stdenv.mkDerivation { opt = condition: pkg: if condition then pkg else null; in [ - # bpf compilation support - { name = "libbpf.so.0"; pkg = opt withLibBPF libbpf; } + # bpf compilation support. We use libbpf 1 now. + { name = "libbpf.so.1"; pkg = opt withLibBPF libbpf; } + { name = "libbpf.so.0"; pkg = null; } # We did never provide support for libxkbcommon & qrencode { name = "libxkbcommon.so.0"; pkg = null; } { name = "libqrencode.so.4"; pkg = null; } + { name = "libqrencode.so.3"; pkg = null; } # We did not provide libpwquality before so it is safe to disable it for # now. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 65092be7a8f6..fb28bd0be6e4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25710,6 +25710,7 @@ with pkgs; enableMinimal = true; guiSupport = false; }; + libbpf = libbpf_1; }; systemdMinimal = systemd.override { pname = "systemd-minimal"; From bfe9eadec9720b1ba4647f4508a774561f4888c8 Mon Sep 17 00:00:00 2001 From: Kira Bruneau Date: Sat, 16 Jul 2022 21:02:42 -0400 Subject: [PATCH 059/130] =?UTF-8?q?python3Packages.pytest-datadir:=201.3.1?= =?UTF-8?q?=20=E2=86=92=201.4.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../python-modules/pytest-datadir/default.nix | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/pytest-datadir/default.nix b/pkgs/development/python-modules/pytest-datadir/default.nix index d53734618b3e..58ad575d6386 100644 --- a/pkgs/development/python-modules/pytest-datadir/default.nix +++ b/pkgs/development/python-modules/pytest-datadir/default.nix @@ -1,31 +1,30 @@ -{ lib, buildPythonPackage, fetchFromGitHub -, setuptools-scm, pytest +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools-scm +, pytestCheckHook }: buildPythonPackage rec { pname = "pytest-datadir"; - version = "1.3.1"; + version = "1.4.1"; format = "pyproject"; src = fetchFromGitHub { owner = "gabrielcnr"; - repo = pname; - rev = version; - sha256 = "0kwgp6sqnqnmww5r0dkmyfpi0lmw0iwxz3fnwn2fs8w6bvixzznf"; + repo = "pytest-datadir"; + rev = "refs/tags/${version}"; + sha256 = "sha256-HyJ0rU1nHqRv8SHFS8m3GZ5409+JZIkoDgIVjy4ol54="; }; + SETUPTOOLS_SCM_PRETEND_VERSION = version; nativeBuildInputs = [ setuptools-scm ]; - - preBuild = '' - export SETUPTOOLS_SCM_PRETEND_VERSION="${version}" - ''; - - checkInputs = [ pytest ]; - checkPhase = "pytest"; + checkInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "pytest_datadir" ]; meta = with lib; { + description = "Pytest plugin for manipulating test data directories and files"; homepage = "https://github.com/gabrielcnr/pytest-datadir"; - description = "pytest plugin for manipulating test data directories and files"; license = licenses.mit; maintainers = with maintainers; [ kira-bruneau ]; }; From 16b4c7f0adbf63a69554e3954c2bf443e932b090 Mon Sep 17 00:00:00 2001 From: oxalica Date: Sat, 5 Nov 2022 19:27:27 +0800 Subject: [PATCH 060/130] python3Packages.protobuf: fix derivation version --- .../python-modules/protobuf/default.nix | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/protobuf/default.nix b/pkgs/development/python-modules/protobuf/default.nix index cc7ea3c7bdc3..7034ef322ab5 100644 --- a/pkgs/development/python-modules/protobuf/default.nix +++ b/pkgs/development/python-modules/protobuf/default.nix @@ -6,15 +6,29 @@ , isPyPy }: +let + versionMajor = lib.versions.major protobuf.version; + versionMinor = lib.versions.minor protobuf.version; + versionPatch = lib.versions.patch protobuf.version; +in buildPythonPackage { - inherit (protobuf) pname src version; + inherit (protobuf) pname src; + + # protobuf 3.21 coresponds with its python library 4.21 + version = + if lib.versionAtLeast protobuf.version "3.21" + then "${toString (lib.toInt versionMajor + 1)}.${versionMinor}.${versionPatch}" + else protobuf.version; + disabled = isPyPy; + sourceRoot = "source/python"; + prePatch = '' - while [ ! -d python ]; do - cd * - done - cd python + if [[ "$(<../version.json)" != *'"python": "'"$version"'"'* ]]; then + echo "Python library version mismatch. Derivation version: $version, actual: $(<../version.json)" + exit 1 + fi ''; nativeBuildInputs = [ pyext ]; From 53dfc2573b48664e620dbd140b3dbc8d2c9996ff Mon Sep 17 00:00:00 2001 From: oxalica Date: Sun, 9 Oct 2022 03:09:40 +0800 Subject: [PATCH 061/130] python3Packages.sagamaker: relax protobuf and attrs --- .../python-modules/sagemaker/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/sagemaker/default.nix b/pkgs/development/python-modules/sagemaker/default.nix index b35eb7118d57..ebcb42920618 100644 --- a/pkgs/development/python-modules/sagemaker/default.nix +++ b/pkgs/development/python-modules/sagemaker/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, pythonRelaxDepsHook , attrs , boto3 , google-pasta @@ -27,6 +28,13 @@ buildPythonPackage rec { hash = "sha256-hs71bIoByh5S1ncsku+y4X2i0yU65FknJE05lEmnru4="; }; + nativeBuildInputs = [ pythonRelaxDepsHook ]; + pythonRelaxDeps = [ + # FIXME: Remove when >= 2.111.0 + "attrs" + "protobuf" + ]; + propagatedBuildInputs = [ attrs boto3 @@ -41,11 +49,6 @@ buildPythonPackage rec { pandas ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "attrs==20.3.0" "attrs>=20.3.0" - ''; - postFixup = '' [ "$($out/bin/sagemaker-upgrade-v2 --help 2>&1 | grep -cim1 'pandas failed to import')" -eq "0" ] ''; From 8bd4d92e2f586f3622621a0e5fbf18c81ab3bb55 Mon Sep 17 00:00:00 2001 From: oxalica Date: Sun, 9 Oct 2022 02:12:11 +0800 Subject: [PATCH 062/130] nrfutil: relax protobuf --- pkgs/development/tools/misc/nrfutil/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/nrfutil/default.nix b/pkgs/development/tools/misc/nrfutil/default.nix index 7d2cbabef40e..5c88bd130599 100644 --- a/pkgs/development/tools/misc/nrfutil/default.nix +++ b/pkgs/development/tools/misc/nrfutil/default.nix @@ -37,9 +37,12 @@ buildPythonApplication rec { nose ]; + # Workaround: pythonRelaxDepsHook doesn't work for this. postPatch = '' mkdir test-reports - substituteInPlace requirements.txt --replace "libusb1==1.9.3" "libusb1" + substituteInPlace requirements.txt \ + --replace "libusb1==1.9.3" "libusb1" \ + --replace "protobuf >=3.17.3, < 4.0.0" "protobuf" ''; meta = with lib; { From a12a0047d031934a07f940e31b0bd7a7d892be25 Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Sat, 5 Nov 2022 13:18:49 +0100 Subject: [PATCH 063/130] expat: 2.4.9 -> 2.5.0 Fixes CVE-2022-43680 https://github.com/libexpat/libexpat/blob/R_2_5_0/expat/Changes --- pkgs/development/libraries/expat/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/expat/default.nix b/pkgs/development/libraries/expat/default.nix index 71841e0cfbc2..ac6e9bfdc386 100644 --- a/pkgs/development/libraries/expat/default.nix +++ b/pkgs/development/libraries/expat/default.nix @@ -16,11 +16,11 @@ stdenv.mkDerivation rec { pname = "expat"; - version = "2.4.9"; + version = "2.5.0"; src = fetchurl { url = "https://github.com/libexpat/libexpat/releases/download/R_${lib.replaceStrings ["."] ["_"] version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-bowHKP5cfNP5OmrM5DBGxeRzbHtLaOAy6TUNqg78A1Q="; + sha256 = "1gnwihpfz4x18rwd6cbrdggmfqjzwsdfh1gpmc0ph21c4gq2097g"; }; strictDeps = true; From 3d459ebf01918ea330677190280bf9164b003966 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 5 Nov 2022 11:35:34 +0100 Subject: [PATCH 064/130] pixman: 0.38.4 -> 0.42.2 https://www.openwall.com/lists/oss-security/2022/11/05/100644 Fixes: CVE-2022-44638 --- pkgs/development/libraries/pixman/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/pixman/default.nix b/pkgs/development/libraries/pixman/default.nix index ffdaeaef035a..49f5fbe88159 100644 --- a/pkgs/development/libraries/pixman/default.nix +++ b/pkgs/development/libraries/pixman/default.nix @@ -2,11 +2,14 @@ stdenv.mkDerivation rec { pname = "pixman"; - version = "0.38.4"; + version = "0.42.2"; src = fetchurl { - url = "mirror://xorg/individual/lib/${pname}-${version}.tar.bz2"; - sha256 = "0l0m48lnmdlmnaxn2021qi5cj366d9fzfjxkqgcj9bs14pxbgaw4"; + urls = [ + "mirror://xorg/individual/lib/${pname}-${version}.tar.gz" + "https://cairographics.org/releases/${pname}-${version}.tar.gz" + ]; + hash = "sha256-6hSA762i/ZSLx1Nm98NJ4cltMpfQmj/mJibjjiNKYl4="; }; separateDebugInfo = !stdenv.hostPlatform.isStatic; From 3d64cd31a201b877c2a72d2de7d36d3810a029ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 6 Nov 2022 08:24:19 +0100 Subject: [PATCH 065/130] python3Packages.PyICU: 2.9 -> 2.10.2 Otherwise tests would fail; most likely fixed by: https://gitlab.pyicu.org/main/pyicu/-/commit/8331f889a1e840e CHANGES look backward compatible. --- pkgs/development/python-modules/pyicu/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyicu/default.nix b/pkgs/development/python-modules/pyicu/default.nix index 255231f8a496..54c757c93915 100644 --- a/pkgs/development/python-modules/pyicu/default.nix +++ b/pkgs/development/python-modules/pyicu/default.nix @@ -8,11 +8,11 @@ buildPythonPackage rec { pname = "PyICU"; - version = "2.9"; + version = "2.10.2"; src = fetchPypi { inherit pname version; - sha256 = "sha256-PCnWzmVUYVcReho0ejA+zfzxp1ke1nn8iM3vQQiEWHg="; + sha256 = "sha256-DDMJ7qf6toV1B6zmJANRW2D+CWy/tPkNFPVf91xUQcE="; }; nativeBuildInputs = [ icu ]; # for icu-config, but should be replaced with pkg-config From d9a7fcb2ee4aefef248065452af8c846062ab840 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 27 Oct 2022 10:02:00 +0200 Subject: [PATCH 066/130] python3Packages.scikit-learn: 1.1.2 -> 1.1.3 vcunat's comments: somehow this fixes python39Packages.scikit-learn and the release is bugfix-only so let me move it forward: https://github.com/scikit-learn/scikit-learn/releases/tag/1.1.3 https://hydra.nixos.org/log/bgfiivrlx2ddp61h7k2mwg5nmc19brnp-python3.9-scikit-learn-1.1.2.drv --- pkgs/development/python-modules/scikit-learn/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/scikit-learn/default.nix b/pkgs/development/python-modules/scikit-learn/default.nix index 3512f1ddd06f..d9c4f07ccb8d 100644 --- a/pkgs/development/python-modules/scikit-learn/default.nix +++ b/pkgs/development/python-modules/scikit-learn/default.nix @@ -19,12 +19,12 @@ buildPythonPackage rec { pname = "scikit-learn"; - version = "1.1.2"; + version = "1.1.3"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-fCLRMFsW8I1XdRpOo2Bx4iFe+0wJy3kYP6pOjoKj2/g="; + sha256 = "sha256-vvUZeKUewZl3cA/nuGrs6knIJYhPOBF1a3SjsVK7TjU="; }; buildInputs = [ From 12508ac79a3b940d42580e9cfb7d2037e7af3b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Oko=C5=84ski?= Date: Sat, 29 Oct 2022 22:22:57 +0200 Subject: [PATCH 067/130] nixos-container: force systemd-nspawn to use unified cgroups hierarchy --- .../virtualisation/nixos-containers.nix | 2 ++ nixos/tests/all-tests.nix | 1 + nixos/tests/containers-unified-hierarchy.nix | 21 +++++++++++++++++++ .../nixos-container/default.nix | 1 + 4 files changed, 25 insertions(+) create mode 100644 nixos/tests/containers-unified-hierarchy.nix diff --git a/nixos/modules/virtualisation/nixos-containers.nix b/nixos/modules/virtualisation/nixos-containers.nix index 22be1d5bff92..4d51c53a604e 100644 --- a/nixos/modules/virtualisation/nixos-containers.nix +++ b/nixos/modules/virtualisation/nixos-containers.nix @@ -138,6 +138,8 @@ let fi ''} + export SYSTEMD_NSPAWN_UNIFIED_HIERARCHY=1 + # Run systemd-nspawn without startup notification (we'll # wait for the container systemd to signal readiness) # Kill signal handling means systemd-nspawn will pass a system-halt signal diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 47a433c0322b..fe75f1582908 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -143,6 +143,7 @@ in { containers-reloadable = handleTest ./containers-reloadable.nix {}; containers-restart_networking = handleTest ./containers-restart_networking.nix {}; containers-tmpfs = handleTest ./containers-tmpfs.nix {}; + containers-unified-hierarchy = handleTest ./containers-unified-hierarchy.nix {}; convos = handleTest ./convos.nix {}; corerad = handleTest ./corerad.nix {}; coturn = handleTest ./coturn.nix {}; diff --git a/nixos/tests/containers-unified-hierarchy.nix b/nixos/tests/containers-unified-hierarchy.nix new file mode 100644 index 000000000000..978d59e12c8a --- /dev/null +++ b/nixos/tests/containers-unified-hierarchy.nix @@ -0,0 +1,21 @@ +import ./make-test-python.nix ({ pkgs, lib, ... }: { + name = "containers-unified-hierarchy"; + meta = { + maintainers = with lib.maintainers; [ farnoy ]; + }; + + nodes.machine = { ... }: { + containers = { + test-container = { + autoStart = true; + config = { }; + }; + }; + }; + + testScript = '' + machine.wait_for_unit("default.target") + + machine.succeed("echo 'stat -fc %T /sys/fs/cgroup/ | grep cgroup2fs' | nixos-container root-login test-container") + ''; +}) diff --git a/pkgs/tools/virtualization/nixos-container/default.nix b/pkgs/tools/virtualization/nixos-container/default.nix index be17753b3436..0b44bde4719f 100644 --- a/pkgs/tools/virtualization/nixos-container/default.nix +++ b/pkgs/tools/virtualization/nixos-container/default.nix @@ -25,6 +25,7 @@ substituteAll { containers-ip containers-tmpfs containers-ephemeral + containers-unified-hierarchy ; }; }; From 370c1a9ad0388df4c3677fa82899353ae19dee40 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Mon, 7 Nov 2022 13:23:19 +0000 Subject: [PATCH 068/130] python3Packages.sh: disable flaky tests --- .../development/python-modules/sh/default.nix | 24 +++++++--- .../sh/disable-broken-tests-darwin.patch | 48 ------------------- 2 files changed, 17 insertions(+), 55 deletions(-) delete mode 100644 pkgs/development/python-modules/sh/disable-broken-tests-darwin.patch diff --git a/pkgs/development/python-modules/sh/default.nix b/pkgs/development/python-modules/sh/default.nix index d6334251bff4..17dcc5acbee0 100644 --- a/pkgs/development/python-modules/sh/default.nix +++ b/pkgs/development/python-modules/sh/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, python, coverage, lsof, glibcLocales, coreutils }: +{ lib, stdenv, buildPythonPackage, fetchPypi, python, coverage, lsof, glibcLocales, coreutils, pytestCheckHook }: buildPythonPackage rec { pname = "sh"; @@ -9,17 +9,12 @@ buildPythonPackage rec { sha256 = "sha256-5ARbbHMtnOddVxx59awiNO3Zrk9fqdWbCXBQgr3KGMc="; }; - patches = [ - # Disable tests that fail on Darwin sandbox - ./disable-broken-tests-darwin.patch - ]; - postPatch = '' sed -i 's#/usr/bin/env python#${python.interpreter}#' test.py sed -i 's#/bin/sleep#${coreutils.outPath}/bin/sleep#' test.py ''; - checkInputs = [ coverage lsof glibcLocales ]; + checkInputs = [ coverage lsof glibcLocales pytestCheckHook ]; # A test needs the HOME directory to be different from $TMPDIR. preCheck = '' @@ -27,6 +22,21 @@ buildPythonPackage rec { HOME=$(mktemp -d) ''; + pytestFlagsArray = [ "test.py" ]; + + disabledTests = [ + # Disable tests that fail on Hydra + "test_no_fd_leak" + "test_piped_exception1" + "test_piped_exception2" + "test_unicode_path" + ] ++ lib.optionals stdenv.isDarwin [ + # Disable tests that fail on Darwin sandbox + "test_background_exception" + "test_cwd" + "test_ok_code" + ]; + meta = with lib; { description = "Python subprocess interface"; homepage = "https://pypi.python.org/pypi/sh/"; diff --git a/pkgs/development/python-modules/sh/disable-broken-tests-darwin.patch b/pkgs/development/python-modules/sh/disable-broken-tests-darwin.patch deleted file mode 100644 index dfeb50db8d0e..000000000000 --- a/pkgs/development/python-modules/sh/disable-broken-tests-darwin.patch +++ /dev/null @@ -1,48 +0,0 @@ -From c596ad546fe7460b57a62799837757eb641309c1 Mon Sep 17 00:00:00 2001 -From: Sirio Balmelli -Date: Mon, 20 Jul 2020 19:51:20 +0200 -Subject: [PATCH] Disable tests that fail on Darwin (macOS) or with sandboxing - -Signed-off-by: Sirio Balmelli ---- a/test.py -+++ b/test.py -@@ -377,6 +377,7 @@ exit(3) - self.assertEqual(sed(_in="one test three", e="s/test/two/").strip(), - "one two three") - -+ @not_macos - def test_ok_code(self): - from sh import ls, ErrorReturnCode_1, ErrorReturnCode_2 - -@@ -982,6 +983,7 @@ print(sys.argv[1]) - now = time.time() - self.assertGreater(now - start, sleep_time) - -+ @not_macos - def test_background_exception(self): - from sh import ls, ErrorReturnCode_1, ErrorReturnCode_2 - p = ls("/ofawjeofj", _bg=True, _bg_exc=False) # should not raise -@@ -1779,6 +1781,7 @@ exit(49) - p = python(py.name, _ok_code=49, _bg=True) - self.assertEqual(49, p.exit_code) - -+ @not_macos - def test_cwd(self): - from sh import pwd - from os.path import realpath -@@ -2777,6 +2780,7 @@ print("cool") - # on osx. so skip it for now if osx - @not_macos - @requires_progs("lsof") -+ @skipUnless(False, "Flaky on Hydra") - def test_no_fd_leak(self): - import sh - import os -@@ -2879,6 +2883,7 @@ print("hi") - python(py.name, _in=stdin) - - @requires_utf8 -+ @skipUnless(False, "Does not work in sandbox") - def test_unicode_path(self): - from sh import Command - From 89c92a92062746bc12cb066614ca4c59f13ea3bc Mon Sep 17 00:00:00 2001 From: Jan Solanti Date: Thu, 20 Oct 2022 04:39:10 +0300 Subject: [PATCH 069/130] SDL2: 2.24.0 -> 2.24.1 --- pkgs/development/libraries/SDL2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix index 9900d8874b25..97899f316d76 100644 --- a/pkgs/development/libraries/SDL2/default.nix +++ b/pkgs/development/libraries/SDL2/default.nix @@ -59,11 +59,11 @@ with lib; stdenv.mkDerivation rec { pname = "SDL2"; - version = "2.24.0"; + version = "2.24.1"; src = fetchurl { url = "https://www.libsdl.org/release/${pname}-${version}.tar.gz"; - sha256 = "sha256-keTDSxdo+S05mweOFxRIxq8Yyv2nQ5h+0gZKKJVNbZc="; + sha256 = "sha256-vBIViLEQUGVZjOOAeAJqQUwo6pXmbtKtq0xE2Aswnhs="; }; dontDisableStatic = if withStatic then 1 else 0; outputs = [ "out" "dev" ]; From 4db7dc72d27f94483d759beeb7d4c1914b4da1e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 7 Nov 2022 15:55:47 +0100 Subject: [PATCH 070/130] SDL2: 2.24.1 -> 2.24.2 --- pkgs/development/libraries/SDL2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix index 97899f316d76..a38761ed7c50 100644 --- a/pkgs/development/libraries/SDL2/default.nix +++ b/pkgs/development/libraries/SDL2/default.nix @@ -59,11 +59,11 @@ with lib; stdenv.mkDerivation rec { pname = "SDL2"; - version = "2.24.1"; + version = "2.24.2"; src = fetchurl { url = "https://www.libsdl.org/release/${pname}-${version}.tar.gz"; - sha256 = "sha256-vBIViLEQUGVZjOOAeAJqQUwo6pXmbtKtq0xE2Aswnhs="; + sha256 = "sha256-s17wqAKwnZDtOt0NysDpWCCAQgKRT1u3sP63EPGhMp8="; }; dontDisableStatic = if withStatic then 1 else 0; outputs = [ "out" "dev" ]; From f77d334af1dc5b0bf9b15b2bcbdc5aa0f5fc7338 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 7 Nov 2022 17:55:20 +0000 Subject: [PATCH 071/130] clingo: 5.6.1 -> 5.6.2 --- pkgs/applications/science/logic/potassco/clingo.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/logic/potassco/clingo.nix b/pkgs/applications/science/logic/potassco/clingo.nix index 0065ff3ef25c..a3c324d0dbb8 100644 --- a/pkgs/applications/science/logic/potassco/clingo.nix +++ b/pkgs/applications/science/logic/potassco/clingo.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "clingo"; - version = "5.6.1"; + version = "5.6.2"; src = fetchFromGitHub { owner = "potassco"; repo = "clingo"; rev = "v${version}"; - sha256 = "sha256-blr2GPa/ZwVfvot6wUcQmdN/mLEox6tjIWtr0geeoDI="; + sha256 = "sha256-2vOscD5jengY3z9gHoY9y9y6RLfdzUj7BNKLyppNRac="; }; nativeBuildInputs = [ cmake ]; From 45ab6cf9c84d74734200391aa872e79ad32f789d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 28 Oct 2022 12:53:54 -0700 Subject: [PATCH 072/130] python310Packages.nbconvert: 6.5.3 -> 7.2.3 --- .../python-modules/nbconvert/default.nix | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/pkgs/development/python-modules/nbconvert/default.nix b/pkgs/development/python-modules/nbconvert/default.nix index 1940da96047d..51123d05ef4a 100644 --- a/pkgs/development/python-modules/nbconvert/default.nix +++ b/pkgs/development/python-modules/nbconvert/default.nix @@ -4,78 +4,80 @@ , defusedxml , fetchPypi , fetchpatch +, fetchurl +, hatchling +, importlib-metadata , ipywidgets , jinja2 +, jupyter_core , jupyterlab-pygments , lib , markupsafe , mistune , nbclient +, packaging , pandocfilters +, pygments , pyppeteer , pytestCheckHook +, pythonOlder , tinycss2 +, traitlets }: -buildPythonPackage rec { +let + # see https://github.com/jupyter/nbconvert/issues/1896 + style-css = fetchurl { + url = "https://cdn.jupyter.org/notebook/5.4.0/style/style.min.css"; + hash = "sha256-WGWmCfRDewRkvBIc1We2GQdOVAoFFaO4LyIvdk61HgE="; + }; +in buildPythonPackage rec { pname = "nbconvert"; - version = "6.5.3"; - format = "setuptools"; + version = "7.2.3"; + + disabled = pythonOlder "3.7"; + + format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-EO1pPEz9PGNYPIfKXDovbth0FFEDWV84JO/Mjfy3Uiw="; + hash = "sha256-eufMxoSVtWXasVNFnufmUDmXCRPrEVBw2m4sZzzw6fg="; }; # Add $out/share/jupyter to the list of paths that are used to search for # various exporter templates patches = [ ./templates.patch - - # Use mistune 2.x - (fetchpatch { - name = "support-mistune-2.x.patch"; - url = "https://github.com/jupyter/nbconvert/commit/e870d9a4a61432a65bee5466c5fa80c9ee28966e.patch"; - hash = "sha256-kdOmE7BnkRy2lsNQ2OVrEXXZntJUPJ//b139kSsfKmI="; - excludes = [ "pyproject.toml" ]; - }) - - # patch nbconvert/filters/markdown_mistune.py - (fetchpatch { - name = "clean-up-markdown-parsing.patch"; - url = "https://github.com/jupyter/nbconvert/commit/4df1f5451c9c3e8121036dfbc7e07f0095f4d524.patch"; - hash = "sha256-O+VWUaQi8UMCpE9/h/IsrenmEuJ2ac/kBkUBq7GFJTY"; - }) - (fetchpatch { - name = "fix-markdown-table.patch"; - url = "https://github.com/jupyter/nbconvert/commit/d3900ed4527f024138dc3a8658c6a1b1dfc43c09.patch"; - hash = "sha256-AFE1Zhw29JMLB0Sj17zHcOfy7VEFqLekO8NYbyMLrdI="; - }) ]; postPatch = '' substituteAllInPlace ./nbconvert/exporters/templateexporter.py - # Use mistune 2.x - substituteInPlace setup.py \ - --replace "mistune>=0.8.1,<2" "mistune>=2.0.3,<3" - - # Equivalent of the upstream patch https://github.com/jupyter/nbconvert/commit/aec39288c9a6c614d659bcaf9f5cb36634d6b37b.patch - substituteInPlace share/jupyter/nbconvert/templates/lab/base.html.j2 \ - --replace "{{ output.data['image/svg+xml'] | clean_html }}" "{{ output.data['image/svg+xml'].encode(\"utf-8\") | clean_html }}" + mkdir -p share/templates/classic/static + cp ${style-css} share/templates/classic/static/style.css ''; + nativeBuildInputs = [ + hatchling + ]; + propagatedBuildInputs = [ beautifulsoup4 bleach defusedxml jinja2 + jupyter_core jupyterlab-pygments markupsafe mistune nbclient + packaging pandocfilters + pygments tinycss2 + traitlets + ] ++ lib.optionals (pythonOlder "3.10") [ + importlib-metadata ]; preCheck = '' @@ -88,15 +90,13 @@ buildPythonPackage rec { pytestCheckHook ]; - pytestFlagsArray = [ - # DeprecationWarning: Support for bleach <5 will be removed in a future version of nbconvert - "-W ignore::DeprecationWarning" - ]; - disabledTests = [ # Attempts network access (Failed to establish a new connection: [Errno -3] Temporary failure in name resolution) "test_export" "test_webpdf_with_chromium" + # ModuleNotFoundError: No module named 'nbconvert.tests' + "test_convert_full_qualified_name" + "test_post_processor" ]; # Some of the tests use localhost networking. From 77306d371e34fb03ffe8daa356d9ea0ce31d9eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 7 Nov 2022 21:02:10 -0800 Subject: [PATCH 073/130] python310Packages.nbformat: 5.5.0 -> 5.7.0 --- .../python-modules/nbformat/default.nix | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/pkgs/development/python-modules/nbformat/default.nix b/pkgs/development/python-modules/nbformat/default.nix index fabee5f10a2b..a418e5c6b48f 100644 --- a/pkgs/development/python-modules/nbformat/default.nix +++ b/pkgs/development/python-modules/nbformat/default.nix @@ -1,50 +1,48 @@ { lib , buildPythonPackage +, pythonOlder , fetchPypi +, hatchling +, hatch-nodejs-version , fastjsonschema -, flit-core -, pytestCheckHook -, glibcLocales -, ipython_genutils -, traitlets -, testpath , jsonschema , jupyter_core +, traitlets , pep440 +, pytestCheckHook +, testpath }: buildPythonPackage rec { pname = "nbformat"; - version = "5.5.0"; + version = "5.7.0"; + + disabled = pythonOlder "3.7"; + format = "pyproject"; src = fetchPypi { inherit pname version; - sha256 = "sha256-nr4w5sOz5bR9Of8KOJehrPUj0r+vy04tBM23D4pmxQc="; + sha256 = "1d4760c15c1a04269ef5caf375be8b98dd2f696e5eb9e603ec2bf091f9b0d3f3"; }; nativeBuildInputs = [ - flit-core + hatchling + hatch-nodejs-version ]; - LC_ALL="en_US.utf8"; - propagatedBuildInputs = [ fastjsonschema - ipython_genutils jsonschema jupyter_core - pep440 - testpath traitlets ]; - checkInputs = [ pytestCheckHook glibcLocales ]; - - preCheck = '' - mkdir tmp - export HOME=tmp - ''; + checkInputs = [ + pep440 + pytestCheckHook + testpath + ]; # Some of the tests use localhost networking. __darwinAllowLocalNetworking = true; From 3039552944add3456ccaa03e86378b51e5e4f4b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 7 Nov 2022 21:26:37 -0800 Subject: [PATCH 074/130] python310Packages.jupytext: fix tests --- pkgs/development/python-modules/jupytext/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/jupytext/default.nix b/pkgs/development/python-modules/jupytext/default.nix index 37f855394cdd..dabbe303e161 100644 --- a/pkgs/development/python-modules/jupytext/default.nix +++ b/pkgs/development/python-modules/jupytext/default.nix @@ -2,6 +2,7 @@ , stdenv , buildPythonPackage , fetchFromGitHub +, fetchpatch , GitPython , isort , jupyter-client @@ -31,6 +32,13 @@ buildPythonPackage rec { sha256 = "sha256-DDF4aTLkhEl4xViYh/E0/y6swcwZ9KbeS0qKm+HdFz8="; }; + patches = [ + (fetchpatch { + url = "https://github.com/mwouts/jupytext/commit/be9b65b03600227b737b5f10ea259a7cdb762b76.patch"; + hash = "sha256-3klx8I+T560EVfsKe/FlrSjF6JzdKSCt6uhAW2cSwtc="; + }) + ]; + buildInputs = [ jupyter-packaging jupyterlab From c35a930454f97d7fe134c71a7ffa75faa1d89aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 8 Nov 2022 11:07:29 +0100 Subject: [PATCH 075/130] libvirt-glib: fixup build after glib update I see only one instance of the warning where *equality* of strings is tested and char signedness differs. That one seems perfectly safe. ``` ../libvirt-gconfig/libvirt-gconfig-domain-capabilities-os.c: In function 'search_firmwares': ../libvirt-gconfig/libvirt-gconfig-domain-capabilities-os.c:70:26: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness [-Wpointer-sign] 70 | if (!g_str_equal(node->name, "enum")) /nix/store/fmqcm52w0p5jmzdbjjskwjiwyj9kqic9-glib-2.74.1-dev/include/glib-2.0/glib/ghash.h:165:39: note: in definition of macro 'g_str_equal' 165 | #define g_str_equal(v1, v2) (strcmp ((v1), (v2)) == 0) | ^~ ``` --- pkgs/development/libraries/libvirt-glib/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/libvirt-glib/default.nix b/pkgs/development/libraries/libvirt-glib/default.nix index b7efdf2cf7d8..8f84cd0eab80 100644 --- a/pkgs/development/libraries/libvirt-glib/default.nix +++ b/pkgs/development/libraries/libvirt-glib/default.nix @@ -55,6 +55,9 @@ stdenv.mkDerivation rec { strictDeps = true; + # https://gitlab.com/libvirt/libvirt-glib/-/issues/4 + NIX_CFLAGS_COMPILE = [ "-Wno-error=pointer-sign" ]; + meta = with lib; { description = "Library for working with virtual machines"; longDescription = '' From 7ae1b194da97ec4a0704b4b1f54837c61e4b1522 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 8 Nov 2022 20:36:21 +0100 Subject: [PATCH 076/130] microcodeIntel: 20220809 -> 20221108 https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/releases/tag/microcode-20221108 --- pkgs/os-specific/linux/microcode/intel.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/microcode/intel.nix b/pkgs/os-specific/linux/microcode/intel.nix index 6bb2855719bf..3683522f04f9 100644 --- a/pkgs/os-specific/linux/microcode/intel.nix +++ b/pkgs/os-specific/linux/microcode/intel.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "microcode-intel"; - version = "20220809"; + version = "20221108"; src = fetchFromGitHub { owner = "intel"; repo = "Intel-Linux-Processor-Microcode-Data-Files"; rev = "microcode-${version}"; - hash = "sha256-vcuLQHAGr5uRkGWWIwA2WXLJadVNxfcPgjmNS82Logg="; + hash = "sha256-JZbBrD3fHgJogDw4u2YggDX7OCXCu5/XEZKzHuVJR9k="; }; nativeBuildInputs = [ iucode-tool libarchive ]; From 1eb380d489517996794d0852cb5a389a144b4fee Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 9 Nov 2022 00:37:08 +0100 Subject: [PATCH 077/130] element-{web,desktop}: 1.11.13 -> 1.11.14 ChangeLog web: https://github.com/vector-im/element-web/releases/tag/v1.11.14 ChangeLog desktop: https://github.com/vector-im/element-desktop/releases/tag/v1.11.14 --- .../networking/instant-messengers/element/pin.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/element/pin.json b/pkgs/applications/networking/instant-messengers/element/pin.json index 9e09fa6acbee..436a8a8f4bf6 100644 --- a/pkgs/applications/networking/instant-messengers/element/pin.json +++ b/pkgs/applications/networking/instant-messengers/element/pin.json @@ -1,7 +1,7 @@ { - "version": "1.11.13", - "desktopSrcHash": "E8jpv7cJf8qdR4I3n7id5hUysAiMVvwyqUqHzGnVUJE=", - "desktopYarnHash": "1scp9y2lmah3n20f1kpc9paspd3qgslg129diis7g11cz4h0wyi5", - "webSrcHash": "985nxLIOZvrUX11AJDXYRMwC76/aP9ruSCqL47c7ZRM=", - "webYarnHash": "0bmjg9qhd89bdnh398lp257mxdgdd88wj5g3fmc3cavyd6hmgzbn" + "version": "1.11.14", + "desktopSrcHash": "91WCtb+ylVz9gSqOHb5GuSC1YZjDS3M8gdFIZYVls3c=", + "desktopYarnHash": "1ng9fwpwxsw91bzgd2kb2pdq927rkjv5rrrkmszvn55bj6ry7sqi", + "webSrcHash": "ss7Pmjg205EE/V/xIV7nvfZFRyyJfuB8MDM9dCnPckQ=", + "webYarnHash": "1v6qlk58msam9dglal4jzcyqcsrspa6idsdb8acjnscdkj26bkps" } From 5b4b6b5a037e2dc00ee788435fd5b8053bf40df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 8 Nov 2022 17:58:48 -0800 Subject: [PATCH 078/130] python310Packages.mkdocs-jupyter: relax nbconvert version constraint --- pkgs/development/python-modules/mkdocs-jupyter/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/mkdocs-jupyter/default.nix b/pkgs/development/python-modules/mkdocs-jupyter/default.nix index 2c9b85e64e0b..846d40a25fa0 100644 --- a/pkgs/development/python-modules/mkdocs-jupyter/default.nix +++ b/pkgs/development/python-modules/mkdocs-jupyter/default.nix @@ -21,6 +21,8 @@ buildPythonPackage rec { }; postPatch = '' + substituteInPlace setup.py \ + --replace "nbconvert>=6.2.0,<7.0.0" "nbconvert>=6.2.0" substituteInPlace mkdocs_jupyter/tests/test_base_usage.py \ --replace "[\"mkdocs\"," "[\"${mkdocs.out}/bin/mkdocs\"," ''; From d879bde8fbbccc39eadacde853c9de52e5c68d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 8 Nov 2022 21:50:51 -0800 Subject: [PATCH 079/130] python310Packages.aiohttp: 3.8.1 -> 3.8.3 https://github.com/aio-libs/aiohttp/blob/v3.8.3/CHANGES.rst --- pkgs/development/python-modules/aiohttp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aiohttp/default.nix b/pkgs/development/python-modules/aiohttp/default.nix index bca1f6002f4e..9a6f14f765e5 100644 --- a/pkgs/development/python-modules/aiohttp/default.nix +++ b/pkgs/development/python-modules/aiohttp/default.nix @@ -29,12 +29,12 @@ buildPythonPackage rec { pname = "aiohttp"; - version = "3.8.1"; + version = "3.8.3"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "fc5471e1a54de15ef71c1bc6ebe80d4dc681ea600e68bfd1cbce40427f0b7578"; + sha256 = "3828fb41b7203176b82fe5d699e0d845435f2374750a44b480ea6b930f6be269"; }; postPatch = '' From 50d8cda36000f0d68c02385ba0d02032b894e187 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Wed, 9 Nov 2022 07:46:54 +0100 Subject: [PATCH 080/130] pixman: fix aarch64-darwin by disabling neon https://hydra.nixos.org/build/197830077 --- pkgs/development/libraries/pixman/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/pixman/default.nix b/pkgs/development/libraries/pixman/default.nix index 232429b29fec..76ec2244c833 100644 --- a/pkgs/development/libraries/pixman/default.nix +++ b/pkgs/development/libraries/pixman/default.nix @@ -32,7 +32,9 @@ stdenv.mkDerivation rec { buildInputs = [ libpng ]; - configureFlags = lib.optional stdenv.isAarch32 "--disable-arm-iwmmxt"; + configureFlags = lib.optional stdenv.isAarch32 "--disable-arm-iwmmxt" + # Disable until https://gitlab.freedesktop.org/pixman/pixman/-/issues/46 is resolved + ++ lib.optional (stdenv.isAarch64 && !stdenv.cc.isGNU) "--disable-arm-a64-neon"; preConfigure = '' # https://gitlab.freedesktop.org/pixman/pixman/-/issues/62 From f552429c8071f9d597cb0306e9787933bc2bfc5c Mon Sep 17 00:00:00 2001 From: Viktor Kronvall Date: Fri, 4 Nov 2022 14:57:22 +0900 Subject: [PATCH 081/130] udpreplay: init at 1.0.0 --- maintainers/maintainer-list.nix | 6 ++++++ pkgs/tools/networking/udpreplay/default.nix | 24 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 pkgs/tools/networking/udpreplay/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index dc6f8eca59b5..46358221ca69 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2744,6 +2744,12 @@ githubId = 40290417; name = "Seb Blair"; }; + considerate = { + email = "viktor.kronvall@gmail.com"; + github = "considerate"; + githubId = 217918; + name = "Viktor Kronvall"; + }; copumpkin = { email = "pumpkingod@gmail.com"; github = "copumpkin"; diff --git a/pkgs/tools/networking/udpreplay/default.nix b/pkgs/tools/networking/udpreplay/default.nix new file mode 100644 index 000000000000..2e91e884e6f2 --- /dev/null +++ b/pkgs/tools/networking/udpreplay/default.nix @@ -0,0 +1,24 @@ +{ stdenv, cmake, libpcap, fetchFromGitHub, lib }: +stdenv.mkDerivation rec { + pname = "updreplay"; + version = "1.0.0"; + nativeBuildInputs = [ cmake ]; + buildInputs = [ libpcap ]; + src = fetchFromGitHub { + owner = "rigtorp"; + repo = "udpreplay"; + rev = "v${version}"; + hash = "sha256-8cp1RyVBnq3vx2LPkAx7ktmdLo0bSq9UWlbb/DrJxpc="; + }; + + meta = with lib; { + description = "Replay UDP packets from a pcap file"; + longDescription = '' + udpreplay is a lightweight alternative to tcpreplay for replaying UDP unicast and multicast streams from a pcap file. + ''; + homepage = "https://github.com/rigtorp/udpreplay"; + license = licenses.mit; + maintainers = [ maintainers.considerate ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c97f1d41dbda..a45dee49527d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12286,6 +12286,8 @@ with pkgs; udftools = callPackage ../tools/filesystems/udftools {}; + udpreplay = callPackage ../tools/networking/udpreplay { }; + udpt = callPackage ../servers/udpt { }; udptunnel = callPackage ../tools/networking/udptunnel { }; From 7e12550ff9d5c9814cb4f46dc736bb2f4627d373 Mon Sep 17 00:00:00 2001 From: Chuang Zhu Date: Wed, 9 Nov 2022 18:40:06 +0800 Subject: [PATCH 082/130] tootle: fix build --- pkgs/applications/misc/tootle/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/misc/tootle/default.nix b/pkgs/applications/misc/tootle/default.nix index 422cf8ea7623..a552b5721b32 100644 --- a/pkgs/applications/misc/tootle/default.nix +++ b/pkgs/applications/misc/tootle/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , nix-update-script , fetchpatch -, vala_0_54 +, vala , meson , ninja , pkg-config @@ -50,6 +50,11 @@ stdenv.mkDerivation rec { url = "https://git.alpinelinux.org/aports/plain/community/tootle/0003-make-app-entries-private.patch?id=c973e68e3cba855f1601ef010afa9a14578b9499"; sha256 = "sha256-zwU0nxf/haBZl4tOYDmMzwug+HC6lLDT8/12Wt62+S4="; }) + # https://github.com/flathub/com.github.bleakgrey.tootle/pull/22 + (fetchpatch { + url = "https://github.com/flathub/com.github.bleakgrey.tootle/raw/6b524dc13143e4827f67628e33dcf161d862af29/Fix-construct-prop.patch"; + sha256 = "sha256-zOIMy9+rY2aRcPHcGWU/x6kf/xb7VnuHdsKQ0FO1Cyc="; + }) ]; nativeBuildInputs = [ @@ -57,11 +62,7 @@ stdenv.mkDerivation rec { ninja pkg-config python3 - # Does not build with Vala 0.56.1: - # ../src/Widgets/Status.vala:8.43-8.56: error: construct - # properties not supported for specified property type - # public API.NotificationType? kind { get; construct set; } - vala_0_54 + vala wrapGAppsHook ]; @@ -93,6 +94,5 @@ stdenv.mkDerivation rec { homepage = "https://github.com/bleakgrey/tootle"; license = licenses.gpl3; maintainers = with maintainers; [ dtzWill ]; - broken = true; }; } From e0f3fd697055212016f71c938ab3cfc2125a8e83 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 9 Nov 2022 15:07:38 +0100 Subject: [PATCH 083/130] python310Packages.pytenable: 1.4.8 -> 1.4.9 --- pkgs/development/python-modules/pytenable/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pytenable/default.nix b/pkgs/development/python-modules/pytenable/default.nix index 2b08e6129fad..caae9319db7e 100644 --- a/pkgs/development/python-modules/pytenable/default.nix +++ b/pkgs/development/python-modules/pytenable/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { pname = "pytenable"; - version = "1.4.8"; + version = "1.4.9"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -29,7 +29,7 @@ buildPythonPackage rec { owner = "tenable"; repo = "pyTenable"; rev = "refs/tags/${version}"; - hash = "sha256-alBEKCYwLIbQanKTzkd3NnfOudhGhKhg4sFqddWdzQA="; + hash = "sha256-Cj1/f/e+j5CJMl+afF+HStd419Uh053jKk/vmObaBl8="; }; propagatedBuildInputs = [ From cc9214ee8edbe45d9c5cba10a956122e7e85e9ea Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 9 Nov 2022 09:53:19 -0500 Subject: [PATCH 084/130] rustscan: 2.2.0 -> 2.2.1 --- pkgs/tools/security/rustscan/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/rustscan/default.nix b/pkgs/tools/security/rustscan/default.nix index 79a1fd1195f0..849a921898a7 100644 --- a/pkgs/tools/security/rustscan/default.nix +++ b/pkgs/tools/security/rustscan/default.nix @@ -2,14 +2,14 @@ rustPlatform.buildRustPackage rec { pname = "rustscan"; - version = "2.1.0"; + version = "2.1.1"; src = fetchCrate { inherit pname version; - sha256 = "sha256-f9QFsVGGKoWqZGIg8Z8FgZGcUo5M8MFNUavK69SgHkg="; + sha256 = "sha256-yGVhbI1LivTIQEgqOK59T1+8SiTJBPIdftiXkwE4lZM="; }; - cargoSha256 = "sha256-ZoDE7SJ6snWTFvYXHZdVCC6UCug2wGghH93FfDTDsv0="; + cargoSha256 = "sha256-UR3ktV80QU0N3f7qmqdhYpc5uwoPq4UvN40zEuMbp+Q="; postPatch = '' substituteInPlace src/scripts/mod.rs \ From 7ed22692b510b688b624e0495d1fa5f52c576940 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Wed, 9 Nov 2022 23:11:25 +0800 Subject: [PATCH 085/130] pantheon.elementary-iconbrowser: 2.0.0 -> 2.1.1 --- .../desktops/pantheon/apps/elementary-iconbrowser/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/pantheon/apps/elementary-iconbrowser/default.nix b/pkgs/desktops/pantheon/apps/elementary-iconbrowser/default.nix index 64b9b67cb788..8a0ff75f9038 100644 --- a/pkgs/desktops/pantheon/apps/elementary-iconbrowser/default.nix +++ b/pkgs/desktops/pantheon/apps/elementary-iconbrowser/default.nix @@ -18,13 +18,13 @@ stdenv.mkDerivation rec { pname = "elementary-iconbrowser"; - version = "2.0.0"; + version = "2.1.1"; src = fetchFromGitHub { owner = "elementary"; repo = "iconbrowser"; rev = version; - sha256 = "sha256-aXFgL5l9jnOZJJgMOYwiE7W//1sq23CbLEDmhYFJT38="; + sha256 = "sha256-xooZfQmeB4rvlO8zKWnUuXPCFQNCTdjd7C53/j9EoHg="; }; nativeBuildInputs = [ From eb9835c6766dee18ae98e2fdb7cb17198f24538e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 9 Nov 2022 16:08:10 +0000 Subject: [PATCH 086/130] python310Packages.thriftpy2: 0.4.14 -> 0.4.15 --- pkgs/development/python-modules/thriftpy2/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/thriftpy2/default.nix b/pkgs/development/python-modules/thriftpy2/default.nix index 0d5f5afe4a5c..53b1219bc485 100644 --- a/pkgs/development/python-modules/thriftpy2/default.nix +++ b/pkgs/development/python-modules/thriftpy2/default.nix @@ -10,15 +10,15 @@ buildPythonPackage rec { pname = "thriftpy2"; - version = "0.4.14"; + version = "0.4.15"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "Thriftpy"; repo = pname; - rev = "v${version}"; - sha256 = "17f57vsbym4c9yax128bhrwg2zjxcsgl3ja6422y8hyb38v5mdc3"; + rev = "refs/tags/v${version}"; + sha256 = "sha256-1X1roRFQgLJ+rrRuRlHMVtUdj2D68WGdxvid/0chsvI="; }; nativeBuildInputs = [ From 41b4865186d5f7bff74bf63d5ae6f0ce99eb95fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 8 Nov 2022 22:10:46 -0800 Subject: [PATCH 087/130] home-assistant: relax aiohttp version constraint --- pkgs/servers/home-assistant/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 89d05b2260c6..6eca3b16bdf6 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -70,7 +70,7 @@ let pname = "pytest-aiohttp"; hash = "sha256-ySmFQzljeXc3WDhwO2L+9jUoWYvAqdRRY566lfSqpE8="; }; - propagatedBuildInputs = with python3.pkgs; [ aiohttp pytest ]; + propagatedBuildInputs = with self; [ aiohttp pytest ]; doCheck = false; patches = []; }); @@ -259,6 +259,7 @@ in python.pkgs.buildPythonApplication rec { postPatch = let relaxedConstraints = [ + "aiohttp" "attrs" "awesomeversion" "bcrypt" From 821d9076acb51e8ba66071c8acd3d657d35f4b73 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 9 Nov 2022 18:16:39 +0000 Subject: [PATCH 088/130] python310Packages.vispy: 0.11.0 -> 0.12.0 --- pkgs/development/python-modules/vispy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/vispy/default.nix b/pkgs/development/python-modules/vispy/default.nix index 27c67de69332..6c3acdf6e2ba 100644 --- a/pkgs/development/python-modules/vispy/default.nix +++ b/pkgs/development/python-modules/vispy/default.nix @@ -16,11 +16,11 @@ buildPythonPackage rec { pname = "vispy"; - version = "0.11.0"; + version = "0.12.0"; src = fetchPypi { inherit pname version; - sha256 = "sha256-zi0lalMdQF8pWTPHSZaRL79D9lUhbbX8ao/zp4dHhBo="; + sha256 = "sha256-CtSg/pAtOhhiuS6yE3ogzF0llceMQTF12ShXIi9GMD0="; }; patches = [ From 90fc7b0b001bc0e1a3d99cf1a6e3d834fedc2872 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 9 Nov 2022 18:17:41 +0000 Subject: [PATCH 089/130] python310Packages.azure-eventgrid: 4.9.0 -> 4.9.1 --- pkgs/development/python-modules/azure-eventgrid/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/azure-eventgrid/default.nix b/pkgs/development/python-modules/azure-eventgrid/default.nix index 99e9198c4fea..43d075505193 100644 --- a/pkgs/development/python-modules/azure-eventgrid/default.nix +++ b/pkgs/development/python-modules/azure-eventgrid/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "azure-eventgrid"; - version = "4.9.0"; + version = "4.9.1"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -18,7 +18,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; extension = "zip"; - hash = "sha256-ueuOxhNATK6o/Vue+x5vtP0ac3CQellkuyQmSrq7tqQ="; + hash = "sha256-zRiS5XsinEQoyYsg2PSso3Y2pC7QwB1fbVkCF1OeQ3U="; }; propagatedBuildInputs = [ From 4ae8ed4631c104535f8c5f3f3a3dea0b61f612e9 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 9 Nov 2022 22:45:47 +0000 Subject: [PATCH 090/130] python310Packages.adafruit-platformdetect: 3.32.0 -> 3.33.0 --- .../python-modules/adafruit-platformdetect/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/adafruit-platformdetect/default.nix b/pkgs/development/python-modules/adafruit-platformdetect/default.nix index d87626e7b530..6707cb53e720 100644 --- a/pkgs/development/python-modules/adafruit-platformdetect/default.nix +++ b/pkgs/development/python-modules/adafruit-platformdetect/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "adafruit-platformdetect"; - version = "3.32.0"; + version = "3.33.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "Adafruit-PlatformDetect"; inherit version; - hash = "sha256-MbrRf7kcPNYb1i+5cSkCvO9SJbvrPAeKGWxtfi1FmaQ="; + hash = "sha256-Fj+LUTovZm6t0YRCa8QtoTBal+PefCvTIl9OeBoac6U="; }; nativeBuildInputs = [ From d225156cde893c3061da1078f7ff2ad569e13256 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 9 Nov 2022 23:02:32 +0000 Subject: [PATCH 091/130] python310Packages.aiohomekit: 2.2.18 -> 2.2.19 --- pkgs/development/python-modules/aiohomekit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aiohomekit/default.nix b/pkgs/development/python-modules/aiohomekit/default.nix index ab9f3556a887..a72d72878760 100644 --- a/pkgs/development/python-modules/aiohomekit/default.nix +++ b/pkgs/development/python-modules/aiohomekit/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "aiohomekit"; - version = "2.2.18"; + version = "2.2.19"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = "Jc2k"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-yE3+1dhgqgqmoBhBVsivXvn7MTKaY8FYiyqBRkg3h1U="; + hash = "sha256-x1Cah47EupdqLxwoJBLmN3AtC7zYqGZTP0nbLLsC3a0="; }; nativeBuildInputs = [ From e280d06774ab3a9adafc264f6c070d5686351474 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 10 Nov 2022 00:12:25 +0000 Subject: [PATCH 092/130] python310Packages.azure-mgmt-containerservice: 20.6.0 -> 20.7.0 --- .../python-modules/azure-mgmt-containerservice/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/azure-mgmt-containerservice/default.nix b/pkgs/development/python-modules/azure-mgmt-containerservice/default.nix index ce0920b972b6..dff9c2fe6d65 100644 --- a/pkgs/development/python-modules/azure-mgmt-containerservice/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-containerservice/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "azure-mgmt-containerservice"; - version = "20.6.0"; + version = "20.7.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -19,7 +19,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; extension = "zip"; - hash = "sha256-zQ3Lg45rO1vgtsjQnokNFjWt6qnrNQ2CnElGJ0Dksew="; + hash = "sha256-tNuBIfObCWd8JXq49CDLOzMl1pw7ulTQJua7CNJjRuo="; }; propagatedBuildInputs = [ From 4f87937601a15fd5bbc49d86e46b1982721876f7 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 10 Nov 2022 00:30:40 +0000 Subject: [PATCH 093/130] lychee: 0.10.2 -> 0.10.3 --- pkgs/tools/networking/lychee/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/lychee/default.nix b/pkgs/tools/networking/lychee/default.nix index 0064c8e5870e..8cca06ca95ff 100644 --- a/pkgs/tools/networking/lychee/default.nix +++ b/pkgs/tools/networking/lychee/default.nix @@ -9,16 +9,16 @@ rustPlatform.buildRustPackage rec { pname = "lychee"; - version = "0.10.2"; + version = "0.10.3"; src = fetchFromGitHub { owner = "lycheeverse"; repo = pname; rev = "v${version}"; - sha256 = "sha256-GePP4BvOxaLOyF+UNXqcbCtKWeeIcXYIs6zLi+7efVY="; + sha256 = "sha256-gnHeG1LaW10HmVF/+0OmOgaMz3X4ub4UpBiFQaGIah0="; }; - cargoSha256 = "sha256-QZDoZNY1ZyWRTeIxRdbTNg5NVDzBtEKGroTzaYRWt1w="; + cargoSha256 = "sha256-+hTXkPf4r+PF+k0+miY634sQ9RONHmtyF2hVowl/zuk="; nativeBuildInputs = [ pkg-config ]; From 3c603ddf321480716ced0b084f1132e63ea7f405 Mon Sep 17 00:00:00 2001 From: nixpkgs-upkeep-bot Date: Thu, 10 Nov 2022 00:31:06 +0000 Subject: [PATCH 094/130] vscode: 1.73.0 -> 1.73.1 --- pkgs/applications/editors/vscode/vscode.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/editors/vscode/vscode.nix b/pkgs/applications/editors/vscode/vscode.nix index 337db00d6c5d..5f7204012762 100644 --- a/pkgs/applications/editors/vscode/vscode.nix +++ b/pkgs/applications/editors/vscode/vscode.nix @@ -18,17 +18,17 @@ let archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz"; sha256 = { - x86_64-linux = "1dcp6r78kaq3wzcw7dfra59kfpdzqy9qnlyp1ywayxh610ryjyfc"; - x86_64-darwin = "0ypxjh5z0v83y0wb22m942qqlvx5df7k4dk8ip9wqd4p7h8540q8"; - aarch64-linux = "1qq4zg0j3rpx06cqaic7a1x7ckk5wf8w1gp5y8hwhvkym4s8g4i7"; - aarch64-darwin = "18hrsvr7hgmlpi64dbk581i516my6c5zwz6g8awp4fhxilk0wbrg"; - armv7l-linux = "1y357ci4gllxg26m5qdv9652i5rra5vj972l7kdnxiimfgm6h83b"; + x86_64-linux = "1m5mz6wdrivqrw699iivvh62bdn4yzm6hmph455sdyvk5icq59dq"; + x86_64-darwin = "1zn0h9p05kb3fcn816fpxh8asaglycjmpiwkrmxd0s8jwjq7m4gn"; + aarch64-linux = "1gs810iz08jxqfhcgi6ab41m46ib5h3m7i3pnyvlimxx99r5lirf"; + aarch64-darwin = "1dvasr1h28snxi33m6yx95pp3jd4irwy6yav4ilwrcl22cf6ybvi"; + armv7l-linux = "1j5vrpdaqihcr02pdsd5nz07zsk0027xmkfp30npnjy1gjrjvnim"; }.${system} or throwSystem; in callPackage ./generic.nix rec { # Please backport all compatible updates to the stable release. # This is important for the extension ecosystem. - version = "1.73.0"; + version = "1.73.1"; pname = "vscode"; executableName = "code" + lib.optionalString isInsiders "-insiders"; From dfe6ea4025b2e99bcbb30528ff31e69179763372 Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Mon, 3 Oct 2022 11:26:25 +1100 Subject: [PATCH 095/130] tootle: add platforms.linux to meta.platforms Motivation: Ensure this builds on the aarch64 builders. (cherry picked from pull request #194135) --- pkgs/applications/misc/tootle/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/misc/tootle/default.nix b/pkgs/applications/misc/tootle/default.nix index a552b5721b32..8483c787ad75 100644 --- a/pkgs/applications/misc/tootle/default.nix +++ b/pkgs/applications/misc/tootle/default.nix @@ -94,5 +94,6 @@ stdenv.mkDerivation rec { homepage = "https://github.com/bleakgrey/tootle"; license = licenses.gpl3; maintainers = with maintainers; [ dtzWill ]; + platforms = platforms.linux; }; } From 0a4dc86f057932f875c8e989e344463568c46410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Wed, 9 Nov 2022 21:56:55 -0300 Subject: [PATCH 096/130] whitesur-gtk-theme: 2022-08-26 -> 2022-10-27 (#198263) --- pkgs/data/themes/whitesur/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/data/themes/whitesur/default.nix b/pkgs/data/themes/whitesur/default.nix index 90f1515dc472..1073fd8f2505 100644 --- a/pkgs/data/themes/whitesur/default.nix +++ b/pkgs/data/themes/whitesur/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, gitUpdater , glib , gnome-shell , gnome-themes-extra @@ -32,13 +33,13 @@ lib.checkListOfEnum "${pname}: panel size" [ "default" "smaller" "bigger" ] (sin stdenv.mkDerivation rec { pname = "whitesur-gtk-theme"; - version = "2022-08-26"; + version = "2022-10-27"; src = fetchFromGitHub { owner = "vinceliuice"; repo = pname; rev = version; - sha256 = "sha256-kvu6Zv5vmyDasBt6eOBqexv0n5vi6OzpG5We1eSbW0o="; + sha256 = "sha256-jOrTasnkNExCgvST+09JOQ0iosjoEu3aoj3C1pNHTgY="; }; nativeBuildInputs = [ @@ -83,11 +84,13 @@ stdenv.mkDerivation rec { ${lib.optionalString (panelSize != null) ("--panel-size " + panelSize)} \ --dest $out/share/themes - jdupes --link-soft --recurse $out/share + jdupes --quiet --link-soft --recurse $out/share runHook postInstall ''; + passthru.updateScript = gitUpdater { }; + meta = with lib; { description = "MacOS Big Sur like theme for Gnome desktops"; homepage = "https://github.com/vinceliuice/WhiteSur-gtk-theme"; From d4926fc87fcbedf3e7485486c0e1bd58624d49d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Wed, 9 Nov 2022 21:57:19 -0300 Subject: [PATCH 097/130] vimix-gtk-themes: 2022-04-24 -> 2022-10-30 (#198745) --- pkgs/data/themes/vimix/default.nix | 31 +++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/pkgs/data/themes/vimix/default.nix b/pkgs/data/themes/vimix/default.nix index 12795e68e70e..85dc0788bfba 100644 --- a/pkgs/data/themes/vimix/default.nix +++ b/pkgs/data/themes/vimix/default.nix @@ -1,26 +1,41 @@ { lib -, stdenv +, stdenvNoCC , fetchFromGitHub , gnome-shell , gtk-engine-murrine , gtk_engines +, jdupes , sassc , gitUpdater +, themeVariants ? [] # default: doder (blue) +, colorVariants ? [] # default: all +, sizeVariants ? [] # default: standard +, tweaks ? [] }: -stdenv.mkDerivation rec { +let pname = "vimix-gtk-themes"; - version = "2022-04-24"; + +in +lib.checkListOfEnum "${pname}: theme variants" [ "doder" "beryl" "ruby" "amethyst" "grey" ] themeVariants +lib.checkListOfEnum "${pname}: color variants" [ "standard" "light" "dark" ] colorVariants +lib.checkListOfEnum "${pname}: size variants" [ "standard" "compact" ] sizeVariants +lib.checkListOfEnum "${pname}: tweaks" [ "flat" "grey" "mix" "translucent" ] tweaks + +stdenvNoCC.mkDerivation rec { + inherit pname; + version = "2022-10-30"; src = fetchFromGitHub { owner = "vinceliuice"; repo = pname; rev = version; - sha256 = "0q0ahm060qvr7r9j3x9lxidjnwf032c2g1pcqw9mz93iy7vfn358"; + sha256 = "QGKh2Md25VNVqy58w/LBzNnEM+g4gBMUjj0W0IuVZ1U="; }; nativeBuildInputs = [ gnome-shell # needed to determine the gnome-shell version + jdupes sassc ]; @@ -39,8 +54,14 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall mkdir -p $out/share/themes - name= HOME="$TMPDIR" ./install.sh --all --dest $out/share/themes + name= HOME="$TMPDIR" ./install.sh \ + ${lib.optionalString (themeVariants != []) "--theme " + builtins.toString themeVariants} \ + ${lib.optionalString (colorVariants != []) "--color " + builtins.toString colorVariants} \ + ${lib.optionalString (sizeVariants != []) "--size " + builtins.toString sizeVariants} \ + ${lib.optionalString (tweaks != []) "--tweaks " + builtins.toString tweaks} \ + --dest $out/share/themes rm $out/share/themes/*/{AUTHORS,LICENSE} + jdupes --quiet --link-soft --recurse $out/share runHook postInstall ''; From c588a77cd54fbdbe874ddd1e63656d5fd69c6ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Wed, 9 Nov 2022 21:57:35 -0300 Subject: [PATCH 098/130] tela-circle-icon-theme: 2022-03-07 -> 2022-11-06 (#200377) --- .../icons/tela-circle-icon-theme/default.nix | 18 ++++++++++++------ pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/pkgs/data/icons/tela-circle-icon-theme/default.nix b/pkgs/data/icons/tela-circle-icon-theme/default.nix index 44e8fdb6c05f..7f7dc0d043f3 100644 --- a/pkgs/data/icons/tela-circle-icon-theme/default.nix +++ b/pkgs/data/icons/tela-circle-icon-theme/default.nix @@ -1,6 +1,8 @@ { lib , stdenvNoCC , fetchFromGitHub +, adwaita-icon-theme +, breeze-icons , gtk3 , hicolor-icon-theme , jdupes @@ -13,17 +15,17 @@ let pname = "tela-circle-icon-theme"; in -lib.checkListOfEnum "${pname}: color variants" [ "standard" "black" "blue" "brown" "green" "grey" "orange" "pink" "purple" "red" "yellow" "manjaro" "ubuntu" ] colorVariants +lib.checkListOfEnum "${pname}: color variants" [ "standard" "black" "blue" "brown" "green" "grey" "orange" "pink" "purple" "red" "yellow" "manjaro" "ubuntu" "dracula" "nord" ] colorVariants stdenvNoCC.mkDerivation rec { inherit pname; - version = "2022-03-07"; + version = "2022-11-06"; src = fetchFromGitHub { owner = "vinceliuice"; repo = pname; rev = version; - sha256 = "vQeWGZmurvT/UQJ1dx6t+ZeKdJ1Oq9TdHBADw64x18g="; + sha256 = "ybp+r0Ru2lJg1WipFHIowvRO5XjppI0cUxKc6kPn0lM="; }; nativeBuildInputs = [ @@ -32,6 +34,8 @@ stdenvNoCC.mkDerivation rec { ]; propagatedBuildInputs = [ + adwaita-icon-theme + breeze-icons hicolor-icon-theme ]; @@ -42,16 +46,18 @@ stdenvNoCC.mkDerivation rec { dontPatchELF = true; dontRewriteSymlinks = true; + postPatch = '' + patchShebangs install.sh + ''; + installPhase = '' runHook preInstall - patchShebangs install.sh - ./install.sh -d $out/share/icons \ ${lib.optionalString circularFolder "-c"} \ ${if allColorVariants then "-a" else builtins.toString colorVariants} - jdupes --link-soft --recurse $out/share + jdupes --quiet --link-soft --recurse $out/share runHook postInstall ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 70d0aa64c71c..cdf564bd7644 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26943,7 +26943,9 @@ with pkgs; theano = callPackage ../data/fonts/theano { }; - tela-circle-icon-theme = callPackage ../data/icons/tela-circle-icon-theme { }; + tela-circle-icon-theme = callPackage ../data/icons/tela-circle-icon-theme { + inherit (gnome) adwaita-icon-theme; + }; tela-icon-theme = callPackage ../data/icons/tela-icon-theme { }; From 43bd6a0ee63186f31876aecfc36d7b6b7ec25c1b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 10 Nov 2022 01:03:51 +0000 Subject: [PATCH 099/130] python310Packages.bellows: 0.34.2 -> 0.34.3 --- pkgs/development/python-modules/bellows/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/bellows/default.nix b/pkgs/development/python-modules/bellows/default.nix index 4e509e1b3c27..de4205654255 100644 --- a/pkgs/development/python-modules/bellows/default.nix +++ b/pkgs/development/python-modules/bellows/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "bellows"; - version = "0.34.2"; + version = "0.34.3"; format = "setuptools"; src = fetchFromGitHub { owner = "zigpy"; repo = "bellows"; rev = "refs/tags/${version}"; - sha256 = "sha256-78LUQBFV4TFPDLiSHBG+RLnQLaCPX4LZpow9aszQAQA="; + sha256 = "sha256-7jaXNz7i+kF64T+5/QWKGpxHCkg/M9U2hbWrVB2tjH8="; }; propagatedBuildInputs = [ From da31bd56732b2b954c867b0283df66539b3764c0 Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Wed, 3 Aug 2022 09:02:55 +0800 Subject: [PATCH 100/130] patchRcPathBash, patchRcPathCsh, patchRcPathFish, patchRcPathPosix: init Init patchRcPath hooks, which provides utilities to patch shell scripts to be sourced by users. Add test cases and documentation. --- doc/hooks/index.xml | 1 + doc/hooks/patch-rc-path-hooks.section.md | 50 ++ .../patch-rc-path-hooks/default.nix | 64 +++ .../patch-rc-path-hooks/patch-rc-path-bash.sh | 50 ++ .../patch-rc-path-hooks/patch-rc-path-csh.sh | 57 +++ .../patch-rc-path-hooks/patch-rc-path-fish.sh | 50 ++ .../patch-rc-path-posix.sh | 39 ++ .../patch-rc-path-hooks/test/default.nix | 442 ++++++++++++++++++ .../test/sample_source.bash | 2 + .../test/sample_source.csh.in | 1 + .../test/sample_source.fish | 9 + .../test/sample_source.sh.in | 2 + .../test/test-sourcing-bash | 21 + .../test/test-sourcing-csh | 13 + .../test/test-sourcing-fish | 13 + .../test/test-sourcing-posix | 21 + pkgs/top-level/all-packages.nix | 4 + 17 files changed, 839 insertions(+) create mode 100644 doc/hooks/patch-rc-path-hooks.section.md create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-bash.sh create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-csh.sh create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-fish.sh create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-posix.sh create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/default.nix create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.bash create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.csh.in create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.fish create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.sh.in create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-bash create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-csh create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-fish create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-posix diff --git a/doc/hooks/index.xml b/doc/hooks/index.xml index ed703c03d8b0..0917fac6c0ac 100644 --- a/doc/hooks/index.xml +++ b/doc/hooks/index.xml @@ -22,6 +22,7 @@ + diff --git a/doc/hooks/patch-rc-path-hooks.section.md b/doc/hooks/patch-rc-path-hooks.section.md new file mode 100644 index 000000000000..5c870dc782c2 --- /dev/null +++ b/doc/hooks/patch-rc-path-hooks.section.md @@ -0,0 +1,50 @@ + +# `patchRcPath` hooks {#sec-patchRcPathHooks} + +These hooks provide shell-specific utilities (with the same name as the hook) to patch shell scripts meant to be sourced by software users. + +The typical usage is to patch initialisation or [rc](https://unix.stackexchange.com/questions/3467/what-does-rc-in-bashrc-stand-for) scripts inside `$out/bin` or `$out/etc`. +Such scripts, when being sourced, would insert the binary locations of certain commands into `PATH`, modify other environment variables or run a series of start-up commands. +When shipped from the upstream, they sometimes use commands that might not be available in the environment they are getting sourced in. + +The compatible shells for each hook are: + + - `patchRcPathBash`: [Bash](https://www.gnu.org/software/bash/), [ksh](http://www.kornshell.org/), [zsh](https://www.zsh.org/) and other shells supporting the Bash-like parameter expansions. + - `patchRcPathCsh`: Csh scripts, such as those targeting [tcsh](https://www.tcsh.org/). + - `patchRcPathFish`: [Fish](https://fishshell.com/) scripts. + - `patchRcPathPosix`: POSIX-conformant shells supporting the limited parameter expansions specified by the POSIX standard. Current implementation uses the parameter expansion `${foo-}` only. + +For each supported shell, it modifies the script with a `PATH` prefix that is later removed when the script ends. +It allows nested patching, which guarantees that a patched script may source another patched script. + +Syntax to apply the utility to a script: + +```sh +patchRcPath +``` + +Example usage: + +Given a package `foo` containing an init script `this-foo.fish` that depends on `coreutils`, `man` and `which`, +patch the init script for users to source without having the above dependencies in their `PATH`: + +```nix +{ lib, stdenv, patchRcPathFish}: +stdenv.mkDerivation { + + # ... + + nativeBuildInputs = [ + patchRcPathFish + ]; + + postFixup = '' + patchRcPathFish $out/bin/this-foo.fish ${lib.makeBinPath [ coreutils man which ]} + ''; +} +``` + +::: {.note} +`patchRcPathCsh` and `patchRcPathPosix` implementation depends on `sed` to do the string processing. +The others are in vanilla shell and have no third-party dependencies. +::: diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix new file mode 100644 index 000000000000..73fbfa6e9b72 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix @@ -0,0 +1,64 @@ +{ lib +, callPackage +, makeSetupHook +, gnused +}: +let + tests = import ./test { inherit callPackage; }; +in +{ + patchRcPathBash = (makeSetupHook + { + name = "patch-rc-path-bash"; + meta = with lib; { + description = "Setup-hook to inject source-time PATH prefix to a Bash/Ksh/Zsh script"; + maintainers = with maintainers; [ ShamrockLee ]; + }; + } ./patch-rc-path-bash.sh).overrideAttrs (oldAttrs: { + passthru.tests = { + inherit (tests) test-bash; + }; + }); + patchRcPathCsh = (makeSetupHook + { + name = "patch-rc-path-csh"; + substitutions = { + sed = "${gnused}/bin/sed"; + }; + meta = with lib; { + description = "Setup-hook to inject source-time PATH prefix to a Csh script"; + maintainers = with maintainers; [ ShamrockLee ]; + }; + } ./patch-rc-path-csh.sh).overrideAttrs (oldAttrs: { + passthru.tests = { + inherit (tests) test-csh; + }; + }); + patchRcPathFish = (makeSetupHook + { + name = "patch-rc-path-fish"; + meta = with lib; { + description = "Setup-hook to inject source-time PATH prefix to a Fish script"; + maintainers = with maintainers; [ ShamrockLee ]; + }; + } ./patch-rc-path-fish.sh).overrideAttrs (oldAttrs: { + passthru.tests = { + inherit (tests) test-fish; + }; + }); + patchRcPathPosix = (makeSetupHook + { + name = "patch-rc-path-posix"; + substitutions = { + sed = "${gnused}/bin/sed"; + }; + meta = with lib; { + description = "Setup-hook to inject source-time PATH prefix to a POSIX shell script"; + maintainers = with maintainers; [ ShamrockLee ]; + }; + } ./patch-rc-path-posix.sh).overrideAttrs (oldAttrs: { + passthru.tests = { + inherit (tests) test-posix; + }; + }); +} diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-bash.sh b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-bash.sh new file mode 100644 index 000000000000..b98b983861b0 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-bash.sh @@ -0,0 +1,50 @@ +patchRcPathBash(){ + local FILE_TO_PATCH="$1" + local SOURCETIME_PATH="$2" + local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")" + cat <> "$FILE_TO_WORK_ON" +# Lines to add to PATH the source-time utilities for Nixpkgs packaging +if [[ -n "\${NIXPKGS_SOURCETIME_PATH-}" ]]; then + NIXPKGS_SOURCETIME_PATH_OLD="\$NIXPKGS_SOURCETIME_PATH;\${NIXPKGS_SOURCETIME_PATH_OLD-}" +fi +NIXPKGS_SOURCETIME_PATH="$SOURCETIME_PATH" +if [[ -n "\$PATH" ]]; then + PATH="\$NIXPKGS_SOURCETIME_PATH:\$PATH" +else + PATH="\$NIXPKGS_SOURCETIME_PATH" +fi +export PATH +# End of lines to add to PATH source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON" + cat <> "$FILE_TO_WORK_ON" +# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +if [[ -n "\${PATH-}" ]]; then + # Remove the inserted section + PATH="\${PATH/\$NIXPKGS_SOURCETIME_PATH}" + # Remove the duplicated colons + PATH="\${PATH//::/:}" + # Remove the prefixing colon + if [[ -n "\$PATH" && "\${PATH:0:1}" == ":" ]]; then + PATH="\${PATH:1}" + fi + # Remove the trailing colon + if [[ -n "\$PATH" && "\${PATH:\${#PATH}-1}" == ":" ]]; then + PATH="\${PATH::}" + fi + export PATH +fi +if [[ -n "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]]; then + IFS="" read -r -d ";" NIXPKGS_SOURCETIME_PATH <<< "\$NIXPKGS_SOURCETIME_PATH_OLD" + NIXPKGS_SOURCETIME_PATH_OLD="\${NIXPKGS_SOURCETIME_PATH_OLD:\${#NIXPKGS_SOURCETIME_PATH}+1}" +else + unset NIXPKGS_SOURCETIME_PATH +fi +if [[ -z "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]]; then + unset NIXPKGS_SOURCETIME_PATH_OLD +fi +# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH" + rm "$FILE_TO_WORK_ON" +} diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-csh.sh b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-csh.sh new file mode 100644 index 000000000000..5e2367003ade --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-csh.sh @@ -0,0 +1,57 @@ +patchRcPathCsh(){ + local FILE_TO_PATCH="$1" + local SOURCETIME_PATH="$2" + local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")" + cat <> "$FILE_TO_WORK_ON" +# Lines to add to PATH the source-time utilities for Nixpkgs packaging +if (\$?NIXPKGS_SOURCETIME_PATH) then + if ("\$NIXPKGS_SOURCETIME_PATH" != "") then + if (\$?NIXPKGS_SOURCETIME_PATH_OLD) then + if ("\$NIXPKGS_SOURCETIME_PATH_OLD" != "") + set NIXPKGS_SOURCETIME_PATH_OLD = (\$NIXPKGS_SOURCETIME_PATH \$NIXPKGS_SOURCETIME_PATH_OLD) + else + set NIXPKGS_SOURCETIME_PATH_OLD = \$NIXPKGS_SOURCETIME_PATH + endif + else + set NIXPKGS_SOURCETIME_PATH_OLD = \$NIXPKGS_SOURCETIME_PATH + endif + endif +endif +set NIXPKGS_SOURCETIME_PATH = "$SOURCETIME_PATH" +if (! \$?PATH) then + setenv PATH "" +endif +if ("\$PATH" != "") then + setenv PATH "\${NIXPKGS_SOURCETIME_PATH}:\$PATH" +else + setenv PATH "\$NIXPKGS_SOURCETIME_PATH" +endif +# End of lines to add to PATH source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON" + cat <> "$FILE_TO_WORK_ON" +# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +if (\$?PATH) then + if ("\$PATH" != "") then + # Remove the inserted section, the duplicated colons, and the leading and trailing colon + setenv PATH \`echo "\$PATH" | @sed@ "s#\${NIXPKGS_SOURCETIME_PATH}##" | @sed@ "s#::#:#g" | @sed@ "s#^:##" | @sed@ 's#:\$##'\` + endif +endif +if (\$?NIXPKGS_SOURCETIME_PATH_OLD) then + if ("\$NIXPKGS_SOURCETIME_PATH_OLD" != "") then + set NIXPKGS_SOURCETIME_PATH = \$NIXPKGS_SOURCETIME_PATH_OLD[1] + set NIXPKGS_SOURCETIME_PATH_OLD = \$NIXPKGS_SOURCETIME_PATH_OLD[2-] + else + unset NIXPKGS_SOURCETIME_PATH + endif + if (NIXPKGS_SOURCETIME_PATH_OLD == "") then + unset NIXPKGS_SOURCETIME_PATH_OLD + endif +else + unset NIXPKGS_SOURCETIME_PATH +endif +# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH" + rm "$FILE_TO_WORK_ON" +} diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-fish.sh b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-fish.sh new file mode 100644 index 000000000000..3d3e08c57a11 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-fish.sh @@ -0,0 +1,50 @@ +patchRcPathFish(){ + local FILE_TO_PATCH="$1" + local SOURCETIME_PATH="$2" + local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")" + cat <> "$FILE_TO_WORK_ON" +# Lines to add to PATH the source-time utilities for Nixpkgs packaging +if set -q NIXPKGS_SOURCETIME_PATH && test (count \$NIXPKGS_SOURCETIME_PATH) -gt 0 + set --unpath NIXPKGS_SOURCETIME_PATH_OLD "\$NIXPKGS_SOURCETIME_PATH" \$NIXPKGS_SOURCETIME_PATH_OLD +end +set --path NIXPKGS_SOURCETIME_PATH $SOURCETIME_PATH +set -g --path PATH \$NIXPKGS_SOURCETIME_PATH \$PATH +# End of lines to add to PATH source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON" + cat <> "$FILE_TO_WORK_ON" +# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +if set -q PATH && test "\$PATH" != "" && test (count \$PATH) -ge (count \$NIXPKGS_SOURCETIME_PATH) + # Remove the inserted section + for i in (seq 0 (math (count \$PATH) - (count \$NIXPKGS_SOURCETIME_PATH))) + for j in (seq 1 (count \$NIXPKGS_SOURCETIME_PATH)) + if test \$PATH[(math \$i + \$j)] != \$NIXPKGS_SOURCETIME_PATH[\$j] + set i -1 + break + end + end + if test \$i -eq -1 + continue + end + if test \$i -eq 0 + set -g --path PATH \$PATH[(math (count \$NIXPKGS_SOURCETIME_PATH) + 1)..] + else + set -g --path PATH \$PATH[..\$i] \$PATH[(math (count \$NIXPKGS_SOURCETIME_PATH) + 1 + \$i)..] + end + break + end +end +if set -q NIXPKGS_SOURCETIME_PATH_OLD && test (count \$NIXPKGS_SOURCETIME_PATH_OLD) -gt 0 + set --path NIXPKGS_SOURCETIME_PATH \$NIXPKGS_SOURCETIME_PATH_OLD[1] + set --unpath NIXPKGS_SOURCETIME_PATH_OLD \$NIXPKGS_SOURCETIME_PATH_OLD[2..] +else + set -e NIXPKGS_SOURCETIME_PATH +end +if set -q NIXPKGS_SOURCETIME_PATH_OLD && test (count \$NIXPKGS_SOURCETIME_PATH_OLD) -eq 0 + set -e NIXPKGS_SOURCETIME_PATH_OLD +end +# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH" + rm "$FILE_TO_WORK_ON" +} diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-posix.sh b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-posix.sh new file mode 100644 index 000000000000..a3740d4436d9 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-posix.sh @@ -0,0 +1,39 @@ +patchRcPathPosix(){ + local FILE_TO_PATCH="$1" + local SOURCETIME_PATH="$2" + local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")" + cat <> "$FILE_TO_WORK_ON" +# Lines to add to PATH the source-time utilities for Nixpkgs packaging +if [ -n "\${NIXPKGS_SOURCETIME_PATH-}" ]; then + NIXPKGS_SOURCETIME_PATH_OLD="\$NIXPKGS_SOURCETIME_PATH;\${NIXPKGS_SOURCETIME_PATH_OLD-}" +fi +NIXPKGS_SOURCETIME_PATH="$SOURCETIME_PATH" +if [ -n "\$PATH" ]; then + PATH="\$NIXPKGS_SOURCETIME_PATH:\$PATH"; +else + PATH="\$NIXPKGS_SOURCETIME_PATH" +fi +export PATH +# End of lines to add to PATH source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON" + cat <> "$FILE_TO_WORK_ON" +# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +if [ -n "\${PATH-}" ]; then + PATH="\$(echo "\$PATH" | @sed@ "s#\$NIXPKGS_SOURCETIME_PATH##" | @sed@ "s#::#:#g" | @sed@ "s#^:##" | @sed@ "s#:\\\$##")" + export PATH +fi +if [ -n "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]; then + NIXPKGS_SOURCETIME_PATH="\$(echo "\$NIXPKGS_SOURCETIME_PATH_OLD" | @sed@ "s#\\([^;]\\);.*#\\1#")" + NIXPKGS_SOURCETIME_PATH_OLD="\$(echo "\$NIXPKGS_SOURCETIME_PATH_OLD" | @sed@ "s#[^;];\\(.*\\)#\\1#")" +else + unset NIXPKGS_SOURCETIME_PATH +fi +if [ -z "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]; then + unset NIXPKGS_SOURCETIME_PATH_OLD +fi +# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH" + rm "$FILE_TO_WORK_ON" +} diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/default.nix b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/default.nix new file mode 100644 index 000000000000..82bc160387ee --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/default.nix @@ -0,0 +1,442 @@ +{ callPackage }: + +{ + test-bash = callPackage + ( + { lib + , runCommandLocal + , bash + , hello + , ksh + , patchRcPathBash + , shellcheck + , zsh + }: + runCommandLocal "patch-rc-path-bash-test" + { + nativeBuildInputs = [ + bash + ksh + patchRcPathBash + shellcheck + zsh + ]; + meta = { + description = "Package test of patchActivateBash"; + inherit (patchRcPathBash.meta) maintainers; + }; + } + '' + set -eu -o pipefail + + + # Check the setup hook script + + echo "Running shellcheck against ${./test-sourcing-bash}" + shellcheck -s bash --exclude SC1090 ${./test-sourcing-bash} + shellcheck -s ksh --exclude SC1090 ${./test-sourcing-bash} + + + # Test patching a blank file + + echo > blank.bash + + echo "Generating blank_patched.bash from blank.bash" + cp blank.bash blank_patched.bash + patchRcPathBash blank_patched.bash "$PWD/delta:$PWD/foxtrot" + + echo "Running shellcheck against blank_patched.bash" + shellcheck -s bash blank_patched.bash + shellcheck -s ksh blank_patched.bash + + echo "Testing in Bash if blank.bash and blank_patched.bash modifies PATH the same way" + bash ${./test-sourcing-bash} ./blank.bash ./blank_patched.bash + + echo "Testing in Ksh if blank.bash and blank_patched.bash modifies PATH the same way" + ksh ${./test-sourcing-bash} "$PWD/blank.bash" "$PWD/blank_patched.bash" + + echo "Testing in Zsh if blank.bash and blank_patched.bash modifies PATH the same way" + zsh ${./test-sourcing-bash} ./blank.bash ./blank_patched.bash + + + # Test patching silent_hello + + echo "hello > /dev/null" > silent_hello.bash + + echo "Generating silent_hello_patched.bash from silent_hello.bash" + cp silent_hello.bash silent_hello_patched.bash + patchRcPathBash silent_hello_patched.bash "${hello}/bin" + + echo "Running shellcheck against silent_hello_patched.bash" + shellcheck -s bash silent_hello_patched.bash + + echo "Testing in Bash if silent_hello_patched.bash get sourced without error" + bash -eu -o pipefail -c ". ./silent_hello_patched.bash" + + echo "Testing in Ksh if silent_hello_patched.bash get sourced without error" + ksh -eu -o pipefail -c ". ./silent_hello_patched.bash" + + echo "Testing in Zsh if silent_hello_patched.bash get sourced without error" + zsh -eu -o pipefail -c ". ./silent_hello_patched.bash" + + + # Check the sample source + + echo "Running shellcheck against sample_source.bash" + shellcheck -s bash ${./sample_source.bash} + shellcheck -s ksh ${./sample_source.bash} + + + # Test patching the sample source + + cp ${./sample_source.bash} sample_source_patched.bash + chmod u+w sample_source_patched.bash + + echo "Generating sample_source_patched.bash from ./sample_source.bash" + patchRcPathBash sample_source_patched.bash "$PWD/delta:$PWD/foxtrot" + + echo "Running shellcheck against sample_source_patched.bash" + shellcheck -s bash sample_source_patched.bash + + echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + bash ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash + + echo "Testing in Ksh if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + ksh ${./test-sourcing-bash} ${./sample_source.bash} "$PWD/sample_source_patched.bash" + + echo "Testing in Zsh if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + zsh ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash + + + # Test double-patching the sample source + + echo "Patching again sample_source_patched.bash" + patchRcPathBash sample_source_patched.bash "$PWD/foxtrot:$PWD/golf" + + echo "Running shellcheck against sample_source_patched.bash" + shellcheck -s bash sample_source_patched.bash + shellcheck -s ksh sample_source_patched.bash + + echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + bash ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash + + echo "Testing in Ksh if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + ksh ${./test-sourcing-bash} ${./sample_source.bash} "$PWD/sample_source_patched.bash" + + echo "Testing in Zsh if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + zsh ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash + + + # Create a dummy output + touch "$out" + '' + ) + { }; + + + + test-csh = callPackage + ( + { lib + , runCommandLocal + , gnused + , hello + , patchRcPathCsh + , tcsh + }: + runCommandLocal "patch-rc-path-csh-test" + { + nativeBuildInputs = [ + patchRcPathCsh + tcsh + ]; + meta = { + description = "Package test of patchActivateCsh"; + inherit (patchRcPathCsh.meta) maintainers; + }; + } + '' + set -eu -o pipefail + + + # Test patching a blank file + + echo > blank.csh + + echo "Generating blank_patched.csh from blank.csh" + cp blank.csh blank_patched.csh + patchRcPathCsh blank_patched.csh "$PWD/delta:$PWD/foxtrot" + + echo "Testing in Csh if blank.csh and blank_patched.csh modifies PATH the same way" + tcsh -e ${./test-sourcing-csh} blank.csh blank_patched.csh + + + # Test patching silent_hello file + + echo "hello > /dev/null" > silent_hello.csh + + echo "Generating silent_hello_patched.csh from silent_hello.csh" + cp silent_hello.csh silent_hello_patched.csh + patchRcPathCsh silent_hello_patched.csh "${hello}/bin" + + echo "Testing in Csh if silent_hello_patched.csh get sourced without errer" + tcsh -e -c "source silent_hello_patched.csh" + + + # Generate the sample source + + substitute ${./sample_source.csh.in} sample_source.csh --replace @sed@ ${gnused}/bin/sed + chmod u+rw sample_source.csh + + + # Test patching the sample source + + echo "Generating sample_source_patched.csh from sample_source.csh" + cp sample_source.csh sample_source_patched.csh + chmod u+w sample_source_patched.csh + patchRcPathCsh sample_source_patched.csh "$PWD/delta:$PWD/foxtrot" + + echo "Testing in Csh if sample_source.csh and sample_source_patched.csh modifies PATH the same way" + tcsh -e ${./test-sourcing-csh} sample_source.csh sample_source_patched.csh + + + # Test double-patching the sample source + + echo "Patching again sample_source_patched.csh from sample_source.csh" + patchRcPathCsh sample_source_patched.csh "$PWD/foxtrot:$PWD/golf" + + echo "Testing in Csh if sample_source.csh and sample_source_patched.csh modifies PATH the same way" + tcsh -e ${./test-sourcing-csh} sample_source.csh sample_source_patched.csh + + + # Create a dummy output + touch "$out" + '' + ) + { }; + + + + test-fish = callPackage + ( + { lib + , runCommandLocal + , fish + , hello + , patchRcPathFish + }: + runCommandLocal "patch-rc-path-fish-test" + { + nativeBuildInputs = [ + fish + patchRcPathFish + ]; + meta = { + description = "Package test of patchActivateFish"; + inherit (patchRcPathFish.meta) maintainers; + }; + } + '' + set -eu -o pipefail + + + # Test patching a blank file + + echo > blank.fish + + echo "Generating blank_patched.fish from blank.fish" + cp blank.fish blank_patched.fish + patchRcPathFish blank_patched.fish "$PWD/delta:$PWD/foxtrot" + + echo "Testing in Fish if blank.fish and blank_patched.fish modifies PATH the same way" + HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)" + HOME="$HOME_TEMP" fish ${./test-sourcing-fish} blank.fish blank_patched.fish + rm -r "$HOME_TEMP" + + + # Test patching silent_hello file + + echo "hello > /dev/null" > silent_hello.fish + + echo "Generating silent_hello_patched.fish from silent_hello.fish" + cp silent_hello.fish silent_hello_patched.fish + patchRcPathFish silent_hello_patched.fish "${hello}/bin" + + echo "Testing in Fish if silent_hello_patched.fish get sourced without error" + HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)" + HOME="$HOME_TEMP" fish -c "source silent_hello_patched.fish" + rm -r "$HOME_TEMP" + + + # Test patching the sample source + + cp ${./sample_source.fish} sample_source_patched.fish + chmod u+w sample_source_patched.fish + + echo "Generating sample_source_patched.fish from ${./sample_source.fish}" + patchRcPathFish sample_source_patched.fish "$PWD/delta:$PWD/foxtrot" + echo "Testing in Fish if sample_source.fish and sample_source_patched.fish modifies PATH the same way" + HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)" + HOME="$HOME_TEMP" fish ${./test-sourcing-fish} ${./sample_source.fish} sample_source_patched.fish + rm -r "$HOME_TEMP" + + + # Test double-patching the sample source + + echo "Patching again sample_source_patched.fish from ${./sample_source.fish}" + patchRcPathFish sample_source_patched.fish "$PWD/foxtrot:$PWD/golf" + + echo "Testing in Fish if sample_source.fish and sample_source_patched.fish modifies PATH the same way" + HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)" + HOME="$HOME_TEMP" fish ${./test-sourcing-fish} ${./sample_source.fish} sample_source_patched.fish + rm -r "$HOME_TEMP" + + + # Create a dummy output + touch "$out" + '' + ) + { }; + + + + test-posix = callPackage + ( + { lib + , runCommandLocal + , bash + , dash + , gnused + , hello + , ksh + , patchRcPathPosix + , shellcheck + }: + runCommandLocal "patch-rc-path-posix-test" + { + nativeBuildInputs = [ + bash + dash + ksh + patchRcPathPosix + shellcheck + ]; + meta = { + description = "Package test of patchActivatePosix"; + inherit (patchRcPathPosix.meta) maintainers; + }; + } + '' + set -eu -o pipefail + + + # Check the setup hook script + + echo "Running shellcheck against ${./test-sourcing-posix}" + shellcheck -s sh --exclude SC1090 ${./test-sourcing-posix} + shellcheck -s dash --exclude SC1090 ${./test-sourcing-posix} + + + # Test patching a blank file + + echo > blank.sh + + echo "Generating blank_patched.sh from blank.sh" + cp blank.sh blank_patched.sh + patchRcPathPosix blank_patched.sh "$PWD/delta:$PWD/foxtrot" + + echo "Running shellcheck against blank_patched.sh" + shellcheck -s sh blank_patched.sh + shellcheck -s dash blank_patched.sh + + echo "Testing in Bash if blank.sh and blank_patched.sh modifies PATH the same way" + bash --posix ${./test-sourcing-posix} ./blank.sh ./blank_patched.sh + + echo "Testing in Dash if blank.sh and blank_patched.sh modifies PATH the same way" + dash ${./test-sourcing-posix} ./blank.sh ./blank_patched.sh + + echo "Testing in Ksh if ./blank.sh and ./blank_patched.sh modifies PATH the same way" + ksh ${./test-sourcing-posix} "$PWD/blank.sh" "$PWD/blank_patched.sh" + + + # Test patching silent_hello file + + echo "hello > /dev/null" > silent_hello.sh + + echo "Generating silent_hello_patched.sh from silent_hello.sh" + cp silent_hello.sh silent_hello_patched.sh + patchRcPathPosix silent_hello_patched.sh "${hello}/bin" + + echo "Running shellcheck against silent_hello_patched.sh" + shellcheck -s sh silent_hello_patched.sh + shellcheck -s dash silent_hello_patched.sh + + echo "Testing in Bash if silent_hello_patched.sh get sourced without error" + bash --posix -eu -c ". ./silent_hello_patched.sh" + + echo "Testing in Dash if silent_hello_patched.sh get sourced without error" + dash -eu -c ". ./silent_hello_patched.sh" + + echo "Testing in Ksh if silent_hello_patched.sh get sourced without error" + ksh -eu -c ". $PWD/silent_hello_patched.sh" + + + # Generate the sample source "$PWD/delta:$PWD/foxtrot" "$PWD/delta:$PWD/foxtrot" + + substitute ${./sample_source.sh.in} sample_source.sh --replace @sed@ ${gnused}/bin/sed + chmod u+rw sample_source.sh + + + # Check the sample source + + echo "Running shellcheck against sample_source.sh" + shellcheck -s sh sample_source.sh + shellcheck -s dash sample_source.sh + + + # Test patching the sample source + + echo "Generating sample_source_patched.sh from sample_source.sh" + cp sample_source.sh sample_source_patched.sh + chmod u+w sample_source_patched.sh + patchRcPathPosix sample_source_patched.sh "$PWD/delta:$PWD/foxtrot" + + echo "Running shellcheck against sample_source_patched.sh" + shellcheck -s sh sample_source_patched.sh + shellcheck -s dash sample_source_patched.sh + + echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + bash --posix ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh" + + echo "Testing in Dash if sample_source.sh and sample_source_patched.sh modifies PATH the same way" + dash ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh" + + echo "Testing in Ksh if sample_source.sh and sample_source_patched.sh modifies PATH the same way" + ksh ${./test-sourcing-posix} "$PWD/sample_source.sh" "$PWD/sample_source_patched.sh" + + + # Test double-patching the sample source + + echo "Patching again sample_source_patched.sh" + patchRcPathPosix sample_source_patched.sh "$PWD/foxtrot:$PWD/golf" + + echo "Running shellcheck against sample_source_patched.sh" + shellcheck -s sh sample_source_patched.sh + shellcheck -s dash sample_source_patched.sh + + echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + bash --posix ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh" + + echo "Testing in Dash if sample_source.sh and sample_source_patched.sh modifies PATH the same way" + dash ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh" + + echo "Testing in Ksh if sample_source.sh and sample_source_patched.sh modifies PATH the same way" + ksh ${./test-sourcing-posix} "$PWD/sample_source.sh" "$PWD/sample_source_patched.sh" + + + # Create a dummy output + touch "$out" + '' + ) + { }; +} diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.bash b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.bash new file mode 100644 index 000000000000..6cb043e4e70c --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.bash @@ -0,0 +1,2 @@ +PATH="$PWD/charlie:${PATH/:$PWD\/bravo}" +export PATH diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.csh.in b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.csh.in new file mode 100644 index 000000000000..9606458c037e --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.csh.in @@ -0,0 +1 @@ +setenv PATH $PWD/charlie:`echo "$PATH" | @sed@ "s#:$PWD/bravo##"` diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.fish b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.fish new file mode 100644 index 000000000000..f638fe5e24d1 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.fish @@ -0,0 +1,9 @@ +begin + for p in $PATH + if test $p != "$PWD/bravo" + set TEMPORARY_PATH $TEMPORARY_PATH $p + end + end + set -g PATH $TEMPORARY_PATH +end +set PATH "$PWD/charlie" $PATH diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.sh.in b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.sh.in new file mode 100644 index 000000000000..42e64a1ffc08 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.sh.in @@ -0,0 +1,2 @@ +PATH="$PWD/charlie:$(echo "$PATH" | @sed@ "s#:$PWD/bravo##")" +export PATH diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-bash b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-bash new file mode 100644 index 000000000000..1b6cc54d8f93 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-bash @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -eu -o pipefail + +UNPATCHED_SOURCE_FILE="$1" +PATCHED_SOURCE_FILE="$2" +ORIG_PATH="$PWD/alfa:$PWD/bravo" +RESULT_PATH_FROM_UNPATCHED="$( + PATH="$ORIG_PATH"; export PATH + . "$UNPATCHED_SOURCE_FILE" + echo "$PATH" +)" +RESULT_PATH_FROM_PATCHED="$( + PATH="$ORIG_PATH"; export PATH + . "$PATCHED_SOURCE_FILE" + echo "$PATH" +)" +if [[ "$RESULT_PATH_FROM_UNPATCHED" != "$RESULT_PATH_FROM_PATCHED" ]]; then + echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" >&2 + exit 1 +fi diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-csh b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-csh new file mode 100644 index 000000000000..7ddb2ddc1bdc --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-csh @@ -0,0 +1,13 @@ +#/usr/bin/env tcsh + +set UNPATCHED_SOURCE_FILE = "$1" +set PATCHED_SOURCE_FILE = "$2" +set ORIG_PATH = "${PWD}/alfa:${PWD}/bravo" + +set RESULT_PATH_FROM_UNPATCHED = `setenv PATH "$ORIG_PATH"; source $UNPATCHED_SOURCE_FILE; echo $PATH` +set RESULT_PATH_FROM_PATCHED = `setenv PATH "$ORIG_PATH"; source $PATCHED_SOURCE_FILE; echo $PATH` + +if ($RESULT_PATH_FROM_UNPATCHED != $RESULT_PATH_FROM_PATCHED) then + echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" > /dev/stderr + exit 1 +endif diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-fish b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-fish new file mode 100644 index 000000000000..fcce014331e5 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-fish @@ -0,0 +1,13 @@ +#/usr/bin/env fish + +set UNPATCHED_SOURCE_FILE $argv[1] +set PATCHED_SOURCE_FILE $argv[2] +set ORIG_PATH "$PWD/alfa:$PWD/bravo" + +set RESULT_PATH_FROM_UNPATCHED (fish -c "set -g PATH \"$ORIG_PATH\"; source $UNPATCHED_SOURCE_FILE; echo \"\$PATH\"") +set RESULT_PATH_FROM_PATCHED (fish -c "set -g PATH \"$ORIG_PATH\"; source $PATCHED_SOURCE_FILE; echo \"\$PATH\"") + +if test "$RESULT_PATH_FROM_UNPATCHED" != "$RESULT_PATH_FROM_PATCHED" + echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" >&2 + exit 1 +end diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-posix b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-posix new file mode 100644 index 000000000000..6039b4dcf097 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-posix @@ -0,0 +1,21 @@ +#!/bin/sh + +set -eu + +UNPATCHED_SOURCE_FILE="$1" +PATCHED_SOURCE_FILE="$2" +ORIG_PATH="$PWD/alfa:$PWD/bravo" +RESULT_PATH_FROM_UNPATCHED="$( + PATH="$ORIG_PATH"; export PATH + . "$UNPATCHED_SOURCE_FILE" + echo "$PATH" +)" +RESULT_PATH_FROM_PATCHED="$( + PATH="$ORIG_PATH"; export PATH + . "$PATCHED_SOURCE_FILE" + echo "$PATH" +)" +if [ "$RESULT_PATH_FROM_UNPATCHED" != "$RESULT_PATH_FROM_PATCHED" ]; then + echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" > /dev/stderr + exit 1 +fi diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cdf564bd7644..22bace945227 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -983,6 +983,10 @@ with pkgs; octant-desktop = callPackage ../applications/networking/cluster/octant/desktop.nix { }; starboard-octant-plugin = callPackage ../applications/networking/cluster/octant/plugins/starboard-octant-plugin.nix { }; + inherit ( + callPackages ../build-support/setup-hooks/patch-rc-path-hooks { } + ) patchRcPathBash patchRcPathCsh patchRcPathFish patchRcPathPosix; + pathsFromGraph = ../build-support/kernel/paths-from-graph.pl; pruneLibtoolFiles = makeSetupHook { name = "prune-libtool-files"; } From 7f91dec5ddf8a75c8da23df982ad027ba333a150 Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Sat, 23 Apr 2022 03:53:34 +0800 Subject: [PATCH 101/130] root: wrap the executable and patch thisroot.* --- .../science/misc/root/default.nix | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index f60fc95e0d56..0435ca2e5850 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -4,11 +4,14 @@ , fetchpatch , makeWrapper , cmake +, coreutils , git , davix , ftgl , gl2ps , glew +, gnugrep +, gnused , gsl , lapack , libX11 @@ -20,14 +23,18 @@ , libxcrypt , libxml2 , llvm_9 +, lsof , lz4 , xz +, man , openblas , openssl , pcre , nlohmann_json , pkg-config +, procps , python +, which , xxHash , zlib , zstd @@ -36,6 +43,9 @@ , libjpeg , libtiff , libpng +, patchRcPathCsh +, patchRcPathFish +, patchRcPathPosix , tbb , Cocoa , CoreSymbolication @@ -93,6 +103,9 @@ stdenv.mkDerivation rec { libtiff libpng nlohmann_json + patchRcPathCsh + patchRcPathFish + patchRcPathPosix python.pkgs.numpy tbb ] @@ -195,6 +208,45 @@ stdenv.mkDerivation rec { --set PYTHONPATH "$out/lib" \ --set ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH "$out/lib" done + + # Make ldd and sed available to the ROOT executable + wrapProgram "$out/bin/root" --prefix PATH : "${lib.makeBinPath [ + gnused # sed + stdenv.cc # c++ ld etc. + stdenv.cc.libc # ldd + ]}" + + # Patch thisroot.{sh,csh,fish} + + # The main target of `thisroot.sh` is "bash-like shells", + # but it also need to support Bash-less POSIX shell like dash, + # as they are mentioned in `thisroot.sh`. + + # `thisroot.sh` would include commands `lsof` and `procps` since ROOT 6.28. + # See https://github.com/root-project/root/pull/10332 + + patchRcPathPosix "$out/bin/thisroot.sh" "${lib.makeBinPath [ + coreutils # dirname tail + gnugrep # grep + gnused # sed + lsof # lsof # for ROOT (>=6.28) + man # manpath + procps # ps # for ROOT (>=6.28) + which # which + ]}" + patchRcPathCsh "$out/bin/thisroot.csh" "${lib.makeBinPath [ + coreutils + gnugrep + gnused + lsof # lsof # for ROOT (>=6.28) + man + which + ]}" + patchRcPathFish "$out/bin/thisroot.fish" "${lib.makeBinPath [ + coreutils + man + which + ]}" ''; setupHook = ./setup-hook.sh; From a664ec27f44b4c7f29c03eff8b60ca62f90b2f16 Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Wed, 12 Oct 2022 03:11:09 +0800 Subject: [PATCH 102/130] root: add package test test-thisroot --- .../science/misc/root/default.nix | 5 ++ .../science/misc/root/tests/default.nix | 4 ++ .../science/misc/root/tests/test-thisroot.nix | 49 +++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 pkgs/applications/science/misc/root/tests/default.nix create mode 100644 pkgs/applications/science/misc/root/tests/test-thisroot.nix diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index 0435ca2e5850..30ff02c1f2ca 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -1,5 +1,6 @@ { stdenv , lib +, callPackage , fetchFromGitHub , fetchpatch , makeWrapper @@ -71,6 +72,10 @@ stdenv.mkDerivation rec { pname = "root"; version = "6.26.08"; + passthru = { + tests = import ./tests { inherit callPackage; }; + }; + src = fetchFromGitHub { owner = "root-project"; repo = "root"; diff --git a/pkgs/applications/science/misc/root/tests/default.nix b/pkgs/applications/science/misc/root/tests/default.nix new file mode 100644 index 000000000000..9d2da2533f7f --- /dev/null +++ b/pkgs/applications/science/misc/root/tests/default.nix @@ -0,0 +1,4 @@ +{ callPackage }: +{ + test-thisroot = callPackage ./test-thisroot.nix { }; +} diff --git a/pkgs/applications/science/misc/root/tests/test-thisroot.nix b/pkgs/applications/science/misc/root/tests/test-thisroot.nix new file mode 100644 index 000000000000..3540dde8c913 --- /dev/null +++ b/pkgs/applications/science/misc/root/tests/test-thisroot.nix @@ -0,0 +1,49 @@ +{ lib +, runCommand +, root +, bash +, fish +, ksh +, tcsh +, zsh +}: runCommand "test-thisroot" +{ + meta = with lib; { + description = "Test for root thisroot.* sourcing"; + maintainers = unique ((with maintainers; [ ShamrockLee ]) ++ root.meta.maintainers); + }; +} + '' + set -eu -o pipefail + declare -a shellNameArray shellOutpathArray sourcefileNameArray sourceCommandArray + shellNameArray=( bash zsh tcsh fish ) + shellOutpathArray=( "${bash}" "${zsh}" "${tcsh}" "${fish}") + sourcefileNameArray=( thisroot.sh thisroot.sh thisroot.csh thisroot.fish ) + sourceCommandArray=( "source" "source" "source" "source" ) + debugFlagstrArray=( "-e" "-e" "-e" "" ) + nShellToTest="''${#shellNameArray[@]}" + if [[ "''${#shellOutpathArray[@]}" -ne "$nShellToTest" ]] \ + || [[ "''${#sourcefileNameArray[@]}" -ne "$nShellToTest" ]] \ + || [[ "''${#sourceCommandArray[@]}" -ne "$nShellToTest" ]] \ + || [[ "''${#debugFlagstrArray[@]}" -ne "$nShellToTest" ]] + then + echo "error: Lengths of test parameter arrays doesn't match." >&2 + exit 1 + fi + typePExpect="${root}/bin/root" + for ((i=0; i<$nShellToTest; ++i)); do + tryCommand="''${sourceCommandArray[$i]} \"${root}/bin/''${sourcefileNameArray[$i]}\"" + echo "Testing ''${shellNameArray[$i]} $tryCommand" + # Home directory for Fish + HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)" + binPATHGot="$(PATH="''${shellOutpathArray[$i]}/bin" HOME=$HOME_TEMP "''${shellNameArray[$i]}" ''${debugFlagstrArray[$i]} -c "$tryCommand && echo \"\$PATH\"")" + rm -r "$HOME_TEMP" + typePGot="$(PATH="$binPATHGot" type -p root)" + if [[ "$typePGot" != "$typePExpect" ]]; then + echo "error: Got PATH \"$binPATHGot\", in which the root executable path is \"$typePGot\". Expect root executable path \"$typePExpect\"." >&2 + exit 1 + fi + done + echo "test-thisroot pass!" + touch "$out" + '' From 6386d793261ae917ae49bf95f587787c5b00db47 Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Mon, 31 Oct 2022 16:48:07 +0000 Subject: [PATCH 103/130] patchRcPath hooks: use the passthru argument --- .../patch-rc-path-hooks/default.nix | 44 +++++++++---------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix index 73fbfa6e9b72..f16644528f00 100644 --- a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix @@ -7,19 +7,18 @@ let tests = import ./test { inherit callPackage; }; in { - patchRcPathBash = (makeSetupHook + patchRcPathBash = makeSetupHook { name = "patch-rc-path-bash"; meta = with lib; { description = "Setup-hook to inject source-time PATH prefix to a Bash/Ksh/Zsh script"; maintainers = with maintainers; [ ShamrockLee ]; }; - } ./patch-rc-path-bash.sh).overrideAttrs (oldAttrs: { - passthru.tests = { - inherit (tests) test-bash; - }; - }); - patchRcPathCsh = (makeSetupHook + passthru.tests = { + inherit (tests) test-bash; + }; + } ./patch-rc-path-bash.sh; + patchRcPathCsh = makeSetupHook { name = "patch-rc-path-csh"; substitutions = { @@ -29,24 +28,22 @@ in description = "Setup-hook to inject source-time PATH prefix to a Csh script"; maintainers = with maintainers; [ ShamrockLee ]; }; - } ./patch-rc-path-csh.sh).overrideAttrs (oldAttrs: { - passthru.tests = { - inherit (tests) test-csh; - }; - }); - patchRcPathFish = (makeSetupHook + passthru.tests = { + inherit (tests) test-csh; + }; + } ./patch-rc-path-csh.sh; + patchRcPathFish = makeSetupHook { name = "patch-rc-path-fish"; meta = with lib; { description = "Setup-hook to inject source-time PATH prefix to a Fish script"; maintainers = with maintainers; [ ShamrockLee ]; }; - } ./patch-rc-path-fish.sh).overrideAttrs (oldAttrs: { - passthru.tests = { - inherit (tests) test-fish; - }; - }); - patchRcPathPosix = (makeSetupHook + passthru.tests = { + inherit (tests) test-fish; + }; + } ./patch-rc-path-fish.sh; + patchRcPathPosix = makeSetupHook { name = "patch-rc-path-posix"; substitutions = { @@ -56,9 +53,8 @@ in description = "Setup-hook to inject source-time PATH prefix to a POSIX shell script"; maintainers = with maintainers; [ ShamrockLee ]; }; - } ./patch-rc-path-posix.sh).overrideAttrs (oldAttrs: { - passthru.tests = { - inherit (tests) test-posix; - }; - }); + passthru.tests = { + inherit (tests) test-posix; + }; + } ./patch-rc-path-posix.sh; } From a791afd94c9902ed5c65d13f6850d337ae8f44b2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 10 Nov 2022 01:36:33 +0000 Subject: [PATCH 104/130] mmdoc: 0.12.0 -> 0.13.0 --- pkgs/tools/text/mmdoc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/text/mmdoc/default.nix b/pkgs/tools/text/mmdoc/default.nix index 6399c3333c12..1a1c531f6296 100644 --- a/pkgs/tools/text/mmdoc/default.nix +++ b/pkgs/tools/text/mmdoc/default.nix @@ -12,13 +12,13 @@ stdenv.mkDerivation rec { pname = "mmdoc"; - version = "0.12.0"; + version = "0.13.0"; src = fetchFromGitHub { owner = "ryantm"; repo = "mmdoc"; rev = version; - hash = "sha256-wg0wFZMijwTWU6B3PuQ785F98JqObDMvltHaI5ltpx8="; + hash = "sha256-ZPdAMlKGwEO54hxHcQh1xgu6eUGsoX12xD/9JehzRdw="; }; nativeBuildInputs = [ ninja meson pkg-config xxd ]; From 9bbb7fb6352c972679f3ac7d8268fd889c65233b Mon Sep 17 00:00:00 2001 From: Joshua Campbell Date: Sun, 6 Nov 2022 18:04:39 -0800 Subject: [PATCH 105/130] azure-functions-core-tools: remove jshcmpbll as maintainer I don't use this tool anymore and dont really have the means to maintain it --- pkgs/development/tools/azure-functions-core-tools/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/azure-functions-core-tools/default.nix b/pkgs/development/tools/azure-functions-core-tools/default.nix index 251493d0deb3..d4cebd5551e9 100644 --- a/pkgs/development/tools/azure-functions-core-tools/default.nix +++ b/pkgs/development/tools/azure-functions-core-tools/default.nix @@ -80,7 +80,7 @@ stdenv.mkDerivation rec { binaryNativeCode ]; license = licenses.mit; - maintainers = with maintainers; [ jshcmpbll ]; + maintainers = with maintainers; [ ]; platforms = platforms.unix; }; } From 2a928587658a39ac7ce17ebe4a206abe014e6ff5 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 10 Nov 2022 02:26:58 +0000 Subject: [PATCH 106/130] nixpacks: 0.12.3 -> 0.13.0 --- pkgs/applications/virtualization/nixpacks/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/virtualization/nixpacks/default.nix b/pkgs/applications/virtualization/nixpacks/default.nix index fef77cb6402d..60bf018fb3fb 100644 --- a/pkgs/applications/virtualization/nixpacks/default.nix +++ b/pkgs/applications/virtualization/nixpacks/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "nixpacks"; - version = "0.12.3"; + version = "0.13.0"; src = fetchFromGitHub { owner = "railwayapp"; repo = pname; rev = "v${version}"; - sha256 = "sha256-Hy2QRGuXSidUrJ7kb1AhkaLeaevhhleGE8QvnNZf/L0="; + sha256 = "sha256-uxy0/Ngzzh96YZDR9whLVYNnQOlj3wkCEuuJTQjT6GE="; }; - cargoSha256 = "sha256-5EJGUi74hrd3vifJ3r2vO0Qq2YEt0stXSi+RAGTme2I="; + cargoSha256 = "sha256-99J4ucjE0yTPQSdM6PDTWEjBltJdIU6yEDqhgSfOaJU="; # skip test due FHS dependency doCheck = false; From d4be94cb82a9a722000f656d868bebf3f5877d63 Mon Sep 17 00:00:00 2001 From: psondej Date: Thu, 10 Nov 2022 04:31:34 +0100 Subject: [PATCH 107/130] kics: add version test --- pkgs/tools/admin/kics/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/admin/kics/default.nix b/pkgs/tools/admin/kics/default.nix index ef3239355f09..8c8000168d5c 100644 --- a/pkgs/tools/admin/kics/default.nix +++ b/pkgs/tools/admin/kics/default.nix @@ -1,4 +1,10 @@ -{ stdenv, buildGoModule, fetchFromGitHub, lib }: +{ stdenv +, buildGoModule +, fetchFromGitHub +, lib +, testers +, kics +}: buildGoModule rec { pname = "kics"; @@ -25,6 +31,11 @@ buildGoModule rec { "-X github.com/Checkmarx/kics/internal/constants.Version=${version}" ]; + passthru.tests.version = testers.testVersion { + package = kics; + command = "kics version"; + }; + meta = with lib; { description = '' Find security vulnerabilities, compliance issues, and infrastructure misconfigurations early in the development From ae2fd703e1b47a27b1a967cc8eb94dff42df34b5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 03:33:57 +0000 Subject: [PATCH 108/130] =?UTF-8?q?terraform-providers.external:=202.2.2?= =?UTF-8?q?=20=E2=86=92=202.2.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/cluster/terraform-providers/providers.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index f4eced33d63b..7d537af4c87f 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -375,13 +375,13 @@ "version": "0.41.0" }, "external": { - "hash": "sha256-gImRxsDUgBHmw/5DeKcO9BzB906JB8dUcSGKQj+Vcy0=", + "hash": "sha256-o9vCr3ayqg9Ehi39FgR6vJFZYF1iTcVD4QfYHcs+YbQ=", "owner": "hashicorp", "provider-source-address": "registry.terraform.io/hashicorp/external", "repo": "terraform-provider-external", - "rev": "v2.2.2", - "vendorHash": "sha256-1BUFg8epcEsCf6yyJr4E4CdX2o6/3R384opRTxwrsng=", - "version": "2.2.2" + "rev": "v2.2.3", + "vendorHash": "sha256-0t+2ixMSsgDK9zzst3s0YWdnS6p7jO0stHnaKio5lvY=", + "version": "2.2.3" }, "fastly": { "hash": "sha256-WxFkJBi87IvO4a/8bmftMKCc/JcfoQILCtklvr9bcuc=", From b4401413f700c9507910091aa71b15d785c82d5d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 03:34:39 +0000 Subject: [PATCH 109/130] =?UTF-8?q?terraform-providers.hcloud:=201.35.2=20?= =?UTF-8?q?=E2=86=92=201.36.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/cluster/terraform-providers/providers.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index 7d537af4c87f..096c773e5d84 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -487,13 +487,13 @@ "version": "1.16.2" }, "hcloud": { - "hash": "sha256-DWDM3yWKkRV9FJMzKK7JJQdI0WvFILF/bsZFv2CjrvM=", + "hash": "sha256-d/qLN5ev8ywiJr97rrlS9rwfvsEheBD2n8I6D9a7krQ=", "owner": "hetznercloud", "provider-source-address": "registry.terraform.io/hetznercloud/hcloud", "repo": "terraform-provider-hcloud", - "rev": "v1.35.2", - "vendorHash": "sha256-LKngOmB3jfC/wFX398LETSZ8HllfOQA/kGg4uUNlN5A=", - "version": "1.35.2" + "rev": "v1.36.0", + "vendorHash": "sha256-HsWkHoFs/77b5+6HSV7YgLOwpE2BZyxbGNty8p+OBSM=", + "version": "1.36.0" }, "helm": { "hash": "sha256-s8ZOzTG3qux+4Yh1wj3ArjB1uJ32bdGhxY9iSL5LOK8=", From 9759793e793e19a080d1513463b4e302c227190d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 03:36:32 +0000 Subject: [PATCH 110/130] =?UTF-8?q?terraform-providers.ksyun:=201.3.57=20?= =?UTF-8?q?=E2=86=92=201.3.58?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/cluster/terraform-providers/providers.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index 096c773e5d84..5c5247c720a0 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -623,13 +623,13 @@ "version": "4.0.1" }, "ksyun": { - "hash": "sha256-62ylxBt5F3J2n7BW8qD5ukE8OJa63E6Qyuuf8dPo9FQ=", + "hash": "sha256-Rye7gKARdbrB6KDEygEJy9m7VqlGw6QeE2F1oa3n8as=", "owner": "kingsoftcloud", "provider-source-address": "registry.terraform.io/kingsoftcloud/ksyun", "repo": "terraform-provider-ksyun", - "rev": "v1.3.57", + "rev": "v1.3.58", "vendorHash": "sha256-miHKAz+ONXtuC1DNukcyZbbaYReY69dz9Zk6cJdORdQ=", - "version": "1.3.57" + "version": "1.3.58" }, "kubectl": { "hash": "sha256-UkUwWi7Z9cSMyZakD6JxMl+qdczAYfZQgwroCUjFIUM=", From d1f98aaf0edd18d60ec8aa363af3c13ac735fa38 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 03:37:23 +0000 Subject: [PATCH 111/130] =?UTF-8?q?terraform-providers.ns1:=201.12.8=20?= =?UTF-8?q?=E2=86=92=201.13.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/cluster/terraform-providers/providers.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index 5c5247c720a0..9ce284f03f76 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -795,13 +795,13 @@ "version": "1.4.19" }, "ns1": { - "hash": "sha256-vw3n1EBKwOThoJ+2hFa4rsMzvWCOnhoYOmJpX8LQKy8=", + "hash": "sha256-qHR3KJa1y10B+iQPgH6lTt/JUqTmiK/60rPCa3gQDP8=", "owner": "ns1-terraform", "provider-source-address": "registry.terraform.io/ns1-terraform/ns1", "repo": "terraform-provider-ns1", - "rev": "v1.12.8", - "vendorHash": "sha256-MaJHCxvD9BM5G8wJbSo06+TIPvJTlXzQ+l9Kdbg0QQw=", - "version": "1.12.8" + "rev": "v1.13.0", + "vendorHash": "sha256-6ePPxdULuTzLdVzzr12BjLu/lBN+5yIUq8U8FVUw/PM=", + "version": "1.13.0" }, "nsxt": { "hash": "sha256-TOoRtCKdR1fBjk39dbMgBd7pDJGfjvkQAqfpJzWRwRg=", From cbb048f8d91149c3976f51083d3056fa17fc1622 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 03:40:46 +0000 Subject: [PATCH 112/130] =?UTF-8?q?terraform-providers.tencentcloud:=201.7?= =?UTF-8?q?8.8=20=E2=86=92=201.78.9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/cluster/terraform-providers/providers.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index 9ce284f03f76..6fe52ab7b895 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -1120,13 +1120,13 @@ "version": "0.13.5" }, "tencentcloud": { - "hash": "sha256-DvH8+Be2AVwsNoDrNlCG8/Uve2EKcuan3qUsJynreHw=", + "hash": "sha256-vVwfKzA6qK6VzRRlYPEqL1QPlpiruD8JZRL6oF/u62w=", "owner": "tencentcloudstack", "provider-source-address": "registry.terraform.io/tencentcloudstack/tencentcloud", "repo": "terraform-provider-tencentcloud", - "rev": "v1.78.8", + "rev": "v1.78.9", "vendorHash": null, - "version": "1.78.8" + "version": "1.78.9" }, "tfe": { "hash": "sha256-MDlRwB2iVi/Rv7/UtukI6mIDImz8Gnpm5Qv5R6EDpiU=", From 980b1ab0504256b58751a7f1686c123c2863082e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 10 Nov 2022 04:29:19 +0000 Subject: [PATCH 113/130] opentelemetry-collector: 0.63.1 -> 0.64.0 --- pkgs/tools/misc/opentelemetry-collector/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/opentelemetry-collector/default.nix b/pkgs/tools/misc/opentelemetry-collector/default.nix index ebd9678df177..bb2a6e5bed97 100644 --- a/pkgs/tools/misc/opentelemetry-collector/default.nix +++ b/pkgs/tools/misc/opentelemetry-collector/default.nix @@ -12,17 +12,17 @@ let in buildGoModule rec { pname = "opentelemetry-collector"; - version = "0.63.1"; + version = "0.64.0"; src = fetchFromGitHub { owner = "open-telemetry"; repo = "opentelemetry-collector"; rev = "v${version}"; - sha256 = "sha256-YeW9A338HZHdW4PQaxUwdAPXwY9kijcFEGos/4NdZek="; + sha256 = "sha256-4EXRmG8HAUybA9+kPNCvlfZf3bfREAqeis7YxmGn33c="; }; # there is a nested go.mod sourceRoot = "source/cmd/otelcorecol"; - vendorSha256 = "sha256-U3RPRuDdXXoeAQY3RYToply7VhePnlq9hn/79KCrum4="; + vendorSha256 = "sha256-i3pAK9ByXDdd2juenPooStgvhpcemcCOKLT9jjz0hL8="; preBuild = '' # set the build version, can't be done via ldflags From ab238f2d81857e9c77ca8d40077e50c6b8c0ffa5 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 10 Nov 2022 04:33:01 +0000 Subject: [PATCH 114/130] opentelemetry-collector-contrib: 0.63.0 -> 0.64.0 --- pkgs/tools/misc/opentelemetry-collector/contrib.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/opentelemetry-collector/contrib.nix b/pkgs/tools/misc/opentelemetry-collector/contrib.nix index c00254ef894c..78344c666705 100644 --- a/pkgs/tools/misc/opentelemetry-collector/contrib.nix +++ b/pkgs/tools/misc/opentelemetry-collector/contrib.nix @@ -6,17 +6,17 @@ buildGoModule rec { pname = "opentelemetry-collector-contrib"; - version = "0.63.0"; + version = "0.64.0"; src = fetchFromGitHub { owner = "open-telemetry"; repo = "opentelemetry-collector-contrib"; rev = "v${version}"; - sha256 = "sha256-oZGh80zer2VHGoypcIJ/WZ+DMe349/qRrmlx6UJlZVI="; + sha256 = "sha256-yrm9tLK9no1H4bh2ghQO1ybohYeEo1EzVa+5dgawlxk="; }; # proxy vendor to avoid hash missmatches between linux and macOS proxyVendor = true; - vendorSha256 = "sha256-zd6ll30nROV9ORJhyRPPSRqzpw7MJN3xryDSUg8XxPY="; + vendorSha256 = "sha256-Tartb4Qh10UPdVQG2mGbqXW/Mg9XbD28JRrn128d/4k="; subPackages = [ "cmd/otelcontribcol" ]; From c3616ce8370f4a00e6b62af80fdaace308c13b68 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 10 Nov 2022 00:00:40 +0200 Subject: [PATCH 115/130] 0ad: fix icon install path --- pkgs/games/0ad/game.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/games/0ad/game.nix b/pkgs/games/0ad/game.nix index 7e1375a829f9..1ebf215aefb5 100644 --- a/pkgs/games/0ad/game.nix +++ b/pkgs/games/0ad/game.nix @@ -95,7 +95,7 @@ stdenv.mkDerivation rec { install -Dm644 -t $out/lib/0ad binaries/system/*.so # Copy icon. - install -D build/resources/0ad.png $out/share/icons/hicolor/128x128/0ad.png + install -D build/resources/0ad.png $out/share/icons/hicolor/128x128/apps/0ad.png install -D build/resources/0ad.desktop $out/share/applications/0ad.desktop ''; From f680c2020f41da5d2ed5d88ad3f997b9a8d03b77 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 3 Oct 2022 01:18:59 +0000 Subject: [PATCH 116/130] shards: 0.17.0 -> 0.17.1 --- pkgs/development/tools/build-managers/shards/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/shards/default.nix b/pkgs/development/tools/build-managers/shards/default.nix index a04eba1d1711..9202543ea904 100644 --- a/pkgs/development/tools/build-managers/shards/default.nix +++ b/pkgs/development/tools/build-managers/shards/default.nix @@ -37,8 +37,8 @@ let in rec { shards_0_17 = generic { - version = "0.17.0"; - hash = "sha256-f9MptrKalW7gi0J2h0fokkzdjKBVa2TmoPX8BYffqzY="; + version = "0.17.1"; + hash = "sha256-YAsFsMoZVUINnIQzYNjE7/hpvipmyU5DrLJJrk9TkHs="; }; shards = shards_0_17; From 184023a1f9e8ce094c2961a855e7f7ccb9eb0e79 Mon Sep 17 00:00:00 2001 From: Mostly Void <7rat13@gmail.com> Date: Thu, 10 Nov 2022 11:48:49 +0530 Subject: [PATCH 117/130] cotton: fix build on darwin --- pkgs/development/tools/cotton/default.nix | 6 +++++- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/cotton/default.nix b/pkgs/development/tools/cotton/default.nix index 34cf19d40fdd..310561d52646 100644 --- a/pkgs/development/tools/cotton/default.nix +++ b/pkgs/development/tools/cotton/default.nix @@ -1,6 +1,8 @@ -{ lib +{ stdenv +, lib , rustPlatform , fetchFromGitHub +, CoreServices }: rustPlatform.buildRustPackage rec { @@ -16,6 +18,8 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-qpV3UriOidIk/0di9d8RjXvjcjgD6dXqg7wLAywI66o="; + buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + meta = with lib; { description = "A package manager for JavaScript projects"; homepage = "https://github.com/danielhuang/cotton"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0efcc5cf7e07..fcdb81b84331 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13636,7 +13636,9 @@ with pkgs; copper = callPackage ../development/compilers/copper {}; - cotton = callPackage ../development/tools/cotton { }; + cotton = callPackage ../development/tools/cotton { + inherit (darwin.apple_sdk.frameworks) CoreServices; + }; inherit (callPackages ../development/compilers/crystal { llvmPackages = if stdenv.system == "aarch64-darwin" then llvmPackages_11 else llvmPackages_10; From 016580f6daf1836ed945840dc50db69431c31e62 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 10 Nov 2022 09:01:58 +0100 Subject: [PATCH 118/130] python310Packages.azure-eventgrid: update disabled --- pkgs/development/python-modules/azure-eventgrid/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/azure-eventgrid/default.nix b/pkgs/development/python-modules/azure-eventgrid/default.nix index 43d075505193..5946f5202c8e 100644 --- a/pkgs/development/python-modules/azure-eventgrid/default.nix +++ b/pkgs/development/python-modules/azure-eventgrid/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { version = "4.9.1"; format = "setuptools"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; From 113bfd75d6d64d25981e630babe2ca36233744c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 10 Nov 2022 09:24:31 +0100 Subject: [PATCH 119/130] gnome.gnome-maps: patch a test failure Thanks to bobby285271 for suggesting this patch. --- pkgs/desktops/gnome/apps/gnome-maps/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/desktops/gnome/apps/gnome-maps/default.nix b/pkgs/desktops/gnome/apps/gnome-maps/default.nix index 1e74521d3e9d..99d4d27ef660 100644 --- a/pkgs/desktops/gnome/apps/gnome-maps/default.nix +++ b/pkgs/desktops/gnome/apps/gnome-maps/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchurl +, fetchpatch , meson , ninja , gettext @@ -65,6 +66,14 @@ stdenv.mkDerivation rec { libsoup_3 ]; + patches = [ + (fetchpatch { + name = "timeTest.patch"; + url = "https://gitlab.gnome.org/GNOME/gnome-maps/-/commit/bec3d2f26de1b3a8c8b7e603f6d6a46c853426fa.diff"; + sha256 = "sha256-7/ogIDG0piZOPaCPX4nUA3jHI7RGTd2KMZsp8z0XLcc="; + }) + ]; + postPatch = '' # The .service file isn't wrapped with the correct environment # so misses GIR files when started. By re-pointing from the gjs From 5ed3812a9ff33b2ec955d36ee2444cec2e58b536 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 10 Nov 2022 10:36:31 +0100 Subject: [PATCH 120/130] octave: enable JSON Add rapidjson to inputs, which enables the functions jsonencode and jsondecode. --- pkgs/development/interpreters/octave/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/interpreters/octave/default.nix b/pkgs/development/interpreters/octave/default.nix index c1753a7668e6..8f0cd0e6a226 100644 --- a/pkgs/development/interpreters/octave/default.nix +++ b/pkgs/development/interpreters/octave/default.nix @@ -25,6 +25,7 @@ , fftwSinglePrec , zlib , curl +, rapidjson , blas, lapack # These two should use the same lapack and blas as the above , qrupdate, arpack, suitesparse ? null @@ -130,6 +131,7 @@ let fltk zlib curl + rapidjson blas' lapack' libsndfile From b89efbd9a45aaa6563225ba2de8a93ce9663f337 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Tue, 8 Nov 2022 23:46:02 +0000 Subject: [PATCH 121/130] mame-tools: init at 0.249 This commit adds a new `tools` output to `mame` and move all non-emulator binaries to it. This is because some of those binaries (e.g.: chdman) are useful outside of the MAME, and the MAME binary is really big. So if you only want to use some of the MAME tools, this will reduce the download size needed for it. The `tools` output is declared as `mame-tools` inside `all-packages.nix`, for easier discovery. This is similar to how other distros packages MAME, e.g.: on Arch Linux we have `mame` and `mame-tools`. --- pkgs/applications/emulators/mame/default.nix | 24 ++++++++++++++++---- pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/emulators/mame/default.nix b/pkgs/applications/emulators/mame/default.nix index aaa4077015ee..cd5d718c8a4e 100644 --- a/pkgs/applications/emulators/mame/default.nix +++ b/pkgs/applications/emulators/mame/default.nix @@ -53,6 +53,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-im6y/E0pQxruX2kNXZLE3fHq+zXfsstnOoC1QvH4fd4="; }; + outputs = [ "out" "tools" ]; + makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "CXX=${stdenv.cc.targetPrefix}c++" @@ -138,21 +140,33 @@ stdenv.mkDerivation rec { runHook preInstall make -f dist.mak PTR64=${lib.optionalString stdenv.is64bit "1"} + + # mame mkdir -p ${dest} mv build/release/*/Release/mame/* ${dest} - mkdir -p $out/bin - find ${dest} -maxdepth 1 -executable -type f -exec mv -t $out/bin {} \; - install -Dm755 src/osd/sdl/taputil.sh $out/bin/taputil.sh - - installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6 + find ${dest} -maxdepth 1 -executable -type f -delete; + install -Dm755 mame -t $out/bin install -Dm644 ${icon} $out/share/icons/hicolor/scalable/apps/mame.svg + installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6 mv artwork plugins samples ${dest} + # mame-tools + for _i in castool chdman floptool imgtool jedutil ldresample ldverify nltool nlwav pngcmp regrep romcmp \ + split srcclean testkeys unidasm; do + install -Dm755 $_i -t $tools/bin + done + mv $tools/bin/{,mame-}split + runHook postInstall ''; + postFixup = '' + mkdir -p $tools/share/man + mv {$out,$tools}/share/man/man1 + ''; + enableParallelBuilding = true; passthru.updateScript = writeScript "mame-update-script" '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b70b510d21f5..f7745800c661 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1597,6 +1597,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) CoreAudioKit ForceFeedback; }; + mame-tools = (lib.getOutput "tools" mame); + mednafen = callPackage ../applications/emulators/mednafen { inherit (darwin) libiconv; }; From d868053b400db0fa46e2a0432fa06231a040a7cb Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 10 Nov 2022 08:33:35 +0000 Subject: [PATCH 122/130] nixos/doc: formatting improvements --- .../doc/manual/from_md/release-notes/rl-2211.section.xml | 9 +++++---- nixos/doc/manual/release-notes/rl-2211.section.md | 2 +- 2 files changed, 6 insertions(+), 5 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 c53474144d27..d9fa98904db8 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 @@ -1338,10 +1338,11 @@ - boot.kernel.sysctl is defined as a freeformType and adds a - custom merge option for net.core.rmem_max - (taking the highest value defined to avoid conflicts between 2 - services trying to set that value) + boot.kernel.sysctl is defined as a + freeformType and adds a custom merge option for + net.core.rmem_max (taking the highest value + defined to avoid conflicts between 2 services trying to set + that value). diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md index 863bf95b55f3..d043de005dda 100644 --- a/nixos/doc/manual/release-notes/rl-2211.section.md +++ b/nixos/doc/manual/release-notes/rl-2211.section.md @@ -395,6 +395,6 @@ Available as [services.patroni](options.html#opt-services.patroni.enable). - The `nodePackages` package set now defaults to the LTS release in the `nodejs` package again, instead of being pinned to `nodejs-14_x`. Several updates to node2nix have been made for compatibility with newer Node.js and npm versions and a new `postRebuild` hook has been added for packages to perform extra build steps before the npm install step prunes dev dependencies. -- boot.kernel.sysctl is defined as a freeformType and adds a custom merge option for "net.core.rmem_max" (taking the highest value defined to avoid conflicts between 2 services trying to set that value) +- `boot.kernel.sysctl` is defined as a freeformType and adds a custom merge option for "net.core.rmem_max" (taking the highest value defined to avoid conflicts between 2 services trying to set that value). From 891511b61957757faa4c3162d173e984f9c39e34 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 10 Nov 2022 08:35:40 +0000 Subject: [PATCH 123/130] nixos/doc: document mame package changes --- .../doc/manual/from_md/release-notes/rl-2211.section.xml | 9 +++++++++ nixos/doc/manual/release-notes/rl-2211.section.md | 2 ++ 2 files changed, 11 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 d9fa98904db8..841aced11f2f 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 @@ -1345,6 +1345,15 @@ that value). + + + The mame package does not ship with its + tools anymore in the default output. They were moved to a + separate tools output instead. For + convenience, mame-tools package was added + for those who want to use it. + + diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md index d043de005dda..85d8080fba18 100644 --- a/nixos/doc/manual/release-notes/rl-2211.section.md +++ b/nixos/doc/manual/release-notes/rl-2211.section.md @@ -397,4 +397,6 @@ Available as [services.patroni](options.html#opt-services.patroni.enable). - `boot.kernel.sysctl` is defined as a freeformType and adds a custom merge option for "net.core.rmem_max" (taking the highest value defined to avoid conflicts between 2 services trying to set that value). +- The `mame` package does not ship with its tools anymore in the default output. They were moved to a separate `tools` output instead. For convenience, `mame-tools` package was added for those who want to use it. + From b2eda58270a9b863da085f92fd2c0bc301212956 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 10 Nov 2022 10:52:37 +0100 Subject: [PATCH 124/130] mpich: 4.0.2 -> 4.0.3 --- pkgs/development/libraries/mpich/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mpich/default.nix b/pkgs/development/libraries/mpich/default.nix index 60e543c46296..14dddf1f29fd 100644 --- a/pkgs/development/libraries/mpich/default.nix +++ b/pkgs/development/libraries/mpich/default.nix @@ -11,11 +11,11 @@ assert (ch4backend.pname == "ucx" || ch4backend.pname == "libfabric"); stdenv.mkDerivation rec { pname = "mpich"; - version = "4.0.2"; + version = "4.0.3"; src = fetchurl { url = "https://www.mpich.org/static/downloads/${version}/mpich-${version}.tar.gz"; - sha256 = "0hnxvqhhscp3h70zf538dhqz9jwmqpwwnj3fqabdk8nli6lg2hjs"; + sha256 = "sha256-F0BuqQpu1OzVvjnJ3cv6yTQ+arT3esToxevko+O2xQE="; }; configureFlags = [ From a4e879a54919387162fb68565d7ecffda0abf9f5 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 10 Nov 2022 11:22:37 +0100 Subject: [PATCH 125/130] spglib/pythonPackages.spglib: 2.0.1 -> 2.0.2 --- pkgs/development/libraries/spglib/default.nix | 4 ++-- pkgs/development/python-modules/spglib/default.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/spglib/default.nix b/pkgs/development/libraries/spglib/default.nix index c10b5a705425..4b634a0f1f69 100644 --- a/pkgs/development/libraries/spglib/default.nix +++ b/pkgs/development/libraries/spglib/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "spglib"; - version = "2.0.1"; # N.B: if you change this, please update: pythonPackages.spglib + version = "2.0.2"; # N.B: if you change this, please update: pythonPackages.spglib src = fetchFromGitHub { owner = "spglib"; repo = "spglib"; rev = "v${version}"; - sha256 = "sha256-0M3GSnNvBNmE4ShW8NNkVrOBGEF9A0C5wd++xnyrcdI="; + sha256 = "sha256-8Voepj35CMbboL3Dc55Gc4+OLPTTSgqVQuvNcRQsqmU="; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/python-modules/spglib/default.nix b/pkgs/development/python-modules/spglib/default.nix index c9023285568b..8b5e36b0f665 100644 --- a/pkgs/development/python-modules/spglib/default.nix +++ b/pkgs/development/python-modules/spglib/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "spglib"; - version = "2.0.1"; + version = "2.0.2"; src = fetchPypi { inherit pname version; - sha256 = "sha256-9fHKuDWuwbjXjL9CmJxUWWoomkqDP93J8MX1XKwbwsE="; + sha256 = "sha256-HQgewi2kq0/DGY6URd2tbewiYcQ5J4MRUdk+OUImEKo="; }; propagatedBuildInputs = [ numpy ]; From 0a303bce315c8588e7e0f25fc054ac74b081a073 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 10 Nov 2022 11:36:38 +0100 Subject: [PATCH 126/130] nfs-ganesha: 4.0.8 -> 4.0.12 --- pkgs/servers/nfs-ganesha/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/nfs-ganesha/default.nix b/pkgs/servers/nfs-ganesha/default.nix index a8cbe695c49a..1af14ded947d 100644 --- a/pkgs/servers/nfs-ganesha/default.nix +++ b/pkgs/servers/nfs-ganesha/default.nix @@ -1,17 +1,17 @@ { lib, stdenv, fetchFromGitHub, cmake, pkg-config , krb5, xfsprogs, jemalloc, dbus, libcap -, ntirpc, liburcu, bison, flex, nfs-utils +, ntirpc, liburcu, bison, flex, nfs-utils, acl } : stdenv.mkDerivation rec { pname = "nfs-ganesha"; - version = "4.0.8"; + version = "4.0.12"; src = fetchFromGitHub { owner = "nfs-ganesha"; repo = "nfs-ganesha"; rev = "V${version}"; - sha256 = "sha256-03zrEWwPQi7ED6Yr3HgzQyOtqJjjnUj5nChgGV6v0zk="; + sha256 = "sha256-s6iZcZObBEHvIqyD0niNzuPJf4ENZGw3mhgZZZdj2zc="; }; preConfigure = "cd src"; @@ -26,6 +26,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ + acl krb5 xfsprogs jemalloc From d97cad58c7f83a2a8fa18c69eb128a80fb24960e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 10 Nov 2022 11:37:06 +0000 Subject: [PATCH 127/130] snappymail: 2.19.4 -> 2.20.6 --- pkgs/servers/snappymail/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/snappymail/default.nix b/pkgs/servers/snappymail/default.nix index fabbac5e7f5c..de2df9fffcc3 100644 --- a/pkgs/servers/snappymail/default.nix +++ b/pkgs/servers/snappymail/default.nix @@ -2,11 +2,11 @@ , dataPath ? "/var/lib/snappymail" }: stdenv.mkDerivation rec { pname = "snappymail"; - version = "2.19.4"; + version = "2.20.6"; src = fetchurl { url = "https://github.com/the-djmaze/snappymail/releases/download/v${version}/snappymail-${version}.tar.gz"; - sha256 = "sha256-XjnNBK/w9aPfG11fVcESIMy1UFAI1j/iAKz1GvZzfq4="; + sha256 = "sha256-xALHgE+N/X2YqGd3qZxAiZF1onzO/FVfxSbwjAaep/A="; }; sourceRoot = "snappymail"; From b73781c9893215ff33a7a372976a45ba8528086c Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Thu, 10 Nov 2022 11:32:40 +0100 Subject: [PATCH 128/130] conmon-rs: init at 0.4.0 Signed-off-by: Sascha Grunert --- .../virtualization/conmon-rs/default.nix | 31 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/applications/virtualization/conmon-rs/default.nix diff --git a/pkgs/applications/virtualization/conmon-rs/default.nix b/pkgs/applications/virtualization/conmon-rs/default.nix new file mode 100644 index 000000000000..59a2de96e9dd --- /dev/null +++ b/pkgs/applications/virtualization/conmon-rs/default.nix @@ -0,0 +1,31 @@ +{ capnproto +, lib +, fetchFromGitHub +, protobuf +, rustPlatform +}: + +rustPlatform.buildRustPackage rec { + pname = "conmon-rs"; + version = "0.4.0"; + + src = fetchFromGitHub { + owner = "containers"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-VwVJWf9tKZ5rVF8tXDf35zsS2PipqC8FPbXUpOzsw/Y="; + }; + + nativeBuildInputs = [ capnproto protobuf ]; + doCheck = false; + + cargoSha256 = "sha256-zY9fsZK1C3HnCxeNA5dCbQQHYx3IVDMHCHYwFh5ev2k="; + + meta = with lib; { + description = "An OCI container runtime monitor written in Rust"; + homepage = "https://github.com/containers/conmon-rs"; + license = licenses.asl20; + maintainers = with maintainers; [ ] ++ teams.podman.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0d69ac96bc7e..2a394a2aebe7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33701,6 +33701,8 @@ with pkgs; conmon = callPackage ../applications/virtualization/conmon { }; + conmon-rs = callPackage ../applications/virtualization/conmon-rs { }; + digikam = libsForQt5.callPackage ../applications/graphics/digikam {}; drumkv1 = libsForQt5.callPackage ../applications/audio/drumkv1 { }; From 2c0c029ae388acc19219fbf0db381ee557c2ddb3 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 10 Nov 2022 03:17:46 +0000 Subject: [PATCH 129/130] awscli2: 2.8.9 -> 2.8.11 --- pkgs/tools/admin/awscli2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/admin/awscli2/default.nix b/pkgs/tools/admin/awscli2/default.nix index 8b4b42e31239..a666a4cf8edb 100644 --- a/pkgs/tools/admin/awscli2/default.nix +++ b/pkgs/tools/admin/awscli2/default.nix @@ -32,14 +32,14 @@ let in with py.pkgs; buildPythonApplication rec { pname = "awscli2"; - version = "2.8.9"; # N.B: if you change this, check if overrides are still up-to-date + version = "2.8.11"; # N.B: if you change this, check if overrides are still up-to-date format = "pyproject"; src = fetchFromGitHub { owner = "aws"; repo = "aws-cli"; rev = version; - sha256 = "sha256-7So0zPknO5rIiWY7o82HXl+Iw2+fQmhYvrfrFMCDdDE="; + sha256 = "sha256-E4O4DEdPwfIt+XOiCF2gLZILYTfZ4BhXMUgKggtsoCc="; }; nativeBuildInputs = [ From 4cdc5e30697c12f405c686c06056160ff078bdcc Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 5 Nov 2022 02:03:02 +0000 Subject: [PATCH 130/130] sssd: 2.8.0 -> 2.8.1 --- pkgs/os-specific/linux/sssd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/sssd/default.nix b/pkgs/os-specific/linux/sssd/default.nix index ef92739ec275..30311bbd58c4 100644 --- a/pkgs/os-specific/linux/sssd/default.nix +++ b/pkgs/os-specific/linux/sssd/default.nix @@ -13,13 +13,13 @@ let in stdenv.mkDerivation rec { pname = "sssd"; - version = "2.8.0"; + version = "2.8.1"; src = fetchFromGitHub { owner = "SSSD"; repo = pname; rev = version; - sha256 = "sha256-i2RRvIFQLuFw9Q3pLOgomvCH9j8h3JAailoIww1dnLs="; + sha256 = "sha256-TbeofUQAQNM/Nxzgl8GP2+Y4iR7bVXm4dQaPkYMSdqc="; }; postPatch = ''