diff options
author | Vladimír Čunát <v@cunat.cz> | 2024-05-03 17:36:08 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2024-05-03 17:36:08 +0200 |
commit | e96601ecf084d9d6a366a4f0da7f36479f67f81e (patch) | |
tree | dbfe3d477ed9bee7adb03c76ae5fecce043fb9bf /pkgs/development | |
parent | 1aae0909b02ffb4d0d4a45db322df7a8c9fdd34e (diff) | |
parent | 2544167a82ff99e00a8de68fa529701a30648128 (diff) |
Merge #306080: staging-next 2024-04-22
Diffstat (limited to 'pkgs/development')
429 files changed, 12044 insertions, 5191 deletions
diff --git a/pkgs/development/compilers/dtc/default.nix b/pkgs/development/compilers/dtc/default.nix index 60bce2f6e4580..9548f8fe06f8b 100644 --- a/pkgs/development/compilers/dtc/default.nix +++ b/pkgs/development/compilers/dtc/default.nix @@ -47,6 +47,12 @@ stdenv.mkDerivation (finalAttrs: { url = "https://github.com/dgibson/dtc/commit/35f26d2921b68d97fefbd5a2b6e821a2f02ff65d.patch"; sha256 = "sha256-cO4f/jJX/pQL7kk4jpKUhsCVESW2ZuWaTr7z3BuvVkw="; }) + + (fetchpatch { + name = "static.patch"; + url = "https://git.kernel.org/pub/scm/utils/dtc/dtc.git/patch/?id=3fbfdd08afd2a7a25b27433f6f5678c0fe694721"; + hash = "sha256-skK8m1s4xkK6x9AqzxiEK+1uMEmS27dBI1CdEXNFTfU="; + }) ]; env.SETUPTOOLS_SCM_PRETEND_VERSION = finalAttrs.version; diff --git a/pkgs/development/compilers/flutter/wrapper.nix b/pkgs/development/compilers/flutter/wrapper.nix index 4a7aedf97d38e..f5b8b2e2059da 100644 --- a/pkgs/development/compilers/flutter/wrapper.nix +++ b/pkgs/development/compilers/flutter/wrapper.nix @@ -20,7 +20,7 @@ , makeWrapper , runCommandLocal , writeShellScript -, wrapGAppsHook +, wrapGAppsHook3 , git , which , pkg-config @@ -123,7 +123,7 @@ in nativeBuildInputs = [ makeWrapper ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ] - ++ lib.optionals supportsLinuxDesktopTarget [ glib wrapGAppsHook ]; + ++ lib.optionals supportsLinuxDesktopTarget [ glib wrapGAppsHook3 ]; passthru = flutter.passthru // { inherit (flutter) version; diff --git a/pkgs/development/compilers/llvm/12/default.nix b/pkgs/development/compilers/llvm/12/default.nix index 45955dc5e1b36..82a9d63ab3300 100644 --- a/pkgs/development/compilers/llvm/12/default.nix +++ b/pkgs/development/compilers/llvm/12/default.nix @@ -58,7 +58,52 @@ let in { - libllvm = callPackage ./llvm { + libllvm = callPackage ../common/llvm { + src = fetch "llvm" "1pzx9zrmd7r3481sbhwvkms68fwhffpp4mmz45dgrkjpyl2q96kx"; + polly_src = fetch "polly" "1yfm9ixda4a2sx7ak5vswijx4ydk5lv1c1xh39xmd2kh299y4m12"; + patches = [ + # When cross-compiling we configure llvm-config-native with an approximation + # of the flags used for the normal LLVM build. To avoid the need for building + # a native libLLVM.so (which would fail) we force llvm-config to be linked + # statically against the necessary LLVM components always. + ../common/llvm/llvm-config-link-static.patch + # Fix llvm being miscompiled by some gccs. See llvm/llvm-project#49955 + # Fix llvm being miscompiled by some gccs. See https://github.com/llvm/llvm-project/issues/49955 + ./llvm/fix-llvm-issue-49955.patch + + ./llvm/gnu-install-dirs.patch + # On older CPUs (e.g. Hydra/wendy) we'd be getting an error in this test. + (fetchpatch { + name = "uops-CMOV16rm-noreg.diff"; + url = "https://github.com/llvm/llvm-project/commit/9e9f991ac033.diff"; + sha256 = "sha256:12s8vr6ibri8b48h2z38f3afhwam10arfiqfy4yg37bmc054p5hi"; + stripLen = 1; + }) + + # Fix musl build. + (fetchpatch { + url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch"; + relative = "llvm"; + hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA="; + }) + + # Backport gcc-13 fixes with missing includes. + (fetchpatch { + name = "signals-gcc-13.patch"; + url = "https://github.com/llvm/llvm-project/commit/ff1681ddb303223973653f7f5f3f3435b48a1983.patch"; + hash = "sha256-CXwYxQezTq5vdmc8Yn88BUAEly6YZ5VEIA6X3y5NNOs="; + stripLen = 1; + }) + (fetchpatch { + name = "base64-gcc-13.patch"; + url = "https://github.com/llvm/llvm-project/commit/5e9be93566f39ee6cecd579401e453eccfbe81e5.patch"; + hash = "sha256-PAwrVrvffPd7tphpwCkYiz+67szPRzRB2TXBvKfzQ7U="; + stripLen = 1; + }) + ]; + pollyPatches = [ + ./llvm/gnu-install-dirs-polly.patch + ]; inherit llvm_meta; }; diff --git a/pkgs/development/compilers/llvm/12/llvm/default.nix b/pkgs/development/compilers/llvm/12/llvm/default.nix deleted file mode 100644 index 4745345a3f712..0000000000000 --- a/pkgs/development/compilers/llvm/12/llvm/default.nix +++ /dev/null @@ -1,357 +0,0 @@ -{ lib, stdenv, llvm_meta -, pkgsBuildBuild -, fetch -, fetchpatch -, cmake -, python3 -, libffi -, enableGoldPlugin ? libbfd.hasPluginAPI -, libbfd -, libpfm -, libxml2 -, ncurses -, version -, release_version -, zlib -, buildLlvmTools -, debugVersion ? false -, doCheck ? stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl) - && (stdenv.hostPlatform == stdenv.buildPlatform) -, enableManpages ? false -, enableSharedLibraries ? !stdenv.hostPlatform.isStatic -# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245 -# broken for the armv7l builder -, enablePFM ? stdenv.isLinux && !stdenv.hostPlatform.isAarch -, enablePolly ? false -}: - -let - inherit (lib) optional optionals optionalString; - - # Used when creating a version-suffixed symlink of libLLVM.dylib - shortVersion = with lib; - concatStringsSep "." (take 1 (splitString "." release_version)); - - # Ordinarily we would just the `doCheck` and `checkDeps` functionality - # `mkDerivation` gives us to manage our test dependencies (instead of breaking - # out `doCheck` as a package level attribute). - # - # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in - # particular the children it uses to do feature detection. - # - # This means that python deps we add to `checkDeps` (which the python - # interpreter is made aware of via `$PYTHONPATH` – populated by the python - # setup hook) are not picked up by `lit` which causes it to skip tests. - # - # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work - # because this package is shadowed in `$PATH` by the regular `python3` - # package. - # - # So, we "manually" assemble one python derivation for the package to depend - # on, taking into account whether checks are enabled or not: - python = if doCheck then - let - checkDeps = ps: with ps; [ psutil ]; - in python3.withPackages checkDeps - else python3; - -in stdenv.mkDerivation (rec { - pname = "llvm"; - inherit version; - - src = fetch pname "1pzx9zrmd7r3481sbhwvkms68fwhffpp4mmz45dgrkjpyl2q96kx"; - polly_src = fetch "polly" "1yfm9ixda4a2sx7ak5vswijx4ydk5lv1c1xh39xmd2kh299y4m12"; - - unpackPhase = '' - unpackFile $src - mv llvm-${release_version}* llvm - sourceRoot=$PWD/llvm - '' + optionalString enablePolly '' - unpackFile $polly_src - mv polly-* $sourceRoot/tools/polly - ''; - - outputs = [ "out" "lib" "dev" "python" ]; - - nativeBuildInputs = [ cmake python ] - ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ]; - - buildInputs = [ libxml2 libffi ] - ++ optional enablePFM libpfm; # exegesis - - propagatedBuildInputs = optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ ncurses ] - ++ [ zlib ]; - - patches = [ - # When cross-compiling we configure llvm-config-native with an approximation - # of the flags used for the normal LLVM build. To avoid the need for building - # a native libLLVM.so (which would fail) we force llvm-config to be linked - # statically against the necessary LLVM components always. - ../../common/llvm/llvm-config-link-static.patch - # Fix llvm being miscompiled by some gccs. See llvm/llvm-project#49955 - # Fix llvm being miscompiled by some gccs. See https://github.com/llvm/llvm-project/issues/49955 - ./fix-llvm-issue-49955.patch - - ./gnu-install-dirs.patch - # On older CPUs (e.g. Hydra/wendy) we'd be getting an error in this test. - (fetchpatch { - name = "uops-CMOV16rm-noreg.diff"; - url = "https://github.com/llvm/llvm-project/commit/9e9f991ac033.diff"; - sha256 = "sha256:12s8vr6ibri8b48h2z38f3afhwam10arfiqfy4yg37bmc054p5hi"; - stripLen = 1; - }) - - # Fix musl build. - (fetchpatch { - url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch"; - relative = "llvm"; - hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA="; - }) - - # Backport gcc-13 fixes with missing includes. - (fetchpatch { - name = "signals-gcc-13.patch"; - url = "https://github.com/llvm/llvm-project/commit/ff1681ddb303223973653f7f5f3f3435b48a1983.patch"; - hash = "sha256-CXwYxQezTq5vdmc8Yn88BUAEly6YZ5VEIA6X3y5NNOs="; - stripLen = 1; - }) - (fetchpatch { - name = "base64-gcc-13.patch"; - url = "https://github.com/llvm/llvm-project/commit/5e9be93566f39ee6cecd579401e453eccfbe81e5.patch"; - hash = "sha256-PAwrVrvffPd7tphpwCkYiz+67szPRzRB2TXBvKfzQ7U="; - stripLen = 1; - }) - ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch; - - postPatch = optionalString stdenv.isDarwin '' - substituteInPlace cmake/modules/AddLLVM.cmake \ - --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \ - --replace 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' "" - '' + '' - # FileSystem permissions tests fail with various special bits - substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "Path.cpp" "" - rm unittests/Support/Path.cpp - substituteInPlace unittests/IR/CMakeLists.txt \ - --replace "PassBuilderCallbacksTest.cpp" "" - rm unittests/IR/PassBuilderCallbacksTest.cpp - # TODO: Fix failing tests: - rm test/DebugInfo/X86/vla-multi.ll - '' + optionalString stdenv.hostPlatform.isMusl '' - patch -p1 -i ${../../common/llvm/TLI-musl.patch} - substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "add_subdirectory(DynamicLibrary)" "" - rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp - # valgrind unhappy with musl or glibc, but fails w/musl only - rm test/CodeGen/AArch64/wineh4.mir - '' + optionalString stdenv.hostPlatform.isAarch32 '' - # skip failing X86 test cases on 32-bit ARM - rm test/DebugInfo/X86/convert-debugloc.ll - rm test/DebugInfo/X86/convert-inlined.ll - rm test/DebugInfo/X86/convert-linked.ll - rm test/tools/dsymutil/X86/op-convert.test - rm test/tools/gold/X86/split-dwarf.ll - rm test/tools/llvm-objcopy/MachO/universal-object.test - '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") '' - # Seems to require certain floating point hardware (NEON?) - rm test/ExecutionEngine/frem.ll - '' + '' - patchShebangs test/BugPoint/compile-custom.ll.py - '' + '' - # Tweak tests to ignore namespace part of type to support - # gcc-12: https://gcc.gnu.org/PR103598. - # The change below mangles strings like: - # CHECK-NEXT: Starting llvm::Function pass manager run. - # to: - # CHECK-NEXT: Starting {{.*}}Function pass manager run. - for f in \ - test/Other/new-pass-manager.ll \ - test/Other/new-pm-O0-defaults.ll \ - test/Other/new-pm-defaults.ll \ - test/Other/new-pm-lto-defaults.ll \ - test/Other/new-pm-thinlto-defaults.ll \ - test/Other/pass-pipeline-parsing.ll \ - test/Transforms/Inline/cgscc-incremental-invalidate.ll \ - test/Transforms/Inline/clear-analyses.ll \ - test/Transforms/LoopUnroll/unroll-loop-invalidation.ll \ - test/Transforms/SCCP/ipsccp-preserve-analysis.ll \ - test/Transforms/SCCP/preserve-analysis.ll \ - test/Transforms/SROA/dead-inst.ll \ - test/tools/gold/X86/new-pm.ll \ - ; do - echo "PATCH: $f" - substituteInPlace $f \ - --replace 'Starting llvm::' 'Starting {{.*}}' \ - --replace 'Finished llvm::' 'Finished {{.*}}' - done - '' + '' - # gcc-13 fix - sed -i '/#include <string>/i#include <cstdint>' \ - include/llvm/DebugInfo/Symbolize/DIPrinter.h - ''; - - preConfigure = '' - # Workaround for configure flags that need to have spaces - cmakeFlagsArray+=( - -DLLVM_LIT_ARGS='-svj''${NIX_BUILD_CORES} --no-progress-bar' - ) - ''; - - # hacky fix: created binaries need to be run before installation - preBuild = '' - mkdir -p $out/ - ln -sv $PWD/lib $out - ''; - - # E.g. mesa.drivers use the build-id as a cache key (see #93946): - LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; - - hardeningDisable = [ "trivialautovarinit" ]; - - cmakeBuildType = if debugVersion then "Debug" else "Release"; - - cmakeFlags = with stdenv; let - # These flags influence llvm-config's BuildVariables.inc in addition to the - # general build. We need to make sure these are also passed via - # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native - # will return different results from the cross llvm-config. - # - # Some flags don't need to be repassed because LLVM already does so (like - # CMAKE_BUILD_TYPE), others are irrelevant to the result. - flagsForLlvmConfig = [ - "-DLLVM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/llvm/" - "-DLLVM_ENABLE_RTTI=ON" - ] ++ optionals enableSharedLibraries [ - "-DLLVM_LINK_LLVM_DYLIB=ON" - ]; - in flagsForLlvmConfig ++ [ - "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc - "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" - "-DLLVM_ENABLE_FFI=ON" - "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" - "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}" - "-DLLVM_ENABLE_DUMP=ON" - ] ++ optionals stdenv.hostPlatform.isStatic [ - # Disables building of shared libs, -fPIC is still injected by cc-wrapper - "-DLLVM_ENABLE_PIC=OFF" - "-DLLVM_BUILD_STATIC=ON" - # libxml2 needs to be disabled because the LLVM build system ignores its .la - # file and doesn't link zlib as well. - # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812 - "-DLLVM_ENABLE_LIBXML2=OFF" - ] ++ optionals enableManpages [ - "-DLLVM_BUILD_DOCS=ON" - "-DLLVM_ENABLE_SPHINX=ON" - "-DSPHINX_OUTPUT_MAN=ON" - "-DSPHINX_OUTPUT_HTML=OFF" - "-DSPHINX_WARNINGS_AS_ERRORS=OFF" - ] ++ optionals (enableGoldPlugin) [ - "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" - ] ++ optionals isDarwin [ - "-DLLVM_ENABLE_LIBCXX=ON" - "-DCAN_TARGET_i386=false" - ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ - "-DCMAKE_CROSSCOMPILING=True" - "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" - ( - let - nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc; - nativeBintools = nativeCC.bintools.bintools; - nativeToolchainFlags = [ - "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc" - "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++" - "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar" - "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip" - "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib" - ]; - # We need to repass the custom GNUInstallDirs values, otherwise CMake - # will choose them for us, leading to wrong results in llvm-config-native - nativeInstallFlags = [ - "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}" - "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin" - "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include" - "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib" - "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec" - ]; - in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list=" - + lib.concatStringsSep ";" (lib.concatLists [ - flagsForLlvmConfig - nativeToolchainFlags - nativeInstallFlags - ]) - ) - ]; - - postBuild = '' - rm -fR $out - ''; - - preCheck = '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib - ''; - - postInstall = '' - mkdir -p $python/share - mv $out/share/opt-viewer $python/share/opt-viewer - moveToOutput "bin/llvm-config*" "$dev" - substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ - --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \ - --replace "$out/bin/llvm-config" "$dev/bin/llvm-config" - substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ - --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}'"$lib"'")' - '' - + optionalString (stdenv.isDarwin && enableSharedLibraries) '' - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib - '' - + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' - cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native - ''; - - inherit doCheck; - - checkTarget = "check-all"; - - requiredSystemFeatures = [ "big-parallel" ]; - meta = llvm_meta // { - homepage = "https://llvm.org/"; - description = "A collection of modular and reusable compiler and toolchain technologies"; - longDescription = '' - The LLVM Project is a collection of modular and reusable compiler and - toolchain technologies. Despite its name, LLVM has little to do with - traditional virtual machines. The name "LLVM" itself is not an acronym; it - is the full name of the project. - LLVM began as a research project at the University of Illinois, with the - goal of providing a modern, SSA-based compilation strategy capable of - supporting both static and dynamic compilation of arbitrary programming - languages. Since then, LLVM has grown to be an umbrella project consisting - of a number of subprojects, many of which are being used in production by - a wide variety of commercial and open source projects as well as being - widely used in academic research. Code in the LLVM project is licensed - under the "Apache 2.0 License with LLVM exceptions". - ''; - }; -} // lib.optionalAttrs enableManpages { - pname = "llvm-manpages"; - - buildPhase = '' - make docs-llvm-man - ''; - - propagatedBuildInputs = []; - - installPhase = '' - make -C docs install - ''; - - postPatch = null; - postInstall = null; - - outputs = [ "out" ]; - - doCheck = false; - - meta = llvm_meta // { - description = "man pages for LLVM ${version}"; - }; -}) diff --git a/pkgs/development/compilers/llvm/13/default.nix b/pkgs/development/compilers/llvm/13/default.nix index 018fb0c638505..9348e19e6de39 100644 --- a/pkgs/development/compilers/llvm/13/default.nix +++ b/pkgs/development/compilers/llvm/13/default.nix @@ -84,7 +84,47 @@ in let in { - libllvm = callPackage ./llvm { + libllvm = callPackage ../common/llvm { + patches = [ + # When cross-compiling we configure llvm-config-native with an approximation + # of the flags used for the normal LLVM build. To avoid the need for building + # a native libLLVM.so (which would fail) we force llvm-config to be linked + # statically against the necessary LLVM components always. + ../common/llvm/llvm-config-link-static.patch + + ./llvm/gnu-install-dirs.patch + + # Fix random compiler crashes: https://bugs.llvm.org/show_bug.cgi?id=50611 + (fetchpatch { + url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/4764a4f8c920912a2bfd8b0eea57273acfe0d8a8/trunk/no-strict-aliasing-DwarfCompileUnit.patch"; + sha256 = "18l6mrvm2vmwm77ckcnbjvh6ybvn72rhrb799d4qzwac4x2ifl7g"; + stripLen = 1; + }) + + # Fix musl build. + (fetchpatch { + url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch"; + relative = "llvm"; + hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA="; + }) + + # Backport gcc-13 fixes with missing includes. + (fetchpatch { + name = "signals-gcc-13.patch"; + url = "https://github.com/llvm/llvm-project/commit/ff1681ddb303223973653f7f5f3f3435b48a1983.patch"; + hash = "sha256-CXwYxQezTq5vdmc8Yn88BUAEly6YZ5VEIA6X3y5NNOs="; + stripLen = 1; + }) + (fetchpatch { + name = "base64-gcc-13.patch"; + url = "https://github.com/llvm/llvm-project/commit/5e9be93566f39ee6cecd579401e453eccfbe81e5.patch"; + hash = "sha256-PAwrVrvffPd7tphpwCkYiz+67szPRzRB2TXBvKfzQ7U="; + stripLen = 1; + }) + ]; + pollyPatches = [ + ./llvm/gnu-install-dirs-polly.patch + ]; inherit llvm_meta; }; diff --git a/pkgs/development/compilers/llvm/13/llvm/default.nix b/pkgs/development/compilers/llvm/13/llvm/default.nix deleted file mode 100644 index 58e742b9b41ea..0000000000000 --- a/pkgs/development/compilers/llvm/13/llvm/default.nix +++ /dev/null @@ -1,315 +0,0 @@ -{ lib, stdenv, llvm_meta -, pkgsBuildBuild -, src -, fetchpatch -, cmake -, python3 -, libffi -, enableGoldPlugin ? libbfd.hasPluginAPI -, libbfd -, libpfm -, libxml2 -, ncurses -, version -, release_version -, zlib -, which -, buildLlvmTools -, debugVersion ? false -, doCheck ? stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl) - && (stdenv.hostPlatform == stdenv.buildPlatform) -, enableManpages ? false -, enableSharedLibraries ? !stdenv.hostPlatform.isStatic -# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245 -# broken for the armv7l builder -, enablePFM ? stdenv.isLinux && !stdenv.hostPlatform.isAarch -, enablePolly ? false -}: - -let - inherit (lib) optional optionals optionalString; - - # Used when creating a version-suffixed symlink of libLLVM.dylib - shortVersion = with lib; - concatStringsSep "." (take 1 (splitString "." release_version)); - - # Ordinarily we would just the `doCheck` and `checkDeps` functionality - # `mkDerivation` gives us to manage our test dependencies (instead of breaking - # out `doCheck` as a package level attribute). - # - # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in - # particular the children it uses to do feature detection. - # - # This means that python deps we add to `checkDeps` (which the python - # interpreter is made aware of via `$PYTHONPATH` – populated by the python - # setup hook) are not picked up by `lit` which causes it to skip tests. - # - # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work - # because this package is shadowed in `$PATH` by the regular `python3` - # package. - # - # So, we "manually" assemble one python derivation for the package to depend - # on, taking into account whether checks are enabled or not: - python = if doCheck then - let - checkDeps = ps: with ps; [ psutil ]; - in python3.withPackages checkDeps - else python3; - -in stdenv.mkDerivation (rec { - pname = "llvm"; - inherit version; - - inherit src; - sourceRoot = "${src.name}/${pname}"; - - outputs = [ "out" "lib" "dev" "python" ]; - - nativeBuildInputs = [ cmake python ] - ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ]; - - buildInputs = [ libxml2 libffi ] - ++ optional enablePFM libpfm; # exegesis - - propagatedBuildInputs = optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ ncurses ] - ++ [ zlib ]; - - nativeCheckInputs = [ which ]; - - patches = [ - # When cross-compiling we configure llvm-config-native with an approximation - # of the flags used for the normal LLVM build. To avoid the need for building - # a native libLLVM.so (which would fail) we force llvm-config to be linked - # statically against the necessary LLVM components always. - ../../common/llvm/llvm-config-link-static.patch - - ./gnu-install-dirs.patch - - # Fix random compiler crashes: https://bugs.llvm.org/show_bug.cgi?id=50611 - (fetchpatch { - url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/4764a4f8c920912a2bfd8b0eea57273acfe0d8a8/trunk/no-strict-aliasing-DwarfCompileUnit.patch"; - sha256 = "18l6mrvm2vmwm77ckcnbjvh6ybvn72rhrb799d4qzwac4x2ifl7g"; - stripLen = 1; - }) - - # Fix musl build. - (fetchpatch { - url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch"; - relative = "llvm"; - hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA="; - }) - - # Backport gcc-13 fixes with missing includes. - (fetchpatch { - name = "signals-gcc-13.patch"; - url = "https://github.com/llvm/llvm-project/commit/ff1681ddb303223973653f7f5f3f3435b48a1983.patch"; - hash = "sha256-CXwYxQezTq5vdmc8Yn88BUAEly6YZ5VEIA6X3y5NNOs="; - stripLen = 1; - }) - (fetchpatch { - name = "base64-gcc-13.patch"; - url = "https://github.com/llvm/llvm-project/commit/5e9be93566f39ee6cecd579401e453eccfbe81e5.patch"; - hash = "sha256-PAwrVrvffPd7tphpwCkYiz+67szPRzRB2TXBvKfzQ7U="; - stripLen = 1; - }) - ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch; - - postPatch = optionalString stdenv.isDarwin '' - substituteInPlace cmake/modules/AddLLVM.cmake \ - --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \ - --replace 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' "" - '' + '' - # FileSystem permissions tests fail with various special bits - substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "Path.cpp" "" - rm unittests/Support/Path.cpp - substituteInPlace unittests/IR/CMakeLists.txt \ - --replace "PassBuilderCallbacksTest.cpp" "" - rm unittests/IR/PassBuilderCallbacksTest.cpp - rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test - '' + optionalString stdenv.hostPlatform.isMusl '' - patch -p1 -i ${../../common/llvm/TLI-musl.patch} - substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "add_subdirectory(DynamicLibrary)" "" - rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp - # valgrind unhappy with musl or glibc, but fails w/musl only - rm test/CodeGen/AArch64/wineh4.mir - '' + optionalString stdenv.hostPlatform.isAarch32 '' - # skip failing X86 test cases on 32-bit ARM - rm test/DebugInfo/X86/convert-debugloc.ll - rm test/DebugInfo/X86/convert-inlined.ll - rm test/DebugInfo/X86/convert-linked.ll - rm test/tools/dsymutil/X86/op-convert.test - rm test/tools/gold/X86/split-dwarf.ll - '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") '' - # Seems to require certain floating point hardware (NEON?) - rm test/ExecutionEngine/frem.ll - '' + '' - patchShebangs test/BugPoint/compile-custom.ll.py - ''; - - preConfigure = '' - # Workaround for configure flags that need to have spaces - cmakeFlagsArray+=( - -DLLVM_LIT_ARGS='-svj''${NIX_BUILD_CORES} --no-progress-bar' - ) - ''; - - # hacky fix: created binaries need to be run before installation - preBuild = '' - mkdir -p $out/ - ln -sv $PWD/lib $out - ''; - - # E.g. mesa.drivers use the build-id as a cache key (see #93946): - LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; - - hardeningDisable = [ "trivialautovarinit" ]; - - cmakeBuildType = if debugVersion then "Debug" else "Release"; - - cmakeFlags = with stdenv; let - # These flags influence llvm-config's BuildVariables.inc in addition to the - # general build. We need to make sure these are also passed via - # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native - # will return different results from the cross llvm-config. - # - # Some flags don't need to be repassed because LLVM already does so (like - # CMAKE_BUILD_TYPE), others are irrelevant to the result. - flagsForLlvmConfig = [ - "-DLLVM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/llvm/" - "-DLLVM_ENABLE_RTTI=ON" - ] ++ optionals enableSharedLibraries [ - "-DLLVM_LINK_LLVM_DYLIB=ON" - ]; - in flagsForLlvmConfig ++ [ - "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc - "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" - "-DLLVM_ENABLE_FFI=ON" - "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" - "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}" - "-DLLVM_ENABLE_DUMP=ON" - ] ++ optionals stdenv.hostPlatform.isStatic [ - # Disables building of shared libs, -fPIC is still injected by cc-wrapper - "-DLLVM_ENABLE_PIC=OFF" - "-DLLVM_BUILD_STATIC=ON" - # libxml2 needs to be disabled because the LLVM build system ignores its .la - # file and doesn't link zlib as well. - # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812 - "-DLLVM_ENABLE_LIBXML2=OFF" - ] ++ optionals enableManpages [ - "-DLLVM_BUILD_DOCS=ON" - "-DLLVM_ENABLE_SPHINX=ON" - "-DSPHINX_OUTPUT_MAN=ON" - "-DSPHINX_OUTPUT_HTML=OFF" - "-DSPHINX_WARNINGS_AS_ERRORS=OFF" - ] ++ optionals (enableGoldPlugin) [ - "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" - ] ++ optionals isDarwin [ - "-DLLVM_ENABLE_LIBCXX=ON" - "-DCAN_TARGET_i386=false" - ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ - "-DCMAKE_CROSSCOMPILING=True" - "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" - ( - let - nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc; - nativeBintools = nativeCC.bintools.bintools; - nativeToolchainFlags = [ - "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc" - "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++" - "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar" - "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip" - "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib" - ]; - # We need to repass the custom GNUInstallDirs values, otherwise CMake - # will choose them for us, leading to wrong results in llvm-config-native - nativeInstallFlags = [ - "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}" - "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin" - "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include" - "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib" - "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec" - ]; - in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list=" - + lib.concatStringsSep ";" (lib.concatLists [ - flagsForLlvmConfig - nativeToolchainFlags - nativeInstallFlags - ]) - ) - ]; - - postBuild = '' - rm -fR $out - ''; - - preCheck = '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib - ''; - - postInstall = '' - mkdir -p $python/share - mv $out/share/opt-viewer $python/share/opt-viewer - moveToOutput "bin/llvm-config*" "$dev" - substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ - --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \ - --replace "$out/bin/llvm-config" "$dev/bin/llvm-config" - substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ - --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}'"$lib"'")' - '' - + optionalString (stdenv.isDarwin && enableSharedLibraries) '' - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib - '' - + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' - cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native - ''; - - inherit doCheck; - - checkTarget = "check-all"; - - requiredSystemFeatures = [ "big-parallel" ]; - meta = llvm_meta // { - homepage = "https://llvm.org/"; - description = "A collection of modular and reusable compiler and toolchain technologies"; - longDescription = '' - The LLVM Project is a collection of modular and reusable compiler and - toolchain technologies. Despite its name, LLVM has little to do with - traditional virtual machines. The name "LLVM" itself is not an acronym; it - is the full name of the project. - LLVM began as a research project at the University of Illinois, with the - goal of providing a modern, SSA-based compilation strategy capable of - supporting both static and dynamic compilation of arbitrary programming - languages. Since then, LLVM has grown to be an umbrella project consisting - of a number of subprojects, many of which are being used in production by - a wide variety of commercial and open source projects as well as being - widely used in academic research. Code in the LLVM project is licensed - under the "Apache 2.0 License with LLVM exceptions". - ''; - }; -} // lib.optionalAttrs enableManpages { - pname = "llvm-manpages"; - - buildPhase = '' - make docs-llvm-man - ''; - - propagatedBuildInputs = []; - - installPhase = '' - make -C docs install - ''; - - postPatch = null; - postInstall = null; - - outputs = [ "out" ]; - - doCheck = false; - - meta = llvm_meta // { - description = "man pages for LLVM ${version}"; - }; -}) diff --git a/pkgs/development/compilers/llvm/14/default.nix b/pkgs/development/compilers/llvm/14/default.nix index 588dc8fffefdd..f7368050d6149 100644 --- a/pkgs/development/compilers/llvm/14/default.nix +++ b/pkgs/development/compilers/llvm/14/default.nix @@ -1,6 +1,6 @@ { lowPrio, newScope, pkgs, lib, stdenv, cmake , preLibcCrossHeaders -, libxml2, python3, fetchFromGitHub, substitute, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith +, libxml2, python3, fetchFromGitHub, substitute, substituteAll, fetchpatch, overrideCC, wrapCCWith, wrapBintoolsWith , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross , targetLlvm @@ -80,7 +80,26 @@ in let in { - libllvm = callPackage ./llvm { + libllvm = callPackage ../common/llvm { + patches = [ + ./llvm/gnu-install-dirs.patch + + # Fix musl build. + (fetchpatch { + url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch"; + relative = "llvm"; + hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA="; + }) + # fix RuntimeDyld usage on aarch64-linux (e.g. python312Packages.numba tests) + (fetchpatch { + url = "https://github.com/llvm/llvm-project/commit/2e1b838a889f9793d4bcd5dbfe10db9796b77143.patch"; + relative = "llvm"; + hash = "sha256-Ot45P/iwaR4hkcM3xtLwfryQNgHI6pv6ADjv98tgdZA="; + }) + ]; + pollyPatches = [ + ./llvm/gnu-install-dirs-polly.patch + ]; inherit llvm_meta; }; diff --git a/pkgs/development/compilers/llvm/14/llvm/default.nix b/pkgs/development/compilers/llvm/14/llvm/default.nix deleted file mode 100644 index 124d07e4bb2b1..0000000000000 --- a/pkgs/development/compilers/llvm/14/llvm/default.nix +++ /dev/null @@ -1,323 +0,0 @@ -{ lib, stdenv, llvm_meta -, pkgsBuildBuild -, monorepoSrc -, runCommand -, fetchpatch -, cmake -, python3 -, libffi -, enableGoldPlugin ? libbfd.hasPluginAPI -, libbfd -, libpfm -, libxml2 -, ncurses -, version -, release_version -, zlib -, which -, buildLlvmTools -, debugVersion ? false -, doCheck ? stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl) - && (stdenv.hostPlatform == stdenv.buildPlatform) -, enableManpages ? false -, enableSharedLibraries ? !stdenv.hostPlatform.isStatic -# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245 -# broken for the armv7l builder -, enablePFM ? stdenv.isLinux && !stdenv.hostPlatform.isAarch -, enablePolly ? true -}: - -let - inherit (lib) optional optionals optionalString; - - # Used when creating a version-suffixed symlink of libLLVM.dylib - shortVersion = with lib; - concatStringsSep "." (take 1 (splitString "." release_version)); - - # Ordinarily we would just the `doCheck` and `checkDeps` functionality - # `mkDerivation` gives us to manage our test dependencies (instead of breaking - # out `doCheck` as a package level attribute). - # - # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in - # particular the children it uses to do feature detection. - # - # This means that python deps we add to `checkDeps` (which the python - # interpreter is made aware of via `$PYTHONPATH` – populated by the python - # setup hook) are not picked up by `lit` which causes it to skip tests. - # - # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work - # because this package is shadowed in `$PATH` by the regular `python3` - # package. - # - # So, we "manually" assemble one python derivation for the package to depend - # on, taking into account whether checks are enabled or not: - python = if doCheck then - let - checkDeps = ps: with ps; [ psutil ]; - in python3.withPackages checkDeps - else python3; - -in stdenv.mkDerivation (rec { - pname = "llvm"; - inherit version; - - src = runCommand "${pname}-src-${version}" {} ('' - mkdir -p "$out" - cp -r ${monorepoSrc}/cmake "$out" - cp -r ${monorepoSrc}/${pname} "$out" - cp -r ${monorepoSrc}/third-party "$out" - '' + lib.optionalString enablePolly '' - chmod u+w "$out/${pname}/tools" - cp -r ${monorepoSrc}/polly "$out/${pname}/tools" - ''); - - sourceRoot = "${src.name}/${pname}"; - - outputs = [ "out" "lib" "dev" "python" ]; - - nativeBuildInputs = [ cmake python ] - ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ]; - - buildInputs = [ libxml2 libffi ] - ++ optional enablePFM libpfm; # exegesis - - propagatedBuildInputs = [ ncurses zlib ]; - - nativeCheckInputs = [ which ]; - - patches = [ - ./gnu-install-dirs.patch - - # Fix musl build. - (fetchpatch { - url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch"; - relative = "llvm"; - hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA="; - }) - # fix RuntimeDyld usage on aarch64-linux (e.g. python312Packages.numba tests) - (fetchpatch { - url = "https://github.com/llvm/llvm-project/commit/2e1b838a889f9793d4bcd5dbfe10db9796b77143.patch"; - relative = "llvm"; - hash = "sha256-Ot45P/iwaR4hkcM3xtLwfryQNgHI6pv6ADjv98tgdZA="; - }) - ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch; - - postPatch = optionalString stdenv.isDarwin '' - substituteInPlace cmake/modules/AddLLVM.cmake \ - --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \ - --replace 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' "" - '' + '' - # FileSystem permissions tests fail with various special bits - substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "Path.cpp" "" - rm unittests/Support/Path.cpp - substituteInPlace unittests/IR/CMakeLists.txt \ - --replace "PassBuilderCallbacksTest.cpp" "" - rm unittests/IR/PassBuilderCallbacksTest.cpp - rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test - '' + optionalString stdenv.hostPlatform.isMusl '' - patch -p1 -i ${../../common/llvm/TLI-musl.patch} - substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "add_subdirectory(DynamicLibrary)" "" - rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp - # valgrind unhappy with musl or glibc, but fails w/musl only - rm test/CodeGen/AArch64/wineh4.mir - '' + optionalString stdenv.hostPlatform.isAarch32 '' - # skip failing X86 test cases on 32-bit ARM - rm test/DebugInfo/X86/convert-debugloc.ll - rm test/DebugInfo/X86/convert-inlined.ll - rm test/DebugInfo/X86/convert-linked.ll - rm test/tools/dsymutil/X86/op-convert.test - rm test/tools/gold/X86/split-dwarf.ll - rm test/tools/llvm-dwarfdump/X86/prettyprint_types.s - rm test/tools/llvm-dwarfdump/X86/simplified-template-names.s - '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") '' - # Seems to require certain floating point hardware (NEON?) - rm test/ExecutionEngine/frem.ll - '' + optionalString stdenv.hostPlatform.isRiscV '' - rm test/ExecutionEngine/frem.ll - rm test/ExecutionEngine/mov64zext32.ll - rm test/ExecutionEngine/test-interp-vec-arithm_float.ll - rm test/ExecutionEngine/test-interp-vec-arithm_int.ll - rm test/ExecutionEngine/test-interp-vec-logical.ll - rm test/ExecutionEngine/test-interp-vec-setcond-fp.ll - rm test/ExecutionEngine/test-interp-vec-setcond-int.ll - substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "CrashRecoveryTest.cpp" "" - rm unittests/Support/CrashRecoveryTest.cpp - substituteInPlace unittests/ExecutionEngine/Orc/CMakeLists.txt \ - --replace "OrcCAPITest.cpp" "" - rm unittests/ExecutionEngine/Orc/OrcCAPITest.cpp - '' + '' - patchShebangs test/BugPoint/compile-custom.ll.py - ''; - - preConfigure = '' - # Workaround for configure flags that need to have spaces - cmakeFlagsArray+=( - -DLLVM_LIT_ARGS='-svj''${NIX_BUILD_CORES} --no-progress-bar' - ) - ''; - - # hacky fix: created binaries need to be run before installation - preBuild = '' - mkdir -p $out/ - ln -sv $PWD/lib $out - ''; - - # E.g. mesa.drivers use the build-id as a cache key (see #93946): - LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; - - hardeningDisable = [ "trivialautovarinit" ]; - - cmakeBuildType = if debugVersion then "Debug" else "Release"; - - cmakeFlags = with stdenv; let - # These flags influence llvm-config's BuildVariables.inc in addition to the - # general build. We need to make sure these are also passed via - # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native - # will return different results from the cross llvm-config. - # - # Some flags don't need to be repassed because LLVM already does so (like - # CMAKE_BUILD_TYPE), others are irrelevant to the result. - flagsForLlvmConfig = [ - "-DLLVM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/llvm/" - "-DLLVM_ENABLE_RTTI=ON" - ] ++ optionals enableSharedLibraries [ - "-DLLVM_LINK_LLVM_DYLIB=ON" - ]; - in flagsForLlvmConfig ++ [ - "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc - "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" - "-DLLVM_ENABLE_FFI=ON" - "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" - "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}" - "-DLLVM_ENABLE_DUMP=ON" - ] ++ optionals stdenv.hostPlatform.isStatic [ - # Disables building of shared libs, -fPIC is still injected by cc-wrapper - "-DLLVM_ENABLE_PIC=OFF" - "-DLLVM_BUILD_STATIC=ON" - "-DLLVM_LINK_LLVM_DYLIB=off" - # libxml2 needs to be disabled because the LLVM build system ignores its .la - # file and doesn't link zlib as well. - # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812 - "-DLLVM_ENABLE_LIBXML2=OFF" - ] ++ optionals enableManpages [ - "-DLLVM_BUILD_DOCS=ON" - "-DLLVM_ENABLE_SPHINX=ON" - "-DSPHINX_OUTPUT_MAN=ON" - "-DSPHINX_OUTPUT_HTML=OFF" - "-DSPHINX_WARNINGS_AS_ERRORS=OFF" - ] ++ optionals (enableGoldPlugin) [ - "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" - ] ++ optionals isDarwin [ - "-DLLVM_ENABLE_LIBCXX=ON" - "-DCAN_TARGET_i386=false" - ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ - "-DCMAKE_CROSSCOMPILING=True" - "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" - ( - let - nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc; - nativeBintools = nativeCC.bintools.bintools; - nativeToolchainFlags = [ - "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc" - "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++" - "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar" - "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip" - "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib" - ]; - # We need to repass the custom GNUInstallDirs values, otherwise CMake - # will choose them for us, leading to wrong results in llvm-config-native - nativeInstallFlags = [ - "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}" - "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin" - "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include" - "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib" - "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec" - ]; - in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list=" - + lib.concatStringsSep ";" (lib.concatLists [ - flagsForLlvmConfig - nativeToolchainFlags - nativeInstallFlags - ]) - ) - ]; - - postBuild = '' - rm -fR $out - ''; - - preCheck = '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib - ''; - - postInstall = '' - mkdir -p $python/share - mv $out/share/opt-viewer $python/share/opt-viewer - moveToOutput "bin/llvm-config*" "$dev" - substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ - --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \ - --replace "$out/bin/llvm-config" "$dev/bin/llvm-config" - substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ - --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}'"$lib"'")' - '' - + optionalString (stdenv.isDarwin && enableSharedLibraries) '' - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib - '' - + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' - cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native - ''; - - inherit doCheck; - - checkTarget = "check-all"; - - # For the update script: - passthru.monorepoSrc = monorepoSrc; - - requiredSystemFeatures = [ "big-parallel" ]; - meta = llvm_meta // { - homepage = "https://llvm.org/"; - description = "A collection of modular and reusable compiler and toolchain technologies"; - longDescription = '' - The LLVM Project is a collection of modular and reusable compiler and - toolchain technologies. Despite its name, LLVM has little to do with - traditional virtual machines. The name "LLVM" itself is not an acronym; it - is the full name of the project. - LLVM began as a research project at the University of Illinois, with the - goal of providing a modern, SSA-based compilation strategy capable of - supporting both static and dynamic compilation of arbitrary programming - languages. Since then, LLVM has grown to be an umbrella project consisting - of a number of subprojects, many of which are being used in production by - a wide variety of commercial and open source projects as well as being - widely used in academic research. Code in the LLVM project is licensed - under the "Apache 2.0 License with LLVM exceptions". - ''; - }; -} // lib.optionalAttrs enableManpages { - pname = "llvm-manpages"; - - buildPhase = '' - make docs-llvm-man - ''; - - propagatedBuildInputs = []; - - installPhase = '' - make -C docs install - ''; - - postPatch = null; - postInstall = null; - - outputs = [ "out" ]; - - doCheck = false; - - meta = llvm_meta // { - description = "man pages for LLVM ${version}"; - }; -}) diff --git a/pkgs/development/compilers/llvm/15/default.nix b/pkgs/development/compilers/llvm/15/default.nix index bfcbe2b86e247..5003ef32d1ee0 100644 --- a/pkgs/development/compilers/llvm/15/default.nix +++ b/pkgs/development/compilers/llvm/15/default.nix @@ -86,7 +86,64 @@ in let in { - libllvm = callPackage ./llvm { + libllvm = callPackage ../common/llvm { + patches = [ + ./llvm/gnu-install-dirs.patch + + # Running the tests involves invoking binaries (like `opt`) that depend on + # the LLVM dylibs and reference them by absolute install path (i.e. their + # nix store path). + # + # Because we have not yet run the install phase (we're running these tests + # as part of `checkPhase` instead of `installCheckPhase`) these absolute + # paths do not exist yet; to work around this we point the loader (`ld` on + # unix, `dyld` on macOS) at the `lib` directory which will later become this + # package's `lib` output. + # + # Previously we would just set `LD_LIBRARY_PATH` to include the build `lib` + # dir but: + # - this doesn't generalize well to other platforms; `lit` doesn't forward + # `DYLD_LIBRARY_PATH` (macOS): + # + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26 + # - even if `lit` forwarded this env var, we actually cannot set + # `DYLD_LIBRARY_PATH` in the child processes `lit` launches because + # `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for + # "protected processes" (i.e. the python interpreter that runs `lit`): + # https://stackoverflow.com/a/35570229 + # - other LLVM subprojects deal with this issue by having their `lit` + # configuration set these env vars for us; it makes sense to do the same + # for LLVM: + # + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31 + # + # !!! TODO: look into upstreaming this patch + ./llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch + + # `lit` has a mode where it executes run lines as a shell script which is + # constructs; this is problematic for macOS because it means that there's + # another process in between `lit` and the binaries being tested. As noted + # above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our + # tests fail with dyld errors. + # + # To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when + # present in the test configuration. + # + # It's not clear to me why this isn't an issue for LLVM developers running + # on macOS (nothing about this _seems_ nix specific).. + ./llvm/lit-shell-script-runner-set-dyld-library-path.patch + + # Fix musl build. + (fetchpatch { + url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch"; + relative = "llvm"; + hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA="; + }) + ]; + pollyPatches = [ + ./llvm/gnu-install-dirs-polly.patch + + # Just like the `llvm-lit-cfg` patch, but for `polly`. + ./llvm/polly-lit-cfg-add-libs-to-dylib-path.patch + ]; inherit llvm_meta; }; diff --git a/pkgs/development/compilers/llvm/15/llvm/default.nix b/pkgs/development/compilers/llvm/15/llvm/default.nix deleted file mode 100644 index d7ebcbcf8b760..0000000000000 --- a/pkgs/development/compilers/llvm/15/llvm/default.nix +++ /dev/null @@ -1,442 +0,0 @@ -{ lib, stdenv, llvm_meta -, pkgsBuildBuild -, monorepoSrc -, runCommand -, fetchpatch -, cmake -, darwin -, ninja -, python3 -, python3Packages -, libffi -, enableGoldPlugin ? libbfd.hasPluginAPI -, libbfd -, libpfm -, libxml2 -, ncurses -, version -, release_version -, zlib -, which -, sysctl -, buildLlvmTools -, debugVersion ? false -, doCheck ? (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl) - && (stdenv.hostPlatform == stdenv.buildPlatform) -, enableManpages ? false -, enableSharedLibraries ? !stdenv.hostPlatform.isStatic -, enablePFM ? stdenv.isLinux /* PFM only supports Linux */ - # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245 - # broken for the armv7l builder - && !stdenv.hostPlatform.isAarch -, enablePolly ? true -}: - -let - inherit (lib) optional optionals optionalString; - - # Used when creating a version-suffixed symlink of libLLVM.dylib - shortVersion = with lib; - concatStringsSep "." (take 1 (splitString "." release_version)); - - # Ordinarily we would just the `doCheck` and `checkDeps` functionality - # `mkDerivation` gives us to manage our test dependencies (instead of breaking - # out `doCheck` as a package level attribute). - # - # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in - # particular the children it uses to do feature detection. - # - # This means that python deps we add to `checkDeps` (which the python - # interpreter is made aware of via `$PYTHONPATH` – populated by the python - # setup hook) are not picked up by `lit` which causes it to skip tests. - # - # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work - # because this package is shadowed in `$PATH` by the regular `python3` - # package. - # - # So, we "manually" assemble one python derivation for the package to depend - # on, taking into account whether checks are enabled or not: - python = if doCheck then - # Note that we _explicitly_ ask for a python interpreter for our host - # platform here; the splicing that would ordinarily take care of this for - # us does not seem to work once we use `withPackages`. - let - checkDeps = ps: with ps; [ psutil ]; - in pkgsBuildBuild.targetPackages.python3.withPackages checkDeps - else python3; - -in stdenv.mkDerivation (rec { - pname = "llvm"; - inherit version; - - src = runCommand "${pname}-src-${version}" {} ('' - mkdir -p "$out" - cp -r ${monorepoSrc}/cmake "$out" - cp -r ${monorepoSrc}/${pname} "$out" - cp -r ${monorepoSrc}/third-party "$out" - '' + lib.optionalString enablePolly '' - chmod u+w "$out/${pname}/tools" - cp -r ${monorepoSrc}/polly "$out/${pname}/tools" - ''); - - sourceRoot = "${src.name}/${pname}"; - - outputs = [ "out" "lib" "dev" "python" ]; - - nativeBuildInputs = [ cmake ninja python ] - ++ optionals enableManpages [ - # Note: we intentionally use `python3Packages` instead of `python3.pkgs`; - # splicing does *not* work with the latter. (TODO: fix) - python3Packages.sphinx python3Packages.recommonmark - ]; - - buildInputs = [ libxml2 libffi ] - ++ optional enablePFM libpfm; # exegesis - - propagatedBuildInputs = [ ncurses zlib ]; - - nativeCheckInputs = [ - which - ] ++ lib.optional stdenv.isDarwin sysctl; - - patches = [ - ./gnu-install-dirs.patch - - # Running the tests involves invoking binaries (like `opt`) that depend on - # the LLVM dylibs and reference them by absolute install path (i.e. their - # nix store path). - # - # Because we have not yet run the install phase (we're running these tests - # as part of `checkPhase` instead of `installCheckPhase`) these absolute - # paths do not exist yet; to work around this we point the loader (`ld` on - # unix, `dyld` on macOS) at the `lib` directory which will later become this - # package's `lib` output. - # - # Previously we would just set `LD_LIBRARY_PATH` to include the build `lib` - # dir but: - # - this doesn't generalize well to other platforms; `lit` doesn't forward - # `DYLD_LIBRARY_PATH` (macOS): - # + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26 - # - even if `lit` forwarded this env var, we actually cannot set - # `DYLD_LIBRARY_PATH` in the child processes `lit` launches because - # `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for - # "protected processes" (i.e. the python interpreter that runs `lit`): - # https://stackoverflow.com/a/35570229 - # - other LLVM subprojects deal with this issue by having their `lit` - # configuration set these env vars for us; it makes sense to do the same - # for LLVM: - # + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31 - # - # !!! TODO: look into upstreaming this patch - ./llvm-lit-cfg-add-libs-to-dylib-path.patch - - # `lit` has a mode where it executes run lines as a shell script which is - # constructs; this is problematic for macOS because it means that there's - # another process in between `lit` and the binaries being tested. As noted - # above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our - # tests fail with dyld errors. - # - # To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when - # present in the test configuration. - # - # It's not clear to me why this isn't an issue for LLVM developers running - # on macOS (nothing about this _seems_ nix specific).. - ./lit-shell-script-runner-set-dyld-library-path.patch - - # Fix musl build. - (fetchpatch { - url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch"; - relative = "llvm"; - hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA="; - }) - ] ++ lib.optionals enablePolly [ - ./gnu-install-dirs-polly.patch - - # Just like the `llvm-lit-cfg` patch, but for `polly`. - ./polly-lit-cfg-add-libs-to-dylib-path.patch - ]; - - postPatch = optionalString stdenv.isDarwin '' - substituteInPlace cmake/modules/AddLLVM.cmake \ - --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \ - --replace 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' "" - - # As of LLVM 15, marked as XFAIL on arm64 macOS but lit doesn't seem to pick - # this up: https://github.com/llvm/llvm-project/blob/c344d97a125b18f8fed0a64aace73c49a870e079/llvm/test/MC/ELF/cfi-version.ll#L7 - rm test/MC/ELF/cfi-version.ll - - # This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`) - # and thus fails under the sandbox: - substituteInPlace unittests/Support/Host.cpp \ - --replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }" - '' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) '' - # This test tries to call the intrinsics `@llvm.roundeven.f32` and - # `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf` - # and `roundeven` on x86_64 macOS. - # - # However these functions are glibc specific so the test fails: - # - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html - # - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html - # - # TODO(@rrbutani): this seems to run fine on `aarch64-darwin`, why does it - # pass there? - substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \ - --replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \ - --replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" "" - - # This test fails on darwin x86_64 because `sw_vers` reports a different - # macOS version than what LLVM finds by reading - # `/System/Library/CoreServices/SystemVersion.plist` (which is passed into - # the sandbox on macOS). - # - # The `sw_vers` provided by nixpkgs reports the macOS version associated - # with the `CoreFoundation` framework with which it was built. Because - # nixpkgs pins the SDK for `aarch64-darwin` and `x86_64-darwin` what - # `sw_vers` reports is not guaranteed to match the macOS version of the host - # that's building this derivation. - # - # Astute readers will note that we only _patch_ this test on aarch64-darwin - # (to use the nixpkgs provided `sw_vers`) instead of disabling it outright. - # So why does this test pass on aarch64? - # - # Well, it seems that `sw_vers` on aarch64 actually links against the _host_ - # CoreFoundation framework instead of the nixpkgs provided one. - # - # Not entirely sure what the right fix is here. I'm assuming aarch64 - # `sw_vers` doesn't intentionally link against the host `CoreFoundation` - # (still digging into how this ends up happening, will follow up) but that - # aside I think the more pertinent question is: should we be patching LLVM's - # macOS version detection logic to use `sw_vers` instead of reading host - # paths? This *is* a way in which details about builder machines can creep - # into the artifacts that are produced, affecting reproducibility, but it's - # not clear to me when/where/for what this even gets used in LLVM. - # - # TODO(@rrbutani): fix/follow-up - substituteInPlace unittests/Support/Host.cpp \ - --replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion" - - # This test fails with a `dysmutil` crash; have not yet dug into what's - # going on here (TODO(@rrbutani)). - rm test/tools/dsymutil/ARM/obfuscated.test - '' + '' - # FileSystem permissions tests fail with various special bits - substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "Path.cpp" "" - rm unittests/Support/Path.cpp - substituteInPlace unittests/IR/CMakeLists.txt \ - --replace "PassBuilderCallbacksTest.cpp" "" - rm unittests/IR/PassBuilderCallbacksTest.cpp - rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test - # timing-based tests are trouble - rm utils/lit/tests/googletest-timeout.py - '' + optionalString stdenv.hostPlatform.isMusl '' - patch -p1 -i ${../../common/llvm/TLI-musl.patch} - substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "add_subdirectory(DynamicLibrary)" "" - rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp - # valgrind unhappy with musl or glibc, but fails w/musl only - rm test/CodeGen/AArch64/wineh4.mir - '' + optionalString stdenv.hostPlatform.isAarch32 '' - # skip failing X86 test cases on 32-bit ARM - rm test/DebugInfo/X86/convert-debugloc.ll - rm test/DebugInfo/X86/convert-inlined.ll - rm test/DebugInfo/X86/convert-linked.ll - rm test/tools/dsymutil/X86/op-convert.test - rm test/tools/gold/X86/split-dwarf.ll - rm test/tools/llvm-dwarfdump/X86/prettyprint_types.s - rm test/tools/llvm-dwarfdump/X86/simplified-template-names.s - - # !!! Note: these tests are removed in LLVM 16. - # - # See here for context: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999790443 - rm test/CodeGen/RISCV/rv32zbp.ll - rm test/CodeGen/RISCV/rv64zbp.ll - '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") '' - # Seems to require certain floating point hardware (NEON?) - rm test/ExecutionEngine/frem.ll - '' + '' - patchShebangs test/BugPoint/compile-custom.ll.py - ''; - - preConfigure = '' - # Workaround for configure flags that need to have spaces - cmakeFlagsArray+=( - -DLLVM_LIT_ARGS="-svj''${NIX_BUILD_CORES} --no-progress-bar" - ) - ''; - - # Defensive check: some paths (that we make symlinks to) depend on the release - # version, for example: - # - https://github.com/llvm/llvm-project/blob/406bde9a15136254f2b10d9ef3a42033b3cb1b16/clang/lib/Headers/CMakeLists.txt#L185 - # - # So we want to sure that the version in the source matches the release - # version we were given. - # - # We do this check here, in the LLVM build, because it happens early. - postConfigure = let - v = lib.versions; - major = v.major release_version; - minor = v.minor release_version; - patch = v.patch release_version; - in '' - # $1: part, $2: expected - check_version() { - part="''${1^^}" - part="$(cat include/llvm/Config/llvm-config.h | grep "#define LLVM_VERSION_''${part} " | cut -d' ' -f3)" - - if [[ "$part" != "$2" ]]; then - echo >&2 \ - "mismatch in the $1 version! we have version ${release_version}" \ - "and expected the $1 version to be '$2'; the source has '$part' instead" - exit 3 - fi - } - - check_version major ${major} - check_version minor ${minor} - check_version patch ${patch} - ''; - - # E.g. mesa.drivers use the build-id as a cache key (see #93946): - LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; - - hardeningDisable = [ "trivialautovarinit" ]; - - cmakeBuildType = if debugVersion then "Debug" else "Release"; - - cmakeFlags = with stdenv; let - # These flags influence llvm-config's BuildVariables.inc in addition to the - # general build. We need to make sure these are also passed via - # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native - # will return different results from the cross llvm-config. - # - # Some flags don't need to be repassed because LLVM already does so (like - # CMAKE_BUILD_TYPE), others are irrelevant to the result. - flagsForLlvmConfig = [ - "-DLLVM_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/llvm" - "-DLLVM_ENABLE_RTTI=ON" - ] ++ optionals enableSharedLibraries [ - "-DLLVM_LINK_LLVM_DYLIB=ON" - ]; - in flagsForLlvmConfig ++ [ - "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc - "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" - "-DLLVM_ENABLE_FFI=ON" - "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" - "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}" - "-DLLVM_ENABLE_DUMP=ON" - ] ++ optionals stdenv.hostPlatform.isStatic [ - # Disables building of shared libs, -fPIC is still injected by cc-wrapper - "-DLLVM_ENABLE_PIC=OFF" - "-DLLVM_BUILD_STATIC=ON" - "-DLLVM_LINK_LLVM_DYLIB=off" - # libxml2 needs to be disabled because the LLVM build system ignores its .la - # file and doesn't link zlib as well. - # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812 - "-DLLVM_ENABLE_LIBXML2=OFF" - ] ++ optionals enableManpages [ - "-DLLVM_BUILD_DOCS=ON" - "-DLLVM_ENABLE_SPHINX=ON" - "-DSPHINX_OUTPUT_MAN=ON" - "-DSPHINX_OUTPUT_HTML=OFF" - "-DSPHINX_WARNINGS_AS_ERRORS=OFF" - ] ++ optionals (enableGoldPlugin) [ - "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" - ] ++ optionals isDarwin [ - "-DLLVM_ENABLE_LIBCXX=ON" - "-DCAN_TARGET_i386=false" - ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ - "-DCMAKE_CROSSCOMPILING=True" - "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" - ( - let - nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc; - nativeBintools = nativeCC.bintools.bintools; - nativeToolchainFlags = [ - "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc" - "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++" - "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar" - "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip" - "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib" - ]; - # We need to repass the custom GNUInstallDirs values, otherwise CMake - # will choose them for us, leading to wrong results in llvm-config-native - nativeInstallFlags = [ - "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}" - "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin" - "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include" - "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib" - "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec" - ]; - in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list=" - + lib.concatStringsSep ";" (lib.concatLists [ - flagsForLlvmConfig - nativeToolchainFlags - nativeInstallFlags - ]) - ) - ]; - - postInstall = '' - mkdir -p $python/share - mv $out/share/opt-viewer $python/share/opt-viewer - moveToOutput "bin/llvm-config*" "$dev" - substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ - --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \ - --replace "$out/bin/llvm-config" "$dev/bin/llvm-config" - substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ - --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")' - '' - + optionalString (stdenv.isDarwin && enableSharedLibraries) '' - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib - '' - + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' - cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native - ''; - - inherit doCheck; - - checkTarget = "check-all"; - - # For the update script: - passthru.monorepoSrc = monorepoSrc; - - requiredSystemFeatures = [ "big-parallel" ]; - meta = llvm_meta // { - homepage = "https://llvm.org/"; - description = "A collection of modular and reusable compiler and toolchain technologies"; - longDescription = '' - The LLVM Project is a collection of modular and reusable compiler and - toolchain technologies. Despite its name, LLVM has little to do with - traditional virtual machines. The name "LLVM" itself is not an acronym; it - is the full name of the project. - LLVM began as a research project at the University of Illinois, with the - goal of providing a modern, SSA-based compilation strategy capable of - supporting both static and dynamic compilation of arbitrary programming - languages. Since then, LLVM has grown to be an umbrella project consisting - of a number of subprojects, many of which are being used in production by - a wide variety of commercial and open source projects as well as being - widely used in academic research. Code in the LLVM project is licensed - under the "Apache 2.0 License with LLVM exceptions". - ''; - }; -} // lib.optionalAttrs enableManpages { - pname = "llvm-manpages"; - - propagatedBuildInputs = []; - - ninjaFlags = [ "docs-llvm-man" ]; - installTargets = [ "install-docs-llvm-man" ]; - - postPatch = null; - postInstall = null; - - outputs = [ "out" ]; - - doCheck = false; - - meta = llvm_meta // { - description = "man pages for LLVM ${version}"; - }; -}) diff --git a/pkgs/development/compilers/llvm/16/default.nix b/pkgs/development/compilers/llvm/16/default.nix index 5dd07d77cf8c6..79d5f8589044c 100644 --- a/pkgs/development/compilers/llvm/16/default.nix +++ b/pkgs/development/compilers/llvm/16/default.nix @@ -87,7 +87,57 @@ in let in { - libllvm = callPackage ./llvm { + libllvm = callPackage ../common/llvm { + patches = [ + ./llvm/gnu-install-dirs.patch + + # Running the tests involves invoking binaries (like `opt`) that depend on + # the LLVM dylibs and reference them by absolute install path (i.e. their + # nix store path). + # + # Because we have not yet run the install phase (we're running these tests + # as part of `checkPhase` instead of `installCheckPhase`) these absolute + # paths do not exist yet; to work around this we point the loader (`ld` on + # unix, `dyld` on macOS) at the `lib` directory which will later become this + # package's `lib` output. + # + # Previously we would just set `LD_LIBRARY_PATH` to include the build `lib` + # dir but: + # - this doesn't generalize well to other platforms; `lit` doesn't forward + # `DYLD_LIBRARY_PATH` (macOS): + # + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26 + # - even if `lit` forwarded this env var, we actually cannot set + # `DYLD_LIBRARY_PATH` in the child processes `lit` launches because + # `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for + # "protected processes" (i.e. the python interpreter that runs `lit`): + # https://stackoverflow.com/a/35570229 + # - other LLVM subprojects deal with this issue by having their `lit` + # configuration set these env vars for us; it makes sense to do the same + # for LLVM: + # + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31 + # + # !!! TODO: look into upstreaming this patch + ./llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch + + # `lit` has a mode where it executes run lines as a shell script which is + # constructs; this is problematic for macOS because it means that there's + # another process in between `lit` and the binaries being tested. As noted + # above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our + # tests fail with dyld errors. + # + # To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when + # present in the test configuration. + # + # It's not clear to me why this isn't an issue for LLVM developers running + # on macOS (nothing about this _seems_ nix specific).. + ./llvm/lit-shell-script-runner-set-dyld-library-path.patch + ]; + pollyPatches = [ + ./llvm/gnu-install-dirs-polly.patch + + # Just like the `llvm-lit-cfg` patch, but for `polly`. + ./llvm/polly-lit-cfg-add-libs-to-dylib-path.patch + ]; inherit llvm_meta; }; diff --git a/pkgs/development/compilers/llvm/16/llvm/default.nix b/pkgs/development/compilers/llvm/16/llvm/default.nix deleted file mode 100644 index 0a8d877ba83c8..0000000000000 --- a/pkgs/development/compilers/llvm/16/llvm/default.nix +++ /dev/null @@ -1,435 +0,0 @@ -{ lib, stdenv, llvm_meta -, pkgsBuildBuild -, monorepoSrc -, runCommand -, cmake -, darwin -, ninja -, python3 -, python3Packages -, libffi -# TODO: Gold plugin on LLVM16 has a severe memory corruption bug: https://github.com/llvm/llvm-project/issues/61350. -, enableGoldPlugin ? false -, libbfd -, libpfm -, libxml2 -, ncurses -, version -, release_version -, zlib -, which -, sysctl -, buildLlvmTools -, debugVersion ? false -, doCheck ? (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl) - && (stdenv.hostPlatform == stdenv.buildPlatform) -, enableManpages ? false -, enableSharedLibraries ? !stdenv.hostPlatform.isStatic -, enablePFM ? stdenv.isLinux /* PFM only supports Linux */ - # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245 - # broken for the armv7l builder - && !stdenv.hostPlatform.isAarch -, enablePolly ? true -}: - -let - inherit (lib) optional optionals optionalString; - - # Used when creating a version-suffixed symlink of libLLVM.dylib - shortVersion = with lib; - concatStringsSep "." (take 1 (splitString "." release_version)); - - # Ordinarily we would just the `doCheck` and `checkDeps` functionality - # `mkDerivation` gives us to manage our test dependencies (instead of breaking - # out `doCheck` as a package level attribute). - # - # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in - # particular the children it uses to do feature detection. - # - # This means that python deps we add to `checkDeps` (which the python - # interpreter is made aware of via `$PYTHONPATH` – populated by the python - # setup hook) are not picked up by `lit` which causes it to skip tests. - # - # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work - # because this package is shadowed in `$PATH` by the regular `python3` - # package. - # - # So, we "manually" assemble one python derivation for the package to depend - # on, taking into account whether checks are enabled or not: - python = if doCheck then - # Note that we _explicitly_ ask for a python interpreter for our host - # platform here; the splicing that would ordinarily take care of this for - # us does not seem to work once we use `withPackages`. - let - checkDeps = ps: with ps; [ psutil ]; - in pkgsBuildBuild.targetPackages.python3.withPackages checkDeps - else python3; - -in - assert (lib.assertMsg (!enableGoldPlugin) "Gold plugin cannot be enabled on LLVM16 due to a upstream issue: https://github.com/llvm/llvm-project/issues/61350"); - stdenv.mkDerivation (rec { - pname = "llvm"; - inherit version; - - src = runCommand "${pname}-src-${version}" {} ('' - mkdir -p "$out" - cp -r ${monorepoSrc}/cmake "$out" - cp -r ${monorepoSrc}/${pname} "$out" - cp -r ${monorepoSrc}/third-party "$out" - '' + lib.optionalString enablePolly '' - chmod u+w "$out/${pname}/tools" - cp -r ${monorepoSrc}/polly "$out/${pname}/tools" - ''); - - sourceRoot = "${src.name}/${pname}"; - - outputs = [ "out" "lib" "dev" "python" ]; - - nativeBuildInputs = [ cmake ninja python ] - ++ optionals enableManpages [ - # Note: we intentionally use `python3Packages` instead of `python3.pkgs`; - # splicing does *not* work with the latter. (TODO: fix) - python3Packages.sphinx python3Packages.recommonmark - ]; - - buildInputs = [ libxml2 libffi ] - ++ optional enablePFM libpfm; # exegesis - - propagatedBuildInputs = [ ncurses zlib ]; - - nativeCheckInputs = [ - which - ] ++ lib.optional stdenv.isDarwin sysctl; - - patches = [ - ./gnu-install-dirs.patch - - # Running the tests involves invoking binaries (like `opt`) that depend on - # the LLVM dylibs and reference them by absolute install path (i.e. their - # nix store path). - # - # Because we have not yet run the install phase (we're running these tests - # as part of `checkPhase` instead of `installCheckPhase`) these absolute - # paths do not exist yet; to work around this we point the loader (`ld` on - # unix, `dyld` on macOS) at the `lib` directory which will later become this - # package's `lib` output. - # - # Previously we would just set `LD_LIBRARY_PATH` to include the build `lib` - # dir but: - # - this doesn't generalize well to other platforms; `lit` doesn't forward - # `DYLD_LIBRARY_PATH` (macOS): - # + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26 - # - even if `lit` forwarded this env var, we actually cannot set - # `DYLD_LIBRARY_PATH` in the child processes `lit` launches because - # `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for - # "protected processes" (i.e. the python interpreter that runs `lit`): - # https://stackoverflow.com/a/35570229 - # - other LLVM subprojects deal with this issue by having their `lit` - # configuration set these env vars for us; it makes sense to do the same - # for LLVM: - # + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31 - # - # !!! TODO: look into upstreaming this patch - ./llvm-lit-cfg-add-libs-to-dylib-path.patch - - # `lit` has a mode where it executes run lines as a shell script which is - # constructs; this is problematic for macOS because it means that there's - # another process in between `lit` and the binaries being tested. As noted - # above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our - # tests fail with dyld errors. - # - # To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when - # present in the test configuration. - # - # It's not clear to me why this isn't an issue for LLVM developers running - # on macOS (nothing about this _seems_ nix specific).. - ./lit-shell-script-runner-set-dyld-library-path.patch - ] ++ lib.optionals enablePolly [ - ./gnu-install-dirs-polly.patch - - # Just like the `llvm-lit-cfg` patch, but for `polly`. - ./polly-lit-cfg-add-libs-to-dylib-path.patch - ]; - - postPatch = optionalString stdenv.isDarwin '' - substituteInPlace cmake/modules/AddLLVM.cmake \ - --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \ - --replace 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' "" - - # As of LLVM 15, marked as XFAIL on arm64 macOS but lit doesn't seem to pick - # this up: https://github.com/llvm/llvm-project/blob/c344d97a125b18f8fed0a64aace73c49a870e079/llvm/test/MC/ELF/cfi-version.ll#L7 - rm test/MC/ELF/cfi-version.ll - - # This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`) - # and thus fails under the sandbox: - substituteInPlace unittests/TargetParser/Host.cpp \ - --replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }" - - # This test tries to call the intrinsics `@llvm.roundeven.f32` and - # `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf` - # and `roundeven` on macOS. - # - # However these functions are glibc specific so the test fails: - # - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html - # - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html - # - substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \ - --replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \ - --replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" "" - '' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) '' - # This test fails on darwin x86_64 because `sw_vers` reports a different - # macOS version than what LLVM finds by reading - # `/System/Library/CoreServices/SystemVersion.plist` (which is passed into - # the sandbox on macOS). - # - # The `sw_vers` provided by nixpkgs reports the macOS version associated - # with the `CoreFoundation` framework with which it was built. Because - # nixpkgs pins the SDK for `aarch64-darwin` and `x86_64-darwin` what - # `sw_vers` reports is not guaranteed to match the macOS version of the host - # that's building this derivation. - # - # Astute readers will note that we only _patch_ this test on aarch64-darwin - # (to use the nixpkgs provided `sw_vers`) instead of disabling it outright. - # So why does this test pass on aarch64? - # - # Well, it seems that `sw_vers` on aarch64 actually links against the _host_ - # CoreFoundation framework instead of the nixpkgs provided one. - # - # Not entirely sure what the right fix is here. I'm assuming aarch64 - # `sw_vers` doesn't intentionally link against the host `CoreFoundation` - # (still digging into how this ends up happening, will follow up) but that - # aside I think the more pertinent question is: should we be patching LLVM's - # macOS version detection logic to use `sw_vers` instead of reading host - # paths? This *is* a way in which details about builder machines can creep - # into the artifacts that are produced, affecting reproducibility, but it's - # not clear to me when/where/for what this even gets used in LLVM. - # - # TODO(@rrbutani): fix/follow-up - substituteInPlace unittests/TargetParser/Host.cpp \ - --replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion" - - # This test fails with a `dysmutil` crash; have not yet dug into what's - # going on here (TODO(@rrbutani)). - rm test/tools/dsymutil/ARM/obfuscated.test - '' + '' - # FileSystem permissions tests fail with various special bits - substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "Path.cpp" "" - rm unittests/Support/Path.cpp - substituteInPlace unittests/IR/CMakeLists.txt \ - --replace "PassBuilderCallbacksTest.cpp" "" - rm unittests/IR/PassBuilderCallbacksTest.cpp - rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test - - # Fails in the presence of anti-virus software or other intrusion-detection software that - # modifies the atime when run. See #284056. - rm test/tools/llvm-objcopy/ELF/strip-preserve-atime.test - - # timing-based tests are trouble - rm utils/lit/tests/googletest-timeout.py - '' + optionalString stdenv.hostPlatform.isMusl '' - patch -p1 -i ${../../common/llvm/TLI-musl.patch} - substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "add_subdirectory(DynamicLibrary)" "" - rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp - # valgrind unhappy with musl or glibc, but fails w/musl only - rm test/CodeGen/AArch64/wineh4.mir - '' + optionalString stdenv.hostPlatform.isAarch32 '' - # skip failing X86 test cases on 32-bit ARM - rm test/DebugInfo/X86/convert-debugloc.ll - rm test/DebugInfo/X86/convert-inlined.ll - rm test/DebugInfo/X86/convert-linked.ll - rm test/tools/dsymutil/X86/op-convert.test - rm test/tools/gold/X86/split-dwarf.ll - rm test/tools/llvm-dwarfdump/X86/prettyprint_types.s - rm test/tools/llvm-dwarfdump/X86/simplified-template-names.s - '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") '' - # Seems to require certain floating point hardware (NEON?) - rm test/ExecutionEngine/frem.ll - '' + '' - patchShebangs test/BugPoint/compile-custom.ll.py - ''; - - preConfigure = '' - # Workaround for configure flags that need to have spaces - cmakeFlagsArray+=( - -DLLVM_LIT_ARGS="-svj''${NIX_BUILD_CORES} --no-progress-bar" - ) - ''; - - # Defensive check: some paths (that we make symlinks to) depend on the release - # version, for example: - # - https://github.com/llvm/llvm-project/blob/406bde9a15136254f2b10d9ef3a42033b3cb1b16/clang/lib/Headers/CMakeLists.txt#L185 - # - # So we want to sure that the version in the source matches the release - # version we were given. - # - # We do this check here, in the LLVM build, because it happens early. - postConfigure = let - v = lib.versions; - major = v.major release_version; - minor = v.minor release_version; - patch = v.patch release_version; - in '' - # $1: part, $2: expected - check_version() { - part="''${1^^}" - part="$(cat include/llvm/Config/llvm-config.h | grep "#define LLVM_VERSION_''${part} " | cut -d' ' -f3)" - - if [[ "$part" != "$2" ]]; then - echo >&2 \ - "mismatch in the $1 version! we have version ${release_version}" \ - "and expected the $1 version to be '$2'; the source has '$part' instead" - exit 3 - fi - } - - check_version major ${major} - check_version minor ${minor} - check_version patch ${patch} - ''; - - # E.g. mesa.drivers use the build-id as a cache key (see #93946): - LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; - - hardeningDisable = [ "trivialautovarinit" ]; - - cmakeBuildType = if debugVersion then "Debug" else "Release"; - - cmakeFlags = with stdenv; let - # These flags influence llvm-config's BuildVariables.inc in addition to the - # general build. We need to make sure these are also passed via - # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native - # will return different results from the cross llvm-config. - # - # Some flags don't need to be repassed because LLVM already does so (like - # CMAKE_BUILD_TYPE), others are irrelevant to the result. - flagsForLlvmConfig = [ - "-DLLVM_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/llvm" - "-DLLVM_ENABLE_RTTI=ON" - ] ++ optionals enableSharedLibraries [ - "-DLLVM_LINK_LLVM_DYLIB=ON" - ]; - in flagsForLlvmConfig ++ [ - "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc - "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" - "-DLLVM_ENABLE_FFI=ON" - "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" - "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}" - "-DLLVM_ENABLE_DUMP=ON" - ] ++ optionals stdenv.hostPlatform.isStatic [ - # Disables building of shared libs, -fPIC is still injected by cc-wrapper - "-DLLVM_ENABLE_PIC=OFF" - "-DLLVM_BUILD_STATIC=ON" - "-DLLVM_LINK_LLVM_DYLIB=off" - # libxml2 needs to be disabled because the LLVM build system ignores its .la - # file and doesn't link zlib as well. - # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812 - "-DLLVM_ENABLE_LIBXML2=OFF" - ] ++ optionals enableManpages [ - "-DLLVM_BUILD_DOCS=ON" - "-DLLVM_ENABLE_SPHINX=ON" - "-DSPHINX_OUTPUT_MAN=ON" - "-DSPHINX_OUTPUT_HTML=OFF" - "-DSPHINX_WARNINGS_AS_ERRORS=OFF" - ] ++ optionals enableGoldPlugin [ - # For LLVMgold plugin - "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" - ] ++ optionals isDarwin [ - "-DLLVM_ENABLE_LIBCXX=ON" - "-DCAN_TARGET_i386=false" - ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ - "-DCMAKE_CROSSCOMPILING=True" - "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" - ( - let - nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc; - nativeBintools = nativeCC.bintools.bintools; - nativeToolchainFlags = [ - "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc" - "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++" - "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar" - "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip" - "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib" - ]; - # We need to repass the custom GNUInstallDirs values, otherwise CMake - # will choose them for us, leading to wrong results in llvm-config-native - nativeInstallFlags = [ - "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}" - "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin" - "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include" - "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib" - "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec" - ]; - in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list=" - + lib.concatStringsSep ";" (lib.concatLists [ - flagsForLlvmConfig - nativeToolchainFlags - nativeInstallFlags - ]) - ) - ]; - - postInstall = '' - mkdir -p $python/share - mv $out/share/opt-viewer $python/share/opt-viewer - moveToOutput "bin/llvm-config*" "$dev" - substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ - --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \ - --replace "$out/bin/llvm-config" "$dev/bin/llvm-config" - substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ - --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")' - '' - + optionalString (stdenv.isDarwin && enableSharedLibraries) '' - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib - '' - + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' - cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native - ''; - - inherit doCheck; - - checkTarget = "check-all"; - - # For the update script: - passthru.monorepoSrc = monorepoSrc; - - requiredSystemFeatures = [ "big-parallel" ]; - meta = llvm_meta // { - homepage = "https://llvm.org/"; - description = "A collection of modular and reusable compiler and toolchain technologies"; - longDescription = '' - The LLVM Project is a collection of modular and reusable compiler and - toolchain technologies. Despite its name, LLVM has little to do with - traditional virtual machines. The name "LLVM" itself is not an acronym; it - is the full name of the project. - LLVM began as a research project at the University of Illinois, with the - goal of providing a modern, SSA-based compilation strategy capable of - supporting both static and dynamic compilation of arbitrary programming - languages. Since then, LLVM has grown to be an umbrella project consisting - of a number of subprojects, many of which are being used in production by - a wide variety of commercial and open source projects as well as being - widely used in academic research. Code in the LLVM project is licensed - under the "Apache 2.0 License with LLVM exceptions". - ''; - }; -} // lib.optionalAttrs enableManpages { - pname = "llvm-manpages"; - - propagatedBuildInputs = []; - - ninjaFlags = [ "docs-llvm-man" ]; - installTargets = [ "install-docs-llvm-man" ]; - - postPatch = null; - postInstall = null; - - outputs = [ "out" ]; - - doCheck = false; - - meta = llvm_meta // { - description = "man pages for LLVM ${version}"; - }; -}) diff --git a/pkgs/development/compilers/llvm/17/default.nix b/pkgs/development/compilers/llvm/17/default.nix index 9f4be2261b0cf..b4039540badf4 100644 --- a/pkgs/development/compilers/llvm/17/default.nix +++ b/pkgs/development/compilers/llvm/17/default.nix @@ -82,7 +82,57 @@ in let in { - libllvm = callPackage ./llvm { + libllvm = callPackage ../common/llvm { + patches = [ + ./llvm/gnu-install-dirs.patch + + # Running the tests involves invoking binaries (like `opt`) that depend on + # the LLVM dylibs and reference them by absolute install path (i.e. their + # nix store path). + # + # Because we have not yet run the install phase (we're running these tests + # as part of `checkPhase` instead of `installCheckPhase`) these absolute + # paths do not exist yet; to work around this we point the loader (`ld` on + # unix, `dyld` on macOS) at the `lib` directory which will later become this + # package's `lib` output. + # + # Previously we would just set `LD_LIBRARY_PATH` to include the build `lib` + # dir but: + # - this doesn't generalize well to other platforms; `lit` doesn't forward + # `DYLD_LIBRARY_PATH` (macOS): + # + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26 + # - even if `lit` forwarded this env var, we actually cannot set + # `DYLD_LIBRARY_PATH` in the child processes `lit` launches because + # `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for + # "protected processes" (i.e. the python interpreter that runs `lit`): + # https://stackoverflow.com/a/35570229 + # - other LLVM subprojects deal with this issue by having their `lit` + # configuration set these env vars for us; it makes sense to do the same + # for LLVM: + # + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31 + # + # !!! TODO: look into upstreaming this patch + ./llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch + + # `lit` has a mode where it executes run lines as a shell script which is + # constructs; this is problematic for macOS because it means that there's + # another process in between `lit` and the binaries being tested. As noted + # above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our + # tests fail with dyld errors. + # + # To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when + # present in the test configuration. + # + # It's not clear to me why this isn't an issue for LLVM developers running + # on macOS (nothing about this _seems_ nix specific).. + ./llvm/lit-shell-script-runner-set-dyld-library-path.patch + ]; + pollyPatches = [ + ./llvm/gnu-install-dirs-polly.patch + + # Just like the `llvm-lit-cfg` patch, but for `polly`. + ./llvm/polly-lit-cfg-add-libs-to-dylib-path.patch + ]; inherit llvm_meta; }; diff --git a/pkgs/development/compilers/llvm/17/llvm/default.nix b/pkgs/development/compilers/llvm/17/llvm/default.nix deleted file mode 100644 index a045bea9f4728..0000000000000 --- a/pkgs/development/compilers/llvm/17/llvm/default.nix +++ /dev/null @@ -1,431 +0,0 @@ -{ lib, stdenv, llvm_meta -, pkgsBuildBuild -, monorepoSrc -, runCommand -, cmake -, darwin -, ninja -, python3 -, python3Packages -, libffi -, enableGoldPlugin ? libbfd.hasPluginAPI -, libbfd -, libpfm -, libxml2 -, ncurses -, version -, release_version -, zlib -, which -, sysctl -, buildLlvmTools -, debugVersion ? false -, doCheck ? (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl) - && (stdenv.hostPlatform == stdenv.buildPlatform) -, enableManpages ? false -, enableSharedLibraries ? !stdenv.hostPlatform.isStatic -, enablePFM ? stdenv.isLinux /* PFM only supports Linux */ - # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245 - # broken for the armv7l builder - && !stdenv.hostPlatform.isAarch -, enablePolly ? true -}: - -let - inherit (lib) optional optionals optionalString; - - # Used when creating a version-suffixed symlink of libLLVM.dylib - shortVersion = with lib; - concatStringsSep "." (take 1 (splitString "." release_version)); - - # Ordinarily we would just the `doCheck` and `checkDeps` functionality - # `mkDerivation` gives us to manage our test dependencies (instead of breaking - # out `doCheck` as a package level attribute). - # - # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in - # particular the children it uses to do feature detection. - # - # This means that python deps we add to `checkDeps` (which the python - # interpreter is made aware of via `$PYTHONPATH` – populated by the python - # setup hook) are not picked up by `lit` which causes it to skip tests. - # - # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work - # because this package is shadowed in `$PATH` by the regular `python3` - # package. - # - # So, we "manually" assemble one python derivation for the package to depend - # on, taking into account whether checks are enabled or not: - python = if doCheck then - # Note that we _explicitly_ ask for a python interpreter for our host - # platform here; the splicing that would ordinarily take care of this for - # us does not seem to work once we use `withPackages`. - let - checkDeps = ps: with ps; [ psutil ]; - in pkgsBuildBuild.targetPackages.python3.withPackages checkDeps - else python3; - -in - -stdenv.mkDerivation (rec { - pname = "llvm"; - inherit version; - - src = runCommand "${pname}-src-${version}" {} ('' - mkdir -p "$out" - cp -r ${monorepoSrc}/cmake "$out" - cp -r ${monorepoSrc}/${pname} "$out" - cp -r ${monorepoSrc}/third-party "$out" - '' + lib.optionalString enablePolly '' - chmod u+w "$out/${pname}/tools" - cp -r ${monorepoSrc}/polly "$out/${pname}/tools" - ''); - - sourceRoot = "${src.name}/${pname}"; - - outputs = [ "out" "lib" "dev" "python" ]; - - nativeBuildInputs = [ cmake ninja python ] - ++ optionals enableManpages [ - # Note: we intentionally use `python3Packages` instead of `python3.pkgs`; - # splicing does *not* work with the latter. (TODO: fix) - python3Packages.sphinx python3Packages.recommonmark - ]; - - buildInputs = [ libxml2 libffi ] - ++ optional enablePFM libpfm; # exegesis - - propagatedBuildInputs = [ ncurses zlib ]; - - nativeCheckInputs = [ - which - ] ++ lib.optional stdenv.isDarwin sysctl; - - patches = [ - ./gnu-install-dirs.patch - - # Running the tests involves invoking binaries (like `opt`) that depend on - # the LLVM dylibs and reference them by absolute install path (i.e. their - # nix store path). - # - # Because we have not yet run the install phase (we're running these tests - # as part of `checkPhase` instead of `installCheckPhase`) these absolute - # paths do not exist yet; to work around this we point the loader (`ld` on - # unix, `dyld` on macOS) at the `lib` directory which will later become this - # package's `lib` output. - # - # Previously we would just set `LD_LIBRARY_PATH` to include the build `lib` - # dir but: - # - this doesn't generalize well to other platforms; `lit` doesn't forward - # `DYLD_LIBRARY_PATH` (macOS): - # + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26 - # - even if `lit` forwarded this env var, we actually cannot set - # `DYLD_LIBRARY_PATH` in the child processes `lit` launches because - # `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for - # "protected processes" (i.e. the python interpreter that runs `lit`): - # https://stackoverflow.com/a/35570229 - # - other LLVM subprojects deal with this issue by having their `lit` - # configuration set these env vars for us; it makes sense to do the same - # for LLVM: - # + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31 - # - # !!! TODO: look into upstreaming this patch - ./llvm-lit-cfg-add-libs-to-dylib-path.patch - - # `lit` has a mode where it executes run lines as a shell script which is - # constructs; this is problematic for macOS because it means that there's - # another process in between `lit` and the binaries being tested. As noted - # above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our - # tests fail with dyld errors. - # - # To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when - # present in the test configuration. - # - # It's not clear to me why this isn't an issue for LLVM developers running - # on macOS (nothing about this _seems_ nix specific).. - ./lit-shell-script-runner-set-dyld-library-path.patch - ] ++ lib.optionals enablePolly [ - ./gnu-install-dirs-polly.patch - - # Just like the `llvm-lit-cfg` patch, but for `polly`. - ./polly-lit-cfg-add-libs-to-dylib-path.patch - ]; - - postPatch = optionalString stdenv.isDarwin '' - substituteInPlace cmake/modules/AddLLVM.cmake \ - --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \ - --replace 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' "" - - # As of LLVM 15, marked as XFAIL on arm64 macOS but lit doesn't seem to pick - # this up: https://github.com/llvm/llvm-project/blob/c344d97a125b18f8fed0a64aace73c49a870e079/llvm/test/MC/ELF/cfi-version.ll#L7 - rm test/MC/ELF/cfi-version.ll - - # This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`) - # and thus fails under the sandbox: - substituteInPlace unittests/TargetParser/Host.cpp \ - --replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }" - - # This test tries to call the intrinsics `@llvm.roundeven.f32` and - # `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf` - # and `roundeven` on macOS. - # - # However these functions are glibc specific so the test fails: - # - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html - # - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html - # - substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \ - --replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \ - --replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" "" - '' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) '' - # This test fails on darwin x86_64 because `sw_vers` reports a different - # macOS version than what LLVM finds by reading - # `/System/Library/CoreServices/SystemVersion.plist` (which is passed into - # the sandbox on macOS). - # - # The `sw_vers` provided by nixpkgs reports the macOS version associated - # with the `CoreFoundation` framework with which it was built. Because - # nixpkgs pins the SDK for `aarch64-darwin` and `x86_64-darwin` what - # `sw_vers` reports is not guaranteed to match the macOS version of the host - # that's building this derivation. - # - # Astute readers will note that we only _patch_ this test on aarch64-darwin - # (to use the nixpkgs provided `sw_vers`) instead of disabling it outright. - # So why does this test pass on aarch64? - # - # Well, it seems that `sw_vers` on aarch64 actually links against the _host_ - # CoreFoundation framework instead of the nixpkgs provided one. - # - # Not entirely sure what the right fix is here. I'm assuming aarch64 - # `sw_vers` doesn't intentionally link against the host `CoreFoundation` - # (still digging into how this ends up happening, will follow up) but that - # aside I think the more pertinent question is: should we be patching LLVM's - # macOS version detection logic to use `sw_vers` instead of reading host - # paths? This *is* a way in which details about builder machines can creep - # into the artifacts that are produced, affecting reproducibility, but it's - # not clear to me when/where/for what this even gets used in LLVM. - # - # TODO(@rrbutani): fix/follow-up - substituteInPlace unittests/TargetParser/Host.cpp \ - --replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion" - - # This test fails with a `dysmutil` crash; have not yet dug into what's - # going on here (TODO(@rrbutani)). - rm test/tools/dsymutil/ARM/obfuscated.test - '' + '' - # FileSystem permissions tests fail with various special bits - substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "Path.cpp" "" - rm unittests/Support/Path.cpp - substituteInPlace unittests/IR/CMakeLists.txt \ - --replace "PassBuilderCallbacksTest.cpp" "" - rm unittests/IR/PassBuilderCallbacksTest.cpp - rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test - - # Fails in the presence of anti-virus software or other intrusion-detection software that - # modifies the atime when run. See #284056. - rm test/tools/llvm-objcopy/ELF/strip-preserve-atime.test - '' + optionalString stdenv.hostPlatform.isMusl '' - patch -p1 -i ${../../common/llvm/TLI-musl.patch} - substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "add_subdirectory(DynamicLibrary)" "" - rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp - # valgrind unhappy with musl or glibc, but fails w/musl only - rm test/CodeGen/AArch64/wineh4.mir - '' + optionalString stdenv.hostPlatform.isAarch32 '' - # skip failing X86 test cases on 32-bit ARM - rm test/DebugInfo/X86/convert-debugloc.ll - rm test/DebugInfo/X86/convert-inlined.ll - rm test/DebugInfo/X86/convert-linked.ll - rm test/tools/dsymutil/X86/op-convert.test - rm test/tools/gold/X86/split-dwarf.ll - rm test/tools/llvm-dwarfdump/X86/prettyprint_types.s - rm test/tools/llvm-dwarfdump/X86/simplified-template-names.s - rm test/CodeGen/RISCV/attributes.ll - rm test/CodeGen/RISCV/xtheadmempair.ll - '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") '' - # Seems to require certain floating point hardware (NEON?) - rm test/ExecutionEngine/frem.ll - '' + '' - patchShebangs test/BugPoint/compile-custom.ll.py - ''; - - preConfigure = '' - # Workaround for configure flags that need to have spaces - cmakeFlagsArray+=( - -DLLVM_LIT_ARGS="-svj''${NIX_BUILD_CORES} --no-progress-bar" - ) - ''; - - # Defensive check: some paths (that we make symlinks to) depend on the release - # version, for example: - # - https://github.com/llvm/llvm-project/blob/406bde9a15136254f2b10d9ef3a42033b3cb1b16/clang/lib/Headers/CMakeLists.txt#L185 - # - # So we want to sure that the version in the source matches the release - # version we were given. - # - # We do this check here, in the LLVM build, because it happens early. - postConfigure = let - v = lib.versions; - major = v.major release_version; - minor = v.minor release_version; - patch = v.patch release_version; - in '' - # $1: part, $2: expected - check_version() { - part="''${1^^}" - part="$(cat include/llvm/Config/llvm-config.h | grep "#define LLVM_VERSION_''${part} " | cut -d' ' -f3)" - - if [[ "$part" != "$2" ]]; then - echo >&2 \ - "mismatch in the $1 version! we have version ${release_version}" \ - "and expected the $1 version to be '$2'; the source has '$part' instead" - exit 3 - fi - } - - check_version major ${major} - check_version minor ${minor} - check_version patch ${patch} - ''; - - # E.g. mesa.drivers use the build-id as a cache key (see #93946): - LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; - - cmakeBuildType = if debugVersion then "Debug" else "Release"; - - cmakeFlags = with stdenv; let - # These flags influence llvm-config's BuildVariables.inc in addition to the - # general build. We need to make sure these are also passed via - # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native - # will return different results from the cross llvm-config. - # - # Some flags don't need to be repassed because LLVM already does so (like - # CMAKE_BUILD_TYPE), others are irrelevant to the result. - flagsForLlvmConfig = [ - "-DLLVM_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/llvm" - "-DLLVM_ENABLE_RTTI=ON" - ] ++ optionals enableSharedLibraries [ - "-DLLVM_LINK_LLVM_DYLIB=ON" - ]; - in flagsForLlvmConfig ++ [ - "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc - "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" - "-DLLVM_ENABLE_FFI=ON" - "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" - "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}" - "-DLLVM_ENABLE_DUMP=ON" - ] ++ optionals stdenv.hostPlatform.isStatic [ - # Disables building of shared libs, -fPIC is still injected by cc-wrapper - "-DLLVM_ENABLE_PIC=OFF" - "-DLLVM_BUILD_STATIC=ON" - "-DLLVM_LINK_LLVM_DYLIB=off" - # libxml2 needs to be disabled because the LLVM build system ignores its .la - # file and doesn't link zlib as well. - # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812 - "-DLLVM_ENABLE_LIBXML2=OFF" - ] ++ optionals enableManpages [ - "-DLLVM_BUILD_DOCS=ON" - "-DLLVM_ENABLE_SPHINX=ON" - "-DSPHINX_OUTPUT_MAN=ON" - "-DSPHINX_OUTPUT_HTML=OFF" - "-DSPHINX_WARNINGS_AS_ERRORS=OFF" - ] ++ optionals enableGoldPlugin [ - # For LLVMgold plugin - "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" - ] ++ optionals isDarwin [ - "-DLLVM_ENABLE_LIBCXX=ON" - "-DCAN_TARGET_i386=false" - ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ - "-DCMAKE_CROSSCOMPILING=True" - "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" - ( - let - nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc; - nativeBintools = nativeCC.bintools.bintools; - nativeToolchainFlags = [ - "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc" - "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++" - "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar" - "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip" - "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib" - ]; - # We need to repass the custom GNUInstallDirs values, otherwise CMake - # will choose them for us, leading to wrong results in llvm-config-native - nativeInstallFlags = [ - "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}" - "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin" - "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include" - "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib" - "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec" - ]; - in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list=" - + lib.concatStringsSep ";" (lib.concatLists [ - flagsForLlvmConfig - nativeToolchainFlags - nativeInstallFlags - ]) - ) - ]; - - postInstall = '' - mkdir -p $python/share - mv $out/share/opt-viewer $python/share/opt-viewer - moveToOutput "bin/llvm-config*" "$dev" - substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ - --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \ - --replace "$out/bin/llvm-config" "$dev/bin/llvm-config" - substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ - --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")' - '' - + optionalString (stdenv.isDarwin && enableSharedLibraries) '' - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib - '' - + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' - cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native - ''; - - inherit doCheck; - - checkTarget = "check-all"; - - # For the update script: - passthru.monorepoSrc = monorepoSrc; - - requiredSystemFeatures = [ "big-parallel" ]; - meta = llvm_meta // { - homepage = "https://llvm.org/"; - description = "A collection of modular and reusable compiler and toolchain technologies"; - longDescription = '' - The LLVM Project is a collection of modular and reusable compiler and - toolchain technologies. Despite its name, LLVM has little to do with - traditional virtual machines. The name "LLVM" itself is not an acronym; it - is the full name of the project. - LLVM began as a research project at the University of Illinois, with the - goal of providing a modern, SSA-based compilation strategy capable of - supporting both static and dynamic compilation of arbitrary programming - languages. Since then, LLVM has grown to be an umbrella project consisting - of a number of subprojects, many of which are being used in production by - a wide variety of commercial and open source projects as well as being - widely used in academic research. Code in the LLVM project is licensed - under the "Apache 2.0 License with LLVM exceptions". - ''; - }; -} // lib.optionalAttrs enableManpages { - pname = "llvm-manpages"; - - propagatedBuildInputs = []; - - ninjaFlags = [ "docs-llvm-man" ]; - installTargets = [ "install-docs-llvm-man" ]; - - postPatch = null; - postInstall = null; - - outputs = [ "out" ]; - - doCheck = false; - - meta = llvm_meta // { - description = "man pages for LLVM ${version}"; - }; -}) diff --git a/pkgs/development/compilers/llvm/18/default.nix b/pkgs/development/compilers/llvm/18/default.nix index 3c78cd44fdf58..ea5323db9b0f3 100644 --- a/pkgs/development/compilers/llvm/18/default.nix +++ b/pkgs/development/compilers/llvm/18/default.nix @@ -82,7 +82,57 @@ in let in { - libllvm = callPackage ./llvm { + libllvm = callPackage ../common/llvm { + patches = [ + ./llvm/gnu-install-dirs.patch + + # Running the tests involves invoking binaries (like `opt`) that depend on + # the LLVM dylibs and reference them by absolute install path (i.e. their + # nix store path). + # + # Because we have not yet run the install phase (we're running these tests + # as part of `checkPhase` instead of `installCheckPhase`) these absolute + # paths do not exist yet; to work around this we point the loader (`ld` on + # unix, `dyld` on macOS) at the `lib` directory which will later become this + # package's `lib` output. + # + # Previously we would just set `LD_LIBRARY_PATH` to include the build `lib` + # dir but: + # - this doesn't generalize well to other platforms; `lit` doesn't forward + # `DYLD_LIBRARY_PATH` (macOS): + # + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26 + # - even if `lit` forwarded this env var, we actually cannot set + # `DYLD_LIBRARY_PATH` in the child processes `lit` launches because + # `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for + # "protected processes" (i.e. the python interpreter that runs `lit`): + # https://stackoverflow.com/a/35570229 + # - other LLVM subprojects deal with this issue by having their `lit` + # configuration set these env vars for us; it makes sense to do the same + # for LLVM: + # + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31 + # + # !!! TODO: look into upstreaming this patch + ./llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch + + # `lit` has a mode where it executes run lines as a shell script which is + # constructs; this is problematic for macOS because it means that there's + # another process in between `lit` and the binaries being tested. As noted + # above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our + # tests fail with dyld errors. + # + # To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when + # present in the test configuration. + # + # It's not clear to me why this isn't an issue for LLVM developers running + # on macOS (nothing about this _seems_ nix specific).. + ./llvm/lit-shell-script-runner-set-dyld-library-path.patch + ]; + pollyPatches = [ + ./llvm/gnu-install-dirs-polly.patch + + # Just like the `llvm-lit-cfg` patch, but for `polly`. + ./llvm/polly-lit-cfg-add-libs-to-dylib-path.patch + ]; inherit llvm_meta; }; diff --git a/pkgs/development/compilers/llvm/common/clang/default.nix b/pkgs/development/compilers/llvm/common/clang/default.nix index 2373795b49fd8..58af0340a1399 100644 --- a/pkgs/development/compilers/llvm/common/clang/default.nix +++ b/pkgs/development/compilers/llvm/common/clang/default.nix @@ -71,7 +71,11 @@ let "-DCLANG_PSEUDO_GEN=${buildLlvmTools.libclang.dev}/bin/clang-pseudo-gen" ]); - postPatch = (if lib.versionOlder release_version "13" then '' + postPatch = '' + # Make sure clang passes the correct location of libLTO to ld64 + substituteInPlace lib/Driver/ToolChains/Darwin.cpp \ + --replace-fail 'StringRef P = llvm::sys::path::parent_path(D.Dir);' 'StringRef P = "${lib.getLib libllvm}";' + '' + (if lib.versionOlder release_version "13" then '' sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \ -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \ lib/Driver/ToolChains/*.cpp diff --git a/pkgs/development/compilers/llvm/18/llvm/default.nix b/pkgs/development/compilers/llvm/common/llvm/default.nix index a9732763e9d7b..0716453c34c94 100644 --- a/pkgs/development/compilers/llvm/18/llvm/default.nix +++ b/pkgs/development/compilers/llvm/common/llvm/default.nix @@ -1,6 +1,12 @@ -{ lib, stdenv, llvm_meta +{ lib +, stdenv +, llvm_meta , pkgsBuildBuild -, monorepoSrc +, pollyPatches ? [] +, patches ? [] +, polly_src ? null +, src ? null +, monorepoSrc ? null , runCommand , cmake , darwin @@ -8,6 +14,8 @@ , python3 , python3Packages , libffi + # TODO: Can this memory corruption bug still occur? + # <https://github.com/llvm/llvm-project/issues/61350> , enableGoldPlugin ? libbfd.hasPluginAPI , libbfd , libpfm @@ -20,7 +28,8 @@ , sysctl , buildLlvmTools , debugVersion ? false -, doCheck ? (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl) +, doCheck ? (if lib.versionOlder release_version "15" then stdenv.isLinux else true) + && (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl) && (stdenv.hostPlatform == stdenv.buildPlatform) , enableManpages ? false , enableSharedLibraries ? !stdenv.hostPlatform.isStatic @@ -28,7 +37,7 @@ # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245 # broken for the armv7l builder && !stdenv.hostPlatform.isAarch -, enablePolly ? true +, enablePolly ? lib.versionAtLeast release_version "14" }: let @@ -64,27 +73,36 @@ let in pkgsBuildBuild.targetPackages.python3.withPackages checkDeps else python3; + pname = "llvm"; + + src' = if monorepoSrc != null then + runCommand "${pname}-src-${version}" {} ('' + mkdir -p "$out" + cp -r ${monorepoSrc}/cmake "$out" + cp -r ${monorepoSrc}/${pname} "$out" + cp -r ${monorepoSrc}/third-party "$out" + '' + lib.optionalString enablePolly '' + chmod u+w "$out/${pname}/tools" + cp -r ${monorepoSrc}/polly "$out/${pname}/tools" + '') else src; + + patches' = patches ++ lib.optionals enablePolly pollyPatches; in stdenv.mkDerivation (rec { - pname = "llvm"; - inherit version; - - src = runCommand "${pname}-src-${version}" {} ('' - mkdir -p "$out" - cp -r ${monorepoSrc}/cmake "$out" - cp -r ${monorepoSrc}/${pname} "$out" - cp -r ${monorepoSrc}/third-party "$out" - '' + lib.optionalString enablePolly '' - chmod u+w "$out/${pname}/tools" - cp -r ${monorepoSrc}/polly "$out/${pname}/tools" - ''); + inherit pname version; - sourceRoot = "${src.name}/${pname}"; + src = src'; + patches = patches'; + + sourceRoot = if lib.versionOlder release_version "13" then null + else "${src.name}/${pname}"; outputs = [ "out" "lib" "dev" "python" ]; - nativeBuildInputs = [ cmake ninja python ] + nativeBuildInputs = [ cmake ] + ++ (lib.optional (lib.versionAtLeast release_version "15") ninja) + ++ [ python ] ++ optionals enableManpages [ # Note: we intentionally use `python3Packages` instead of `python3.pkgs`; # splicing does *not* work with the latter. (TODO: fix) @@ -98,66 +116,14 @@ stdenv.mkDerivation (rec { buildInputs = [ libxml2 libffi ] ++ optional enablePFM libpfm; # exegesis - propagatedBuildInputs = [ ncurses zlib ]; - - nativeCheckInputs = [ - which - ] ++ lib.optional stdenv.isDarwin sysctl; - - patches = [ - ./gnu-install-dirs.patch - - # Running the tests involves invoking binaries (like `opt`) that depend on - # the LLVM dylibs and reference them by absolute install path (i.e. their - # nix store path). - # - # Because we have not yet run the install phase (we're running these tests - # as part of `checkPhase` instead of `installCheckPhase`) these absolute - # paths do not exist yet; to work around this we point the loader (`ld` on - # unix, `dyld` on macOS) at the `lib` directory which will later become this - # package's `lib` output. - # - # Previously we would just set `LD_LIBRARY_PATH` to include the build `lib` - # dir but: - # - this doesn't generalize well to other platforms; `lit` doesn't forward - # `DYLD_LIBRARY_PATH` (macOS): - # + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26 - # - even if `lit` forwarded this env var, we actually cannot set - # `DYLD_LIBRARY_PATH` in the child processes `lit` launches because - # `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for - # "protected processes" (i.e. the python interpreter that runs `lit`): - # https://stackoverflow.com/a/35570229 - # - other LLVM subprojects deal with this issue by having their `lit` - # configuration set these env vars for us; it makes sense to do the same - # for LLVM: - # + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31 - # - # !!! TODO: look into upstreaming this patch - ./llvm-lit-cfg-add-libs-to-dylib-path.patch - - # `lit` has a mode where it executes run lines as a shell script which is - # constructs; this is problematic for macOS because it means that there's - # another process in between `lit` and the binaries being tested. As noted - # above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our - # tests fail with dyld errors. - # - # To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when - # present in the test configuration. - # - # It's not clear to me why this isn't an issue for LLVM developers running - # on macOS (nothing about this _seems_ nix specific).. - ./lit-shell-script-runner-set-dyld-library-path.patch - ] ++ lib.optionals enablePolly [ - ./gnu-install-dirs-polly.patch - - # Just like the `llvm-lit-cfg` patch, but for `polly`. - ./polly-lit-cfg-add-libs-to-dylib-path.patch - ]; + propagatedBuildInputs = (lib.optional (lib.versionAtLeast release_version "14" || stdenv.buildPlatform == stdenv.hostPlatform) ncurses) + ++ [ zlib ]; - postPatch = optionalString stdenv.isDarwin '' + postPatch = optionalString stdenv.isDarwin ('' substituteInPlace cmake/modules/AddLLVM.cmake \ --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \ --replace 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' "" + '' + (optionalString (lib.versionAtLeast release_version "15") ('' # As of LLVM 15, marked as XFAIL on arm64 macOS but lit doesn't seem to pick # this up: https://github.com/llvm/llvm-project/blob/c344d97a125b18f8fed0a64aace73c49a870e079/llvm/test/MC/ELF/cfi-version.ll#L7 @@ -165,8 +131,13 @@ stdenv.mkDerivation (rec { # This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`) # and thus fails under the sandbox: + '' + (if lib.versionAtLeast release_version "16" then '' substituteInPlace unittests/TargetParser/Host.cpp \ --replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }" + '' else '' + substituteInPlace unittests/Support/Host.cpp \ + --replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }" + '') + optionalString (lib.versionAtLeast release_version "16") '' # This test tries to call the intrinsics `@llvm.roundeven.f32` and # `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf` @@ -179,11 +150,32 @@ stdenv.mkDerivation (rec { substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \ --replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \ --replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" "" + '' + optionalString (!stdenv.hostPlatform.isx86 && lib.versionAtLeast release_version "18") '' # fails when run in sandbox substituteInPlace unittests/Support/VirtualFileSystemTest.cpp \ --replace "PhysicalFileSystemWorkingDirFailure" "DISABLED_PhysicalFileSystemWorkingDirFailure" - '' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) '' + ''))) + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86 && lib.versionAtLeast release_version "15") (optionalString (lib.versionOlder release_version "16") '' + # This test tries to call the intrinsics `@llvm.roundeven.f32` and + # `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf` + # and `roundeven` on x86_64 macOS. + # + # However these functions are glibc specific so the test fails: + # - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html + # - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html + # + # TODO(@rrbutani): this seems to run fine on `aarch64-darwin`, why does it + # pass there? + substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \ + --replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \ + --replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" "" + + '' + ((optionalString (lib.versionAtLeast release_version "18") '' + + # fails when run in sandbox + substituteInPlace unittests/Support/VirtualFileSystemTest.cpp \ + --replace "PhysicalFileSystemWorkingDirFailure" "DISABLED_PhysicalFileSystemWorkingDirFailure" + '') + '' # This test fails on darwin x86_64 because `sw_vers` reports a different # macOS version than what LLVM finds by reading # `/System/Library/CoreServices/SystemVersion.plist` (which is passed into @@ -212,13 +204,18 @@ stdenv.mkDerivation (rec { # not clear to me when/where/for what this even gets used in LLVM. # # TODO(@rrbutani): fix/follow-up + '' + (if lib.versionAtLeast release_version "16" then '' substituteInPlace unittests/TargetParser/Host.cpp \ --replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion" + '' else '' + substituteInPlace unittests/Support/Host.cpp \ + --replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion" + '') + '' # This test fails with a `dysmutil` crash; have not yet dug into what's # going on here (TODO(@rrbutani)). rm test/tools/dsymutil/ARM/obfuscated.test - '' + '' + '')) + '' # FileSystem permissions tests fail with various special bits substituteInPlace unittests/Support/CMakeLists.txt \ --replace "Path.cpp" "" @@ -226,13 +223,23 @@ stdenv.mkDerivation (rec { substituteInPlace unittests/IR/CMakeLists.txt \ --replace "PassBuilderCallbacksTest.cpp" "" rm unittests/IR/PassBuilderCallbacksTest.cpp + '' + lib.optionalString (lib.versionAtLeast release_version "13") '' rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test + '' + lib.optionalString (lib.versionOlder release_version "13") '' + # TODO: Fix failing tests: + rm test/DebugInfo/X86/vla-multi.ll + '' + lib.optionalString (lib.versionAtLeast release_version "16") ('' # Fails in the presence of anti-virus software or other intrusion-detection software that # modifies the atime when run. See #284056. rm test/tools/llvm-objcopy/ELF/strip-preserve-atime.test + '' + lib.optionalString (lib.versionOlder release_version "17") '' + + '') + lib.optionalString (lib.versionAtLeast release_version "15" && lib.versionOlder release_version "17") '' + # timing-based tests are trouble + rm utils/lit/tests/googletest-timeout.py '' + optionalString stdenv.hostPlatform.isMusl '' - patch -p1 -i ${../../common/llvm/TLI-musl.patch} + patch -p1 -i ${./TLI-musl.patch} substituteInPlace unittests/Support/CMakeLists.txt \ --replace "add_subdirectory(DynamicLibrary)" "" rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp @@ -245,61 +252,59 @@ stdenv.mkDerivation (rec { rm test/DebugInfo/X86/convert-linked.ll rm test/tools/dsymutil/X86/op-convert.test rm test/tools/gold/X86/split-dwarf.ll - rm test/tools/llvm-dwarfdump/X86/prettyprint_types.s - rm test/tools/llvm-dwarfdump/X86/simplified-template-names.s - rm test/CodeGen/RISCV/attributes.ll - rm test/CodeGen/RISCV/xtheadmempair.ll + rm test/tools/llvm-objcopy/MachO/universal-object.test '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") '' # Seems to require certain floating point hardware (NEON?) rm test/ExecutionEngine/frem.ll '' + '' patchShebangs test/BugPoint/compile-custom.ll.py - ''; + '' + (lib.optionalString (lib.versionOlder release_version "13") '' + # Tweak tests to ignore namespace part of type to support + # gcc-12: https://gcc.gnu.org/PR103598. + # The change below mangles strings like: + # CHECK-NEXT: Starting llvm::Function pass manager run. + # to: + # CHECK-NEXT: Starting {{.*}}Function pass manager run. + for f in \ + test/Other/new-pass-manager.ll \ + test/Other/new-pm-O0-defaults.ll \ + test/Other/new-pm-defaults.ll \ + test/Other/new-pm-lto-defaults.ll \ + test/Other/new-pm-thinlto-defaults.ll \ + test/Other/pass-pipeline-parsing.ll \ + test/Transforms/Inline/cgscc-incremental-invalidate.ll \ + test/Transforms/Inline/clear-analyses.ll \ + test/Transforms/LoopUnroll/unroll-loop-invalidation.ll \ + test/Transforms/SCCP/ipsccp-preserve-analysis.ll \ + test/Transforms/SCCP/preserve-analysis.ll \ + test/Transforms/SROA/dead-inst.ll \ + test/tools/gold/X86/new-pm.ll \ + ; do + echo "PATCH: $f" + substituteInPlace $f \ + --replace 'Starting llvm::' 'Starting {{.*}}' \ + --replace 'Finished llvm::' 'Finished {{.*}}' + done + # gcc-13 fix + sed -i '/#include <string>/i#include <cstdint>' \ + include/llvm/DebugInfo/Symbolize/DIPrinter.h + ''); - preConfigure = '' + preConfigure = if lib.versionAtLeast release_version "15" then '' # Workaround for configure flags that need to have spaces cmakeFlagsArray+=( -DLLVM_LIT_ARGS="-svj''${NIX_BUILD_CORES} --no-progress-bar" ) - ''; - - # Defensive check: some paths (that we make symlinks to) depend on the release - # version, for example: - # - https://github.com/llvm/llvm-project/blob/406bde9a15136254f2b10d9ef3a42033b3cb1b16/clang/lib/Headers/CMakeLists.txt#L185 - # - # So we want to sure that the version in the source matches the release - # version we were given. - # - # We do this check here, in the LLVM build, because it happens early. - postConfigure = let - v = lib.versions; - major = v.major release_version; - minor = v.minor release_version; - patch = v.patch release_version; - in '' - # $1: part, $2: expected - check_version() { - part="''${1^^}" - part="$(cat include/llvm/Config/llvm-config.h | grep "#define LLVM_VERSION_''${part} " | cut -d' ' -f3)" - - if [[ "$part" != "$2" ]]; then - echo >&2 \ - "mismatch in the $1 version! we have version ${release_version}" \ - "and expected the $1 version to be '$2'; the source has '$part' instead" - exit 3 - fi - } - - check_version major ${major} - check_version minor ${minor} - check_version patch ${patch} + '' else '' + # Workaround for configure flags that need to have spaces + cmakeFlagsArray+=( + -DLLVM_LIT_ARGS='-svj''${NIX_BUILD_CORES} --no-progress-bar' + ) ''; # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; - hardeningDisable = [ "trivialautovarinit" ]; - cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let @@ -310,8 +315,11 @@ stdenv.mkDerivation (rec { # # Some flags don't need to be repassed because LLVM already does so (like # CMAKE_BUILD_TYPE), others are irrelevant to the result. - flagsForLlvmConfig = [ + flagsForLlvmConfig = (if lib.versionOlder release_version "15" then [ + "-DLLVM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/llvm/" + ] else [ "-DLLVM_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/llvm" + ]) ++ [ "-DLLVM_ENABLE_RTTI=ON" ] ++ optionals enableSharedLibraries [ "-DLLVM_LINK_LLVM_DYLIB=ON" @@ -327,7 +335,6 @@ stdenv.mkDerivation (rec { # Disables building of shared libs, -fPIC is still injected by cc-wrapper "-DLLVM_ENABLE_PIC=OFF" "-DLLVM_BUILD_STATIC=ON" - "-DLLVM_LINK_LLVM_DYLIB=off" # libxml2 needs to be disabled because the LLVM build system ignores its .la # file and doesn't link zlib as well. # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812 @@ -338,7 +345,7 @@ stdenv.mkDerivation (rec { "-DSPHINX_OUTPUT_MAN=ON" "-DSPHINX_OUTPUT_HTML=OFF" "-DSPHINX_WARNINGS_AS_ERRORS=OFF" - ] ++ optionals enableGoldPlugin [ + ] ++ optionals (enableGoldPlugin) [ "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" ] ++ optionals isDarwin [ "-DLLVM_ENABLE_LIBCXX=ON" @@ -382,8 +389,15 @@ stdenv.mkDerivation (rec { substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \ --replace "$out/bin/llvm-config" "$dev/bin/llvm-config" + '' + (if lib.versionOlder release_version "15" then '' + substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ + --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}'"$lib"'")' + '' else '' substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")' + '') + + optionalString (stdenv.isDarwin && enableSharedLibraries && lib.versionOlder release_version "18") '' + ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib '' + optionalString (stdenv.isDarwin && enableSharedLibraries) '' ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib @@ -418,14 +432,11 @@ stdenv.mkDerivation (rec { under the "Apache 2.0 License with LLVM exceptions". ''; }; -} // lib.optionalAttrs enableManpages { +} // lib.optionalAttrs enableManpages ({ pname = "llvm-manpages"; propagatedBuildInputs = []; - ninjaFlags = [ "docs-llvm-man" ]; - installTargets = [ "install-docs-llvm-man" ]; - postPatch = null; postInstall = null; @@ -436,4 +447,79 @@ stdenv.mkDerivation (rec { meta = llvm_meta // { description = "man pages for LLVM ${version}"; }; +} // (if lib.versionOlder release_version "15" then { + buildPhase = '' + make docs-llvm-man + ''; + + installPhase = '' + make -C docs install + ''; +} else { + ninjaFlags = [ "docs-llvm-man" ]; + installTargets = [ "install-docs-llvm-man" ]; + + postPatch = null; + postInstall = null; +})) // lib.optionalAttrs (lib.versionOlder release_version "13") { + inherit polly_src; + + unpackPhase = '' + unpackFile $src + mv llvm-${release_version}* llvm + sourceRoot=$PWD/llvm + '' + optionalString enablePolly '' + unpackFile $polly_src + mv polly-* $sourceRoot/tools/polly + ''; +} // lib.optionalAttrs (lib.versionAtLeast release_version "13") { + nativeCheckInputs = [ which ] ++ lib.optional (stdenv.isDarwin && lib.versionAtLeast release_version "15") sysctl; +} // lib.optionalAttrs (lib.versionOlder release_version "15") { + # hacky fix: created binaries need to be run before installation + preBuild = '' + mkdir -p $out/ + ln -sv $PWD/lib $out + ''; + + postBuild = '' + rm -fR $out + ''; + + preCheck = '' + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib + ''; +} // lib.optionalAttrs (lib.versionAtLeast release_version "15") { + # Defensive check: some paths (that we make symlinks to) depend on the release + # version, for example: + # - https://github.com/llvm/llvm-project/blob/406bde9a15136254f2b10d9ef3a42033b3cb1b16/clang/lib/Headers/CMakeLists.txt#L185 + # + # So we want to sure that the version in the source matches the release + # version we were given. + # + # We do this check here, in the LLVM build, because it happens early. + postConfigure = let + v = lib.versions; + major = v.major release_version; + minor = v.minor release_version; + patch = v.patch release_version; + in '' + # $1: part, $2: expected + check_version() { + part="''${1^^}" + part="$(cat include/llvm/Config/llvm-config.h | grep "#define LLVM_VERSION_''${part} " | cut -d' ' -f3)" + + if [[ "$part" != "$2" ]]; then + echo >&2 \ + "mismatch in the $1 version! we have version ${release_version}" \ + "and expected the $1 version to be '$2'; the source has '$part' instead" + exit 3 + fi + } + + check_version major ${major} + check_version minor ${minor} + check_version patch ${patch} + ''; +} // lib.optionalAttrs (lib.versionOlder release_version "17" || lib.versionAtLeast release_version "18") { + hardeningDisable = [ "trivialautovarinit" ]; }) diff --git a/pkgs/development/compilers/llvm/git/default.nix b/pkgs/development/compilers/llvm/git/default.nix index 1a34130679db2..c995845fb6b38 100644 --- a/pkgs/development/compilers/llvm/git/default.nix +++ b/pkgs/development/compilers/llvm/git/default.nix @@ -87,7 +87,57 @@ in let in { - libllvm = callPackage ./llvm { + libllvm = callPackage ../common/llvm { + patches = [ + ./llvm/gnu-install-dirs.patch + + # Running the tests involves invoking binaries (like `opt`) that depend on + # the LLVM dylibs and reference them by absolute install path (i.e. their + # nix store path). + # + # Because we have not yet run the install phase (we're running these tests + # as part of `checkPhase` instead of `installCheckPhase`) these absolute + # paths do not exist yet; to work around this we point the loader (`ld` on + # unix, `dyld` on macOS) at the `lib` directory which will later become this + # package's `lib` output. + # + # Previously we would just set `LD_LIBRARY_PATH` to include the build `lib` + # dir but: + # - this doesn't generalize well to other platforms; `lit` doesn't forward + # `DYLD_LIBRARY_PATH` (macOS): + # + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26 + # - even if `lit` forwarded this env var, we actually cannot set + # `DYLD_LIBRARY_PATH` in the child processes `lit` launches because + # `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for + # "protected processes" (i.e. the python interpreter that runs `lit`): + # https://stackoverflow.com/a/35570229 + # - other LLVM subprojects deal with this issue by having their `lit` + # configuration set these env vars for us; it makes sense to do the same + # for LLVM: + # + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31 + # + # !!! TODO: look into upstreaming this patch + ./llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch + + # `lit` has a mode where it executes run lines as a shell script which is + # constructs; this is problematic for macOS because it means that there's + # another process in between `lit` and the binaries being tested. As noted + # above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our + # tests fail with dyld errors. + # + # To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when + # present in the test configuration. + # + # It's not clear to me why this isn't an issue for LLVM developers running + # on macOS (nothing about this _seems_ nix specific).. + ./llvm/lit-shell-script-runner-set-dyld-library-path.patch + ]; + pollyPatches = [ + ./llvm/gnu-install-dirs-polly.patch + + # Just like the `llvm-lit-cfg` patch, but for `polly`. + ./llvm/polly-lit-cfg-add-libs-to-dylib-path.patch + ]; inherit llvm_meta; }; diff --git a/pkgs/development/compilers/llvm/git/llvm/default.nix b/pkgs/development/compilers/llvm/git/llvm/default.nix deleted file mode 100644 index 8987103e22fe5..0000000000000 --- a/pkgs/development/compilers/llvm/git/llvm/default.nix +++ /dev/null @@ -1,435 +0,0 @@ -{ lib, stdenv, llvm_meta -, pkgsBuildBuild -, monorepoSrc -, runCommand -, cmake -, darwin -, ninja -, python3 -, python3Packages -, libffi -, enableGoldPlugin ? libbfd.hasPluginAPI -, libbfd -, libpfm -, libxml2 -, ncurses -, version -, release_version -, zlib -, which -, sysctl -, buildLlvmTools -, debugVersion ? false -, doCheck ? (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl) - && (stdenv.hostPlatform == stdenv.buildPlatform) -, enableManpages ? false -, enableSharedLibraries ? !stdenv.hostPlatform.isStatic -, enablePFM ? stdenv.isLinux /* PFM only supports Linux */ - # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245 - # broken for the armv7l builder - && !stdenv.hostPlatform.isAarch -, enablePolly ? true -}: - -let - inherit (lib) optional optionals optionalString; - - # Used when creating a version-suffixed symlink of libLLVM.dylib - shortVersion = with lib; - concatStringsSep "." (take 1 (splitString "." release_version)); - - # Ordinarily we would just the `doCheck` and `checkDeps` functionality - # `mkDerivation` gives us to manage our test dependencies (instead of breaking - # out `doCheck` as a package level attribute). - # - # Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in - # particular the children it uses to do feature detection. - # - # This means that python deps we add to `checkDeps` (which the python - # interpreter is made aware of via `$PYTHONPATH` – populated by the python - # setup hook) are not picked up by `lit` which causes it to skip tests. - # - # Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work - # because this package is shadowed in `$PATH` by the regular `python3` - # package. - # - # So, we "manually" assemble one python derivation for the package to depend - # on, taking into account whether checks are enabled or not: - python = if doCheck then - # Note that we _explicitly_ ask for a python interpreter for our host - # platform here; the splicing that would ordinarily take care of this for - # us does not seem to work once we use `withPackages`. - let - checkDeps = ps: with ps; [ psutil ]; - in pkgsBuildBuild.targetPackages.python3.withPackages checkDeps - else python3; - -in - -stdenv.mkDerivation (rec { - pname = "llvm"; - inherit version; - - src = runCommand "${pname}-src-${version}" {} ('' - mkdir -p "$out" - cp -r ${monorepoSrc}/cmake "$out" - cp -r ${monorepoSrc}/${pname} "$out" - cp -r ${monorepoSrc}/third-party "$out" - '' + lib.optionalString enablePolly '' - chmod u+w "$out/${pname}/tools" - cp -r ${monorepoSrc}/polly "$out/${pname}/tools" - ''); - - sourceRoot = "${src.name}/${pname}"; - - outputs = [ "out" "lib" "dev" "python" ]; - - nativeBuildInputs = [ cmake ninja python ] - ++ optionals enableManpages [ - # Note: we intentionally use `python3Packages` instead of `python3.pkgs`; - # splicing does *not* work with the latter. (TODO: fix) - python3Packages.sphinx - ] ++ optionals (lib.versionOlder version "18" && enableManpages) [ - python3Packages.recommonmark - ] ++ optionals (lib.versionAtLeast version "18" && enableManpages) [ - python3Packages.myst-parser - ]; - - buildInputs = [ libxml2 libffi ] - ++ optional enablePFM libpfm; # exegesis - - propagatedBuildInputs = [ ncurses zlib ]; - - nativeCheckInputs = [ - which - ] ++ lib.optional stdenv.isDarwin sysctl; - - patches = [ - ./gnu-install-dirs.patch - - # Running the tests involves invoking binaries (like `opt`) that depend on - # the LLVM dylibs and reference them by absolute install path (i.e. their - # nix store path). - # - # Because we have not yet run the install phase (we're running these tests - # as part of `checkPhase` instead of `installCheckPhase`) these absolute - # paths do not exist yet; to work around this we point the loader (`ld` on - # unix, `dyld` on macOS) at the `lib` directory which will later become this - # package's `lib` output. - # - # Previously we would just set `LD_LIBRARY_PATH` to include the build `lib` - # dir but: - # - this doesn't generalize well to other platforms; `lit` doesn't forward - # `DYLD_LIBRARY_PATH` (macOS): - # + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26 - # - even if `lit` forwarded this env var, we actually cannot set - # `DYLD_LIBRARY_PATH` in the child processes `lit` launches because - # `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for - # "protected processes" (i.e. the python interpreter that runs `lit`): - # https://stackoverflow.com/a/35570229 - # - other LLVM subprojects deal with this issue by having their `lit` - # configuration set these env vars for us; it makes sense to do the same - # for LLVM: - # + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31 - # - # !!! TODO: look into upstreaming this patch - ./llvm-lit-cfg-add-libs-to-dylib-path.patch - - # `lit` has a mode where it executes run lines as a shell script which is - # constructs; this is problematic for macOS because it means that there's - # another process in between `lit` and the binaries being tested. As noted - # above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our - # tests fail with dyld errors. - # - # To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when - # present in the test configuration. - # - # It's not clear to me why this isn't an issue for LLVM developers running - # on macOS (nothing about this _seems_ nix specific).. - ./lit-shell-script-runner-set-dyld-library-path.patch - ] ++ lib.optionals enablePolly [ - ./gnu-install-dirs-polly.patch - - # Just like the `llvm-lit-cfg` patch, but for `polly`. - ./polly-lit-cfg-add-libs-to-dylib-path.patch - ]; - - postPatch = optionalString stdenv.isDarwin '' - substituteInPlace cmake/modules/AddLLVM.cmake \ - --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \ - --replace 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' "" - - # As of LLVM 15, marked as XFAIL on arm64 macOS but lit doesn't seem to pick - # this up: https://github.com/llvm/llvm-project/blob/c344d97a125b18f8fed0a64aace73c49a870e079/llvm/test/MC/ELF/cfi-version.ll#L7 - rm test/MC/ELF/cfi-version.ll - - # This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`) - # and thus fails under the sandbox: - substituteInPlace unittests/TargetParser/Host.cpp \ - --replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }" - - # This test tries to call the intrinsics `@llvm.roundeven.f32` and - # `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf` - # and `roundeven` on macOS. - # - # However these functions are glibc specific so the test fails: - # - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html - # - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html - # - substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \ - --replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \ - --replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" "" - - # fails when run in sandbox - substituteInPlace unittests/Support/VirtualFileSystemTest.cpp \ - --replace "PhysicalFileSystemWorkingDirFailure" "DISABLED_PhysicalFileSystemWorkingDirFailure" - '' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) '' - # This test fails on darwin x86_64 because `sw_vers` reports a different - # macOS version than what LLVM finds by reading - # `/System/Library/CoreServices/SystemVersion.plist` (which is passed into - # the sandbox on macOS). - # - # The `sw_vers` provided by nixpkgs reports the macOS version associated - # with the `CoreFoundation` framework with which it was built. Because - # nixpkgs pins the SDK for `aarch64-darwin` and `x86_64-darwin` what - # `sw_vers` reports is not guaranteed to match the macOS version of the host - # that's building this derivation. - # - # Astute readers will note that we only _patch_ this test on aarch64-darwin - # (to use the nixpkgs provided `sw_vers`) instead of disabling it outright. - # So why does this test pass on aarch64? - # - # Well, it seems that `sw_vers` on aarch64 actually links against the _host_ - # CoreFoundation framework instead of the nixpkgs provided one. - # - # Not entirely sure what the right fix is here. I'm assuming aarch64 - # `sw_vers` doesn't intentionally link against the host `CoreFoundation` - # (still digging into how this ends up happening, will follow up) but that - # aside I think the more pertinent question is: should we be patching LLVM's - # macOS version detection logic to use `sw_vers` instead of reading host - # paths? This *is* a way in which details about builder machines can creep - # into the artifacts that are produced, affecting reproducibility, but it's - # not clear to me when/where/for what this even gets used in LLVM. - # - # TODO(@rrbutani): fix/follow-up - substituteInPlace unittests/TargetParser/Host.cpp \ - --replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion" - '' + '' - # FileSystem permissions tests fail with various special bits - substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "Path.cpp" "" - rm unittests/Support/Path.cpp - substituteInPlace unittests/IR/CMakeLists.txt \ - --replace "PassBuilderCallbacksTest.cpp" "" - rm unittests/IR/PassBuilderCallbacksTest.cpp - rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test - - # Fails in the presence of anti-virus software or other intrusion-detection software that - # modifies the atime when run. See #284056. - rm test/tools/llvm-objcopy/ELF/strip-preserve-atime.test - '' + optionalString stdenv.hostPlatform.isMusl '' - patch -p1 -i ${../../common/llvm/TLI-musl.patch} - substituteInPlace unittests/Support/CMakeLists.txt \ - --replace "add_subdirectory(DynamicLibrary)" "" - rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp - # valgrind unhappy with musl or glibc, but fails w/musl only - rm test/CodeGen/AArch64/wineh4.mir - '' + optionalString stdenv.hostPlatform.isAarch32 '' - # skip failing X86 test cases on 32-bit ARM - rm test/DebugInfo/X86/convert-debugloc.ll - rm test/DebugInfo/X86/convert-inlined.ll - rm test/DebugInfo/X86/convert-linked.ll - rm test/tools/dsymutil/X86/op-convert.test - rm test/tools/gold/X86/split-dwarf.ll - rm test/tools/llvm-dwarfdump/X86/prettyprint_types.s - rm test/tools/llvm-dwarfdump/X86/simplified-template-names.s - rm test/CodeGen/RISCV/attributes.ll - rm test/CodeGen/RISCV/xtheadmempair.ll - '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") '' - # Seems to require certain floating point hardware (NEON?) - rm test/ExecutionEngine/frem.ll - '' + '' - patchShebangs test/BugPoint/compile-custom.ll.py - ''; - - preConfigure = '' - # Workaround for configure flags that need to have spaces - cmakeFlagsArray+=( - -DLLVM_LIT_ARGS="-svj''${NIX_BUILD_CORES} --no-progress-bar" - ) - ''; - - # Defensive check: some paths (that we make symlinks to) depend on the release - # version, for example: - # - https://github.com/llvm/llvm-project/blob/406bde9a15136254f2b10d9ef3a42033b3cb1b16/clang/lib/Headers/CMakeLists.txt#L185 - # - # So we want to sure that the version in the source matches the release - # version we were given. - # - # We do this check here, in the LLVM build, because it happens early. - postConfigure = let - v = lib.versions; - major = v.major release_version; - minor = v.minor release_version; - patch = v.patch release_version; - in '' - # $1: part, $2: expected - check_version() { - part="''${1^^}" - part="$(cat include/llvm/Config/llvm-config.h | grep "#define LLVM_VERSION_''${part} " | cut -d' ' -f3)" - - if [[ "$part" != "$2" ]]; then - echo >&2 \ - "mismatch in the $1 version! we have version ${release_version}" \ - "and expected the $1 version to be '$2'; the source has '$part' instead" - exit 3 - fi - } - - check_version major ${major} - check_version minor ${minor} - check_version patch ${patch} - ''; - - # E.g. mesa.drivers use the build-id as a cache key (see #93946): - LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; - - hardeningDisable = [ "trivialautovarinit" ]; - - cmakeBuildType = if debugVersion then "Debug" else "Release"; - - cmakeFlags = with stdenv; let - # These flags influence llvm-config's BuildVariables.inc in addition to the - # general build. We need to make sure these are also passed via - # CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native - # will return different results from the cross llvm-config. - # - # Some flags don't need to be repassed because LLVM already does so (like - # CMAKE_BUILD_TYPE), others are irrelevant to the result. - flagsForLlvmConfig = [ - "-DLLVM_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/llvm" - "-DLLVM_ENABLE_RTTI=ON" - ] ++ optionals enableSharedLibraries [ - "-DLLVM_LINK_LLVM_DYLIB=ON" - ]; - in flagsForLlvmConfig ++ [ - "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc - "-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" - "-DLLVM_ENABLE_FFI=ON" - "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" - "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}" - "-DLLVM_ENABLE_DUMP=ON" - ] ++ optionals stdenv.hostPlatform.isStatic [ - # Disables building of shared libs, -fPIC is still injected by cc-wrapper - "-DLLVM_ENABLE_PIC=OFF" - "-DLLVM_BUILD_STATIC=ON" - "-DLLVM_LINK_LLVM_DYLIB=off" - # libxml2 needs to be disabled because the LLVM build system ignores its .la - # file and doesn't link zlib as well. - # https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812 - "-DLLVM_ENABLE_LIBXML2=OFF" - ] ++ optionals enableManpages [ - "-DLLVM_BUILD_DOCS=ON" - "-DLLVM_ENABLE_SPHINX=ON" - "-DSPHINX_OUTPUT_MAN=ON" - "-DSPHINX_OUTPUT_HTML=OFF" - "-DSPHINX_WARNINGS_AS_ERRORS=OFF" - ] ++ optionals enableGoldPlugin [ - "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" - ] ++ optionals isDarwin [ - "-DLLVM_ENABLE_LIBCXX=ON" - "-DCAN_TARGET_i386=false" - ] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ - "-DCMAKE_CROSSCOMPILING=True" - "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen" - ( - let - nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc; - nativeBintools = nativeCC.bintools.bintools; - nativeToolchainFlags = [ - "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc" - "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++" - "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar" - "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip" - "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib" - ]; - # We need to repass the custom GNUInstallDirs values, otherwise CMake - # will choose them for us, leading to wrong results in llvm-config-native - nativeInstallFlags = [ - "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}" - "-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin" - "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include" - "-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib" - "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec" - ]; - in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list=" - + lib.concatStringsSep ";" (lib.concatLists [ - flagsForLlvmConfig - nativeToolchainFlags - nativeInstallFlags - ]) - ) - ]; - - postInstall = '' - mkdir -p $python/share - mv $out/share/opt-viewer $python/share/opt-viewer - moveToOutput "bin/llvm-config*" "$dev" - substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ - --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \ - --replace "$out/bin/llvm-config" "$dev/bin/llvm-config" - substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ - --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")' - '' - + optionalString (stdenv.isDarwin && enableSharedLibraries) '' - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib - '' - + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' - cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native - ''; - - inherit doCheck; - - checkTarget = "check-all"; - - # For the update script: - passthru.monorepoSrc = monorepoSrc; - - requiredSystemFeatures = [ "big-parallel" ]; - meta = llvm_meta // { - homepage = "https://llvm.org/"; - description = "A collection of modular and reusable compiler and toolchain technologies"; - longDescription = '' - The LLVM Project is a collection of modular and reusable compiler and - toolchain technologies. Despite its name, LLVM has little to do with - traditional virtual machines. The name "LLVM" itself is not an acronym; it - is the full name of the project. - LLVM began as a research project at the University of Illinois, with the - goal of providing a modern, SSA-based compilation strategy capable of - supporting both static and dynamic compilation of arbitrary programming - languages. Since then, LLVM has grown to be an umbrella project consisting - of a number of subprojects, many of which are being used in production by - a wide variety of commercial and open source projects as well as being - widely used in academic research. Code in the LLVM project is licensed - under the "Apache 2.0 License with LLVM exceptions". - ''; - }; -} // lib.optionalAttrs enableManpages { - pname = "llvm-manpages"; - - propagatedBuildInputs = []; - - ninjaFlags = [ "docs-llvm-man" ]; - installTargets = [ "install-docs-llvm-man" ]; - - postPatch = null; - postInstall = null; - - outputs = [ "out" ]; - - doCheck = false; - - meta = llvm_meta // { - description = "man pages for LLVM ${version}"; - }; -}) diff --git a/pkgs/development/compilers/orc/default.nix b/pkgs/development/compilers/orc/default.nix index 07bee8ecd2786..9841fd94f2d01 100644 --- a/pkgs/development/compilers/orc/default.nix +++ b/pkgs/development/compilers/orc/default.nix @@ -60,6 +60,6 @@ in stdenv.mkDerivation rec { # under the 3-clause BSD license. The rest is 2-clause BSD license. license = with licenses; [ bsd3 bsd2 ]; platforms = platforms.unix; - maintainers = [ ]; + maintainers = with maintainers; [ lilyinstarlight ]; }; } diff --git a/pkgs/development/compilers/vala/default.nix b/pkgs/development/compilers/vala/default.nix index 86caf243a559c..a7041bfc6a299 100644 --- a/pkgs/development/compilers/vala/default.nix +++ b/pkgs/development/compilers/vala/default.nix @@ -1,10 +1,10 @@ { stdenv, lib, fetchurl, fetchpatch, pkg-config, flex, bison, libxslt, autoconf, autoreconfHook -, gnome, graphviz, glib, libiconv, libintl, libtool, expat, substituteAll, vala +, gnome, graphviz, glib, libiconv, libintl, libtool, expat, substituteAll, vala, gobject-introspection }: let generic = lib.makeOverridable ({ - version, sha256, + version, hash, extraNativeBuildInputs ? [], extraBuildInputs ? [], withGraphviz ? false @@ -30,7 +30,7 @@ let src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - inherit sha256; + inherit hash; }; postPatch = '' @@ -49,7 +49,7 @@ let outputs = [ "out" "devdoc" ]; nativeBuildInputs = [ - pkg-config flex bison libxslt + pkg-config flex bison libxslt gobject-introspection ] ++ lib.optional (stdenv.isDarwin) expat ++ lib.optional disableGraphviz autoreconfHook # if we changed our ./configure script, need to reconfigure ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ vala ] @@ -86,8 +86,8 @@ let in rec { vala_0_56 = generic { - version = "0.56.14"; - sha256 = "k4LCaMqb3AKq7cgVKpgYvzk1JzBB9inFbeQQ42Cj9Vc="; + version = "0.56.17"; + hash = "sha256-JhAMTk7wBJxhknXxQNl89WWIPQDHVDyCvM5aQmk07Wo="; }; vala = vala_0_56; diff --git a/pkgs/development/coq-modules/coqide/default.nix b/pkgs/development/coq-modules/coqide/default.nix index d2dda145f6773..449e81040dfa9 100644 --- a/pkgs/development/coq-modules/coqide/default.nix +++ b/pkgs/development/coq-modules/coqide/default.nix @@ -1,7 +1,7 @@ { lib , makeDesktopItem , copyDesktopItems -, wrapGAppsHook +, wrapGAppsHook3 , glib , gnome , mkCoqDerivation @@ -26,7 +26,7 @@ mkCoqDerivation rec { buildInputs = [ copyDesktopItems - wrapGAppsHook + wrapGAppsHook3 coq.ocamlPackages.lablgtk3-sourceview3 glib gnome.adwaita-icon-theme diff --git a/pkgs/development/coq-modules/vscoq-language-server/default.nix b/pkgs/development/coq-modules/vscoq-language-server/default.nix index ee74d77101e7b..e79bd4f60f8da 100644 --- a/pkgs/development/coq-modules/vscoq-language-server/default.nix +++ b/pkgs/development/coq-modules/vscoq-language-server/default.nix @@ -1,4 +1,4 @@ -{ metaFetch, mkCoqDerivation, coq, lib, glib, gnome, wrapGAppsHook, +{ metaFetch, mkCoqDerivation, coq, lib, glib, gnome, wrapGAppsHook3, version ? null }: let ocamlPackages = coq.ocamlPackages; @@ -21,7 +21,7 @@ ocamlPackages.buildDunePackage { src = "${fetched.src}/language-server"; nativeBuildInputs = [ coq ]; buildInputs = - [ coq glib gnome.adwaita-icon-theme wrapGAppsHook ] ++ + [ coq glib gnome.adwaita-icon-theme wrapGAppsHook3 ] ++ (with ocamlPackages; [ findlib lablgtk3-sourceview3 yojson zarith ppx_inline_test ppx_assert ppx_sexp_conv ppx_deriving ppx_import sexplib diff --git a/pkgs/development/embedded/arduino/arduino-core/default.nix b/pkgs/development/embedded/arduino/arduino-core/default.nix index cf9e014310df6..43e6292143a4a 100644 --- a/pkgs/development/embedded/arduino/arduino-core/default.nix +++ b/pkgs/development/embedded/arduino/arduino-core/default.nix @@ -13,7 +13,7 @@ , readline , withGui ? false , gtk3 -, wrapGAppsHook +, wrapGAppsHook3 , withTeensyduino ? false /* Packages needed for Teensyduino */ , upx @@ -113,7 +113,7 @@ stdenv.mkDerivation rec { # the glib setup hook will populate GSETTINGS_SCHEMAS_PATH, # wrapGAppHooks (among other things) adds it to XDG_DATA_DIRS # so 'save as...' works: - nativeBuildInputs = [ glib stripJavaArchivesHook wrapGAppsHook unzip ]; + nativeBuildInputs = [ glib stripJavaArchivesHook wrapGAppsHook3 unzip ]; buildInputs = [ jdk ant diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index a0ab31525888f..27ca50b938f5e 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -934,22 +934,6 @@ self: super: { # https://github.com/Euterpea/Euterpea2/issues/40 Euterpea = doJailbreak super.Euterpea; - # Install icons, metadata and cli program. - bustle = appendPatches [ - # Fix build with libpcap 1.10.2 - # https://gitlab.freedesktop.org/bustle/bustle/-/merge_requests/21 - (pkgs.fetchpatch { - url = "https://gitlab.freedesktop.org/bustle/bustle/-/commit/77e2de892cd359f779c84739682431a66eb8cf31.patch"; - hash = "sha256-sPb6/Z/ANids53aL9VsMHa/v5y+TA1ZY3jwAXlEH3Ec="; - }) - ] (overrideCabal (drv: { - buildDepends = [ pkgs.libpcap ]; - buildTools = with pkgs.buildPackages; [ gettext perl help2man ]; - postInstall = '' - make install PREFIX=$out - ''; - }) super.bustle); - # Byte-compile elisp code for Emacs. ghc-mod = overrideCabal (drv: { preCheck = "export HOME=$TMPDIR"; @@ -2258,6 +2242,13 @@ self: super: { # https://github.com/merijn/paramtree/issues/4 paramtree = dontCheck super.paramtree; + # https://github.com/haskell-gi/haskell-gi/issues/431 + haskell-gi = appendPatch (fetchpatch { + url = "https://github.com/haskell-gi/haskell-gi/pull/430/commits/9ee545ad5028e5de8e1e1d96bbba2b9dbab47480.diff"; + hash = "sha256-kh32mZ7EdlOsg7HQILB7Y/EkHIqG/mozbnd/kbP+WDk="; + }) + super.haskell-gi; + # Too strict version bounds on haskell-gi # https://github.com/owickstrom/gi-gtk-declarative/issues/100 gi-gtk-declarative = doJailbreak super.gi-gtk-declarative; diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index fb4afdde5bbaf..01c366b579621 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -444,7 +444,7 @@ self: super: builtins.intersectAttrs super { leksah = dontCheck (overrideCabal (drv: { executableSystemDepends = (drv.executableSystemDepends or []) ++ (with pkgs; [ gnome.adwaita-icon-theme # Fix error: Icon 'window-close' not present in theme ... - wrapGAppsHook # Fix error: GLib-GIO-ERROR **: No GSettings schemas are installed on the system + wrapGAppsHook3 # Fix error: GLib-GIO-ERROR **: No GSettings schemas are installed on the system gtk3 # Fix error: GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed ]); postPatch = (drv.postPatch or "") + '' diff --git a/pkgs/development/interpreters/erlang/generic-builder.nix b/pkgs/development/interpreters/erlang/generic-builder.nix index 32d1466f326e4..2f3b6de7d11c8 100644 --- a/pkgs/development/interpreters/erlang/generic-builder.nix +++ b/pkgs/development/interpreters/erlang/generic-builder.nix @@ -29,7 +29,7 @@ , common-updater-scripts , coreutils , git -, wrapGAppsHook +, wrapGAppsHook3 }: { baseName ? "erlang" , version @@ -46,7 +46,7 @@ , odbcSupport ? false , odbcPackages ? [ unixODBC ] , opensslPackage ? openssl -, wxPackages ? [ libGL libGLU wxGTK xorg.libX11 wrapGAppsHook ] +, wxPackages ? [ libGL libGLU wxGTK xorg.libX11 wrapGAppsHook3 ] , preUnpack ? "" , postUnpack ? "" , patches ? [ ] diff --git a/pkgs/development/interpreters/gnudatalanguage/default.nix b/pkgs/development/interpreters/gnudatalanguage/default.nix index 54b5c5898c87f..41f15afbee305 100644 --- a/pkgs/development/interpreters/gnudatalanguage/default.nix +++ b/pkgs/development/interpreters/gnudatalanguage/default.nix @@ -2,7 +2,7 @@ , lib , fetchFromGitHub , cmake -, wrapGAppsHook +, wrapGAppsHook3 , readline , ncurses , zlib @@ -157,7 +157,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake - ] ++ lib.optional enableWX wrapGAppsHook; + ] ++ lib.optional enableWX wrapGAppsHook3; cmakeFlags = lib.optional (!enableHDF4) "-DHDF=OFF" ++ [ (if enableHDF5 then "-DHDF5DIR=${hdf5-custom}" else "-DHDF5=OFF") ] diff --git a/pkgs/development/interpreters/gtk-server/default.nix b/pkgs/development/interpreters/gtk-server/default.nix index e6d32f40c40ea..d97c94fbd885a 100644 --- a/pkgs/development/interpreters/gtk-server/default.nix +++ b/pkgs/development/interpreters/gtk-server/default.nix @@ -5,7 +5,7 @@ , gtk3 , libffcall , pkg-config -, wrapGAppsHook +, wrapGAppsHook3 }: stdenv.mkDerivation rec { @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { cd src ''; - nativeBuildInputs = [ pkg-config wrapGAppsHook ]; + nativeBuildInputs = [ pkg-config wrapGAppsHook3 ]; buildInputs = [ libffcall glib gtk3 ]; configureOptions = [ "--with-gtk3" ]; diff --git a/pkgs/development/interpreters/racket/default.nix b/pkgs/development/interpreters/racket/default.nix index 8d4615f61cead..f75470566e2cc 100644 --- a/pkgs/development/interpreters/racket/default.nix +++ b/pkgs/development/interpreters/racket/default.nix @@ -15,7 +15,7 @@ , disableDocs ? false , CoreFoundation , gsettings-desktop-schemas -, wrapGAppsHook +, wrapGAppsHook3 }: let @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { (lib.optionalString (stdenv.cc.isGNU && ! stdenv.isDarwin) "-lgcc_s") ]; - nativeBuildInputs = [ cacert wrapGAppsHook ]; + nativeBuildInputs = [ cacert wrapGAppsHook3 ]; buildInputs = [ fontconfig libffi libtool sqlite gsettings-desktop-schemas gtk3 ncurses ] ++ lib.optionals stdenv.isDarwin [ libiconv CoreFoundation ]; diff --git a/pkgs/development/interpreters/racket/racket_7_9.nix b/pkgs/development/interpreters/racket/racket_7_9.nix index 836bc879dbbca..78efe8e2914c8 100644 --- a/pkgs/development/interpreters/racket/racket_7_9.nix +++ b/pkgs/development/interpreters/racket/racket_7_9.nix @@ -13,7 +13,7 @@ , disableDocs ? false , CoreFoundation , gsettings-desktop-schemas -, wrapGAppsHook +, wrapGAppsHook3 }: let @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { (lib.optionalString stdenv.isDarwin "-framework CoreFoundation") ]; - nativeBuildInputs = [ cacert wrapGAppsHook ]; + nativeBuildInputs = [ cacert wrapGAppsHook3 ]; buildInputs = [ fontconfig libffi libtool sqlite gsettings-desktop-schemas gtk3 ] ++ lib.optionals stdenv.isDarwin [ libiconv CoreFoundation ]; diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index 5df1c65b3aac0..ed3a06591d165 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -296,8 +296,8 @@ in { mkRuby = generic; ruby_3_1 = generic { - version = rubyVersion "3" "1" "4" ""; - hash = "sha256-o9VYeaDfqx1xQf3xDSKgfb+OXNxEFdob3gYSfVzDx7Y="; + version = rubyVersion "3" "1" "5" ""; + hash = "sha256-NoXFHu7hNSwx6gOXBtcZdvU9AKttdzEt5qoauvXNosU="; }; ruby_3_2 = generic { @@ -307,8 +307,8 @@ in { }; ruby_3_3 = generic { - version = rubyVersion "3" "3" "0" ""; - hash = "sha256-llGIFNmDK+zpKoVBWoGdSJOzB9tZIa4fD3Uamomla30="; + version = rubyVersion "3" "3" "1" ""; + hash = "sha256-jcKvKALMcAzRgtVDByY4jM+IWz8KFPzWoPIf8knJqpk="; cargoHash = "sha256-GeelTMRFIyvz1QS2L+Q3KAnyQy7jc0ejhx3TdEFVEbk="; }; diff --git a/pkgs/development/interpreters/ruby/rubygems/default.nix b/pkgs/development/interpreters/ruby/rubygems/default.nix index 6a28bbb488ee4..8c0bc2208c10c 100644 --- a/pkgs/development/interpreters/ruby/rubygems/default.nix +++ b/pkgs/development/interpreters/ruby/rubygems/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "rubygems"; - version = "3.5.7"; + version = "3.5.9"; src = fetchurl { url = "https://rubygems.org/rubygems/rubygems-${version}.tgz"; - hash = "sha256-w9BKIE0vcmX+mmtDqF1tInhplHdBok1W5R1xNtRinjk="; + hash = "sha256-KyA2Qhkea7ns4ZB19iJ1qIUmMZsSRoTEZmdBXcpDY/E="; }; patches = [ diff --git a/pkgs/development/libraries/aravis/default.nix b/pkgs/development/libraries/aravis/default.nix index ccdc06e906fe7..e279a6d6e3695 100644 --- a/pkgs/development/libraries/aravis/default.nix +++ b/pkgs/development/libraries/aravis/default.nix @@ -13,7 +13,7 @@ , enableViewer ? true , gst_all_1 , gtk3 -, wrapGAppsHook +, wrapGAppsHook3 , enableUsb ? true , libusb1 @@ -25,7 +25,7 @@ assert enableGstPlugin -> gst_all_1 != null; assert enableViewer -> enableGstPlugin; assert enableViewer -> gtk3 != null; -assert enableViewer -> wrapGAppsHook != null; +assert enableViewer -> wrapGAppsHook3 != null; stdenv.mkDerivation rec { pname = "aravis"; @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { pkg-config gi-docgen gobject-introspection - ] ++ lib.optional enableViewer wrapGAppsHook; + ] ++ lib.optional enableViewer wrapGAppsHook3; buildInputs = [ glib libxml2 ] diff --git a/pkgs/development/libraries/at-spi2-core/default.nix b/pkgs/development/libraries/at-spi2-core/default.nix index 270f624965f60..c70044308d023 100644 --- a/pkgs/development/libraries/at-spi2-core/default.nix +++ b/pkgs/development/libraries/at-spi2-core/default.nix @@ -23,14 +23,14 @@ stdenv.mkDerivation rec { pname = "at-spi2-core"; - version = "2.50.2"; + version = "2.52.0"; outputs = [ "out" "dev" ]; separateDebugInfo = true; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - hash = "sha256-W4GxRhpi3Y++0aJ2+p71txEvmuX/huHjKtlkS2VP94w="; + hash = "sha256-CsP8gyDI0B+hR8Jyun+gOAY4nGsD08QG0II+MONf9as="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/aws-c-auth/default.nix b/pkgs/development/libraries/aws-c-auth/default.nix index 7a7d808795587..670725c2cd681 100644 --- a/pkgs/development/libraries/aws-c-auth/default.nix +++ b/pkgs/development/libraries/aws-c-auth/default.nix @@ -14,13 +14,13 @@ stdenv.mkDerivation rec { pname = "aws-c-auth"; - version = "0.7.16"; + version = "0.7.17"; src = fetchFromGitHub { owner = "awslabs"; repo = "aws-c-auth"; rev = "v${version}"; - hash = "sha256-76sBv4oChDrkv80HPktkULFNC37kfTNxjlwNg/FJiyA="; + hash = "sha256-dSb8VgL/fxU7yHomj/ThcLCrGrvern1ESho5oM39Um4="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/aws-c-common/default.nix b/pkgs/development/libraries/aws-c-common/default.nix index 360b82b6c6797..48b4e5ef11d3d 100644 --- a/pkgs/development/libraries/aws-c-common/default.nix +++ b/pkgs/development/libraries/aws-c-common/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "aws-c-common"; - version = "0.9.14"; + version = "0.9.15"; src = fetchFromGitHub { owner = "awslabs"; repo = pname; rev = "v${version}"; - hash = "sha256-aeuIXqnO8divpguDpiPlYJHABYIqegpaDNGwqJ5TKZw="; + hash = "sha256-x5bFBiFFcx6X+ZDtIkHe+ikMTrl2REK3QnqTaXExahM="; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/libraries/aws-c-io/default.nix b/pkgs/development/libraries/aws-c-io/default.nix index 65b5843897612..1bc0c731a9d73 100644 --- a/pkgs/development/libraries/aws-c-io/default.nix +++ b/pkgs/development/libraries/aws-c-io/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "aws-c-io"; - version = "0.14.6"; + version = "0.14.7"; src = fetchFromGitHub { owner = "awslabs"; repo = pname; rev = "v${version}"; - hash = "sha256-fekeGghqMKbUqKWIfpZg3a6dCpgxywhmXPoGz9y4Aos="; + hash = "sha256-Z4o1vv/8FWp3S7GfLDsV0a8ih+IdJIUC0DL4klOXjnw="; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/libraries/aws-c-s3/default.nix b/pkgs/development/libraries/aws-c-s3/default.nix index 8db5b837ba6b3..895babbb4f727 100644 --- a/pkgs/development/libraries/aws-c-s3/default.nix +++ b/pkgs/development/libraries/aws-c-s3/default.nix @@ -14,13 +14,13 @@ stdenv.mkDerivation rec { pname = "aws-c-s3"; - version = "0.5.4"; + version = "0.5.7"; src = fetchFromGitHub { owner = "awslabs"; repo = "aws-c-s3"; rev = "v${version}"; - hash = "sha256-8eKQsP7AftNDccsZHPC9PcwpbpgZSvsioUuSsiggQDs="; + hash = "sha256-zzsRYhLgJfd02fPgoZBf7n6dTfbLHarc1aQa0fx/uck="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/aws-crt-cpp/default.nix b/pkgs/development/libraries/aws-crt-cpp/default.nix index c41c5426d5666..cbf2e22ec7322 100644 --- a/pkgs/development/libraries/aws-crt-cpp/default.nix +++ b/pkgs/development/libraries/aws-crt-cpp/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { pname = "aws-crt-cpp"; - version = "0.26.4"; + version = "0.26.8"; outputs = [ "out" "dev" ]; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { owner = "awslabs"; repo = "aws-crt-cpp"; rev = "v${version}"; - sha256 = "sha256-H5ms6fhhlkARn9g8S5Ma8bnisZv8mfNizP0QpzsF1tA="; + sha256 = "sha256-TW17Jcs9y8OqB0mnbHbOZgSWkYs70o2bhiLT/Rr1e8k="; }; patches = [ diff --git a/pkgs/development/libraries/aws-sdk-cpp/default.nix b/pkgs/development/libraries/aws-sdk-cpp/default.nix index 0d210abd4a15e..cafe03ce1461b 100644 --- a/pkgs/development/libraries/aws-sdk-cpp/default.nix +++ b/pkgs/development/libraries/aws-sdk-cpp/default.nix @@ -27,13 +27,13 @@ in stdenv.mkDerivation rec { pname = "aws-sdk-cpp"; - version = "1.11.296"; + version = "1.11.309"; src = fetchFromGitHub { owner = "aws"; repo = "aws-sdk-cpp"; rev = version; - hash = "sha256-yg+OkeUaqwUQGQ5ThIVQUpF2rHm4FuFbcl5gE5WHHOQ="; + hash = "sha256-+Hx/qJREXTu92KxwOv1zTsveXWZvoBxpvc27kEej7sw="; }; postPatch = '' diff --git a/pkgs/development/libraries/bamf/default.nix b/pkgs/development/libraries/bamf/default.nix index 99c1df8e0a39c..8b11954429631 100644 --- a/pkgs/development/libraries/bamf/default.nix +++ b/pkgs/development/libraries/bamf/default.nix @@ -17,7 +17,7 @@ , xorgserver , dbus , python3 -, wrapGAppsHook +, wrapGAppsHook3 }: stdenv.mkDerivation rec { @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { pkg-config vala which - wrapGAppsHook + wrapGAppsHook3 xorgserver ]; diff --git a/pkgs/development/libraries/enchant/2.x.nix b/pkgs/development/libraries/enchant/2.x.nix index 383a157acbd14..2fa7aec062f36 100644 --- a/pkgs/development/libraries/enchant/2.x.nix +++ b/pkgs/development/libraries/enchant/2.x.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation rec { pname = "enchant"; - version = "2.6.8"; + version = "2.6.9"; outputs = [ "out" "dev" ]; src = fetchurl { url = "https://github.com/AbiWord/${pname}/releases/download/v${version}/${pname}-${version}.tar.gz"; - hash = "sha256-9WWSMGLHfz1YhG8FWNIebQfKSkiMWIEt/e+zUgL6x64="; + hash = "sha256-2aWhDcmzikOzoPoix27W67fgnrU1r/YpVK/NvUDv/2s="; }; strictDeps = true; diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index bdc0cdd5ffa4c..92a28d8a7705b 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -40,12 +40,14 @@ , withAss ? withHeadlessDeps && stdenv.hostPlatform == stdenv.buildPlatform # (Advanced) SubStation Alpha subtitle rendering , withAudioToolbox ? withHeadlessDeps && stdenv.isDarwin # Apple AudioToolbox , withAvFoundation ? withHeadlessDeps && stdenv.isDarwin # Apple AVFoundation framework +, withAvisynth ? withFullDeps # AviSynth script files reading , withBluray ? withFullDeps # BluRay reading , withBs2b ? withFullDeps # bs2b DSP library , withBzlib ? withHeadlessDeps , withCaca ? withFullDeps # Textual display (ASCII art) , withCelt ? withFullDeps # CELT decoder , withChromaprint ? withFullDeps # Audio fingerprinting +, withCodec2 ? withFullDeps # codec2 en/decoding , withCoreImage ? withHeadlessDeps && stdenv.isDarwin # Apple CoreImage framework , withCuda ? withFullDeps && withNvcodec , withCudaLLVM ? withFullDeps @@ -68,6 +70,7 @@ , withHarfbuzz ? withHeadlessDeps && lib.versionAtLeast version "6.1" # Needed for drawtext filter , withIconv ? withHeadlessDeps , withJack ? withFullDeps && !stdenv.isDarwin # Jack audio +, withJxl ? withFullDeps && lib.versionAtLeast version "5" # JPEG XL de/encoding , withLadspa ? withFullDeps # LADSPA audio filtering , withLzma ? withHeadlessDeps # xz-utils , withMfx ? withFullDeps && (with stdenv.hostPlatform; isLinux && !isAarch) # Hardware acceleration via intel-media-sdk/libmfx @@ -211,9 +214,11 @@ * External libraries options */ , alsa-lib +, avisynthplus , bzip2 , celt , chromaprint +, codec2 , clang , dav1d , fdk_aac @@ -243,6 +248,7 @@ , libGLU , libiconv , libjack2 +, libjxl , libmodplug , libmysofa , libogg @@ -415,6 +421,13 @@ stdenv.mkDerivation (finalAttrs: { ''; } ] + ++ (lib.optionals (lib.versionAtLeast version "5" && lib.versionOlder version "6") [ + { + name = "fix_build_failure_due_to_libjxl_version_to_new"; + url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/75b1a555a70c178a9166629e43ec2f6250219eb2"; + hash = "sha256-+2kzfPJf5piim+DqEgDuVEEX5HLwRsxq0dWONJ4ACrU="; + } + ]) ++ (lib.optionals (lib.versionAtLeast version "6.1" && lib.versionOlder version "6.2") [ { # this can be removed post 6.1 name = "fix_build_failure_due_to_PropertyKey_EncoderID"; @@ -527,12 +540,14 @@ stdenv.mkDerivation (finalAttrs: { (enableFeature withAss "libass") (enableFeature withAudioToolbox "audiotoolbox") (enableFeature withAvFoundation "avfoundation") + (enableFeature withAvisynth "avisynth") (enableFeature withBluray "libbluray") (enableFeature withBs2b "libbs2b") (enableFeature withBzlib "bzlib") (enableFeature withCaca "libcaca") (enableFeature withCelt "libcelt") (enableFeature withChromaprint "chromaprint") + (enableFeature withCodec2 "libcodec2") (enableFeature withCoreImage "coreimage") (enableFeature withCuda "cuda") (enableFeature withCudaLLVM "cuda-llvm") @@ -560,6 +575,9 @@ stdenv.mkDerivation (finalAttrs: { ] ++ [ (enableFeature withIconv "iconv") (enableFeature withJack "libjack") + ] ++ optionals (versionAtLeast finalAttrs.version "5.0") [ + (enableFeature withJxl "libjxl") + ] ++ [ (enableFeature withLadspa "ladspa") (enableFeature withLzma "lzma") (enableFeature withMfx "libmfx") @@ -671,12 +689,14 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withAss [ libass ] ++ optionals withAudioToolbox [ AudioToolbox ] ++ optionals withAvFoundation [ AVFoundation ] + ++ optionals withAvisynth [ avisynthplus ] ++ optionals withBluray [ libbluray ] ++ optionals withBs2b [ libbs2b ] ++ optionals withBzlib [ bzip2 ] ++ optionals withCaca [ libcaca ] ++ optionals withCelt [ celt ] ++ optionals withChromaprint [ chromaprint ] + ++ optionals withCodec2 [ codec2 ] ++ optionals withCoreImage [ CoreImage ] ++ optionals withDav1d [ dav1d ] ++ optionals withDc1394 [ libdc1394 libraw1394 ] @@ -696,6 +716,7 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withHarfbuzz [ harfbuzz ] ++ optionals withIconv [ libiconv ] # On Linux this should be in libc, do we really need it? ++ optionals withJack [ libjack2 ] + ++ optionals withJxl [ libjxl ] ++ optionals withLadspa [ ladspaH ] ++ optionals withLzma [ xz ] ++ optionals withMfx [ intel-media-sdk ] diff --git a/pkgs/development/libraries/folks/default.nix b/pkgs/development/libraries/folks/default.nix index 8df1c9585450a..0f40be439a3ab 100644 --- a/pkgs/development/libraries/folks/default.nix +++ b/pkgs/development/libraries/folks/default.nix @@ -27,13 +27,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "folks"; - version = "0.15.7"; + version = "0.15.9"; outputs = [ "out" "dev" "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/folks/${lib.versions.majorMinor finalAttrs.version}/folks-${finalAttrs.version}.tar.xz"; - sha256 = "Eg8hnvYyEsqpWuf2rrZOKZKLCxqLlFIFQwSgDQ80eHE="; + hash = "sha256-IxGzc1XDUfM/Fj/cOUh0oioKBoLDGUk9bYpuQgcRQV8="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/gcr/4.nix b/pkgs/development/libraries/gcr/4.nix index ea1dbf99f2730..dd860d0bc7008 100644 --- a/pkgs/development/libraries/gcr/4.nix +++ b/pkgs/development/libraries/gcr/4.nix @@ -26,13 +26,13 @@ stdenv.mkDerivation rec { pname = "gcr"; - version = "4.1.0"; + version = "4.3.0"; outputs = [ "out" "bin" "dev" "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "nOqtKShLqRm5IW4oiMGOxnJAwsk7OkhWvFSIu8Hzo4M="; + hash = "sha256-w+6HKOQ2SwOX9DX6IPkvkBqxOdKyZPTgWdZ7PA9DzTY="; }; strictDeps = true; diff --git a/pkgs/development/libraries/gcr/default.nix b/pkgs/development/libraries/gcr/default.nix index 11d695e774994..db31927b7a70a 100644 --- a/pkgs/development/libraries/gcr/default.nix +++ b/pkgs/development/libraries/gcr/default.nix @@ -16,7 +16,7 @@ , openssh , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd , gobject-introspection -, wrapGAppsHook +, wrapGAppsHook3 , gi-docgen , vala , gnome @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { gettext gobject-introspection gi-docgen - wrapGAppsHook + wrapGAppsHook3 vala shared-mime-info openssh diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index f77daec2ea6fb..a90a2c5c9f780 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "gdk-pixbuf"; - version = "2.42.10"; + version = "2.42.11"; outputs = [ "out" "dev" "man" ] ++ lib.optional withIntrospection "devdoc" @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { inherit (finalAttrs) pname version; in fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "7ptsddE7oJaQei48aye2G80X9cfr6rWltDnS8uOf5Es="; + hash = "sha256-Sdy0AjiHCGR+jDIdVrb7MPIeUeUV0MWpQiaNIwUqLwA="; }; patches = [ diff --git a/pkgs/development/libraries/geis/default.nix b/pkgs/development/libraries/geis/default.nix index 17ef806ec9ad7..9f1cc784e1407 100644 --- a/pkgs/development/libraries/geis/default.nix +++ b/pkgs/development/libraries/geis/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl , pkg-config , python3Packages -, wrapGAppsHook +, wrapGAppsHook3 , atk , dbus , evemu @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { pythonPath = with python3Packages; [ pygobject3 ]; - nativeBuildInputs = [ pkg-config wrapGAppsHook python3Packages.wrapPython gobject-introspection ]; + nativeBuildInputs = [ pkg-config wrapGAppsHook3 python3Packages.wrapPython gobject-introspection ]; buildInputs = [ atk dbus evemu frame gdk-pixbuf grail gtk3 xorg.libX11 xorg.libXext xorg.libXi xorg.libXtst pango python3Packages.python xorgserver ]; diff --git a/pkgs/development/libraries/geoclue/default.nix b/pkgs/development/libraries/geoclue/default.nix index c2bf28d710452..df58e5dc9e193 100644 --- a/pkgs/development/libraries/geoclue/default.nix +++ b/pkgs/development/libraries/geoclue/default.nix @@ -19,7 +19,7 @@ , avahi , glib-networking , python3 -, wrapGAppsHook +, wrapGAppsHook3 , gobject-introspection , vala , withDemoAgent ? false @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { intltool meson ninja - wrapGAppsHook + wrapGAppsHook3 python3 vala gobject-introspection diff --git a/pkgs/development/libraries/giflib/default.nix b/pkgs/development/libraries/giflib/default.nix index 9c24d11d4abc3..677db06e5083c 100644 --- a/pkgs/development/libraries/giflib/default.nix +++ b/pkgs/development/libraries/giflib/default.nix @@ -4,7 +4,6 @@ , fetchpatch , fixDarwinDylibNames , pkgsStatic -, imagemagick_light }: stdenv.mkDerivation rec { @@ -29,9 +28,7 @@ stdenv.mkDerivation rec { ./mingw-install-exes.patch ]; - nativeBuildInputs = [ - imagemagick_light - ] ++ lib.optionals stdenv.isDarwin [ + nativeBuildInputs = lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ]; @@ -39,7 +36,11 @@ stdenv.mkDerivation rec { "PREFIX=${builtins.placeholder "out"}" ]; - postPatch = lib.optionalString stdenv.hostPlatform.isStatic '' + postPatch = '' + # we don't want to build HTML documentation + substituteInPlace doc/Makefile \ + --replace-fail "all: allhtml manpages" "all: manpages" + '' + lib.optionalString stdenv.hostPlatform.isStatic '' # Upstream build system does not support NOT building shared libraries. sed -i '/all:/ s/$(LIBGIFSO)//' Makefile sed -i '/all:/ s/$(LIBUTILSO)//' Makefile diff --git a/pkgs/development/libraries/gjs/default.nix b/pkgs/development/libraries/gjs/default.nix index dc5f5e46975d2..604435cee5105 100644 --- a/pkgs/development/libraries/gjs/default.nix +++ b/pkgs/development/libraries/gjs/default.nix @@ -32,13 +32,13 @@ let ]; in stdenv.mkDerivation (finalAttrs: { pname = "gjs"; - version = "1.78.4"; + version = "1.80.2"; outputs = [ "out" "dev" "installedTests" ]; src = fetchurl { url = "mirror://gnome/sources/gjs/${lib.versions.majorMinor finalAttrs.version}/gjs-${finalAttrs.version}.tar.xz"; - hash = "sha256-mux6uHLCBQQEkHrpTwrnq+yKVL2ciU3bXC0PUekyuaE="; + hash = "sha256-E145xaxZEJYjPlV8/ld9ZAk/UFRBHUfLLiFLrX1Bmb0="; }; patches = [ @@ -47,6 +47,10 @@ in stdenv.mkDerivation (finalAttrs: { # Allow installing installed tests to a separate output. ./installed-tests-path.patch + + # Disable introspection test in installed tests + # (minijasmine:1317): GLib-GIO-WARNING **: 17:33:39.556: Error creating IO channel for /proc/self/mountinfo: No such file or directory (g-io-error-quark, 1) + ./disable-introspection-test.patch ]; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/gjs/disable-introspection-test.patch b/pkgs/development/libraries/gjs/disable-introspection-test.patch new file mode 100644 index 0000000000000..1c438dd6b4019 --- /dev/null +++ b/pkgs/development/libraries/gjs/disable-introspection-test.patch @@ -0,0 +1,12 @@ +diff --git a/installed-tests/js/meson.build b/installed-tests/js/meson.build +index 07759690..43c87c59 100644 +--- a/installed-tests/js/meson.build ++++ b/installed-tests/js/meson.build +@@ -123,7 +123,6 @@ jasmine_tests = [ + 'GTypeClass', + 'Importer', + 'Importer2', +- 'Introspection', + 'Lang', + 'LegacyByteArray', + 'LegacyClass', diff --git a/pkgs/development/libraries/glib-networking/default.nix b/pkgs/development/libraries/glib-networking/default.nix index 39e17a894cb7d..d74acc063e5c0 100644 --- a/pkgs/development/libraries/glib-networking/default.nix +++ b/pkgs/development/libraries/glib-networking/default.nix @@ -19,13 +19,13 @@ stdenv.mkDerivation rec { pname = "glib-networking"; - version = "2.78.1"; + version = "2.80.0"; outputs = [ "out" "installedTests" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "5I8t27BJgyy7CSMFKcXkXayp8N8O2jJfgy9zeYWb8J8="; + hash = "sha256-2PTxqrITF5rjNRYXtZ2rXea8yeeFAh7uF4mY69S7Os8="; }; patches = [ diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index cd03315c0b3c6..5a7f49ce94ae1 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -2,24 +2,27 @@ , lib , stdenv , fetchurl -, fetchpatch , gettext , meson , ninja , pkg-config , perl , python3 -, libiconv, zlib, libffi, pcre2, elfutils, gnome, libselinux, bash, gnum4, gtk-doc, docbook_xsl, docbook_xml_dtd_45, libxslt +, python3Packages +, libiconv, zlib, libffi, pcre2, elfutils, gnome, libselinux, bash, gnum4, libxslt +, docutils, gi-docgen # use util-linuxMinimal to avoid circular dependency (util-linux, systemd, glib) , util-linuxMinimal ? null , buildPackages # this is just for tests (not in the closure of any regular package) -, coreutils, dbus, libxml2, tzdata +, coreutils, dbus, tzdata , desktop-file-utils, shared-mime-info , darwin , makeHardcodeGsettingsPatch , testers +, gobject-introspection +, withIntrospection ? stdenv.buildPlatform.canExecute stdenv.hostPlatform && lib.meta.availableOn stdenv.hostPlatform gobject-introspection }: assert stdenv.isLinux -> util-linuxMinimal != null; @@ -38,16 +41,26 @@ let ln -sr -t "''${!outputInclude}/include/" "''${!outputInclude}"/lib/*/include/* 2>/dev/null || true ''; - buildDocs = stdenv.hostPlatform == stdenv.buildPlatform && !stdenv.hostPlatform.isStatic; + gobject-introspection' = buildPackages.gobject-introspection.override { + propagateFullGlib = false; + # Avoid introducing cairo, which enables gobjectSupport by default. + x11Support = false; + }; + + librarySuffix = if (stdenv.targetPlatform.extensions.library == ".so") then "2.0.so.0" + else if (stdenv.targetPlatform.extensions.library == ".dylib") then "2.0.0.dylib" + else if (stdenv.targetPlatform.extensions.library == ".a") then "2.0.a" + else if (stdenv.targetPlatform.extensions.library == ".dll") then "2.0-0.dll" + else "2.0-0.lib"; in stdenv.mkDerivation (finalAttrs: { pname = "glib"; - version = "2.78.4"; + version = "2.80.0"; src = fetchurl { url = "mirror://gnome/sources/glib/${lib.versions.majorMinor finalAttrs.version}/glib-${finalAttrs.version}.tar.xz"; - sha256 = "sha256-JLjgZy3KEgzDLTlLzLhYROcy4E/nXRi7BXOy28dUj2M="; + hash = "sha256-giipL5KkEhYLE5rmi2NFvSjyRDSnta8VDr4h/1h6Vh0="; }; patches = lib.optionals stdenv.isDarwin [ @@ -56,13 +69,19 @@ stdenv.mkDerivation (finalAttrs: { ./quark_init_on_demand.patch ./gobject_init_on_demand.patch ] ++ [ - (fetchpatch { - name = "GLib-against-PCRE2-10.43.patch"; - url = "https://gitlab.gnome.org/GNOME/glib/-/commit/cce3ae98a2c1966719daabff5a4ec6cf94a846f6.patch"; - hash = "sha256-vgKzb5hQmFQGD8zxRrXnuX9Gpg/TeSrzehlOH2vA1xU="; - }) - + # This patch lets GLib's GDesktopAppInfo API watch and notice changes + # to the Nix user and system profiles. That way, the list of available + # applications shown by the desktop environment is immediately updated + # when the user installs or removes any + # (see <https://issues.guix.gnu.org/35594>). + + # It does so by monitoring /nix/var/nix/profiles (for changes to the system + # profile) and /nix/var/nix/profiles/per-user/USER (for changes to the user + # profile) as well as /etc/profiles/per-user (for chanes to the user + # environment profile) and crawling their share/applications sub-directory when + # changes happen. ./glib-appinfo-watch.patch + ./schema-override-variable.patch # Add support for Pantheon’s terminal emulator. @@ -91,10 +110,6 @@ stdenv.mkDerivation (finalAttrs: { # 3. Tools for desktop environment that cannot go to $bin due to $out depending on them ($out) # * gio-launch-desktop ./split-dev-programs.patch - - # Disable flaky test. - # https://gitlab.gnome.org/GNOME/glib/-/issues/820 - ./skip-timer-test.patch ]; outputs = [ "bin" "out" "dev" "devdoc" ]; @@ -113,48 +128,42 @@ stdenv.mkDerivation (finalAttrs: { util-linuxMinimal # for libmount ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Carbon Cocoa CoreFoundation CoreServices Foundation - ]) ++ 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 - # version (-> host dep). We could technically go and fix this in glib, add - # pkg-config to depsBuildBuild, but this would be a futile exercise since - # Meson's gtkdoc integration does not support cross compilation[1] anyway - # and this derivation disables the docs build when cross compiling. - # - # [1] https://github.com/mesonbuild/meson/issues/2003 - gtk-doc - ]; + ]); strictDeps = true; + depsBuildBuild = [ + pkg-config # required to find native gi-docgen + ]; + nativeBuildInputs = [ + docutils # for rst2man, rst2html5 meson ninja pkg-config perl python3 + python3Packages.packaging # mostly used to make meson happy + python3Packages.wrapPython # for patchPythonScript gettext libxslt - docbook_xsl - ] ++ lib.optionals buildDocs [ - gtk-doc - docbook_xml_dtd_45 - libxml2 + ] ++ lib.optionals withIntrospection [ + gi-docgen + gobject-introspection' ]; propagatedBuildInputs = [ zlib libffi gettext libiconv ]; 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=${lib.boolToString buildDocs}" + "-Ddocumentation=true" # gvariant specification can be built without gi-docgen "-Dnls=enabled" "-Ddevbindir=${placeholder "dev"}/bin" + (lib.mesonEnable "introspection" withIntrospection) + # FIXME: Fails when linking target glib/tests/libconstructor-helper.so + # relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object + "-Dtests=${lib.boolToString (!stdenv.hostPlatform.isStatic)}" ] ++ lib.optionals (!lib.meta.availableOn stdenv.hostPlatform elfutils) [ "-Dlibelf=disabled" - ] ++ lib.optionals (!stdenv.isDarwin) [ - "-Dman=true" # broken on Darwin ] ++ lib.optionals stdenv.isFreeBSD [ "-Db_lundef=false" "-Dxattr=false" @@ -168,14 +177,11 @@ stdenv.mkDerivation (finalAttrs: { ]; postPatch = '' - chmod +x gio/tests/gengiotypefuncs.py - patchShebangs gio/tests/gengiotypefuncs.py - chmod +x docs/reference/gio/concat-files-helper.py - patchShebangs docs/reference/gio/concat-files-helper.py patchShebangs glib/gen-unicode-tables.pl patchShebangs glib/tests/gen-casefold-txt.py patchShebangs glib/tests/gen-casemap-txt.py patchShebangs tools/gen-visibility-macros.py + patchShebangs tests # Needs machine-id, comment the test sed -e '/\/gdbus\/codegen-peer-to-peer/ s/^\/*/\/\//' -i gio/tests/gdbus-peer.c @@ -211,8 +217,11 @@ stdenv.mkDerivation (finalAttrs: { for i in $dev/bin/*; do moveToOutput "share/bash-completion/completions/''${i##*/}" "$dev" done - '' + lib.optionalString (!buildDocs) '' - cp -r ${buildPackages.glib.devdoc} $devdoc + ''; + + preFixup = lib.optionalString (!stdenv.hostPlatform.isStatic) '' + buildPythonPath ${python3Packages.packaging} + patchPythonScript "$dev/share/glib-2.0/codegen/utils.py" ''; # Move man pages to the same output as their binaries (needs to be @@ -222,6 +231,9 @@ stdenv.mkDerivation (finalAttrs: { for i in $dev/bin/*; do moveToOutput "share/man/man1/''${i##*/}.1.*" "$dev" done + + # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. + moveToOutput "share/doc/glib-2.0" "$devdoc" ''; nativeCheckInputs = [ tzdata desktop-file-utils shared-mime-info ]; @@ -234,8 +246,34 @@ stdenv.mkDerivation (finalAttrs: { export HOME="$TMP" export XDG_DATA_DIRS="${desktop-file-utils}/share:${shared-mime-info}/share" export G_TEST_DBUS_DAEMON="${dbus}/bin/dbus-daemon" - export PATH="$PATH:$(pwd)/gobject" + + # pkg_config_tests expects a PKG_CONFIG_PATH that points to meson-private, wrapped pkg-config + # tries to be clever and picks up the wrong glib at the end. + export PATH="${buildPackages.pkg-config-unwrapped}/bin:$PATH:$(pwd)/gobject" echo "PATH=$PATH" + + # Our gobject-introspection patches make the shared library paths absolute + # in the GIR files. When running tests, the library is not yet installed, + # though, so we need to replace the absolute path with a local one during build. + # We are using a symlink that we will delete before installation. + mkdir -p $out/lib + ln -s $PWD/gobject/libgobject-${librarySuffix} $out/lib/libgobject-${librarySuffix} + ln -s $PWD/gio/libgio-${librarySuffix} $out/lib/libgio-${librarySuffix} + ln -s $PWD/glib/libglib-${librarySuffix} $out/lib/libglib-${librarySuffix} + ''; + + checkPhase = '' + runHook preCheck + + meson test --print-errorlogs + + runHook postCheck + ''; + + postCheck = '' + rm $out/lib/libgobject-${librarySuffix} + rm $out/lib/libgio-${librarySuffix} + rm $out/lib/libglib-${librarySuffix} ''; separateDebugInfo = stdenv.isLinux; diff --git a/pkgs/development/libraries/glib/elementary-terminal-support.patch b/pkgs/development/libraries/glib/elementary-terminal-support.patch index 34a56c8487aee..5178f9d016cae 100644 --- a/pkgs/development/libraries/glib/elementary-terminal-support.patch +++ b/pkgs/development/libraries/glib/elementary-terminal-support.patch @@ -1,8 +1,8 @@ diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c -index 30fcb2937..a6a7163a7 100644 +index 87db7a97a..bf01fb6b6 100644 --- a/gio/gdesktopappinfo.c +++ b/gio/gdesktopappinfo.c -@@ -2704,6 +2704,7 @@ prepend_terminal_to_vector (int *argc, +@@ -2697,6 +2697,7 @@ prepend_terminal_to_vector (int *argc, { "gnome-terminal", "--" }, { "mate-terminal", "-x" }, { "xfce4-terminal", "-x" }, diff --git a/pkgs/development/libraries/glib/glib-appinfo-watch.patch b/pkgs/development/libraries/glib/glib-appinfo-watch.patch index cbd78a6db4a6f..43641301d3ef6 100644 --- a/pkgs/development/libraries/glib/glib-appinfo-watch.patch +++ b/pkgs/development/libraries/glib/glib-appinfo-watch.patch @@ -1,20 +1,8 @@ -This patch lets GLib's GDesktopAppInfo API watch and notice changes -to the Nix user and system profiles. That way, the list of available -applications shown by the desktop environment is immediately updated -when the user installs or removes any -(see <https://issues.guix.gnu.org/35594>). - -It does so by monitoring /nix/var/nix/profiles (for changes to the system -profile) and /nix/var/nix/profiles/per-user/USER (for changes to the user -profile) as well as /etc/profiles/per-user (for chanes to the user -environment profile) and crawling their share/applications sub-directory when -changes happen. - diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c -index b779b30..31069f7 100644 +index 87db7a97a..2e1689ed7 100644 --- a/gio/gdesktopappinfo.c +++ b/gio/gdesktopappinfo.c -@@ -150,6 +150,7 @@ typedef struct +@@ -147,6 +147,7 @@ typedef struct gchar *alternatively_watching; gboolean is_config; gboolean is_setup; @@ -22,7 +10,7 @@ index b779b30..31069f7 100644 GFileMonitor *monitor; GHashTable *app_names; GHashTable *mime_tweaks; -@@ -181,6 +182,7 @@ desktop_file_dir_unref (DesktopFileDir *dir) +@@ -179,6 +180,7 @@ desktop_file_dir_unref (DesktopFileDir *dir) { desktop_file_dir_reset (dir); g_free (dir->path); @@ -30,7 +18,7 @@ index b779b30..31069f7 100644 g_free (dir); } } -@@ -205,6 +207,14 @@ desktop_file_dir_get_alternative_dir (DesktopFileDir *dir) +@@ -203,6 +205,14 @@ desktop_file_dir_get_alternative_dir (DesktopFileDir *dir) { gchar *parent; @@ -45,7 +33,7 @@ index b779b30..31069f7 100644 /* If the directory itself exists then we need no alternative. */ if (g_access (dir->path, R_OK | X_OK) == 0) return NULL; -@@ -250,11 +260,11 @@ desktop_file_dir_changed (GFileMonitor *monitor, +@@ -248,11 +258,11 @@ desktop_file_dir_changed (GFileMonitor *monitor, * * If this is a notification for a parent directory (because the * desktop directory didn't exist) then we shouldn't fire the signal @@ -59,7 +47,7 @@ index b779b30..31069f7 100644 { gchar *alternative_dir; -@@ -1556,6 +1566,40 @@ desktop_file_dirs_lock (void) +@@ -1650,6 +1660,40 @@ desktop_file_dirs_lock (void) for (i = 0; dirs[i]; i++) g_ptr_array_add (desktop_file_dirs, desktop_file_dir_new (dirs[i])); @@ -84,7 +72,7 @@ index b779b30..31069f7 100644 + user_data_dir = g_build_filename (profile_dir, "profile", "share", NULL); + user_profile_dir = desktop_file_dir_new (user_data_dir); + user_profile_dir->nix_profile_watch_dir = profile_dir; -+ ++ + env_dir = g_build_filename ("/etc/profiles/per-user", NULL); + env_data_dir = g_build_filename (env_dir, user, "share", NULL); + user_env_dir = desktop_file_dir_new (env_data_dir); diff --git a/pkgs/development/libraries/glib/schema-override-variable.patch b/pkgs/development/libraries/glib/schema-override-variable.patch index f98af04a7f245..84d3e93730a59 100644 --- a/pkgs/development/libraries/glib/schema-override-variable.patch +++ b/pkgs/development/libraries/glib/schema-override-variable.patch @@ -1,8 +1,8 @@ diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c -index 1282c10a1..feadfe3aa 100644 +index b1918657d..504ff97c4 100644 --- a/gio/gsettingsschema.c +++ b/gio/gsettingsschema.c -@@ -360,6 +360,9 @@ initialise_schema_sources (void) +@@ -356,6 +356,9 @@ initialise_schema_sources (void) try_prepend_data_dir (g_get_user_data_dir ()); diff --git a/pkgs/development/libraries/glib/skip-timer-test.patch b/pkgs/development/libraries/glib/skip-timer-test.patch deleted file mode 100644 index 942f3e7864c4f..0000000000000 --- a/pkgs/development/libraries/glib/skip-timer-test.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: Skip test which performs some unreliable floating point comparisons -Forwarded: https://bugzilla.gnome.org/show_bug.cgi?id=722604 - -Index: b/glib/tests/timer.c -=================================================================== ---- a/glib/tests/timer.c -+++ b/glib/tests/timer.c -@@ -203,7 +203,7 @@ - { - g_test_init (&argc, &argv, NULL); - -- g_test_add_func ("/timer/basic", test_timer_basic); -+/* g_test_add_func ("/timer/basic", test_timer_basic);*/ -- g_test_add_func ("/timer/stop", test_timer_stop); -+/* g_test_add_func ("/timer/stop", test_timer_stop);*/ - g_test_add_func ("/timer/continue", test_timer_continue); - g_test_add_func ("/timer/reset", test_timer_reset); diff --git a/pkgs/development/libraries/glib/split-dev-programs.patch b/pkgs/development/libraries/glib/split-dev-programs.patch index 0333c5c9ca295..b32fccb8379f4 100644 --- a/pkgs/development/libraries/glib/split-dev-programs.patch +++ b/pkgs/development/libraries/glib/split-dev-programs.patch @@ -1,5 +1,5 @@ diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build -index 65faae9b2..4297513d4 100644 +index 6d19cd4ba..0205e5074 100644 --- a/gio/gdbus-2.0/codegen/meson.build +++ b/gio/gdbus-2.0/codegen/meson.build @@ -20,7 +20,7 @@ gdbus_codegen_conf.set('DATADIR', glib_datadir) @@ -12,13 +12,13 @@ index 65faae9b2..4297513d4 100644 configuration : gdbus_codegen_conf ) diff --git a/gio/meson.build b/gio/meson.build -index 75686bb3e..2f1a73482 100644 +index 59c2b0fc0..87cbb8229 100644 --- a/gio/meson.build +++ b/gio/meson.build -@@ -882,14 +882,15 @@ pkg.generate(libgio, +@@ -885,14 +885,15 @@ pkg.generate(libgio, + variables : [ 'schemasdir=' + '${datadir}' / schemas_subdir, 'dtdsdir=' + '${datadir}' / dtds_subdir, - 'bindir=' + '${prefix}' / get_option('bindir'), + 'devbindir=' + get_option('devbindir'), 'giomoduledir=' + pkgconfig_giomodulesdir, 'gio=' + '${bindir}' / 'gio', @@ -36,7 +36,7 @@ index 75686bb3e..2f1a73482 100644 'gsettings=' + '${bindir}' / 'gsettings', ], version : glib_version, -@@ -992,6 +993,7 @@ executable('gio', gio_tool_sources, +@@ -995,6 +996,7 @@ gio_tool = executable('gio', gio_tool_sources, executable('gresource', 'gresource-tool.c', install : true, @@ -44,7 +44,7 @@ index 75686bb3e..2f1a73482 100644 install_tag : 'bin', # intl.lib is not compatible with SAFESEH link_args : noseh_link_args, -@@ -999,7 +1001,7 @@ executable('gresource', 'gresource-tool.c', +@@ -1002,7 +1004,7 @@ executable('gresource', 'gresource-tool.c', gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c', install : true, @@ -53,7 +53,7 @@ index 75686bb3e..2f1a73482 100644 install_tag : 'bin', c_args : gio_c_args, # intl.lib is not compatible with SAFESEH -@@ -1009,7 +1011,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu +@@ -1012,7 +1014,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu glib_compile_schemas = executable('glib-compile-schemas', ['glib-compile-schemas.c'], install : true, @@ -62,7 +62,7 @@ index 75686bb3e..2f1a73482 100644 install_tag : 'bin', # intl.lib is not compatible with SAFESEH link_args : noseh_link_args, -@@ -1018,6 +1020,7 @@ glib_compile_schemas = executable('glib-compile-schemas', +@@ -1021,6 +1023,7 @@ glib_compile_schemas = executable('glib-compile-schemas', glib_compile_resources = executable('glib-compile-resources', [gconstructor_as_data_h, 'glib-compile-resources.c'], install : true, @@ -71,10 +71,10 @@ index 75686bb3e..2f1a73482 100644 c_args : gio_c_args, # intl.lib is not compatible with SAFESEH diff --git a/gio/tests/meson.build b/gio/tests/meson.build -index 4ef3343ab..2a0a6b56b 100644 +index 232ecca5e..e292927ac 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build -@@ -1131,16 +1131,18 @@ if have_bash and have_pkg_config +@@ -1182,16 +1182,18 @@ if have_bash and have_pkg_config gio_binaries = [ 'gio', @@ -97,7 +97,7 @@ index 4ef3343ab..2a0a6b56b 100644 foreach binary: gio_binaries pkg_config_tests += [ -@@ -1149,6 +1151,13 @@ if have_bash and have_pkg_config +@@ -1200,6 +1202,13 @@ if have_bash and have_pkg_config prefix / get_option('bindir') / binary) ] endforeach @@ -112,13 +112,13 @@ index 4ef3343ab..2a0a6b56b 100644 foreach binary: gio_multiarch_binaries pkg_config_tests += [ diff --git a/glib/meson.build b/glib/meson.build -index c26a35e42..38effe12a 100644 +index d2efebadc..eb9fa5b2f 100644 --- a/glib/meson.build +++ b/glib/meson.build @@ -447,9 +447,10 @@ pkg.generate(libglib, + subdirs : ['glib-2.0'], + extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags, variables : [ - 'bindir=' + '${prefix}' / get_option('bindir'), - 'datadir=' + '${prefix}' / get_option('datadir'), - 'glib_genmarshal=' + '${bindir}' / 'glib-genmarshal', - 'gobject_query=' + '${bindir}' / 'gobject-query', - 'glib_mkenums=' + '${bindir}' / 'glib-mkenums', @@ -147,10 +147,10 @@ index c26a35e42..38effe12a 100644 configuration: report_conf, install_mode: 'rwxr-xr-x' diff --git a/glib/tests/meson.build b/glib/tests/meson.build -index 09ecd5ab3..9748d4122 100644 +index f6efc593a..5522dcb96 100644 --- a/glib/tests/meson.build +++ b/glib/tests/meson.build -@@ -508,9 +508,9 @@ if have_bash and have_pkg_config +@@ -568,9 +568,9 @@ if have_bash and have_pkg_config 'test "$(pkg-config --variable=datadir glib-2.0)" = "@0@"'.format( prefix / get_option('datadir')), 'test "$(pkg-config --variable=gobject_query glib-2.0)" = "@0@"'.format( @@ -184,7 +184,7 @@ index 2129aaf8a..da8462428 100644 dependencies : [libglib_dep, libgobject_dep]) diff --git a/meson_options.txt b/meson_options.txt -index 517d5757c..198cc1b3c 100644 +index 69a2135bc..cfe14bb09 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -4,6 +4,11 @@ option('runtime_libdir', diff --git a/pkgs/development/libraries/glibc/2.39-master.patch b/pkgs/development/libraries/glibc/2.39-master.patch index 3e0815573f5eb..b1d7d60411c81 100644 --- a/pkgs/development/libraries/glibc/2.39-master.patch +++ b/pkgs/development/libraries/glibc/2.39-master.patch @@ -6,14 +6,6 @@ Date: Wed Jan 31 02:12:43 2024 +0100 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> -diff --git a/ADVISORIES b/ADVISORIES -new file mode 100644 -index 0000000000..d4e33f2df3 ---- /dev/null -+++ b/ADVISORIES -@@ -0,0 +1,2 @@ -+For the GNU C Library Security Advisories, see the git master branch: -+https://sourceware.org/git/?p=glibc.git;a=tree;f=advisories;hb=HEAD diff --git a/advisories/GLIBC-SA-2023-0001 b/advisories/GLIBC-SA-2023-0001 deleted file mode 100644 index 3d19c91b6a..0000000000 @@ -564,3 +556,8521 @@ index 470676ab2b..2bc7124983 100644 -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include <support/test-driver.c> + +commit 1b9c1a0047fb26a65a9b2a7b8cd977243f7d353c +Author: Jakub Jelinek <jakub@redhat.com> +Date: Wed Jan 31 19:17:27 2024 +0100 + + Use gcc __builtin_stdc_* builtins in stdbit.h if possible + + The following patch uses the GCC 14 __builtin_stdc_* builtins in stdbit.h + for the type-generic macros, so that when compiled with GCC 14 or later, + it supports not just 8/16/32/64-bit unsigned integers, but also 128-bit + (if target supports them) and unsigned _BitInt (any supported precision). + And so that the macros don't expand arguments multiple times and can be + evaluated in constant expressions. + + The new testcase is gcc's gcc/testsuite/gcc.dg/builtin-stdc-bit-1.c + adjusted to test stdbit.h and the type-generic macros in there instead + of the builtins and adjusted to use glibc test framework rather than + gcc style tests with __builtin_abort (). + + Signed-off-by: Jakub Jelinek <jakub@redhat.com> + Reviewed-by: Joseph Myers <josmyers@redhat.com> + (cherry picked from commit da89496337b97e6a2aaf1e81d55cf998f6db1070) + +diff --git a/manual/stdbit.texi b/manual/stdbit.texi +index fe41c671d8..6c75ed9a20 100644 +--- a/manual/stdbit.texi ++++ b/manual/stdbit.texi +@@ -32,7 +32,13 @@ and @code{unsigned long long int}. In addition, there is a + corresponding type-generic macro (not listed below), named the same as + the functions but without any suffix such as @samp{_uc}. The + type-generic macro can only be used with an argument of an unsigned +-integer type with a width of 8, 16, 32 or 64 bits. ++integer type with a width of 8, 16, 32 or 64 bits, or when using ++a compiler with support for ++@uref{https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html,@code{__builtin_stdc_bit_ceil}}, ++etc.@:, built-in functions such as GCC 14.1 or later ++any unsigned integer type those built-in functions support. ++In GCC 14.1 that includes support for @code{unsigned __int128} and ++@code{unsigned _BitInt(@var{n})} if supported by the target. + + @deftypefun {unsigned int} stdc_leading_zeros_uc (unsigned char @var{x}) + @deftypefunx {unsigned int} stdc_leading_zeros_us (unsigned short @var{x}) +diff --git a/stdlib/Makefile b/stdlib/Makefile +index d587f054d1..9898cc5d8a 100644 +--- a/stdlib/Makefile ++++ b/stdlib/Makefile +@@ -308,6 +308,7 @@ tests := \ + tst-setcontext10 \ + tst-setcontext11 \ + tst-stdbit-Wconversion \ ++ tst-stdbit-builtins \ + tst-stdc_bit_ceil \ + tst-stdc_bit_floor \ + tst-stdc_bit_width \ +diff --git a/stdlib/stdbit.h b/stdlib/stdbit.h +index f334eb174d..2801590c63 100644 +--- a/stdlib/stdbit.h ++++ b/stdlib/stdbit.h +@@ -64,9 +64,13 @@ extern unsigned int stdc_leading_zeros_ul (unsigned long int __x) + __extension__ + extern unsigned int stdc_leading_zeros_ull (unsigned long long int __x) + __THROW __attribute_const__; +-#define stdc_leading_zeros(x) \ ++#if __glibc_has_builtin (__builtin_stdc_leading_zeros) ++# define stdc_leading_zeros(x) (__builtin_stdc_leading_zeros (x)) ++#else ++# define stdc_leading_zeros(x) \ + (stdc_leading_zeros_ull (x) \ + - (unsigned int) (8 * (sizeof (0ULL) - sizeof (x)))) ++#endif + + #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll) + static __always_inline unsigned int +@@ -116,9 +120,13 @@ extern unsigned int stdc_leading_ones_ul (unsigned long int __x) + __extension__ + extern unsigned int stdc_leading_ones_ull (unsigned long long int __x) + __THROW __attribute_const__; +-#define stdc_leading_ones(x) \ ++#if __glibc_has_builtin (__builtin_stdc_leading_ones) ++# define stdc_leading_ones(x) (__builtin_stdc_leading_ones (x)) ++#else ++# define stdc_leading_ones(x) \ + (stdc_leading_ones_ull ((unsigned long long int) (x) \ + << 8 * (sizeof (0ULL) - sizeof (x)))) ++#endif + + #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll) + static __always_inline unsigned int +@@ -168,11 +176,15 @@ extern unsigned int stdc_trailing_zeros_ul (unsigned long int __x) + __extension__ + extern unsigned int stdc_trailing_zeros_ull (unsigned long long int __x) + __THROW __attribute_const__; +-#define stdc_trailing_zeros(x) \ ++#if __glibc_has_builtin (__builtin_stdc_trailing_zeros) ++# define stdc_trailing_zeros(x) (__builtin_stdc_trailing_zeros (x)) ++#else ++# define stdc_trailing_zeros(x) \ + (sizeof (x) == 8 ? stdc_trailing_zeros_ull (x) \ + : sizeof (x) == 4 ? stdc_trailing_zeros_ui (x) \ + : sizeof (x) == 2 ? stdc_trailing_zeros_us (__pacify_uint16 (x)) \ + : stdc_trailing_zeros_uc (__pacify_uint8 (x))) ++#endif + + #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll) + static __always_inline unsigned int +@@ -222,7 +234,11 @@ extern unsigned int stdc_trailing_ones_ul (unsigned long int __x) + __extension__ + extern unsigned int stdc_trailing_ones_ull (unsigned long long int __x) + __THROW __attribute_const__; +-#define stdc_trailing_ones(x) (stdc_trailing_ones_ull (x)) ++#if __glibc_has_builtin (__builtin_stdc_trailing_ones) ++# define stdc_trailing_ones(x) (__builtin_stdc_trailing_ones (x)) ++#else ++# define stdc_trailing_ones(x) (stdc_trailing_ones_ull (x)) ++#endif + + #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll) + static __always_inline unsigned int +@@ -272,11 +288,15 @@ extern unsigned int stdc_first_leading_zero_ul (unsigned long int __x) + __extension__ + extern unsigned int stdc_first_leading_zero_ull (unsigned long long int __x) + __THROW __attribute_const__; +-#define stdc_first_leading_zero(x) \ ++#if __glibc_has_builtin (__builtin_stdc_first_leading_zero) ++# define stdc_first_leading_zero(x) (__builtin_stdc_first_leading_zero (x)) ++#else ++# define stdc_first_leading_zero(x) \ + (sizeof (x) == 8 ? stdc_first_leading_zero_ull (x) \ + : sizeof (x) == 4 ? stdc_first_leading_zero_ui (x) \ + : sizeof (x) == 2 ? stdc_first_leading_zero_us (__pacify_uint16 (x)) \ + : stdc_first_leading_zero_uc (__pacify_uint8 (x))) ++#endif + + #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll) + static __always_inline unsigned int +@@ -326,11 +346,15 @@ extern unsigned int stdc_first_leading_one_ul (unsigned long int __x) + __extension__ + extern unsigned int stdc_first_leading_one_ull (unsigned long long int __x) + __THROW __attribute_const__; +-#define stdc_first_leading_one(x) \ ++#if __glibc_has_builtin (__builtin_stdc_first_leading_one) ++# define stdc_first_leading_one(x) (__builtin_stdc_first_leading_one (x)) ++#else ++# define stdc_first_leading_one(x) \ + (sizeof (x) == 8 ? stdc_first_leading_one_ull (x) \ + : sizeof (x) == 4 ? stdc_first_leading_one_ui (x) \ + : sizeof (x) == 2 ? stdc_first_leading_one_us (__pacify_uint16 (x)) \ + : stdc_first_leading_one_uc (__pacify_uint8 (x))) ++#endif + + #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll) + static __always_inline unsigned int +@@ -380,11 +404,15 @@ extern unsigned int stdc_first_trailing_zero_ul (unsigned long int __x) + __extension__ + extern unsigned int stdc_first_trailing_zero_ull (unsigned long long int __x) + __THROW __attribute_const__; +-#define stdc_first_trailing_zero(x) \ ++#if __glibc_has_builtin (__builtin_stdc_first_trailing_zero) ++# define stdc_first_trailing_zero(x) (__builtin_stdc_first_trailing_zero (x)) ++#else ++# define stdc_first_trailing_zero(x) \ + (sizeof (x) == 8 ? stdc_first_trailing_zero_ull (x) \ + : sizeof (x) == 4 ? stdc_first_trailing_zero_ui (x) \ + : sizeof (x) == 2 ? stdc_first_trailing_zero_us (__pacify_uint16 (x)) \ + : stdc_first_trailing_zero_uc (__pacify_uint8 (x))) ++#endif + + #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll) + static __always_inline unsigned int +@@ -434,11 +462,15 @@ extern unsigned int stdc_first_trailing_one_ul (unsigned long int __x) + __extension__ + extern unsigned int stdc_first_trailing_one_ull (unsigned long long int __x) + __THROW __attribute_const__; +-#define stdc_first_trailing_one(x) \ ++#if __glibc_has_builtin (__builtin_stdc_first_trailing_one) ++# define stdc_first_trailing_one(x) (__builtin_stdc_first_trailing_one (x)) ++#else ++# define stdc_first_trailing_one(x) \ + (sizeof (x) == 8 ? stdc_first_trailing_one_ull (x) \ + : sizeof (x) == 4 ? stdc_first_trailing_one_ui (x) \ + : sizeof (x) == 2 ? stdc_first_trailing_one_us (__pacify_uint16 (x)) \ + : stdc_first_trailing_one_uc (__pacify_uint8 (x))) ++#endif + + #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll) + static __always_inline unsigned int +@@ -488,9 +520,13 @@ extern unsigned int stdc_count_zeros_ul (unsigned long int __x) + __extension__ + extern unsigned int stdc_count_zeros_ull (unsigned long long int __x) + __THROW __attribute_const__; +-#define stdc_count_zeros(x) \ ++#if __glibc_has_builtin (__builtin_stdc_count_zeros) ++# define stdc_count_zeros(x) (__builtin_stdc_count_zeros (x)) ++#else ++# define stdc_count_zeros(x) \ + (stdc_count_zeros_ull (x) \ + - (unsigned int) (8 * (sizeof (0ULL) - sizeof (x)))) ++#endif + + #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_popcountll) + static __always_inline unsigned int +@@ -540,7 +576,11 @@ extern unsigned int stdc_count_ones_ul (unsigned long int __x) + __extension__ + extern unsigned int stdc_count_ones_ull (unsigned long long int __x) + __THROW __attribute_const__; +-#define stdc_count_ones(x) (stdc_count_ones_ull (x)) ++#if __glibc_has_builtin (__builtin_stdc_count_ones) ++# define stdc_count_ones(x) (__builtin_stdc_count_ones (x)) ++#else ++# define stdc_count_ones(x) (stdc_count_ones_ull (x)) ++#endif + + #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_popcountll) + static __always_inline unsigned int +@@ -590,10 +630,14 @@ extern bool stdc_has_single_bit_ul (unsigned long int __x) + __extension__ + extern bool stdc_has_single_bit_ull (unsigned long long int __x) + __THROW __attribute_const__; +-#define stdc_has_single_bit(x) \ ++#if __glibc_has_builtin (__builtin_stdc_has_single_bit) ++# define stdc_has_single_bit(x) (__builtin_stdc_has_single_bit (x)) ++#else ++# define stdc_has_single_bit(x) \ + ((bool) (sizeof (x) <= sizeof (unsigned int) \ + ? stdc_has_single_bit_ui (x) \ + : stdc_has_single_bit_ull (x))) ++#endif + + static __always_inline bool + __hsb64_inline (uint64_t __x) +@@ -641,7 +685,11 @@ extern unsigned int stdc_bit_width_ul (unsigned long int __x) + __extension__ + extern unsigned int stdc_bit_width_ull (unsigned long long int __x) + __THROW __attribute_const__; +-#define stdc_bit_width(x) (stdc_bit_width_ull (x)) ++#if __glibc_has_builtin (__builtin_stdc_bit_width) ++# define stdc_bit_width(x) (__builtin_stdc_bit_width (x)) ++#else ++# define stdc_bit_width(x) (stdc_bit_width_ull (x)) ++#endif + + #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll) + static __always_inline unsigned int +@@ -691,7 +739,11 @@ extern unsigned long int stdc_bit_floor_ul (unsigned long int __x) + __extension__ + extern unsigned long long int stdc_bit_floor_ull (unsigned long long int __x) + __THROW __attribute_const__; +-#define stdc_bit_floor(x) ((__typeof (x)) stdc_bit_floor_ull (x)) ++#if __glibc_has_builtin (__builtin_stdc_bit_floor) ++# define stdc_bit_floor(x) (__builtin_stdc_bit_floor (x)) ++#else ++# define stdc_bit_floor(x) ((__typeof (x)) stdc_bit_floor_ull (x)) ++#endif + + #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll) + static __always_inline uint64_t +@@ -743,7 +795,11 @@ extern unsigned long int stdc_bit_ceil_ul (unsigned long int __x) + __extension__ + extern unsigned long long int stdc_bit_ceil_ull (unsigned long long int __x) + __THROW __attribute_const__; +-#define stdc_bit_ceil(x) ((__typeof (x)) stdc_bit_ceil_ull (x)) ++#if __glibc_has_builtin (__builtin_stdc_bit_ceil) ++# define stdc_bit_ceil(x) (__builtin_stdc_bit_ceil (x)) ++#else ++# define stdc_bit_ceil(x) ((__typeof (x)) stdc_bit_ceil_ull (x)) ++#endif + + #if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll) + static __always_inline uint64_t +diff --git a/stdlib/tst-stdbit-builtins.c b/stdlib/tst-stdbit-builtins.c +new file mode 100644 +index 0000000000..536841ca8a +--- /dev/null ++++ b/stdlib/tst-stdbit-builtins.c +@@ -0,0 +1,778 @@ ++/* Test <stdbit.h> type-generic macros with compiler __builtin_stdc_* support. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <stdbit.h> ++#include <limits.h> ++#include <support/check.h> ++ ++#if __glibc_has_builtin (__builtin_stdc_leading_zeros) \ ++ && __glibc_has_builtin (__builtin_stdc_leading_ones) \ ++ && __glibc_has_builtin (__builtin_stdc_trailing_zeros) \ ++ && __glibc_has_builtin (__builtin_stdc_trailing_ones) \ ++ && __glibc_has_builtin (__builtin_stdc_first_leading_zero) \ ++ && __glibc_has_builtin (__builtin_stdc_first_leading_one) \ ++ && __glibc_has_builtin (__builtin_stdc_first_trailing_zero) \ ++ && __glibc_has_builtin (__builtin_stdc_first_trailing_one) \ ++ && __glibc_has_builtin (__builtin_stdc_count_zeros) \ ++ && __glibc_has_builtin (__builtin_stdc_count_ones) \ ++ && __glibc_has_builtin (__builtin_stdc_has_single_bit) \ ++ && __glibc_has_builtin (__builtin_stdc_bit_width) \ ++ && __glibc_has_builtin (__builtin_stdc_bit_floor) \ ++ && __glibc_has_builtin (__builtin_stdc_bit_ceil) ++ ++# if !defined (BITINT_MAXWIDTH) && defined (__BITINT_MAXWIDTH__) ++# define BITINT_MAXWIDTH __BITINT_MAXWIDTH__ ++# endif ++ ++typedef unsigned char uc; ++typedef unsigned short us; ++typedef unsigned int ui; ++typedef unsigned long int ul; ++typedef unsigned long long int ull; ++ ++# define expr_has_type(e, t) _Generic (e, default : 0, t : 1) ++ ++static int ++do_test (void) ++{ ++ TEST_COMPARE (stdc_leading_zeros ((uc) 0), CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_leading_zeros ((uc) 0), ui), 1); ++ TEST_COMPARE (stdc_leading_zeros ((us) 0), sizeof (short) * CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_leading_zeros ((us) 0), ui), 1); ++ TEST_COMPARE (stdc_leading_zeros (0U), sizeof (int) * CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_leading_zeros (0U), ui), 1); ++ TEST_COMPARE (stdc_leading_zeros (0UL), sizeof (long int) * CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_leading_zeros (0UL), ui), 1); ++ TEST_COMPARE (stdc_leading_zeros (0ULL), sizeof (long long int) * CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_leading_zeros (0ULL), ui), 1); ++ TEST_COMPARE (stdc_leading_zeros ((uc) ~0U), 0); ++ TEST_COMPARE (stdc_leading_zeros ((us) ~0U), 0); ++ TEST_COMPARE (stdc_leading_zeros (~0U), 0); ++ TEST_COMPARE (stdc_leading_zeros (~0UL), 0); ++ TEST_COMPARE (stdc_leading_zeros (~0ULL), 0); ++ TEST_COMPARE (stdc_leading_zeros ((uc) 3), CHAR_BIT - 2); ++ TEST_COMPARE (stdc_leading_zeros ((us) 9), sizeof (short) * CHAR_BIT - 4); ++ TEST_COMPARE (stdc_leading_zeros (34U), sizeof (int) * CHAR_BIT - 6); ++ TEST_COMPARE (stdc_leading_zeros (130UL), sizeof (long int) * CHAR_BIT - 8); ++ TEST_COMPARE (stdc_leading_zeros (512ULL), ++ sizeof (long long int) * CHAR_BIT - 10); ++ TEST_COMPARE (stdc_leading_ones ((uc) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_leading_ones ((uc) 0), ui), 1); ++ TEST_COMPARE (stdc_leading_ones ((us) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_leading_ones ((us) 0), ui), 1); ++ TEST_COMPARE (stdc_leading_ones (0U), 0); ++ TEST_COMPARE (expr_has_type (stdc_leading_ones (0U), ui), 1); ++ TEST_COMPARE (stdc_leading_ones (0UL), 0); ++ TEST_COMPARE (expr_has_type (stdc_leading_ones (0UL), ui), 1); ++ TEST_COMPARE (stdc_leading_ones (0ULL), 0); ++ TEST_COMPARE (expr_has_type (stdc_leading_ones (0ULL), ui), 1); ++ TEST_COMPARE (stdc_leading_ones ((uc) ~0U), CHAR_BIT); ++ TEST_COMPARE (stdc_leading_ones ((us) ~0U), sizeof (short) * CHAR_BIT); ++ TEST_COMPARE (stdc_leading_ones (~0U), sizeof (int) * CHAR_BIT); ++ TEST_COMPARE (stdc_leading_ones (~0UL), sizeof (long int) * CHAR_BIT); ++ TEST_COMPARE (stdc_leading_ones (~0ULL), sizeof (long long int) * CHAR_BIT); ++ TEST_COMPARE (stdc_leading_ones ((uc) ~3), CHAR_BIT - 2); ++ TEST_COMPARE (stdc_leading_ones ((us) ~9), sizeof (short) * CHAR_BIT - 4); ++ TEST_COMPARE (stdc_leading_ones (~34U), sizeof (int) * CHAR_BIT - 6); ++ TEST_COMPARE (stdc_leading_ones (~130UL), sizeof (long int) * CHAR_BIT - 8); ++ TEST_COMPARE (stdc_leading_ones (~512ULL), ++ sizeof (long long int) * CHAR_BIT - 10); ++ TEST_COMPARE (stdc_trailing_zeros ((uc) 0), CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_trailing_zeros ((uc) 0), ui), 1); ++ TEST_COMPARE (stdc_trailing_zeros ((us) 0), sizeof (short) * CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_trailing_zeros ((us) 0), ui), 1); ++ TEST_COMPARE (stdc_trailing_zeros (0U), sizeof (int) * CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_trailing_zeros (0U), ui), 1); ++ TEST_COMPARE (stdc_trailing_zeros (0UL), sizeof (long int) * CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_trailing_zeros (0UL), ui), 1); ++ TEST_COMPARE (stdc_trailing_zeros (0ULL), sizeof (long long int) * CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_trailing_zeros (0ULL), ui), 1); ++ TEST_COMPARE (stdc_trailing_zeros ((uc) ~0U), 0); ++ TEST_COMPARE (stdc_trailing_zeros ((us) ~0U), 0); ++ TEST_COMPARE (stdc_trailing_zeros (~0U), 0); ++ TEST_COMPARE (stdc_trailing_zeros (~0UL), 0); ++ TEST_COMPARE (stdc_trailing_zeros (~0ULL), 0); ++ TEST_COMPARE (stdc_trailing_zeros ((uc) 2), 1); ++ TEST_COMPARE (stdc_trailing_zeros ((us) 24), 3); ++ TEST_COMPARE (stdc_trailing_zeros (32U), 5); ++ TEST_COMPARE (stdc_trailing_zeros (128UL), 7); ++ TEST_COMPARE (stdc_trailing_zeros (512ULL), 9); ++ TEST_COMPARE (stdc_trailing_ones ((uc) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_trailing_ones ((uc) 0), ui), 1); ++ TEST_COMPARE (stdc_trailing_ones ((us) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_trailing_ones ((us) 0), ui), 1); ++ TEST_COMPARE (stdc_trailing_ones (0U), 0); ++ TEST_COMPARE (expr_has_type (stdc_trailing_ones (0U), ui), 1); ++ TEST_COMPARE (stdc_trailing_ones (0UL), 0); ++ TEST_COMPARE (expr_has_type (stdc_trailing_ones (0UL), ui), 1); ++ TEST_COMPARE (stdc_trailing_ones (0ULL), 0); ++ TEST_COMPARE (expr_has_type (stdc_trailing_ones (0ULL), ui), 1); ++ TEST_COMPARE (stdc_trailing_ones ((uc) ~0U), CHAR_BIT); ++ TEST_COMPARE (stdc_trailing_ones ((us) ~0U), sizeof (short) * CHAR_BIT); ++ TEST_COMPARE (stdc_trailing_ones (~0U), sizeof (int) * CHAR_BIT); ++ TEST_COMPARE (stdc_trailing_ones (~0UL), sizeof (long int) * CHAR_BIT); ++ TEST_COMPARE (stdc_trailing_ones (~0ULL), sizeof (long long int) * CHAR_BIT); ++ TEST_COMPARE (stdc_trailing_ones ((uc) 5), 1); ++ TEST_COMPARE (stdc_trailing_ones ((us) 15), 4); ++ TEST_COMPARE (stdc_trailing_ones (127U), 7); ++ TEST_COMPARE (stdc_trailing_ones (511UL), 9); ++ TEST_COMPARE (stdc_trailing_ones (~0ULL >> 2), ++ sizeof (long long int) * CHAR_BIT - 2); ++ TEST_COMPARE (stdc_first_leading_zero ((uc) 0), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_zero ((uc) 0), ui), 1); ++ TEST_COMPARE (stdc_first_leading_zero ((us) 0), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_zero ((us) 0), ui), 1); ++ TEST_COMPARE (stdc_first_leading_zero (0U), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_zero (0U), ui), 1); ++ TEST_COMPARE (stdc_first_leading_zero (0UL), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_zero (0UL), ui), 1); ++ TEST_COMPARE (stdc_first_leading_zero (0ULL), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_zero (0ULL), ui), 1); ++ TEST_COMPARE (stdc_first_leading_zero ((uc) ~0U), 0); ++ TEST_COMPARE (stdc_first_leading_zero ((us) ~0U), 0); ++ TEST_COMPARE (stdc_first_leading_zero (~0U), 0); ++ TEST_COMPARE (stdc_first_leading_zero (~0UL), 0); ++ TEST_COMPARE (stdc_first_leading_zero (~0ULL), 0); ++ TEST_COMPARE (stdc_first_leading_zero ((uc) ~3U), CHAR_BIT - 1); ++ TEST_COMPARE (stdc_first_leading_zero ((us) ~15U), ++ sizeof (short) * CHAR_BIT - 3); ++ TEST_COMPARE (stdc_first_leading_zero (~63U), sizeof (int) * CHAR_BIT - 5); ++ TEST_COMPARE (stdc_first_leading_zero (~255UL), ++ sizeof (long int) * CHAR_BIT - 7); ++ TEST_COMPARE (stdc_first_leading_zero (~1023ULL), ++ sizeof (long long int) * CHAR_BIT - 9); ++ TEST_COMPARE (stdc_first_leading_one ((uc) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_one ((uc) 0), ui), 1); ++ TEST_COMPARE (stdc_first_leading_one ((us) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_one ((us) 0), ui), 1); ++ TEST_COMPARE (stdc_first_leading_one (0U), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_one (0U), ui), 1); ++ TEST_COMPARE (stdc_first_leading_one (0UL), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_one (0UL), ui), 1); ++ TEST_COMPARE (stdc_first_leading_one (0ULL), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_one (0ULL), ui), 1); ++ TEST_COMPARE (stdc_first_leading_one ((uc) ~0U), 1); ++ TEST_COMPARE (stdc_first_leading_one ((us) ~0U), 1); ++ TEST_COMPARE (stdc_first_leading_one (~0U), 1); ++ TEST_COMPARE (stdc_first_leading_one (~0UL), 1); ++ TEST_COMPARE (stdc_first_leading_one (~0ULL), 1); ++ TEST_COMPARE (stdc_first_leading_one ((uc) 3), CHAR_BIT - 1); ++ TEST_COMPARE (stdc_first_leading_one ((us) 9), ++ sizeof (short) * CHAR_BIT - 3); ++ TEST_COMPARE (stdc_first_leading_one (34U), sizeof (int) * CHAR_BIT - 5); ++ TEST_COMPARE (stdc_first_leading_one (130UL), ++ sizeof (long int) * CHAR_BIT - 7); ++ TEST_COMPARE (stdc_first_leading_one (512ULL), ++ sizeof (long long int) * CHAR_BIT - 9); ++ TEST_COMPARE (stdc_first_trailing_zero ((uc) 0), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_zero ((uc) 0), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_zero ((us) 0), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_zero ((us) 0), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_zero (0U), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_zero (0U), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_zero (0UL), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_zero (0UL), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_zero (0ULL), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_zero (0ULL), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_zero ((uc) ~0U), 0); ++ TEST_COMPARE (stdc_first_trailing_zero ((us) ~0U), 0); ++ TEST_COMPARE (stdc_first_trailing_zero (~0U), 0); ++ TEST_COMPARE (stdc_first_trailing_zero (~0UL), 0); ++ TEST_COMPARE (stdc_first_trailing_zero (~0ULL), 0); ++ TEST_COMPARE (stdc_first_trailing_zero ((uc) 2), 1); ++ TEST_COMPARE (stdc_first_trailing_zero ((us) 15), 5); ++ TEST_COMPARE (stdc_first_trailing_zero (63U), 7); ++ TEST_COMPARE (stdc_first_trailing_zero (128UL), 1); ++ TEST_COMPARE (stdc_first_trailing_zero (511ULL), 10); ++ TEST_COMPARE (stdc_first_trailing_one ((uc) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_one ((uc) 0), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_one ((us) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_one ((us) 0), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_one (0U), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_one (0U), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_one (0UL), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_one (0UL), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_one (0ULL), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_one (0ULL), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_one ((uc) ~0U), 1); ++ TEST_COMPARE (stdc_first_trailing_one ((us) ~0U), 1); ++ TEST_COMPARE (stdc_first_trailing_one (~0U), 1); ++ TEST_COMPARE (stdc_first_trailing_one (~0UL), 1); ++ TEST_COMPARE (stdc_first_trailing_one (~0ULL), 1); ++ TEST_COMPARE (stdc_first_trailing_one ((uc) 4), 3); ++ TEST_COMPARE (stdc_first_trailing_one ((us) 96), 6); ++ TEST_COMPARE (stdc_first_trailing_one (127U), 1); ++ TEST_COMPARE (stdc_first_trailing_one (511UL), 1); ++ TEST_COMPARE (stdc_first_trailing_one (~0ULL << 12), 13); ++ TEST_COMPARE (stdc_count_zeros ((uc) 0), CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_count_zeros ((uc) 0), ui), 1); ++ TEST_COMPARE (stdc_count_zeros ((us) 0), sizeof (short) * CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_count_zeros ((us) 0), ui), 1); ++ TEST_COMPARE (stdc_count_zeros (0U), sizeof (int) * CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_count_zeros (0U), ui), 1); ++ TEST_COMPARE (stdc_count_zeros (0UL), sizeof (long int) * CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_count_zeros (0UL), ui), 1); ++ TEST_COMPARE (stdc_count_zeros (0ULL), sizeof (long long int) * CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_count_zeros (0ULL), ui), 1); ++ TEST_COMPARE (stdc_count_zeros ((uc) ~0U), 0); ++ TEST_COMPARE (stdc_count_zeros ((us) ~0U), 0); ++ TEST_COMPARE (stdc_count_zeros (~0U), 0); ++ TEST_COMPARE (stdc_count_zeros (~0UL), 0); ++ TEST_COMPARE (stdc_count_zeros (~0ULL), 0); ++ TEST_COMPARE (stdc_count_zeros ((uc) 1U), CHAR_BIT - 1); ++ TEST_COMPARE (stdc_count_zeros ((us) 42), sizeof (short) * CHAR_BIT - 3); ++ TEST_COMPARE (stdc_count_zeros (291U), sizeof (int) * CHAR_BIT - 4); ++ TEST_COMPARE (stdc_count_zeros (~1315UL), 5); ++ TEST_COMPARE (stdc_count_zeros (3363ULL), ++ sizeof (long long int) * CHAR_BIT - 6); ++ TEST_COMPARE (stdc_count_ones ((uc) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_count_ones ((uc) 0), ui), 1); ++ TEST_COMPARE (stdc_count_ones ((us) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_count_ones ((us) 0), ui), 1); ++ TEST_COMPARE (stdc_count_ones (0U), 0); ++ TEST_COMPARE (expr_has_type (stdc_count_ones (0U), ui), 1); ++ TEST_COMPARE (stdc_count_ones (0UL), 0); ++ TEST_COMPARE (expr_has_type (stdc_count_ones (0UL), ui), 1); ++ TEST_COMPARE (stdc_count_ones (0ULL), 0); ++ TEST_COMPARE (expr_has_type (stdc_count_ones (0ULL), ui), 1); ++ TEST_COMPARE (stdc_count_ones ((uc) ~0U), CHAR_BIT); ++ TEST_COMPARE (stdc_count_ones ((us) ~0U), sizeof (short) * CHAR_BIT); ++ TEST_COMPARE (stdc_count_ones (~0U), sizeof (int) * CHAR_BIT); ++ TEST_COMPARE (stdc_count_ones (~0UL), sizeof (long int) * CHAR_BIT); ++ TEST_COMPARE (stdc_count_ones (~0ULL), sizeof (long long int) * CHAR_BIT); ++ TEST_COMPARE (stdc_count_ones ((uc) ~1U), CHAR_BIT - 1); ++ TEST_COMPARE (stdc_count_ones ((us) ~42), sizeof (short) * CHAR_BIT - 3); ++ TEST_COMPARE (stdc_count_ones (~291U), sizeof (int) * CHAR_BIT - 4); ++ TEST_COMPARE (stdc_count_ones (1315UL), 5); ++ TEST_COMPARE (stdc_count_ones (~3363ULL), ++ sizeof (long long int) * CHAR_BIT - 6); ++ TEST_COMPARE (stdc_has_single_bit ((uc) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_has_single_bit ((uc) 0), _Bool), 1); ++ TEST_COMPARE (stdc_has_single_bit ((us) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_has_single_bit ((us) 0), _Bool), 1); ++ TEST_COMPARE (stdc_has_single_bit (0U), 0); ++ TEST_COMPARE (expr_has_type (stdc_has_single_bit (0U), _Bool), 1); ++ TEST_COMPARE (stdc_has_single_bit (0UL), 0); ++ TEST_COMPARE (expr_has_type (stdc_has_single_bit (0UL), _Bool), 1); ++ TEST_COMPARE (stdc_has_single_bit (0ULL), 0); ++ TEST_COMPARE (expr_has_type (stdc_has_single_bit (0ULL), _Bool), 1); ++ TEST_COMPARE (stdc_has_single_bit ((uc) 2), 1); ++ TEST_COMPARE (stdc_has_single_bit ((us) 8), 1); ++ TEST_COMPARE (stdc_has_single_bit (32U), 1); ++ TEST_COMPARE (stdc_has_single_bit (128UL), 1); ++ TEST_COMPARE (stdc_has_single_bit (512ULL), 1); ++ TEST_COMPARE (stdc_has_single_bit ((uc) 7), 0); ++ TEST_COMPARE (stdc_has_single_bit ((us) 96), 0); ++ TEST_COMPARE (stdc_has_single_bit (513U), 0); ++ TEST_COMPARE (stdc_has_single_bit (1022UL), 0); ++ TEST_COMPARE (stdc_has_single_bit (12ULL), 0); ++ TEST_COMPARE (stdc_bit_width ((uc) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_width ((uc) 0), ui), 1); ++ TEST_COMPARE (stdc_bit_width ((us) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_width ((us) 0), ui), 1); ++ TEST_COMPARE (stdc_bit_width (0U), 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_width (0U), ui), 1); ++ TEST_COMPARE (stdc_bit_width (0UL), 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_width (0UL), ui), 1); ++ TEST_COMPARE (stdc_bit_width (0ULL), 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_width (0ULL), ui), 1); ++ TEST_COMPARE (stdc_bit_width ((uc) ~0U), CHAR_BIT); ++ TEST_COMPARE (stdc_bit_width ((us) ~0U), sizeof (short) * CHAR_BIT); ++ TEST_COMPARE (stdc_bit_width (~0U), sizeof (int) * CHAR_BIT); ++ TEST_COMPARE (stdc_bit_width (~0UL), sizeof (long int) * CHAR_BIT); ++ TEST_COMPARE (stdc_bit_width (~0ULL), sizeof (long long int) * CHAR_BIT); ++ TEST_COMPARE (stdc_bit_width ((uc) ((uc) ~0U >> 1)), CHAR_BIT - 1); ++ TEST_COMPARE (stdc_bit_width ((uc) 6), 3); ++ TEST_COMPARE (stdc_bit_width ((us) 12U), 4); ++ TEST_COMPARE (stdc_bit_width ((us) ((us) ~0U >> 5)), ++ sizeof (short) * CHAR_BIT - 5); ++ TEST_COMPARE (stdc_bit_width (137U), 8); ++ TEST_COMPARE (stdc_bit_width (269U), 9); ++ TEST_COMPARE (stdc_bit_width (39UL), 6); ++ TEST_COMPARE (stdc_bit_width (~0UL >> 2), sizeof (long int) * CHAR_BIT - 2); ++ TEST_COMPARE (stdc_bit_width (1023ULL), 10); ++ TEST_COMPARE (stdc_bit_width (1024ULL), 11); ++ TEST_COMPARE (stdc_bit_floor ((uc) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_floor ((uc) 0), uc), 1); ++ TEST_COMPARE (stdc_bit_floor ((us) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_floor ((us) 0), us), 1); ++ TEST_COMPARE (stdc_bit_floor (0U), 0U); ++ TEST_COMPARE (expr_has_type (stdc_bit_floor (0U), ui), 1); ++ TEST_COMPARE (stdc_bit_floor (0UL), 0UL); ++ TEST_COMPARE (expr_has_type (stdc_bit_floor (0UL), ul), 1); ++ TEST_COMPARE (stdc_bit_floor (0ULL), 0ULL); ++ TEST_COMPARE (expr_has_type (stdc_bit_floor (0ULL), ull), 1); ++ TEST_COMPARE (stdc_bit_floor ((uc) ~0U), (1U << (CHAR_BIT - 1))); ++ TEST_COMPARE (stdc_bit_floor ((us) ~0U), ++ (1U << (sizeof (short) * CHAR_BIT - 1))); ++ TEST_COMPARE (stdc_bit_floor (~0U), (1U << (sizeof (int) * CHAR_BIT - 1))); ++ TEST_COMPARE (stdc_bit_floor (~0UL), ++ (1UL << (sizeof (long int) * CHAR_BIT - 1))); ++ TEST_COMPARE (stdc_bit_floor (~0ULL), ++ (1ULL << (sizeof (long long int) * CHAR_BIT - 1))); ++ TEST_COMPARE (stdc_bit_floor ((uc) 4), 4); ++ TEST_COMPARE (stdc_bit_floor ((uc) 7), 4); ++ TEST_COMPARE (stdc_bit_floor ((us) 8U), 8); ++ TEST_COMPARE (stdc_bit_floor ((us) 31U), 16); ++ TEST_COMPARE (stdc_bit_floor (137U), 128U); ++ TEST_COMPARE (stdc_bit_floor (269U), 256U); ++ TEST_COMPARE (stdc_bit_floor (511UL), 256UL); ++ TEST_COMPARE (stdc_bit_floor (512UL), 512UL); ++ TEST_COMPARE (stdc_bit_floor (513UL), 512ULL); ++ TEST_COMPARE (stdc_bit_floor (1024ULL), 1024ULL); ++ TEST_COMPARE (stdc_bit_ceil ((uc) 0), 1); ++ TEST_COMPARE (expr_has_type (stdc_bit_ceil ((uc) 0), uc), 1); ++ TEST_COMPARE (stdc_bit_ceil ((us) 0), 1); ++ TEST_COMPARE (expr_has_type (stdc_bit_ceil ((us) 0), us), 1); ++ TEST_COMPARE (stdc_bit_ceil (0U), 1U); ++ TEST_COMPARE (expr_has_type (stdc_bit_ceil (0U), ui), 1); ++ TEST_COMPARE (stdc_bit_ceil (0UL), 1UL); ++ TEST_COMPARE (expr_has_type (stdc_bit_ceil (0UL), ul), 1); ++ TEST_COMPARE (stdc_bit_ceil (0ULL), 1ULL); ++ TEST_COMPARE (expr_has_type (stdc_bit_ceil (0ULL), ull), 1); ++ TEST_COMPARE (stdc_bit_ceil ((uc) ~0U), 0); ++ TEST_COMPARE (stdc_bit_ceil ((us) ~0U), 0); ++ TEST_COMPARE (stdc_bit_ceil (~0U), 0U); ++ TEST_COMPARE (stdc_bit_ceil (~0UL), 0UL); ++ TEST_COMPARE (stdc_bit_ceil (~0ULL), 0ULL); ++ TEST_COMPARE (stdc_bit_ceil ((uc) ((uc) ~0U >> 1)), (1U << (CHAR_BIT - 1))); ++ TEST_COMPARE (stdc_bit_ceil ((uc) ((uc) ~0U >> 1)), (1U << (CHAR_BIT - 1))); ++ TEST_COMPARE (stdc_bit_ceil ((us) ((us) ~0U >> 1)), ++ (1U << (sizeof (short) * CHAR_BIT - 1))); ++ TEST_COMPARE (stdc_bit_ceil ((us) ((us) ~0U >> 1)), ++ (1U << (sizeof (short) * CHAR_BIT - 1))); ++ TEST_COMPARE (stdc_bit_ceil (~0U >> 1), ++ (1U << (sizeof (int) * CHAR_BIT - 1))); ++ TEST_COMPARE (stdc_bit_ceil (1U << (sizeof (int) * CHAR_BIT - 1)), ++ (1U << (sizeof (int) * CHAR_BIT - 1))); ++ TEST_COMPARE (stdc_bit_ceil (~0UL >> 1), ++ (1UL << (sizeof (long int) * CHAR_BIT - 1))); ++ TEST_COMPARE (stdc_bit_ceil (~0UL >> 1), ++ (1UL << (sizeof (long int) * CHAR_BIT - 1))); ++ TEST_COMPARE (stdc_bit_ceil (1ULL ++ << (sizeof (long long int) * CHAR_BIT - 1)), ++ (1ULL << (sizeof (long long int) * CHAR_BIT - 1))); ++ TEST_COMPARE (stdc_bit_ceil (~0ULL >> 1), ++ (1ULL << (sizeof (long long int) * CHAR_BIT - 1))); ++ TEST_COMPARE (stdc_bit_ceil ((uc) 1), 1); ++ TEST_COMPARE (stdc_bit_ceil ((uc) 2), 2); ++ TEST_COMPARE (stdc_bit_ceil ((us) 3U), 4); ++ TEST_COMPARE (stdc_bit_ceil ((us) 4U), 4); ++ TEST_COMPARE (stdc_bit_ceil (5U), 8U); ++ TEST_COMPARE (stdc_bit_ceil (269U), 512U); ++ TEST_COMPARE (stdc_bit_ceil (511UL), 512UL); ++ TEST_COMPARE (stdc_bit_ceil (512UL), 512UL); ++ TEST_COMPARE (stdc_bit_ceil (513ULL), 1024ULL); ++ TEST_COMPARE (stdc_bit_ceil (1025ULL), 2048ULL); ++# ifdef __SIZEOF_INT128__ ++ TEST_COMPARE (stdc_leading_zeros ((unsigned __int128) 0), ++ sizeof (__int128) * CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_leading_zeros ((unsigned __int128) 0), ui), ++ 1); ++ TEST_COMPARE (stdc_leading_zeros (~(unsigned __int128) 0), 0); ++ TEST_COMPARE (stdc_leading_ones ((unsigned __int128) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_leading_ones ((unsigned __int128) 0), ui), ++ 1); ++ TEST_COMPARE (stdc_leading_ones (~(unsigned __int128) 0), ++ sizeof (__int128) * CHAR_BIT); ++ TEST_COMPARE (stdc_trailing_zeros ((unsigned __int128) 0), ++ sizeof (__int128) * CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_trailing_zeros ((unsigned __int128) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_trailing_zeros (~(unsigned __int128) 0), 0); ++ TEST_COMPARE (stdc_trailing_ones ((unsigned __int128) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_trailing_ones ((unsigned __int128) 0), ui), ++ 1); ++ TEST_COMPARE (stdc_trailing_ones (~(unsigned __int128) 0), ++ sizeof (__int128) * CHAR_BIT); ++ TEST_COMPARE (stdc_first_leading_zero ((unsigned __int128) 0), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_zero ((unsigned __int128) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_first_leading_zero (~(unsigned __int128) 0), 0); ++ TEST_COMPARE (stdc_first_leading_one ((unsigned __int128) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_one ((unsigned __int128) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_first_leading_one (~(unsigned __int128) 0), 1); ++ TEST_COMPARE (stdc_first_trailing_zero ((unsigned __int128) 0), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_zero ((unsigned __int128) ++ 0), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_zero (~(unsigned __int128) 0), 0); ++ TEST_COMPARE (stdc_first_trailing_one ((unsigned __int128) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_one ((unsigned __int128) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_first_trailing_one (~(unsigned __int128) 0), 1); ++ TEST_COMPARE (stdc_count_zeros ((unsigned __int128) 0), ++ sizeof (__int128) * CHAR_BIT); ++ TEST_COMPARE (expr_has_type (stdc_count_zeros ((unsigned __int128) 0), ui), ++ 1); ++ TEST_COMPARE (stdc_count_zeros (~(unsigned __int128) 0), 0); ++ TEST_COMPARE (stdc_count_ones ((unsigned __int128) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_count_ones ((unsigned __int128) 0), ui), ++ 1); ++ TEST_COMPARE (stdc_count_ones (~(unsigned __int128) 0), ++ sizeof (__int128) * CHAR_BIT); ++ TEST_COMPARE (stdc_has_single_bit ((unsigned __int128) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_has_single_bit ((unsigned __int128) 0), ++ _Bool), 1); ++ TEST_COMPARE (stdc_has_single_bit (~(unsigned __int128) 0), 0); ++ TEST_COMPARE (stdc_bit_width ((unsigned __int128) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_width ((unsigned __int128) 0), ui), 1); ++ TEST_COMPARE (stdc_bit_width (~(unsigned __int128) 0), ++ sizeof (__int128) * CHAR_BIT); ++ TEST_COMPARE (stdc_bit_floor ((unsigned __int128) 0) != 0, 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_floor ((unsigned __int128) 0), ++ unsigned __int128), 1); ++ TEST_COMPARE (stdc_bit_floor (~(unsigned __int128) 0) ++ != ((unsigned __int128) 1) << (sizeof (__int128) ++ * CHAR_BIT - 1), 0); ++ TEST_COMPARE (stdc_bit_ceil ((unsigned __int128) 0) != 1, 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_ceil ((unsigned __int128) 0), ++ unsigned __int128), 1); ++ TEST_COMPARE (stdc_bit_ceil ((unsigned __int128) 1) != 1, 0); ++ TEST_COMPARE (stdc_bit_ceil ((~(unsigned __int128) 0) >> 1) ++ != ((unsigned __int128) 1) << (sizeof (__int128) ++ * CHAR_BIT - 1), 0); ++ TEST_COMPARE (stdc_bit_ceil (~(unsigned __int128) 0) != 0, 0); ++# endif ++ uc a = 0; ++ TEST_COMPARE (stdc_bit_width (a++), 0); ++ TEST_COMPARE (a, 1); ++ ull b = 0; ++ TEST_COMPARE (stdc_bit_width (b++), 0); ++ TEST_COMPARE (b, 1); ++ TEST_COMPARE (stdc_bit_floor (a++), 1); ++ TEST_COMPARE (a, 2); ++ TEST_COMPARE (stdc_bit_floor (b++), 1); ++ TEST_COMPARE (b, 2); ++ TEST_COMPARE (stdc_bit_ceil (a++), 2); ++ TEST_COMPARE (a, 3); ++ TEST_COMPARE (stdc_bit_ceil (b++), 2); ++ TEST_COMPARE (b, 3); ++ TEST_COMPARE (stdc_leading_zeros (a++), CHAR_BIT - 2); ++ TEST_COMPARE (a, 4); ++ TEST_COMPARE (stdc_leading_zeros (b++), ++ sizeof (long long int) * CHAR_BIT - 2); ++ TEST_COMPARE (b, 4); ++ TEST_COMPARE (stdc_leading_ones (a++), 0); ++ TEST_COMPARE (a, 5); ++ TEST_COMPARE (stdc_leading_ones (b++), 0); ++ TEST_COMPARE (b, 5); ++ TEST_COMPARE (stdc_trailing_zeros (a++), 0); ++ TEST_COMPARE (a, 6); ++ TEST_COMPARE (stdc_trailing_zeros (b++), 0); ++ TEST_COMPARE (b, 6); ++ TEST_COMPARE (stdc_trailing_ones (a++), 0); ++ TEST_COMPARE (a, 7); ++ TEST_COMPARE (stdc_trailing_ones (b++), 0); ++ TEST_COMPARE (b, 7); ++ TEST_COMPARE (stdc_first_leading_zero (a++), 1); ++ TEST_COMPARE (a, 8); ++ TEST_COMPARE (stdc_first_leading_zero (b++), 1); ++ TEST_COMPARE (b, 8); ++ TEST_COMPARE (stdc_first_leading_one (a++), CHAR_BIT - 3); ++ TEST_COMPARE (a, 9); ++ TEST_COMPARE (stdc_first_leading_one (b++), ++ sizeof (long long int) * CHAR_BIT - 3); ++ TEST_COMPARE (b, 9); ++ TEST_COMPARE (stdc_first_trailing_zero (a++), 2); ++ TEST_COMPARE (a, 10); ++ TEST_COMPARE (stdc_first_trailing_zero (b++), 2); ++ TEST_COMPARE (b, 10); ++ TEST_COMPARE (stdc_first_trailing_one (a++), 2); ++ TEST_COMPARE (a, 11); ++ TEST_COMPARE (stdc_first_trailing_one (b++), 2); ++ TEST_COMPARE (b, 11); ++ TEST_COMPARE (stdc_count_zeros (a++), CHAR_BIT - 3); ++ TEST_COMPARE (a, 12); ++ TEST_COMPARE (stdc_count_zeros (b++), ++ sizeof (long long int) * CHAR_BIT - 3); ++ TEST_COMPARE (b, 12); ++ TEST_COMPARE (stdc_count_ones (a++), 2); ++ TEST_COMPARE (a, 13); ++ TEST_COMPARE (stdc_count_ones (b++), 2); ++ TEST_COMPARE (b, 13); ++ TEST_COMPARE (stdc_has_single_bit (a++), 0); ++ TEST_COMPARE (a, 14); ++ TEST_COMPARE (stdc_has_single_bit (b++), 0); ++ TEST_COMPARE (b, 14); ++# ifdef BITINT_MAXWIDTH ++# if BITINT_MAXWIDTH >= 64 ++ TEST_COMPARE (stdc_leading_zeros (0uwb), 1); ++ TEST_COMPARE (expr_has_type (stdc_leading_zeros (0uwb), ui), 1); ++ TEST_COMPARE (stdc_leading_zeros (1uwb), 0); ++ TEST_COMPARE (expr_has_type (stdc_leading_zeros (1uwb), ui), 1); ++ TEST_COMPARE (stdc_leading_ones (0uwb), 0); ++ TEST_COMPARE (expr_has_type (stdc_leading_ones (0uwb), ui), 1); ++ TEST_COMPARE (stdc_leading_ones (1uwb), 1); ++ TEST_COMPARE (expr_has_type (stdc_leading_ones (1uwb), ui), 1); ++ TEST_COMPARE (stdc_trailing_zeros (0uwb), 1); ++ TEST_COMPARE (expr_has_type (stdc_trailing_zeros (0uwb), ui), 1); ++ TEST_COMPARE (stdc_trailing_zeros (1uwb), 0); ++ TEST_COMPARE (expr_has_type (stdc_trailing_zeros (1uwb), ui), 1); ++ TEST_COMPARE (stdc_trailing_ones (0uwb), 0); ++ TEST_COMPARE (expr_has_type (stdc_trailing_ones (0uwb), ui), 1); ++ TEST_COMPARE (stdc_trailing_ones (1uwb), 1); ++ TEST_COMPARE (expr_has_type (stdc_trailing_ones (1uwb), ui), 1); ++ TEST_COMPARE (stdc_first_leading_zero (0uwb), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_zero (0uwb), ui), 1); ++ TEST_COMPARE (stdc_first_leading_zero (1uwb), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_zero (1uwb), ui), 1); ++ TEST_COMPARE (stdc_first_leading_one (0uwb), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_one (0uwb), ui), 1); ++ TEST_COMPARE (stdc_first_leading_one (1uwb), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_one (1uwb), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_zero (0uwb), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_zero (0uwb), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_zero (1uwb), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_zero (1uwb), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_one (0uwb), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_one (0uwb), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_one (1uwb), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_one (1uwb), ui), 1); ++ TEST_COMPARE (stdc_count_zeros (0uwb), 1); ++ TEST_COMPARE (expr_has_type (stdc_count_zeros (0uwb), ui), 1); ++ TEST_COMPARE (stdc_count_zeros (1uwb), 0); ++ TEST_COMPARE (expr_has_type (stdc_count_zeros (1uwb), ui), 1); ++ TEST_COMPARE (stdc_count_ones (0uwb), 0); ++ TEST_COMPARE (expr_has_type (stdc_count_ones (0uwb), ui), 1); ++ TEST_COMPARE (stdc_count_ones (1uwb), 1); ++ TEST_COMPARE (expr_has_type (stdc_count_ones (1uwb), ui), 1); ++ TEST_COMPARE (stdc_has_single_bit (0uwb), 0); ++ TEST_COMPARE (expr_has_type (stdc_has_single_bit (0uwb), _Bool), 1); ++ TEST_COMPARE (stdc_has_single_bit (1uwb), 1); ++ TEST_COMPARE (expr_has_type (stdc_has_single_bit (1uwb), _Bool), 1); ++ TEST_COMPARE (stdc_bit_width (0uwb), 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_width (0uwb), ui), 1); ++ TEST_COMPARE (stdc_bit_width (1uwb), 1); ++ TEST_COMPARE (expr_has_type (stdc_bit_width (1uwb), ui), 1); ++ TEST_COMPARE (stdc_bit_floor (0uwb), 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_floor (0uwb), unsigned _BitInt(1)), 1); ++ TEST_COMPARE (stdc_bit_floor (1uwb), 1); ++ TEST_COMPARE (expr_has_type (stdc_bit_floor (1uwb), unsigned _BitInt(1)), 1); ++ TEST_COMPARE (stdc_bit_ceil (0uwb), 1); ++ TEST_COMPARE (expr_has_type (stdc_bit_ceil (0uwb), unsigned _BitInt(1)), 1); ++ TEST_COMPARE (stdc_bit_ceil (1uwb), 1); ++ TEST_COMPARE (expr_has_type (stdc_bit_ceil (1uwb), unsigned _BitInt(1)), 1); ++ unsigned _BitInt(1) c = 0; ++ TEST_COMPARE (stdc_bit_floor (c++), 0); ++ TEST_COMPARE (c, 1); ++ TEST_COMPARE (stdc_bit_floor (c++), 1); ++ TEST_COMPARE (c, 0); ++ TEST_COMPARE (stdc_bit_ceil (c++), 1); ++ TEST_COMPARE (c, 1); ++ TEST_COMPARE (stdc_bit_ceil (c++), 1); ++ TEST_COMPARE (c, 0); ++# endif ++# if BITINT_MAXWIDTH >= 512 ++ TEST_COMPARE (stdc_leading_zeros ((unsigned _BitInt(512)) 0), 512); ++ TEST_COMPARE (expr_has_type (stdc_leading_zeros ((unsigned _BitInt(512)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_leading_zeros ((unsigned _BitInt(373)) 0), 373); ++ TEST_COMPARE (expr_has_type (stdc_leading_zeros ((unsigned _BitInt(373)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_leading_zeros (~(unsigned _BitInt(512)) 0), 0); ++ TEST_COMPARE (stdc_leading_zeros (~(unsigned _BitInt(373)) 0), 0); ++ TEST_COMPARE (stdc_leading_zeros ((unsigned _BitInt(512)) 275), 512 - 9); ++ TEST_COMPARE (stdc_leading_zeros ((unsigned _BitInt(373)) 512), 373 - 10); ++ TEST_COMPARE (stdc_leading_ones ((unsigned _BitInt(512)) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_leading_ones ((unsigned _BitInt(512)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_leading_ones ((unsigned _BitInt(373)) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_leading_ones ((unsigned _BitInt(373)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_leading_ones (~(unsigned _BitInt(512)) 0), 512); ++ TEST_COMPARE (stdc_leading_ones (~(unsigned _BitInt(373)) 0), 373); ++ TEST_COMPARE (stdc_leading_ones (~(unsigned _BitInt(512)) 275), 512 - 9); ++ TEST_COMPARE (stdc_leading_ones (~(unsigned _BitInt(373)) 512), 373 - 10); ++ TEST_COMPARE (stdc_trailing_zeros ((unsigned _BitInt(512)) 0), 512); ++ TEST_COMPARE (expr_has_type (stdc_trailing_zeros ((unsigned _BitInt(512)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_trailing_zeros ((unsigned _BitInt(373)) 0), 373); ++ TEST_COMPARE (expr_has_type (stdc_trailing_zeros ((unsigned _BitInt(373)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_trailing_zeros (~(unsigned _BitInt(512)) 0), 0); ++ TEST_COMPARE (stdc_trailing_zeros (~(unsigned _BitInt(373)) 0), 0); ++ TEST_COMPARE (stdc_trailing_zeros ((unsigned _BitInt(512)) 256), 8); ++ TEST_COMPARE (stdc_trailing_zeros ((unsigned _BitInt(373)) 512), 9); ++ TEST_COMPARE (stdc_trailing_ones ((unsigned _BitInt(512)) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_trailing_ones ((unsigned _BitInt(512)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_trailing_ones ((unsigned _BitInt(373)) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_trailing_ones ((unsigned _BitInt(373)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_trailing_ones (~(unsigned _BitInt(512)) 0), 512); ++ TEST_COMPARE (stdc_trailing_ones (~(unsigned _BitInt(373)) 0), 373); ++ TEST_COMPARE (stdc_trailing_ones ((unsigned _BitInt(512)) 255), 8); ++ TEST_COMPARE (stdc_trailing_ones ((~(unsigned _BitInt(373)) 0) >> 2), ++ 373 - 2); ++ TEST_COMPARE (stdc_first_leading_zero ((unsigned _BitInt(512)) 0), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_zero ((unsigned _BitInt(512)) ++ 0), ui), 1); ++ TEST_COMPARE (stdc_first_leading_zero ((unsigned _BitInt(373)) 0), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_zero ((unsigned _BitInt(373)) ++ 0), ui), 1); ++ TEST_COMPARE (stdc_first_leading_zero (~(unsigned _BitInt(512)) 0), 0); ++ TEST_COMPARE (stdc_first_leading_zero (~(unsigned _BitInt(373)) 0), 0); ++ TEST_COMPARE (stdc_first_leading_zero (~(unsigned _BitInt(512)) 511), ++ 512 - 8); ++ TEST_COMPARE (stdc_first_leading_zero (~(unsigned _BitInt(373)) 1023), ++ 373 - 9); ++ TEST_COMPARE (stdc_first_leading_one ((unsigned _BitInt(512)) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_one ((unsigned _BitInt(512)) ++ 0), ui), 1); ++ TEST_COMPARE (stdc_first_leading_one ((unsigned _BitInt(373)) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_leading_one ((unsigned _BitInt(373)) ++ 0), ui), 1); ++ TEST_COMPARE (stdc_first_leading_one (~(unsigned _BitInt(512)) 0), 1); ++ TEST_COMPARE (stdc_first_leading_one (~(unsigned _BitInt(373)) 0), 1); ++ TEST_COMPARE (stdc_first_leading_one ((unsigned _BitInt(512)) 275), 512 - 8); ++ TEST_COMPARE (stdc_first_leading_one ((unsigned _BitInt(373)) 512), 373 - 9); ++ TEST_COMPARE (stdc_first_trailing_zero ((unsigned _BitInt(512)) 0), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_zero ((unsigned ++ _BitInt(512)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_first_trailing_zero ((unsigned _BitInt(373)) 0), 1); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_zero ((unsigned ++ _BitInt(373)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_first_trailing_zero (~(unsigned _BitInt(512)) 0), 0); ++ TEST_COMPARE (stdc_first_trailing_zero (~(unsigned _BitInt(373)) 0), 0); ++ TEST_COMPARE (stdc_first_trailing_zero ((unsigned _BitInt(512)) 255), 9); ++ TEST_COMPARE (stdc_first_trailing_zero ((unsigned _BitInt(373)) 511), 10); ++ TEST_COMPARE (stdc_first_trailing_one ((unsigned _BitInt(512)) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_one ((unsigned _BitInt(512)) ++ 0), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_one ((unsigned _BitInt(373)) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_first_trailing_one ((unsigned _BitInt(373)) ++ 0), ui), 1); ++ TEST_COMPARE (stdc_first_trailing_one (~(unsigned _BitInt(512)) 0), 1); ++ TEST_COMPARE (stdc_first_trailing_one (~(unsigned _BitInt(373)) 0), 1); ++ TEST_COMPARE (stdc_first_trailing_one (((unsigned _BitInt(512)) 255) << 175), ++ 176); ++ TEST_COMPARE (stdc_first_trailing_one ((~(unsigned _BitInt(373)) 0) << 311), ++ 312); ++ TEST_COMPARE (stdc_count_zeros ((unsigned _BitInt(512)) 0), 512); ++ TEST_COMPARE (expr_has_type (stdc_count_zeros ((unsigned _BitInt(512)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_count_zeros ((unsigned _BitInt(373)) 0), 373); ++ TEST_COMPARE (expr_has_type (stdc_count_zeros ((unsigned _BitInt(373)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_count_zeros (~(unsigned _BitInt(512)) 0), 0); ++ TEST_COMPARE (stdc_count_zeros (~(unsigned _BitInt(373)) 0), 0); ++ TEST_COMPARE (stdc_count_zeros ((unsigned _BitInt(512)) 1315), 512 - 5); ++ TEST_COMPARE (stdc_count_zeros ((unsigned _BitInt(373)) 3363), 373 - 6); ++ TEST_COMPARE (stdc_count_ones ((unsigned _BitInt(512)) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_count_ones ((unsigned _BitInt(512)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_count_ones ((unsigned _BitInt(373)) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_count_ones ((unsigned _BitInt(373)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_count_ones (~(unsigned _BitInt(512)) 0), 512); ++ TEST_COMPARE (stdc_count_ones (~(unsigned _BitInt(373)) 0), 373); ++ TEST_COMPARE (stdc_count_ones (~(unsigned _BitInt(512)) 1315), 512 - 5); ++ TEST_COMPARE (stdc_count_ones (~(unsigned _BitInt(373)) 3363), 373 - 6); ++ TEST_COMPARE (stdc_has_single_bit ((unsigned _BitInt(512)) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_has_single_bit ((unsigned _BitInt(512)) 0), ++ _Bool), 1); ++ TEST_COMPARE (stdc_has_single_bit ((unsigned _BitInt(373)) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_has_single_bit ((unsigned _BitInt(373)) 0), ++ _Bool), 1); ++ TEST_COMPARE (stdc_has_single_bit (~(unsigned _BitInt(512)) 0), 0); ++ TEST_COMPARE (stdc_has_single_bit (~(unsigned _BitInt(373)) 0), 0); ++ TEST_COMPARE (stdc_has_single_bit (((unsigned _BitInt(512)) 1022) << 279), ++ 0); ++ TEST_COMPARE (stdc_has_single_bit (((unsigned _BitInt(373)) 12) << 305), 0); ++ TEST_COMPARE (stdc_bit_width ((unsigned _BitInt(512)) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_width ((unsigned _BitInt(512)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_bit_width ((unsigned _BitInt(373)) 0), 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_width ((unsigned _BitInt(373)) 0), ++ ui), 1); ++ TEST_COMPARE (stdc_bit_width (~(unsigned _BitInt(512)) 0), 512); ++ TEST_COMPARE (stdc_bit_width (~(unsigned _BitInt(373)) 0), 373); ++ TEST_COMPARE (stdc_bit_width (((unsigned _BitInt(512)) 1023) << 405), ++ 405 + 10); ++ TEST_COMPARE (stdc_bit_width (((unsigned _BitInt(373)) 1024) << 242), ++ 242 + 11); ++ TEST_COMPARE (stdc_bit_floor ((unsigned _BitInt(512)) 0) != 0, 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_floor ((unsigned _BitInt(512)) 0), ++ unsigned _BitInt(512)), 1); ++ TEST_COMPARE (stdc_bit_floor ((unsigned _BitInt(373)) 0) != 0, 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_floor ((unsigned _BitInt(373)) 0), ++ unsigned _BitInt(373)), 1); ++ TEST_COMPARE (stdc_bit_floor (~(unsigned _BitInt(512)) 0) ++ != ((unsigned _BitInt(512)) 1) << (512 - 1), 0); ++ TEST_COMPARE (stdc_bit_floor (~(unsigned _BitInt(373)) 0) ++ != ((unsigned _BitInt(373)) 1) << (373 - 1), 0); ++ TEST_COMPARE (stdc_bit_floor (((unsigned _BitInt(512)) 511) << 405) ++ != (((unsigned _BitInt(512)) 256) << 405), 0); ++ TEST_COMPARE (stdc_bit_floor (((unsigned _BitInt(373)) 512) << 242) ++ != (((unsigned _BitInt(512)) 512) << 242), 0); ++ TEST_COMPARE (stdc_bit_ceil ((unsigned _BitInt(512)) 0) != 1, 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_ceil ((unsigned _BitInt(512)) 0), ++ unsigned _BitInt(512)), 1); ++ TEST_COMPARE (stdc_bit_ceil ((unsigned _BitInt(373)) 0) != 1, 0); ++ TEST_COMPARE (expr_has_type (stdc_bit_ceil ((unsigned _BitInt(373)) 0), ++ unsigned _BitInt(373)), 1); ++ TEST_COMPARE (stdc_bit_ceil (~(unsigned _BitInt(512)) 0) != 0, 0); ++ TEST_COMPARE (stdc_bit_ceil (~(unsigned _BitInt(373)) 0) != 0, 0); ++ TEST_COMPARE (stdc_bit_ceil (((unsigned _BitInt(512)) 1) << (512 - 1)) ++ != ((unsigned _BitInt(512)) 1) << (512 - 1), 0); ++ TEST_COMPARE (stdc_bit_ceil ((~(unsigned _BitInt(373)) 0) >> 1) ++ != ((unsigned _BitInt(373)) 1) << (373 - 1), 0); ++ TEST_COMPARE (stdc_bit_ceil (((unsigned _BitInt(512)) 512) << 405) ++ != (((unsigned _BitInt(512)) 512) << 405), 0); ++ TEST_COMPARE (stdc_bit_ceil (((unsigned _BitInt(373)) 513) << 242) ++ != (((unsigned _BitInt(512)) 1024) << 242), 0); ++ TEST_COMPARE (stdc_bit_floor ((unsigned _BitInt(BITINT_MAXWIDTH)) 0) != 0, ++ 0); ++ TEST_COMPARE (stdc_bit_floor (~(unsigned _BitInt(BITINT_MAXWIDTH)) 0) ++ != ((unsigned _BitInt(BITINT_MAXWIDTH)) 1) << (BITINT_MAXWIDTH ++ - 1), 0); ++ TEST_COMPARE (stdc_bit_floor (((unsigned _BitInt(BITINT_MAXWIDTH)) 511) ++ << 405) ++ != (((unsigned _BitInt(BITINT_MAXWIDTH)) 256) << 405), 0); ++ TEST_COMPARE (stdc_bit_floor (((unsigned _BitInt(BITINT_MAXWIDTH)) 512) ++ << 405) ++ != (((unsigned _BitInt(BITINT_MAXWIDTH)) 512) << 405), 0); ++ TEST_COMPARE (stdc_bit_ceil ((unsigned _BitInt(BITINT_MAXWIDTH)) 0) != 1, 0); ++ TEST_COMPARE (stdc_bit_ceil (~(unsigned _BitInt(BITINT_MAXWIDTH)) 0) != 0, ++ 0); ++ TEST_COMPARE (stdc_bit_ceil (((unsigned _BitInt(BITINT_MAXWIDTH)) 1) ++ << (BITINT_MAXWIDTH - 1)) ++ != ((unsigned _BitInt(BITINT_MAXWIDTH)) 1) << (BITINT_MAXWIDTH ++ - 1), 0); ++ TEST_COMPARE (stdc_bit_ceil (((unsigned _BitInt(BITINT_MAXWIDTH)) 512) ++ << 405) ++ != (((unsigned _BitInt(BITINT_MAXWIDTH)) 512) << 405), 0); ++ TEST_COMPARE (stdc_bit_ceil (((unsigned _BitInt(BITINT_MAXWIDTH)) 513) ++ << 405) ++ != (((unsigned _BitInt(BITINT_MAXWIDTH)) 1024) << 405), 0); ++# endif ++# endif ++ return 0; ++} ++#else ++static int ++do_test (void) ++{ ++ return 0; ++} ++#endif ++ ++#include <support/test-driver.c> + +commit 71fcdba577884627c3ee4e43beb915da752efb1f +Author: Florian Weimer <fweimer@redhat.com> +Date: Fri Mar 15 19:08:24 2024 +0100 + + linux: Use rseq area unconditionally in sched_getcpu (bug 31479) + + Originally, nptl/descr.h included <sys/rseq.h>, but we removed that + in commit 2c6b4b272e6b4d07303af25709051c3e96288f2d ("nptl: + Unconditionally use a 32-byte rseq area"). After that, it was + not ensured that the RSEQ_SIG macro was defined during sched_getcpu.c + compilation that provided a definition. This commit always checks + the rseq area for CPU number information before using the other + approaches. + + This adds an unnecessary (but well-predictable) branch on + architectures which do not define RSEQ_SIG, but its cost is small + compared to the system call. Most architectures that have vDSO + acceleration for getcpu also have rseq support. + + Fixes: 2c6b4b272e6b4d07303af25709051c3e96288f2d + Fixes: 1d350aa06091211863e41169729cee1bca39f72f + Reviewed-by: Arjun Shankar <arjun@redhat.com> + (cherry picked from commit 7a76f218677d149d8b7875b336722108239f7ee9) + +diff --git a/sysdeps/unix/sysv/linux/sched_getcpu.c b/sysdeps/unix/sysv/linux/sched_getcpu.c +index dfb884568d..72a3360550 100644 +--- a/sysdeps/unix/sysv/linux/sched_getcpu.c ++++ b/sysdeps/unix/sysv/linux/sched_getcpu.c +@@ -33,17 +33,9 @@ vsyscall_sched_getcpu (void) + return r == -1 ? r : cpu; + } + +-#ifdef RSEQ_SIG + int + sched_getcpu (void) + { + int cpu_id = THREAD_GETMEM_VOLATILE (THREAD_SELF, rseq_area.cpu_id); + return __glibc_likely (cpu_id >= 0) ? cpu_id : vsyscall_sched_getcpu (); + } +-#else /* RSEQ_SIG */ +-int +-sched_getcpu (void) +-{ +- return vsyscall_sched_getcpu (); +-} +-#endif /* RSEQ_SIG */ + +commit ee7f4c54e19738c2c27d3846e1e9b3595c89221f +Author: Manjunath Matti <mmatti@linux.ibm.com> +Date: Tue Mar 19 15:29:48 2024 -0500 + + powerpc: Add HWCAP3/HWCAP4 data to TCB for Power Architecture. + + This patch adds a new feature for powerpc. In order to get faster + access to the HWCAP3/HWCAP4 masks, similar to HWCAP/HWCAP2 (i.e. for + implementing __builtin_cpu_supports() in GCC) without the overhead of + reading them from the auxiliary vector, we now reserve space for them + in the TCB. + + Suggested-by: Peter Bergner <bergner@linux.ibm.com> + Reviewed-by: Peter Bergner <bergner@linux.ibm.com> + (cherry picked from commit 3ab9b88e2ac91062b6d493fe32bd101a55006c6a) + +diff --git a/elf/dl-diagnostics.c b/elf/dl-diagnostics.c +index 7345ebc4e5..aaf67b87e8 100644 +--- a/elf/dl-diagnostics.c ++++ b/elf/dl-diagnostics.c +@@ -235,6 +235,8 @@ _dl_print_diagnostics (char **environ) + _dl_diagnostics_print_labeled_value ("dl_hwcap", GLRO (dl_hwcap)); + _dl_diagnostics_print_labeled_value ("dl_hwcap_important", HWCAP_IMPORTANT); + _dl_diagnostics_print_labeled_value ("dl_hwcap2", GLRO (dl_hwcap2)); ++ _dl_diagnostics_print_labeled_value ("dl_hwcap3", GLRO (dl_hwcap3)); ++ _dl_diagnostics_print_labeled_value ("dl_hwcap4", GLRO (dl_hwcap4)); + _dl_diagnostics_print_labeled_string + ("dl_hwcaps_subdirs", _dl_hwcaps_subdirs); + _dl_diagnostics_print_labeled_value +diff --git a/elf/dl-support.c b/elf/dl-support.c +index 2f502c8b0d..451932dd03 100644 +--- a/elf/dl-support.c ++++ b/elf/dl-support.c +@@ -158,6 +158,8 @@ const ElfW(Phdr) *_dl_phdr; + size_t _dl_phnum; + uint64_t _dl_hwcap; + uint64_t _dl_hwcap2; ++uint64_t _dl_hwcap3; ++uint64_t _dl_hwcap4; + + enum dso_sort_algorithm _dl_dso_sort_algo; + +diff --git a/elf/elf.h b/elf/elf.h +index 455731663c..1c394c64cd 100644 +--- a/elf/elf.h ++++ b/elf/elf.h +@@ -1234,6 +1234,10 @@ typedef struct + #define AT_RSEQ_FEATURE_SIZE 27 /* rseq supported feature size. */ + #define AT_RSEQ_ALIGN 28 /* rseq allocation alignment. */ + ++/* More machine-dependent hints about processor capabilities. */ ++#define AT_HWCAP3 29 /* extension of AT_HWCAP. */ ++#define AT_HWCAP4 30 /* extension of AT_HWCAP. */ ++ + #define AT_EXECFN 31 /* Filename of executable. */ + + /* Pointer to the global system page used for system calls and other +diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h +index 117c901ccc..50f58a60e3 100644 +--- a/sysdeps/generic/ldsodefs.h ++++ b/sysdeps/generic/ldsodefs.h +@@ -646,6 +646,8 @@ struct rtld_global_ro + /* Mask for more hardware capabilities that are available on some + platforms. */ + EXTERN uint64_t _dl_hwcap2; ++ EXTERN uint64_t _dl_hwcap3; ++ EXTERN uint64_t _dl_hwcap4; + + EXTERN enum dso_sort_algorithm _dl_dso_sort_algo; + +diff --git a/sysdeps/powerpc/dl-procinfo.c b/sysdeps/powerpc/dl-procinfo.c +index a76bb6e5b0..8cf00aa7e3 100644 +--- a/sysdeps/powerpc/dl-procinfo.c ++++ b/sysdeps/powerpc/dl-procinfo.c +@@ -38,6 +38,10 @@ + needed. + */ + ++/* The total number of available bits (including those prior to ++ _DL_HWCAP_FIRST). Some of these bits might not be used. */ ++#define _DL_HWCAP_COUNT 128 ++ + #ifndef PROCINFO_CLASS + # define PROCINFO_CLASS + #endif +@@ -61,7 +65,7 @@ PROCINFO_CLASS struct cpu_features _dl_powerpc_cpu_features + #if !defined PROCINFO_DECL && defined SHARED + ._dl_powerpc_cap_flags + #else +-PROCINFO_CLASS const char _dl_powerpc_cap_flags[64][15] ++PROCINFO_CLASS const char _dl_powerpc_cap_flags[_DL_HWCAP_COUNT][15] + #endif + #ifndef PROCINFO_DECL + = { +diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h +index 68f4241095..f8cb343877 100644 +--- a/sysdeps/powerpc/dl-procinfo.h ++++ b/sysdeps/powerpc/dl-procinfo.h +@@ -22,16 +22,17 @@ + #include <ldsodefs.h> + #include <sysdep.h> /* This defines the PPC_FEATURE[2]_* macros. */ + +-/* The total number of available bits (including those prior to +- _DL_HWCAP_FIRST). Some of these bits might not be used. */ +-#define _DL_HWCAP_COUNT 64 ++/* Feature masks are all 32-bits in size. */ ++#define _DL_HWCAP_SIZE 32 + +-/* Features started at bit 31 and decremented as new features were added. */ +-#define _DL_HWCAP_LAST 31 ++/* AT_HWCAP2 feature strings follow the AT_HWCAP feature strings. */ ++#define _DL_HWCAP2_OFFSET _DL_HWCAP_SIZE + +-/* AT_HWCAP2 features started at bit 31 and decremented as new features were +- added. HWCAP2 feature bits start at bit 0. */ +-#define _DL_HWCAP2_LAST 31 ++/* AT_HWCAP3 feature strings follow the AT_HWCAP2 feature strings. */ ++#define _DL_HWCAP3_OFFSET (_DL_HWCAP2_OFFSET + _DL_HWCAP_SIZE) ++ ++/* AT_HWCAP4 feature strings follow the AT_HWCAP3 feature strings. */ ++#define _DL_HWCAP4_OFFSET (_DL_HWCAP3_OFFSET + _DL_HWCAP_SIZE) + + /* These bits influence library search. */ + #define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \ +@@ -187,21 +188,42 @@ _dl_procinfo (unsigned int type, unsigned long int word) + case AT_HWCAP: + _dl_printf ("AT_HWCAP: "); + +- for (int i = 0; i <= _DL_HWCAP_LAST; ++i) ++ for (int i = 0; i < _DL_HWCAP_SIZE; ++i) + if (word & (1 << i)) + _dl_printf (" %s", _dl_hwcap_string (i)); + break; + case AT_HWCAP2: + { +- unsigned int offset = _DL_HWCAP_LAST + 1; + + _dl_printf ("AT_HWCAP2: "); + +- /* We have to go through them all because the kernel added the +- AT_HWCAP2 features starting with the high bits. */ +- for (int i = 0; i <= _DL_HWCAP2_LAST; ++i) +- if (word & (1 << i)) +- _dl_printf (" %s", _dl_hwcap_string (offset + i)); ++ /* We have to go through them all because the kernel added the ++ AT_HWCAP2 features starting with the high bits. */ ++ for (int i = 0; i < _DL_HWCAP_SIZE; ++i) ++ if (word & (1 << i)) ++ _dl_printf (" %s", _dl_hwcap_string (_DL_HWCAP2_OFFSET + i)); ++ break; ++ } ++ case AT_HWCAP3: ++ { ++ _dl_printf ("AT_HWCAP3: "); ++ ++ /* We have to go through them all because the kernel added the ++ AT_HWCAP3 features starting with the high bits. */ ++ for (int i = 0; i < _DL_HWCAP_SIZE; ++i) ++ if (word & (1 << i)) ++ _dl_printf (" %s", _dl_hwcap_string (_DL_HWCAP3_OFFSET + i)); ++ break; ++ } ++ case AT_HWCAP4: ++ { ++ _dl_printf ("AT_HWCAP4: "); ++ ++ /* We have to go through them all because the kernel added the ++ AT_HWCAP4 features starting with the high bits. */ ++ for (int i = 0; i <= _DL_HWCAP_SIZE; ++i) ++ if (word & (1 << i)) ++ _dl_printf (" %s", _dl_hwcap_string (_DL_HWCAP4_OFFSET + i)); + break; + } + case AT_L1I_CACHEGEOMETRY: +diff --git a/sysdeps/powerpc/hwcapinfo.c b/sysdeps/powerpc/hwcapinfo.c +index 76344f285a..f6fede15a7 100644 +--- a/sysdeps/powerpc/hwcapinfo.c ++++ b/sysdeps/powerpc/hwcapinfo.c +@@ -31,7 +31,7 @@ void + __tcb_parse_hwcap_and_convert_at_platform (void) + { + +- uint64_t h1, h2; ++ uint64_t h1, h2, h3, h4; + + /* Read AT_PLATFORM string from auxv and convert it to a number. */ + __tcb.at_platform = _dl_string_platform (GLRO (dl_platform)); +@@ -39,6 +39,8 @@ __tcb_parse_hwcap_and_convert_at_platform (void) + /* Read HWCAP and HWCAP2 from auxv. */ + h1 = GLRO (dl_hwcap); + h2 = GLRO (dl_hwcap2); ++ h3 = GLRO (dl_hwcap3); ++ h4 = GLRO (dl_hwcap4); + + /* hwcap contains only the latest supported ISA, the code checks which is + and fills the previous supported ones. */ +@@ -64,13 +66,16 @@ __tcb_parse_hwcap_and_convert_at_platform (void) + else if (h1 & PPC_FEATURE_POWER5) + h1 |= PPC_FEATURE_POWER4; + +- uint64_t array_hwcaps[] = { h1, h2 }; ++ uint64_t array_hwcaps[] = { h1, h2, h3, h4 }; + init_cpu_features (&GLRO(dl_powerpc_cpu_features), array_hwcaps); + + /* Consolidate both HWCAP and HWCAP2 into a single doubleword so that + we can read both in a single load later. */ + __tcb.hwcap = (h1 << 32) | (h2 & 0xffffffff); +- __tcb.hwcap_extn = 0x0; ++ ++ /* Consolidate both HWCAP3 and HWCAP4 into a single doubleword so that ++ we can read both in a single load later. */ ++ __tcb.hwcap_extn = (h3 << 32) | (h4 & 0xffffffff); + + } + #if IS_IN (rtld) +diff --git a/sysdeps/unix/sysv/linux/dl-parse_auxv.h b/sysdeps/unix/sysv/linux/dl-parse_auxv.h +index e3d758b163..ea2a58ecb1 100644 +--- a/sysdeps/unix/sysv/linux/dl-parse_auxv.h ++++ b/sysdeps/unix/sysv/linux/dl-parse_auxv.h +@@ -47,6 +47,8 @@ void _dl_parse_auxv (ElfW(auxv_t) *av, dl_parse_auxv_t auxv_values) + GLRO(dl_platform) = (void *) auxv_values[AT_PLATFORM]; + GLRO(dl_hwcap) = auxv_values[AT_HWCAP]; + GLRO(dl_hwcap2) = auxv_values[AT_HWCAP2]; ++ GLRO(dl_hwcap3) = auxv_values[AT_HWCAP3]; ++ GLRO(dl_hwcap4) = auxv_values[AT_HWCAP4]; + GLRO(dl_clktck) = auxv_values[AT_CLKTCK]; + GLRO(dl_fpu_control) = auxv_values[AT_FPUCW]; + _dl_random = (void *) auxv_values[AT_RANDOM]; +diff --git a/sysdeps/unix/sysv/linux/dl-sysdep.c b/sysdeps/unix/sysv/linux/dl-sysdep.c +index ad3692d738..e1b14e9eb3 100644 +--- a/sysdeps/unix/sysv/linux/dl-sysdep.c ++++ b/sysdeps/unix/sysv/linux/dl-sysdep.c +@@ -197,6 +197,8 @@ _dl_show_auxv (void) + [AT_SYSINFO_EHDR - 2] = { "SYSINFO_EHDR: 0x", hex }, + [AT_RANDOM - 2] = { "RANDOM: 0x", hex }, + [AT_HWCAP2 - 2] = { "HWCAP2: 0x", hex }, ++ [AT_HWCAP3 - 2] = { "HWCAP3: 0x", hex }, ++ [AT_HWCAP4 - 2] = { "HWCAP4: 0x", hex }, + [AT_MINSIGSTKSZ - 2] = { "MINSIGSTKSZ: ", dec }, + [AT_L1I_CACHESIZE - 2] = { "L1I_CACHESIZE: ", dec }, + [AT_L1I_CACHEGEOMETRY - 2] = { "L1I_CACHEGEOMETRY: 0x", hex }, +diff --git a/sysdeps/unix/sysv/linux/powerpc/cpu-features.c b/sysdeps/unix/sysv/linux/powerpc/cpu-features.c +index 8e8a5ec2ea..a947d62db6 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/cpu-features.c ++++ b/sysdeps/unix/sysv/linux/powerpc/cpu-features.c +@@ -94,6 +94,8 @@ init_cpu_features (struct cpu_features *cpu_features, uint64_t hwcaps[]) + which are set by __tcb_parse_hwcap_and_convert_at_platform. */ + cpu_features->hwcap = hwcaps[0]; + cpu_features->hwcap2 = hwcaps[1]; ++ cpu_features->hwcap3 = hwcaps[2]; ++ cpu_features->hwcap4 = hwcaps[3]; + /* Default is to use aligned memory access on optimized function unless + tunables is enable, since for this case user can explicit disable + unaligned optimizations. */ +diff --git a/sysdeps/unix/sysv/linux/powerpc/cpu-features.h b/sysdeps/unix/sysv/linux/powerpc/cpu-features.h +index 1294f0b601..e9eb6a13c8 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/cpu-features.h ++++ b/sysdeps/unix/sysv/linux/powerpc/cpu-features.h +@@ -26,6 +26,8 @@ struct cpu_features + bool use_cached_memopt; + unsigned long int hwcap; + unsigned long int hwcap2; ++ unsigned long int hwcap3; ++ unsigned long int hwcap4; + }; + + static const char hwcap_names[] = { +diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c +index a4705daf1c..6a00cd88cd 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c ++++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c +@@ -87,6 +87,12 @@ __libc_start_main_impl (int argc, char **argv, + case AT_HWCAP2: + _dl_hwcap2 = (unsigned long int) av->a_un.a_val; + break; ++ case AT_HWCAP3: ++ _dl_hwcap3 = (unsigned long int) av->a_un.a_val; ++ break; ++ case AT_HWCAP4: ++ _dl_hwcap4 = (unsigned long int) av->a_un.a_val; ++ break; + case AT_PLATFORM: + _dl_platform = (void *) av->a_un.a_val; + break; + +commit aad45c8ac30aa1072e54903ce6aead22702f244a +Author: Amrita H S <amritahs@linux.ibm.com> +Date: Tue Mar 19 19:08:47 2024 -0500 + + powerpc: Placeholder and infrastructure/build support to add Power11 related changes. + + The following three changes have been added to provide initial Power11 support. + 1. Add the directories to hold Power11 files. + 2. Add support to select Power11 libraries based on AT_PLATFORM. + 3. Let submachine=power11 be set automatically. + + Reviewed-by: Florian Weimer <fweimer@redhat.com> + Reviewed-by: Peter Bergner <bergner@linux.ibm.com> + (cherry picked from commit 1ea051145612f199d8716ecdf78b084b00b5a727) + +diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h +index f8cb343877..b36697ba44 100644 +--- a/sysdeps/powerpc/dl-procinfo.h ++++ b/sysdeps/powerpc/dl-procinfo.h +@@ -38,7 +38,7 @@ + #define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \ + + PPC_FEATURE_HAS_DFP) + +-#define _DL_PLATFORMS_COUNT 16 ++#define _DL_PLATFORMS_COUNT 17 + + #define _DL_FIRST_PLATFORM 32 + /* Mask to filter out platforms. */ +@@ -62,6 +62,7 @@ + #define PPC_PLATFORM_POWER8 13 + #define PPC_PLATFORM_POWER9 14 + #define PPC_PLATFORM_POWER10 15 ++#define PPC_PLATFORM_POWER11 16 + + static inline const char * + __attribute__ ((unused)) +@@ -89,6 +90,11 @@ _dl_string_platform (const char *str) + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER10; + str++; + } ++ else if (str[1] == '1') ++ { ++ ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER11; ++ str++; ++ } + else + return -1; + break; +diff --git a/sysdeps/powerpc/powerpc32/power11/Implies b/sysdeps/powerpc/powerpc32/power11/Implies +new file mode 100644 +index 0000000000..051cbe0f79 +--- /dev/null ++++ b/sysdeps/powerpc/powerpc32/power11/Implies +@@ -0,0 +1,2 @@ ++powerpc/powerpc32/power10/fpu ++powerpc/powerpc32/power10 +diff --git a/sysdeps/powerpc/powerpc32/power11/fpu/multiarch/Implies b/sysdeps/powerpc/powerpc32/power11/fpu/multiarch/Implies +new file mode 100644 +index 0000000000..58edb2861d +--- /dev/null ++++ b/sysdeps/powerpc/powerpc32/power11/fpu/multiarch/Implies +@@ -0,0 +1 @@ ++powerpc/powerpc32/power10/fpu/multiarch +diff --git a/sysdeps/powerpc/powerpc32/power11/multiarch/Implies b/sysdeps/powerpc/powerpc32/power11/multiarch/Implies +new file mode 100644 +index 0000000000..c70f0428ba +--- /dev/null ++++ b/sysdeps/powerpc/powerpc32/power11/multiarch/Implies +@@ -0,0 +1 @@ ++powerpc/powerpc32/power10/multiarch +diff --git a/sysdeps/powerpc/powerpc64/be/power11/Implies b/sysdeps/powerpc/powerpc64/be/power11/Implies +new file mode 100644 +index 0000000000..de481d1c13 +--- /dev/null ++++ b/sysdeps/powerpc/powerpc64/be/power11/Implies +@@ -0,0 +1,2 @@ ++powerpc/powerpc64/be/power10/fpu ++powerpc/powerpc64/be/power10 +diff --git a/sysdeps/powerpc/powerpc64/be/power11/fpu/Implies b/sysdeps/powerpc/powerpc64/be/power11/fpu/Implies +new file mode 100644 +index 0000000000..dff0e13064 +--- /dev/null ++++ b/sysdeps/powerpc/powerpc64/be/power11/fpu/Implies +@@ -0,0 +1 @@ ++powerpc/powerpc64/be/power10/fpu +diff --git a/sysdeps/powerpc/powerpc64/be/power11/fpu/multiarch/Implies b/sysdeps/powerpc/powerpc64/be/power11/fpu/multiarch/Implies +new file mode 100644 +index 0000000000..c3f259e009 +--- /dev/null ++++ b/sysdeps/powerpc/powerpc64/be/power11/fpu/multiarch/Implies +@@ -0,0 +1 @@ ++powerpc/powerpc64/be/power10/fpu/multiarch +diff --git a/sysdeps/powerpc/powerpc64/be/power11/multiarch/Implies b/sysdeps/powerpc/powerpc64/be/power11/multiarch/Implies +new file mode 100644 +index 0000000000..9491a394c9 +--- /dev/null ++++ b/sysdeps/powerpc/powerpc64/be/power11/multiarch/Implies +@@ -0,0 +1 @@ ++powerpc/powerpc64/be/power10/multiarch +diff --git a/sysdeps/powerpc/powerpc64/le/power11/Implies b/sysdeps/powerpc/powerpc64/le/power11/Implies +new file mode 100644 +index 0000000000..e18182dcc1 +--- /dev/null ++++ b/sysdeps/powerpc/powerpc64/le/power11/Implies +@@ -0,0 +1,2 @@ ++powerpc/powerpc64/le/power10/fpu ++powerpc/powerpc64/le/power10 +diff --git a/sysdeps/powerpc/powerpc64/le/power11/fpu/Implies b/sysdeps/powerpc/powerpc64/le/power11/fpu/Implies +new file mode 100644 +index 0000000000..e41bd55684 +--- /dev/null ++++ b/sysdeps/powerpc/powerpc64/le/power11/fpu/Implies +@@ -0,0 +1 @@ ++powerpc/powerpc64/le/power10/fpu +diff --git a/sysdeps/powerpc/powerpc64/le/power11/fpu/multiarch/Implies b/sysdeps/powerpc/powerpc64/le/power11/fpu/multiarch/Implies +new file mode 100644 +index 0000000000..c838d50931 +--- /dev/null ++++ b/sysdeps/powerpc/powerpc64/le/power11/fpu/multiarch/Implies +@@ -0,0 +1 @@ ++powerpc/powerpc64/le/power10/fpu/multiarch +diff --git a/sysdeps/powerpc/powerpc64/le/power11/multiarch/Implies b/sysdeps/powerpc/powerpc64/le/power11/multiarch/Implies +new file mode 100644 +index 0000000000..687248c3c2 +--- /dev/null ++++ b/sysdeps/powerpc/powerpc64/le/power11/multiarch/Implies +@@ -0,0 +1 @@ ++powerpc/powerpc64/le/power10/multiarch +diff --git a/sysdeps/powerpc/powerpc64/le/tst-glibc-hwcaps.c b/sysdeps/powerpc/powerpc64/le/tst-glibc-hwcaps.c +index 77465d9133..65d3e69303 100644 +--- a/sysdeps/powerpc/powerpc64/le/tst-glibc-hwcaps.c ++++ b/sysdeps/powerpc/powerpc64/le/tst-glibc-hwcaps.c +@@ -36,9 +36,11 @@ compute_level (void) + return 9; + if (strcmp (platform, "power10") == 0) + return 10; ++ if (strcmp (platform, "power11") == 0) ++ return 11; + printf ("warning: unrecognized AT_PLATFORM value: %s\n", platform); +- /* Assume that the new platform supports POWER10. */ +- return 10; ++ /* Assume that the new platform supports POWER11. */ ++ return 11; + } + + static int +diff --git a/sysdeps/powerpc/preconfigure b/sysdeps/powerpc/preconfigure +index 4de94089a3..9e5a07ab6d 100644 +--- a/sysdeps/powerpc/preconfigure ++++ b/sysdeps/powerpc/preconfigure +@@ -58,7 +58,7 @@ fi + + ;; + +- a2|970|power[4-9]|power5x|power6+|power10) ++ a2|970|power[4-9]|power5x|power6+|power10|power11) + submachine=${archcpu} + if test ${libc_cv_cc_submachine+y} + then : +diff --git a/sysdeps/powerpc/preconfigure.ac b/sysdeps/powerpc/preconfigure.ac +index 6c63bd8257..14b6dafd4a 100644 +--- a/sysdeps/powerpc/preconfigure.ac ++++ b/sysdeps/powerpc/preconfigure.ac +@@ -46,7 +46,7 @@ case "${machine}:${submachine}" in + AC_CACHE_VAL(libc_cv_cc_submachine,libc_cv_cc_submachine="") + ;; + +- a2|970|power[[4-9]]|power5x|power6+|power10) ++ a2|970|power[[4-9]]|power5x|power6+|power10|power11) + submachine=${archcpu} + AC_CACHE_VAL(libc_cv_cc_submachine,libc_cv_cc_submachine="") + ;; + +commit 983f34a1252de3ca6f2305c211d86530ea42010e +Author: caiyinyu <caiyinyu@loongson.cn> +Date: Mon Mar 11 16:07:48 2024 +0800 + + LoongArch: Correct {__ieee754, _}_scalb -> {__ieee754, _}_scalbf + +diff --git a/sysdeps/loongarch/fpu/e_scalbf.c b/sysdeps/loongarch/fpu/e_scalbf.c +index 9f05485236..7c0395fbb5 100644 +--- a/sysdeps/loongarch/fpu/e_scalbf.c ++++ b/sysdeps/loongarch/fpu/e_scalbf.c +@@ -57,4 +57,4 @@ __ieee754_scalbf (float x, float fn) + + return x; + } +-libm_alias_finite (__ieee754_scalb, __scalb) ++libm_alias_finite (__ieee754_scalbf, __scalbf) + +commit 7fc8242bf87828c935ac5df5cafb9dc7ab635fd9 +Author: H.J. Lu <hjl.tools@gmail.com> +Date: Fri Feb 16 07:17:10 2024 -0800 + + x86-64: Save APX registers in ld.so trampoline + + Add APX registers to STATE_SAVE_MASK so that APX registers are saved in + ld.so trampoline. This fixes BZ #31371. + + Also update STATE_SAVE_OFFSET and STATE_SAVE_MASK for i386 which will + be used by i386 _dl_tlsdesc_dynamic. + Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com> + + (cherry picked from commit dfb05f8e704edac70db38c4c8ee700769d91a413) + +diff --git a/sysdeps/x86/sysdep.h b/sysdeps/x86/sysdep.h +index 85d0a8c943..837fd28734 100644 +--- a/sysdeps/x86/sysdep.h ++++ b/sysdeps/x86/sysdep.h +@@ -21,14 +21,54 @@ + + #include <sysdeps/generic/sysdep.h> + ++/* The extended state feature IDs in the state component bitmap. */ ++#define X86_XSTATE_X87_ID 0 ++#define X86_XSTATE_SSE_ID 1 ++#define X86_XSTATE_AVX_ID 2 ++#define X86_XSTATE_BNDREGS_ID 3 ++#define X86_XSTATE_BNDCFG_ID 4 ++#define X86_XSTATE_K_ID 5 ++#define X86_XSTATE_ZMM_H_ID 6 ++#define X86_XSTATE_ZMM_ID 7 ++#define X86_XSTATE_PKRU_ID 9 ++#define X86_XSTATE_TILECFG_ID 17 ++#define X86_XSTATE_TILEDATA_ID 18 ++#define X86_XSTATE_APX_F_ID 19 ++ ++#ifdef __x86_64__ + /* Offset for fxsave/xsave area used by _dl_runtime_resolve. Also need + space to preserve RCX, RDX, RSI, RDI, R8, R9 and RAX. It must be +- aligned to 16 bytes for fxsave and 64 bytes for xsave. */ +-#define STATE_SAVE_OFFSET (8 * 7 + 8) +- +-/* Save SSE, AVX, AVX512, mask and bound registers. */ +-#define STATE_SAVE_MASK \ +- ((1 << 1) | (1 << 2) | (1 << 3) | (1 << 5) | (1 << 6) | (1 << 7)) ++ aligned to 16 bytes for fxsave and 64 bytes for xsave. ++ ++ NB: Is is non-zero because of the 128-byte red-zone. Some registers ++ are saved on stack without adjusting stack pointer first. When we ++ update stack pointer to allocate more space, we need to take the ++ red-zone into account. */ ++# define STATE_SAVE_OFFSET (8 * 7 + 8) ++ ++/* Save SSE, AVX, AVX512, mask, bound and APX registers. Bound and APX ++ registers are mutually exclusive. */ ++# define STATE_SAVE_MASK \ ++ ((1 << X86_XSTATE_SSE_ID) \ ++ | (1 << X86_XSTATE_AVX_ID) \ ++ | (1 << X86_XSTATE_BNDREGS_ID) \ ++ | (1 << X86_XSTATE_K_ID) \ ++ | (1 << X86_XSTATE_ZMM_H_ID) \ ++ | (1 << X86_XSTATE_ZMM_ID) \ ++ | (1 << X86_XSTATE_APX_F_ID)) ++#else ++/* Offset for fxsave/xsave area used by _dl_tlsdesc_dynamic. Since i386 ++ doesn't have red-zone, use 0 here. */ ++# define STATE_SAVE_OFFSET 0 ++ ++/* Save SSE, AVX, AXV512, mask and bound registers. */ ++# define STATE_SAVE_MASK \ ++ ((1 << X86_XSTATE_SSE_ID) \ ++ | (1 << X86_XSTATE_AVX_ID) \ ++ | (1 << X86_XSTATE_BNDREGS_ID) \ ++ | (1 << X86_XSTATE_K_ID) \ ++ | (1 << X86_XSTATE_ZMM_H_ID)) ++#endif + + /* Constants for bits in __x86_string_control: */ + + +commit a364304718725a31ab141936322855c76c73e35e +Author: H.J. Lu <hjl.tools@gmail.com> +Date: Mon Feb 26 06:37:03 2024 -0800 + + x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers + + Compiler generates the following instruction sequence for GNU2 dynamic + TLS access: + + leaq tls_var@TLSDESC(%rip), %rax + call *tls_var@TLSCALL(%rax) + + or + + leal tls_var@TLSDESC(%ebx), %eax + call *tls_var@TLSCALL(%eax) + + CALL instruction is transparent to compiler which assumes all registers, + except for EFLAGS and RAX/EAX, are unchanged after CALL. When + _dl_tlsdesc_dynamic is called, it calls __tls_get_addr on the slow + path. __tls_get_addr is a normal function which doesn't preserve any + caller-saved registers. _dl_tlsdesc_dynamic saved and restored integer + caller-saved registers, but didn't preserve any other caller-saved + registers. Add _dl_tlsdesc_dynamic IFUNC functions for FNSAVE, FXSAVE, + XSAVE and XSAVEC to save and restore all caller-saved registers. This + fixes BZ #31372. + + Add GLRO(dl_x86_64_runtime_resolve) with GLRO(dl_x86_tlsdesc_dynamic) + to optimize elf_machine_runtime_setup. + Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com> + + (cherry picked from commit 0aac205a814a8511e98d02b91a8dc908f1c53cde) + +diff --git a/elf/Makefile b/elf/Makefile +index 5d78b659ce..c5c37a9147 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -424,6 +424,7 @@ tests += \ + tst-glibc-hwcaps-prepend \ + tst-global1 \ + tst-global2 \ ++ tst-gnu2-tls2 \ + tst-initfinilazyfail \ + tst-initorder \ + tst-initorder2 \ +@@ -846,6 +847,9 @@ modules-names += \ + tst-filterobj-flt \ + tst-finilazyfailmod \ + tst-globalmod2 \ ++ tst-gnu2-tls2mod0 \ ++ tst-gnu2-tls2mod1 \ ++ tst-gnu2-tls2mod2 \ + tst-initlazyfailmod \ + tst-initorder2a \ + tst-initorder2b \ +@@ -3044,8 +3048,22 @@ $(objpfx)tst-tlsgap.out: \ + $(objpfx)tst-tlsgap-mod0.so \ + $(objpfx)tst-tlsgap-mod1.so \ + $(objpfx)tst-tlsgap-mod2.so ++ ++$(objpfx)tst-gnu2-tls2: $(shared-thread-library) ++$(objpfx)tst-gnu2-tls2.out: \ ++ $(objpfx)tst-gnu2-tls2mod0.so \ ++ $(objpfx)tst-gnu2-tls2mod1.so \ ++ $(objpfx)tst-gnu2-tls2mod2.so ++ + ifeq (yes,$(have-mtls-dialect-gnu2)) ++# This test fails if dl_tlsdesc_dynamic doesn't preserve all caller-saved ++# registers. See https://sourceware.org/bugzilla/show_bug.cgi?id=31372 ++test-xfail-tst-gnu2-tls2 = yes ++ + CFLAGS-tst-tlsgap-mod0.c += -mtls-dialect=gnu2 + CFLAGS-tst-tlsgap-mod1.c += -mtls-dialect=gnu2 + CFLAGS-tst-tlsgap-mod2.c += -mtls-dialect=gnu2 ++CFLAGS-tst-gnu2-tls2mod0.c += -mtls-dialect=gnu2 ++CFLAGS-tst-gnu2-tls2mod1.c += -mtls-dialect=gnu2 ++CFLAGS-tst-gnu2-tls2mod2.c += -mtls-dialect=gnu2 + endif +diff --git a/elf/tst-gnu2-tls2.c b/elf/tst-gnu2-tls2.c +new file mode 100644 +index 0000000000..7ac04d7f33 +--- /dev/null ++++ b/elf/tst-gnu2-tls2.c +@@ -0,0 +1,122 @@ ++/* Test TLSDESC relocation. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <http://www.gnu.org/licenses/>. */ ++ ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++#include <dlfcn.h> ++#include <pthread.h> ++#include <support/xdlfcn.h> ++#include <support/xthread.h> ++#include <support/check.h> ++#include <support/test-driver.h> ++#include "tst-gnu2-tls2.h" ++ ++#ifndef IS_SUPPORTED ++# define IS_SUPPORTED() true ++#endif ++ ++/* An architecture can define it to clobber caller-saved registers in ++ malloc below to verify that the implicit TLSDESC call won't change ++ caller-saved registers. */ ++#ifndef PREPARE_MALLOC ++# define PREPARE_MALLOC() ++#endif ++ ++extern void * __libc_malloc (size_t); ++ ++size_t malloc_counter = 0; ++ ++void * ++malloc (size_t n) ++{ ++ PREPARE_MALLOC (); ++ malloc_counter++; ++ return __libc_malloc (n); ++} ++ ++static void *mod[3]; ++#ifndef MOD ++# define MOD(i) "tst-gnu2-tls2mod" #i ".so" ++#endif ++static const char *modname[3] = { MOD(0), MOD(1), MOD(2) }; ++#undef MOD ++ ++static void ++open_mod (int i) ++{ ++ mod[i] = xdlopen (modname[i], RTLD_LAZY); ++ printf ("open %s\n", modname[i]); ++} ++ ++static void ++close_mod (int i) ++{ ++ xdlclose (mod[i]); ++ mod[i] = NULL; ++ printf ("close %s\n", modname[i]); ++} ++ ++static void ++access_mod (int i, const char *sym) ++{ ++ struct tls var = { -1, -1, -1, -1 }; ++ struct tls *(*f) (struct tls *) = xdlsym (mod[i], sym); ++ /* Check that our malloc is called. */ ++ malloc_counter = 0; ++ struct tls *p = f (&var); ++ TEST_VERIFY (malloc_counter != 0); ++ printf ("access %s: %s() = %p\n", modname[i], sym, p); ++ TEST_VERIFY_EXIT (memcmp (p, &var, sizeof (var)) == 0); ++ ++(p->a); ++} ++ ++static void * ++start (void *arg) ++{ ++ /* The DTV generation is at the last dlopen of mod0 and the ++ entry for mod1 is NULL. */ ++ ++ open_mod (1); /* Reuse modid of mod1. Uses dynamic TLS. */ ++ ++ /* Force the slow path in GNU2 TLS descriptor call. */ ++ access_mod (1, "apply_tls"); ++ ++ return arg; ++} ++ ++static int ++do_test (void) ++{ ++ if (!IS_SUPPORTED ()) ++ return EXIT_UNSUPPORTED; ++ ++ open_mod (0); ++ open_mod (1); ++ open_mod (2); ++ close_mod (0); ++ close_mod (1); /* Create modid gap at mod1. */ ++ open_mod (0); /* Reuse modid of mod0, bump generation count. */ ++ ++ /* Create a thread where DTV of mod1 is NULL. */ ++ pthread_t t = xpthread_create (NULL, start, NULL); ++ xpthread_join (t); ++ return 0; ++} ++ ++#include <support/test-driver.c> +diff --git a/elf/tst-gnu2-tls2.h b/elf/tst-gnu2-tls2.h +new file mode 100644 +index 0000000000..77964a57a3 +--- /dev/null ++++ b/elf/tst-gnu2-tls2.h +@@ -0,0 +1,36 @@ ++/* Test TLSDESC relocation. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <stdint.h> ++ ++struct tls ++{ ++ int64_t a, b, c, d; ++}; ++ ++extern struct tls *apply_tls (struct tls *); ++ ++/* An architecture can define them to verify that clobber caller-saved ++ registers aren't changed by the implicit TLSDESC call. */ ++#ifndef BEFORE_TLSDESC_CALL ++# define BEFORE_TLSDESC_CALL() ++#endif ++ ++#ifndef AFTER_TLSDESC_CALL ++# define AFTER_TLSDESC_CALL() ++#endif +diff --git a/elf/tst-gnu2-tls2mod0.c b/elf/tst-gnu2-tls2mod0.c +new file mode 100644 +index 0000000000..45556a0e17 +--- /dev/null ++++ b/elf/tst-gnu2-tls2mod0.c +@@ -0,0 +1,31 @@ ++/* DSO used by tst-gnu2-tls2. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include "tst-gnu2-tls2.h" ++ ++__thread struct tls tls_var0 __attribute__ ((visibility ("hidden"))); ++ ++struct tls * ++apply_tls (struct tls *p) ++{ ++ BEFORE_TLSDESC_CALL (); ++ tls_var0 = *p; ++ struct tls *ret = &tls_var0; ++ AFTER_TLSDESC_CALL (); ++ return ret; ++} +diff --git a/elf/tst-gnu2-tls2mod1.c b/elf/tst-gnu2-tls2mod1.c +new file mode 100644 +index 0000000000..e10b9dbc0a +--- /dev/null ++++ b/elf/tst-gnu2-tls2mod1.c +@@ -0,0 +1,31 @@ ++/* DSO used by tst-gnu2-tls2. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include "tst-gnu2-tls2.h" ++ ++__thread struct tls tls_var1[100] __attribute__ ((visibility ("hidden"))); ++ ++struct tls * ++apply_tls (struct tls *p) ++{ ++ BEFORE_TLSDESC_CALL (); ++ tls_var1[1] = *p; ++ struct tls *ret = &tls_var1[1]; ++ AFTER_TLSDESC_CALL (); ++ return ret; ++} +diff --git a/elf/tst-gnu2-tls2mod2.c b/elf/tst-gnu2-tls2mod2.c +new file mode 100644 +index 0000000000..141af51e55 +--- /dev/null ++++ b/elf/tst-gnu2-tls2mod2.c +@@ -0,0 +1,31 @@ ++/* DSO used by tst-gnu2-tls2. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include "tst-gnu2-tls2.h" ++ ++__thread struct tls tls_var2 __attribute__ ((visibility ("hidden"))); ++ ++struct tls * ++apply_tls (struct tls *p) ++{ ++ BEFORE_TLSDESC_CALL (); ++ tls_var2 = *p; ++ struct tls *ret = &tls_var2; ++ AFTER_TLSDESC_CALL (); ++ return ret; ++} +diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h +index fc1ef96587..50d74fe6e9 100644 +--- a/sysdeps/i386/dl-machine.h ++++ b/sysdeps/i386/dl-machine.h +@@ -347,7 +347,7 @@ and creates an unsatisfiable circular dependency.\n", + { + td->arg = _dl_make_tlsdesc_dynamic + (sym_map, sym->st_value + (ElfW(Word))td->arg); +- td->entry = _dl_tlsdesc_dynamic; ++ td->entry = GLRO(dl_x86_tlsdesc_dynamic); + } + else + # endif +diff --git a/sysdeps/i386/dl-tlsdesc-dynamic.h b/sysdeps/i386/dl-tlsdesc-dynamic.h +new file mode 100644 +index 0000000000..3627028577 +--- /dev/null ++++ b/sysdeps/i386/dl-tlsdesc-dynamic.h +@@ -0,0 +1,190 @@ ++/* Thread-local storage handling in the ELF dynamic linker. i386 version. ++ Copyright (C) 2004-2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#undef REGISTER_SAVE_AREA ++ ++#if !defined USE_FNSAVE && (STATE_SAVE_ALIGNMENT % 16) != 0 ++# error STATE_SAVE_ALIGNMENT must be multiple of 16 ++#endif ++ ++#if DL_RUNTIME_RESOLVE_REALIGN_STACK ++# ifdef USE_FNSAVE ++# error USE_FNSAVE shouldn't be defined ++# endif ++# ifdef USE_FXSAVE ++/* Use fxsave to save all registers. */ ++# define REGISTER_SAVE_AREA 512 ++# endif ++#else ++# ifdef USE_FNSAVE ++/* Use fnsave to save x87 FPU stack registers. */ ++# define REGISTER_SAVE_AREA 108 ++# else ++# ifndef USE_FXSAVE ++# error USE_FXSAVE must be defined ++# endif ++/* Use fxsave to save all registers. Add 12 bytes to align the stack ++ to 16 bytes. */ ++# define REGISTER_SAVE_AREA (512 + 12) ++# endif ++#endif ++ ++ .hidden _dl_tlsdesc_dynamic ++ .global _dl_tlsdesc_dynamic ++ .type _dl_tlsdesc_dynamic,@function ++ ++ /* This function is used for symbols that need dynamic TLS. ++ ++ %eax points to the TLS descriptor, such that 0(%eax) points to ++ _dl_tlsdesc_dynamic itself, and 4(%eax) points to a struct ++ tlsdesc_dynamic_arg object. It must return in %eax the offset ++ between the thread pointer and the object denoted by the ++ argument, without clobbering any registers. ++ ++ The assembly code that follows is a rendition of the following ++ C code, hand-optimized a little bit. ++ ++ptrdiff_t ++__attribute__ ((__regparm__ (1))) ++_dl_tlsdesc_dynamic (struct tlsdesc *tdp) ++{ ++ struct tlsdesc_dynamic_arg *td = tdp->arg; ++ dtv_t *dtv = *(dtv_t **)((char *)__thread_pointer + DTV_OFFSET); ++ if (__builtin_expect (td->gen_count <= dtv[0].counter ++ && (dtv[td->tlsinfo.ti_module].pointer.val ++ != TLS_DTV_UNALLOCATED), ++ 1)) ++ return dtv[td->tlsinfo.ti_module].pointer.val + td->tlsinfo.ti_offset ++ - __thread_pointer; ++ ++ return ___tls_get_addr (&td->tlsinfo) - __thread_pointer; ++} ++*/ ++ cfi_startproc ++ .align 16 ++_dl_tlsdesc_dynamic: ++ /* Like all TLS resolvers, preserve call-clobbered registers. ++ We need two scratch regs anyway. */ ++ subl $32, %esp ++ cfi_adjust_cfa_offset (32) ++ movl %ecx, 20(%esp) ++ movl %edx, 24(%esp) ++ movl TLSDESC_ARG(%eax), %eax ++ movl %gs:DTV_OFFSET, %edx ++ movl TLSDESC_GEN_COUNT(%eax), %ecx ++ cmpl (%edx), %ecx ++ ja 2f ++ movl TLSDESC_MODID(%eax), %ecx ++ movl (%edx,%ecx,8), %edx ++ cmpl $-1, %edx ++ je 2f ++ movl TLSDESC_MODOFF(%eax), %eax ++ addl %edx, %eax ++1: ++ movl 20(%esp), %ecx ++ subl %gs:0, %eax ++ movl 24(%esp), %edx ++ addl $32, %esp ++ cfi_adjust_cfa_offset (-32) ++ ret ++ .p2align 4,,7 ++2: ++ cfi_adjust_cfa_offset (32) ++#if DL_RUNTIME_RESOLVE_REALIGN_STACK ++ movl %ebx, -28(%esp) ++ movl %esp, %ebx ++ cfi_def_cfa_register(%ebx) ++ and $-STATE_SAVE_ALIGNMENT, %esp ++#endif ++#ifdef REGISTER_SAVE_AREA ++ subl $REGISTER_SAVE_AREA, %esp ++# if !DL_RUNTIME_RESOLVE_REALIGN_STACK ++ cfi_adjust_cfa_offset(REGISTER_SAVE_AREA) ++# endif ++#else ++# if !DL_RUNTIME_RESOLVE_REALIGN_STACK ++# error DL_RUNTIME_RESOLVE_REALIGN_STACK must be true ++# endif ++ /* Allocate stack space of the required size to save the state. */ ++ LOAD_PIC_REG (cx) ++ subl RTLD_GLOBAL_RO_DL_X86_CPU_FEATURES_OFFSET+XSAVE_STATE_SIZE_OFFSET+_rtld_local_ro@GOTOFF(%ecx), %esp ++#endif ++#ifdef USE_FNSAVE ++ fnsave (%esp) ++#elif defined USE_FXSAVE ++ fxsave (%esp) ++#else ++ /* Save the argument for ___tls_get_addr in EAX. */ ++ movl %eax, %ecx ++ movl $TLSDESC_CALL_STATE_SAVE_MASK, %eax ++ xorl %edx, %edx ++ /* Clear the XSAVE Header. */ ++# ifdef USE_XSAVE ++ movl %edx, (512)(%esp) ++ movl %edx, (512 + 4 * 1)(%esp) ++ movl %edx, (512 + 4 * 2)(%esp) ++ movl %edx, (512 + 4 * 3)(%esp) ++# endif ++ movl %edx, (512 + 4 * 4)(%esp) ++ movl %edx, (512 + 4 * 5)(%esp) ++ movl %edx, (512 + 4 * 6)(%esp) ++ movl %edx, (512 + 4 * 7)(%esp) ++ movl %edx, (512 + 4 * 8)(%esp) ++ movl %edx, (512 + 4 * 9)(%esp) ++ movl %edx, (512 + 4 * 10)(%esp) ++ movl %edx, (512 + 4 * 11)(%esp) ++ movl %edx, (512 + 4 * 12)(%esp) ++ movl %edx, (512 + 4 * 13)(%esp) ++ movl %edx, (512 + 4 * 14)(%esp) ++ movl %edx, (512 + 4 * 15)(%esp) ++# ifdef USE_XSAVE ++ xsave (%esp) ++# else ++ xsavec (%esp) ++# endif ++ /* Restore the argument for ___tls_get_addr in EAX. */ ++ movl %ecx, %eax ++#endif ++ call HIDDEN_JUMPTARGET (___tls_get_addr) ++ /* Get register content back. */ ++#ifdef USE_FNSAVE ++ frstor (%esp) ++#elif defined USE_FXSAVE ++ fxrstor (%esp) ++#else ++ /* Save and retore ___tls_get_addr return value stored in EAX. */ ++ movl %eax, %ecx ++ movl $TLSDESC_CALL_STATE_SAVE_MASK, %eax ++ xorl %edx, %edx ++ xrstor (%esp) ++ movl %ecx, %eax ++#endif ++#if DL_RUNTIME_RESOLVE_REALIGN_STACK ++ mov %ebx, %esp ++ cfi_def_cfa_register(%esp) ++ movl -28(%esp), %ebx ++ cfi_restore(%ebx) ++#else ++ addl $REGISTER_SAVE_AREA, %esp ++ cfi_adjust_cfa_offset(-REGISTER_SAVE_AREA) ++#endif ++ jmp 1b ++ cfi_endproc ++ .size _dl_tlsdesc_dynamic, .-_dl_tlsdesc_dynamic ++ ++#undef STATE_SAVE_ALIGNMENT +diff --git a/sysdeps/i386/dl-tlsdesc.S b/sysdeps/i386/dl-tlsdesc.S +index 90d93caa0c..f002feee56 100644 +--- a/sysdeps/i386/dl-tlsdesc.S ++++ b/sysdeps/i386/dl-tlsdesc.S +@@ -18,8 +18,27 @@ + + #include <sysdep.h> + #include <tls.h> ++#include <cpu-features-offsets.h> ++#include <features-offsets.h> + #include "tlsdesc.h" + ++#ifndef DL_STACK_ALIGNMENT ++/* Due to GCC bug: ++ ++ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066 ++ ++ __tls_get_addr may be called with 4-byte stack alignment. Although ++ this bug has been fixed in GCC 4.9.4, 5.3 and 6, we can't assume ++ that stack will be always aligned at 16 bytes. */ ++# define DL_STACK_ALIGNMENT 4 ++#endif ++ ++/* True if _dl_tlsdesc_dynamic should align stack for STATE_SAVE or align ++ stack to MINIMUM_ALIGNMENT bytes before calling ___tls_get_addr. */ ++#define DL_RUNTIME_RESOLVE_REALIGN_STACK \ ++ (STATE_SAVE_ALIGNMENT > DL_STACK_ALIGNMENT \ ++ || MINIMUM_ALIGNMENT > DL_STACK_ALIGNMENT) ++ + .text + + /* This function is used to compute the TP offset for symbols in +@@ -65,69 +84,35 @@ _dl_tlsdesc_undefweak: + .size _dl_tlsdesc_undefweak, .-_dl_tlsdesc_undefweak + + #ifdef SHARED +- .hidden _dl_tlsdesc_dynamic +- .global _dl_tlsdesc_dynamic +- .type _dl_tlsdesc_dynamic,@function +- +- /* This function is used for symbols that need dynamic TLS. +- +- %eax points to the TLS descriptor, such that 0(%eax) points to +- _dl_tlsdesc_dynamic itself, and 4(%eax) points to a struct +- tlsdesc_dynamic_arg object. It must return in %eax the offset +- between the thread pointer and the object denoted by the +- argument, without clobbering any registers. +- +- The assembly code that follows is a rendition of the following +- C code, hand-optimized a little bit. +- +-ptrdiff_t +-__attribute__ ((__regparm__ (1))) +-_dl_tlsdesc_dynamic (struct tlsdesc *tdp) +-{ +- struct tlsdesc_dynamic_arg *td = tdp->arg; +- dtv_t *dtv = *(dtv_t **)((char *)__thread_pointer + DTV_OFFSET); +- if (__builtin_expect (td->gen_count <= dtv[0].counter +- && (dtv[td->tlsinfo.ti_module].pointer.val +- != TLS_DTV_UNALLOCATED), +- 1)) +- return dtv[td->tlsinfo.ti_module].pointer.val + td->tlsinfo.ti_offset +- - __thread_pointer; +- +- return ___tls_get_addr (&td->tlsinfo) - __thread_pointer; +-} +-*/ +- cfi_startproc +- .align 16 +-_dl_tlsdesc_dynamic: +- /* Like all TLS resolvers, preserve call-clobbered registers. +- We need two scratch regs anyway. */ +- subl $28, %esp +- cfi_adjust_cfa_offset (28) +- movl %ecx, 20(%esp) +- movl %edx, 24(%esp) +- movl TLSDESC_ARG(%eax), %eax +- movl %gs:DTV_OFFSET, %edx +- movl TLSDESC_GEN_COUNT(%eax), %ecx +- cmpl (%edx), %ecx +- ja .Lslow +- movl TLSDESC_MODID(%eax), %ecx +- movl (%edx,%ecx,8), %edx +- cmpl $-1, %edx +- je .Lslow +- movl TLSDESC_MODOFF(%eax), %eax +- addl %edx, %eax +-.Lret: +- movl 20(%esp), %ecx +- subl %gs:0, %eax +- movl 24(%esp), %edx +- addl $28, %esp +- cfi_adjust_cfa_offset (-28) +- ret +- .p2align 4,,7 +-.Lslow: +- cfi_adjust_cfa_offset (28) +- call HIDDEN_JUMPTARGET (___tls_get_addr) +- jmp .Lret +- cfi_endproc +- .size _dl_tlsdesc_dynamic, .-_dl_tlsdesc_dynamic ++# define USE_FNSAVE ++# define MINIMUM_ALIGNMENT 4 ++# define STATE_SAVE_ALIGNMENT 4 ++# define _dl_tlsdesc_dynamic _dl_tlsdesc_dynamic_fnsave ++# include "dl-tlsdesc-dynamic.h" ++# undef _dl_tlsdesc_dynamic ++# undef MINIMUM_ALIGNMENT ++# undef USE_FNSAVE ++ ++# define MINIMUM_ALIGNMENT 16 ++ ++# define USE_FXSAVE ++# define STATE_SAVE_ALIGNMENT 16 ++# define _dl_tlsdesc_dynamic _dl_tlsdesc_dynamic_fxsave ++# include "dl-tlsdesc-dynamic.h" ++# undef _dl_tlsdesc_dynamic ++# undef USE_FXSAVE ++ ++# define USE_XSAVE ++# define STATE_SAVE_ALIGNMENT 64 ++# define _dl_tlsdesc_dynamic _dl_tlsdesc_dynamic_xsave ++# include "dl-tlsdesc-dynamic.h" ++# undef _dl_tlsdesc_dynamic ++# undef USE_XSAVE ++ ++# define USE_XSAVEC ++# define STATE_SAVE_ALIGNMENT 64 ++# define _dl_tlsdesc_dynamic _dl_tlsdesc_dynamic_xsavec ++# include "dl-tlsdesc-dynamic.h" ++# undef _dl_tlsdesc_dynamic ++# undef USE_XSAVEC + #endif /* SHARED */ +diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile +index 4d50b327b5..992aabe43e 100644 +--- a/sysdeps/x86/Makefile ++++ b/sysdeps/x86/Makefile +@@ -1,5 +1,5 @@ + ifeq ($(subdir),csu) +-gen-as-const-headers += cpu-features-offsets.sym ++gen-as-const-headers += cpu-features-offsets.sym features-offsets.sym + endif + + ifeq ($(subdir),elf) +@@ -86,6 +86,11 @@ endif + tst-ifunc-isa-2-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-SSE4_2,-AVX,-AVX2,-AVX512F + tst-ifunc-isa-2-static-ENV = $(tst-ifunc-isa-2-ENV) + tst-hwcap-tunables-ARGS = -- $(host-test-program-cmd) ++ ++CFLAGS-tst-gnu2-tls2.c += -msse ++CFLAGS-tst-gnu2-tls2mod0.c += -msse2 -mtune=haswell ++CFLAGS-tst-gnu2-tls2mod1.c += -msse2 -mtune=haswell ++CFLAGS-tst-gnu2-tls2mod2.c += -msse2 -mtune=haswell + endif + + ifeq ($(subdir),math) +diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c +index 25e6622a79..835113b42f 100644 +--- a/sysdeps/x86/cpu-features.c ++++ b/sysdeps/x86/cpu-features.c +@@ -27,8 +27,13 @@ + extern void TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *) + attribute_hidden; + +-#if defined SHARED && defined __x86_64__ +-# include <dl-plt-rewrite.h> ++#if defined SHARED ++extern void _dl_tlsdesc_dynamic_fxsave (void) attribute_hidden; ++extern void _dl_tlsdesc_dynamic_xsave (void) attribute_hidden; ++extern void _dl_tlsdesc_dynamic_xsavec (void) attribute_hidden; ++ ++# ifdef __x86_64__ ++# include <dl-plt-rewrite.h> + + static void + TUNABLE_CALLBACK (set_plt_rewrite) (tunable_val_t *valp) +@@ -47,6 +52,15 @@ TUNABLE_CALLBACK (set_plt_rewrite) (tunable_val_t *valp) + : plt_rewrite_jmp); + } + } ++# else ++extern void _dl_tlsdesc_dynamic_fnsave (void) attribute_hidden; ++# endif ++#endif ++ ++#ifdef __x86_64__ ++extern void _dl_runtime_resolve_fxsave (void) attribute_hidden; ++extern void _dl_runtime_resolve_xsave (void) attribute_hidden; ++extern void _dl_runtime_resolve_xsavec (void) attribute_hidden; + #endif + + #ifdef __LP64__ +@@ -1130,6 +1144,44 @@ no_cpuid: + TUNABLE_CALLBACK (set_x86_shstk)); + #endif + ++ if (GLRO(dl_x86_cpu_features).xsave_state_size != 0) ++ { ++ if (CPU_FEATURE_USABLE_P (cpu_features, XSAVEC)) ++ { ++#ifdef __x86_64__ ++ GLRO(dl_x86_64_runtime_resolve) = _dl_runtime_resolve_xsavec; ++#endif ++#ifdef SHARED ++ GLRO(dl_x86_tlsdesc_dynamic) = _dl_tlsdesc_dynamic_xsavec; ++#endif ++ } ++ else ++ { ++#ifdef __x86_64__ ++ GLRO(dl_x86_64_runtime_resolve) = _dl_runtime_resolve_xsave; ++#endif ++#ifdef SHARED ++ GLRO(dl_x86_tlsdesc_dynamic) = _dl_tlsdesc_dynamic_xsave; ++#endif ++ } ++ } ++ else ++ { ++#ifdef __x86_64__ ++ GLRO(dl_x86_64_runtime_resolve) = _dl_runtime_resolve_fxsave; ++# ifdef SHARED ++ GLRO(dl_x86_tlsdesc_dynamic) = _dl_tlsdesc_dynamic_fxsave; ++# endif ++#else ++# ifdef SHARED ++ if (CPU_FEATURE_USABLE_P (cpu_features, FXSR)) ++ GLRO(dl_x86_tlsdesc_dynamic) = _dl_tlsdesc_dynamic_fxsave; ++ else ++ GLRO(dl_x86_tlsdesc_dynamic) = _dl_tlsdesc_dynamic_fnsave; ++# endif ++#endif ++ } ++ + #ifdef SHARED + # ifdef __x86_64__ + TUNABLE_GET (plt_rewrite, tunable_val_t *, +diff --git a/sysdeps/x86/dl-procinfo.c b/sysdeps/x86/dl-procinfo.c +index ee957b4d70..5920d4b320 100644 +--- a/sysdeps/x86/dl-procinfo.c ++++ b/sysdeps/x86/dl-procinfo.c +@@ -86,3 +86,19 @@ PROCINFO_CLASS const char _dl_x86_platforms[4][9] + #else + , + #endif ++ ++#if defined SHARED && !IS_IN (ldconfig) ++# if !defined PROCINFO_DECL ++ ._dl_x86_tlsdesc_dynamic ++# else ++PROCINFO_CLASS void * _dl_x86_tlsdesc_dynamic ++# endif ++# ifndef PROCINFO_DECL ++= NULL ++# endif ++# ifdef PROCINFO_DECL ++; ++# else ++, ++# endif ++#endif +diff --git a/sysdeps/x86_64/features-offsets.sym b/sysdeps/x86/features-offsets.sym +similarity index 89% +rename from sysdeps/x86_64/features-offsets.sym +rename to sysdeps/x86/features-offsets.sym +index 9e4be3393a..77e990c705 100644 +--- a/sysdeps/x86_64/features-offsets.sym ++++ b/sysdeps/x86/features-offsets.sym +@@ -3,4 +3,6 @@ + #include <ldsodefs.h> + + RTLD_GLOBAL_RO_DL_X86_CPU_FEATURES_OFFSET offsetof (struct rtld_global_ro, _dl_x86_cpu_features) ++#ifdef __x86_64__ + RTLD_GLOBAL_DL_X86_FEATURE_1_OFFSET offsetof (struct rtld_global, _dl_x86_feature_1) ++#endif +diff --git a/sysdeps/x86/sysdep.h b/sysdeps/x86/sysdep.h +index 837fd28734..485cad9c02 100644 +--- a/sysdeps/x86/sysdep.h ++++ b/sysdeps/x86/sysdep.h +@@ -70,6 +70,12 @@ + | (1 << X86_XSTATE_ZMM_H_ID)) + #endif + ++/* States which should be saved for TLSDESC_CALL and TLS_DESC_CALL. ++ Compiler assumes that all registers, including x87 FPU stack registers, ++ are unchanged after CALL, except for EFLAGS and RAX/EAX. */ ++#define TLSDESC_CALL_STATE_SAVE_MASK \ ++ (STATE_SAVE_MASK | (1 << X86_XSTATE_X87_ID)) ++ + /* Constants for bits in __x86_string_control: */ + + /* Avoid short distance REP MOVSB. */ +diff --git a/sysdeps/x86/tst-gnu2-tls2.c b/sysdeps/x86/tst-gnu2-tls2.c +new file mode 100644 +index 0000000000..de900a423b +--- /dev/null ++++ b/sysdeps/x86/tst-gnu2-tls2.c +@@ -0,0 +1,20 @@ ++#ifndef __x86_64__ ++#include <sys/platform/x86.h> ++ ++#define IS_SUPPORTED() CPU_FEATURE_ACTIVE (SSE2) ++#endif ++ ++/* Clear XMM0...XMM7 */ ++#define PREPARE_MALLOC() \ ++{ \ ++ asm volatile ("xorps %%xmm0, %%xmm0" : : : "xmm0" ); \ ++ asm volatile ("xorps %%xmm1, %%xmm1" : : : "xmm1" ); \ ++ asm volatile ("xorps %%xmm2, %%xmm2" : : : "xmm2" ); \ ++ asm volatile ("xorps %%xmm3, %%xmm3" : : : "xmm3" ); \ ++ asm volatile ("xorps %%xmm4, %%xmm4" : : : "xmm4" ); \ ++ asm volatile ("xorps %%xmm5, %%xmm5" : : : "xmm5" ); \ ++ asm volatile ("xorps %%xmm6, %%xmm6" : : : "xmm6" ); \ ++ asm volatile ("xorps %%xmm7, %%xmm7" : : : "xmm7" ); \ ++} ++ ++#include <elf/tst-gnu2-tls2.c> +diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile +index 90f4ecfd26..e8babc9a4e 100644 +--- a/sysdeps/x86_64/Makefile ++++ b/sysdeps/x86_64/Makefile +@@ -10,7 +10,7 @@ LDFLAGS-rtld += -Wl,-z,nomark-plt + endif + + ifeq ($(subdir),csu) +-gen-as-const-headers += features-offsets.sym link-defines.sym ++gen-as-const-headers += link-defines.sym + endif + + ifeq ($(subdir),gmon) +diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h +index 6d605d0d32..ff5d45f7cb 100644 +--- a/sysdeps/x86_64/dl-machine.h ++++ b/sysdeps/x86_64/dl-machine.h +@@ -71,9 +71,6 @@ elf_machine_runtime_setup (struct link_map *l, struct r_scope_elem *scope[], + int lazy, int profile) + { + Elf64_Addr *got; +- extern void _dl_runtime_resolve_fxsave (ElfW(Word)) attribute_hidden; +- extern void _dl_runtime_resolve_xsave (ElfW(Word)) attribute_hidden; +- extern void _dl_runtime_resolve_xsavec (ElfW(Word)) attribute_hidden; + extern void _dl_runtime_profile_sse (ElfW(Word)) attribute_hidden; + extern void _dl_runtime_profile_avx (ElfW(Word)) attribute_hidden; + extern void _dl_runtime_profile_avx512 (ElfW(Word)) attribute_hidden; +@@ -96,8 +93,6 @@ elf_machine_runtime_setup (struct link_map *l, struct r_scope_elem *scope[], + /* Identify this shared object. */ + *(ElfW(Addr) *) (got + 1) = (ElfW(Addr)) l; + +- const struct cpu_features* cpu_features = __get_cpu_features (); +- + #ifdef SHARED + /* The got[2] entry contains the address of a function which gets + called to get the address of a so far unresolved function and +@@ -107,6 +102,7 @@ elf_machine_runtime_setup (struct link_map *l, struct r_scope_elem *scope[], + end in this function. */ + if (__glibc_unlikely (profile)) + { ++ const struct cpu_features* cpu_features = __get_cpu_features (); + if (X86_ISA_CPU_FEATURE_USABLE_P (cpu_features, AVX512F)) + *(ElfW(Addr) *) (got + 2) = (ElfW(Addr)) &_dl_runtime_profile_avx512; + else if (X86_ISA_CPU_FEATURE_USABLE_P (cpu_features, AVX)) +@@ -126,15 +122,8 @@ elf_machine_runtime_setup (struct link_map *l, struct r_scope_elem *scope[], + /* This function will get called to fix up the GOT entry + indicated by the offset on the stack, and then jump to + the resolved address. */ +- if (MINIMUM_X86_ISA_LEVEL >= AVX_X86_ISA_LEVEL +- || GLRO(dl_x86_cpu_features).xsave_state_size != 0) +- *(ElfW(Addr) *) (got + 2) +- = (CPU_FEATURE_USABLE_P (cpu_features, XSAVEC) +- ? (ElfW(Addr)) &_dl_runtime_resolve_xsavec +- : (ElfW(Addr)) &_dl_runtime_resolve_xsave); +- else +- *(ElfW(Addr) *) (got + 2) +- = (ElfW(Addr)) &_dl_runtime_resolve_fxsave; ++ *(ElfW(Addr) *) (got + 2) ++ = (ElfW(Addr)) GLRO(dl_x86_64_runtime_resolve); + } + } + +@@ -383,7 +372,7 @@ and creates an unsatisfiable circular dependency.\n", + { + td->arg = _dl_make_tlsdesc_dynamic + (sym_map, sym->st_value + reloc->r_addend); +- td->entry = _dl_tlsdesc_dynamic; ++ td->entry = GLRO(dl_x86_tlsdesc_dynamic); + } + else + # endif +diff --git a/sysdeps/x86_64/dl-procinfo.c b/sysdeps/x86_64/dl-procinfo.c +index 4d1d790fbb..06637a8154 100644 +--- a/sysdeps/x86_64/dl-procinfo.c ++++ b/sysdeps/x86_64/dl-procinfo.c +@@ -41,5 +41,21 @@ + + #include <sysdeps/x86/dl-procinfo.c> + ++#if !IS_IN (ldconfig) ++# if !defined PROCINFO_DECL && defined SHARED ++ ._dl_x86_64_runtime_resolve ++# else ++PROCINFO_CLASS void * _dl_x86_64_runtime_resolve ++# endif ++# ifndef PROCINFO_DECL ++= NULL ++# endif ++# if !defined SHARED || defined PROCINFO_DECL ++; ++# else ++, ++# endif ++#endif ++ + #undef PROCINFO_DECL + #undef PROCINFO_CLASS +diff --git a/sysdeps/x86_64/dl-tlsdesc-dynamic.h b/sysdeps/x86_64/dl-tlsdesc-dynamic.h +new file mode 100644 +index 0000000000..0c2e8d5320 +--- /dev/null ++++ b/sysdeps/x86_64/dl-tlsdesc-dynamic.h +@@ -0,0 +1,166 @@ ++/* Thread-local storage handling in the ELF dynamic linker. x86_64 version. ++ Copyright (C) 2004-2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#ifndef SECTION ++# define SECTION(p) p ++#endif ++ ++#undef REGISTER_SAVE_AREA ++#undef LOCAL_STORAGE_AREA ++#undef BASE ++ ++#include "dl-trampoline-state.h" ++ ++ .section SECTION(.text),"ax",@progbits ++ ++ .hidden _dl_tlsdesc_dynamic ++ .global _dl_tlsdesc_dynamic ++ .type _dl_tlsdesc_dynamic,@function ++ ++ /* %rax points to the TLS descriptor, such that 0(%rax) points to ++ _dl_tlsdesc_dynamic itself, and 8(%rax) points to a struct ++ tlsdesc_dynamic_arg object. It must return in %rax the offset ++ between the thread pointer and the object denoted by the ++ argument, without clobbering any registers. ++ ++ The assembly code that follows is a rendition of the following ++ C code, hand-optimized a little bit. ++ ++ptrdiff_t ++_dl_tlsdesc_dynamic (register struct tlsdesc *tdp asm ("%rax")) ++{ ++ struct tlsdesc_dynamic_arg *td = tdp->arg; ++ dtv_t *dtv = *(dtv_t **)((char *)__thread_pointer + DTV_OFFSET); ++ if (__builtin_expect (td->gen_count <= dtv[0].counter ++ && (dtv[td->tlsinfo.ti_module].pointer.val ++ != TLS_DTV_UNALLOCATED), ++ 1)) ++ return dtv[td->tlsinfo.ti_module].pointer.val + td->tlsinfo.ti_offset ++ - __thread_pointer; ++ ++ return __tls_get_addr_internal (&td->tlsinfo) - __thread_pointer; ++} ++*/ ++ cfi_startproc ++ .align 16 ++_dl_tlsdesc_dynamic: ++ _CET_ENDBR ++ /* Preserve call-clobbered registers that we modify. ++ We need two scratch regs anyway. */ ++ movq %rsi, -16(%rsp) ++ mov %fs:DTV_OFFSET, %RSI_LP ++ movq %rdi, -8(%rsp) ++ movq TLSDESC_ARG(%rax), %rdi ++ movq (%rsi), %rax ++ cmpq %rax, TLSDESC_GEN_COUNT(%rdi) ++ ja 2f ++ movq TLSDESC_MODID(%rdi), %rax ++ salq $4, %rax ++ movq (%rax,%rsi), %rax ++ cmpq $-1, %rax ++ je 2f ++ addq TLSDESC_MODOFF(%rdi), %rax ++1: ++ movq -16(%rsp), %rsi ++ sub %fs:0, %RAX_LP ++ movq -8(%rsp), %rdi ++ ret ++2: ++#if DL_RUNTIME_RESOLVE_REALIGN_STACK ++ movq %rbx, -24(%rsp) ++ mov %RSP_LP, %RBX_LP ++ cfi_def_cfa_register(%rbx) ++ and $-STATE_SAVE_ALIGNMENT, %RSP_LP ++#endif ++#ifdef REGISTER_SAVE_AREA ++# if DL_RUNTIME_RESOLVE_REALIGN_STACK ++ /* STATE_SAVE_OFFSET has space for 8 integer registers. But we ++ need space for RCX, RDX, RSI, RDI, R8, R9, R10 and R11, plus ++ RBX above. */ ++ sub $(REGISTER_SAVE_AREA + STATE_SAVE_ALIGNMENT), %RSP_LP ++# else ++ sub $REGISTER_SAVE_AREA, %RSP_LP ++ cfi_adjust_cfa_offset(REGISTER_SAVE_AREA) ++# endif ++#else ++ /* Allocate stack space of the required size to save the state. */ ++ sub _rtld_local_ro+RTLD_GLOBAL_RO_DL_X86_CPU_FEATURES_OFFSET+XSAVE_STATE_SIZE_OFFSET(%rip), %RSP_LP ++#endif ++ /* Besides rdi and rsi, saved above, save rcx, rdx, r8, r9, ++ r10 and r11. */ ++ movq %rcx, REGISTER_SAVE_RCX(%rsp) ++ movq %rdx, REGISTER_SAVE_RDX(%rsp) ++ movq %r8, REGISTER_SAVE_R8(%rsp) ++ movq %r9, REGISTER_SAVE_R9(%rsp) ++ movq %r10, REGISTER_SAVE_R10(%rsp) ++ movq %r11, REGISTER_SAVE_R11(%rsp) ++#ifdef USE_FXSAVE ++ fxsave STATE_SAVE_OFFSET(%rsp) ++#else ++ movl $TLSDESC_CALL_STATE_SAVE_MASK, %eax ++ xorl %edx, %edx ++ /* Clear the XSAVE Header. */ ++# ifdef USE_XSAVE ++ movq %rdx, (STATE_SAVE_OFFSET + 512)(%rsp) ++ movq %rdx, (STATE_SAVE_OFFSET + 512 + 8)(%rsp) ++# endif ++ movq %rdx, (STATE_SAVE_OFFSET + 512 + 8 * 2)(%rsp) ++ movq %rdx, (STATE_SAVE_OFFSET + 512 + 8 * 3)(%rsp) ++ movq %rdx, (STATE_SAVE_OFFSET + 512 + 8 * 4)(%rsp) ++ movq %rdx, (STATE_SAVE_OFFSET + 512 + 8 * 5)(%rsp) ++ movq %rdx, (STATE_SAVE_OFFSET + 512 + 8 * 6)(%rsp) ++ movq %rdx, (STATE_SAVE_OFFSET + 512 + 8 * 7)(%rsp) ++# ifdef USE_XSAVE ++ xsave STATE_SAVE_OFFSET(%rsp) ++# else ++ xsavec STATE_SAVE_OFFSET(%rsp) ++# endif ++#endif ++ /* %rdi already points to the tlsinfo data structure. */ ++ call HIDDEN_JUMPTARGET (__tls_get_addr) ++ # Get register content back. ++#ifdef USE_FXSAVE ++ fxrstor STATE_SAVE_OFFSET(%rsp) ++#else ++ /* Save and retore __tls_get_addr return value stored in RAX. */ ++ mov %RAX_LP, %RCX_LP ++ movl $TLSDESC_CALL_STATE_SAVE_MASK, %eax ++ xorl %edx, %edx ++ xrstor STATE_SAVE_OFFSET(%rsp) ++ mov %RCX_LP, %RAX_LP ++#endif ++ movq REGISTER_SAVE_R11(%rsp), %r11 ++ movq REGISTER_SAVE_R10(%rsp), %r10 ++ movq REGISTER_SAVE_R9(%rsp), %r9 ++ movq REGISTER_SAVE_R8(%rsp), %r8 ++ movq REGISTER_SAVE_RDX(%rsp), %rdx ++ movq REGISTER_SAVE_RCX(%rsp), %rcx ++#if DL_RUNTIME_RESOLVE_REALIGN_STACK ++ mov %RBX_LP, %RSP_LP ++ cfi_def_cfa_register(%rsp) ++ movq -24(%rsp), %rbx ++ cfi_restore(%rbx) ++#else ++ add $REGISTER_SAVE_AREA, %RSP_LP ++ cfi_adjust_cfa_offset(-REGISTER_SAVE_AREA) ++#endif ++ jmp 1b ++ cfi_endproc ++ .size _dl_tlsdesc_dynamic, .-_dl_tlsdesc_dynamic ++ ++#undef STATE_SAVE_ALIGNMENT +diff --git a/sysdeps/x86_64/dl-tlsdesc.S b/sysdeps/x86_64/dl-tlsdesc.S +index f748af2ece..ea69f5223a 100644 +--- a/sysdeps/x86_64/dl-tlsdesc.S ++++ b/sysdeps/x86_64/dl-tlsdesc.S +@@ -18,7 +18,19 @@ + + #include <sysdep.h> + #include <tls.h> ++#include <cpu-features-offsets.h> ++#include <features-offsets.h> + #include "tlsdesc.h" ++#include "dl-trampoline-save.h" ++ ++/* Area on stack to save and restore registers used for parameter ++ passing when calling _dl_tlsdesc_dynamic. */ ++#define REGISTER_SAVE_RCX 0 ++#define REGISTER_SAVE_RDX (REGISTER_SAVE_RCX + 8) ++#define REGISTER_SAVE_R8 (REGISTER_SAVE_RDX + 8) ++#define REGISTER_SAVE_R9 (REGISTER_SAVE_R8 + 8) ++#define REGISTER_SAVE_R10 (REGISTER_SAVE_R9 + 8) ++#define REGISTER_SAVE_R11 (REGISTER_SAVE_R10 + 8) + + .text + +@@ -67,80 +79,24 @@ _dl_tlsdesc_undefweak: + .size _dl_tlsdesc_undefweak, .-_dl_tlsdesc_undefweak + + #ifdef SHARED +- .hidden _dl_tlsdesc_dynamic +- .global _dl_tlsdesc_dynamic +- .type _dl_tlsdesc_dynamic,@function +- +- /* %rax points to the TLS descriptor, such that 0(%rax) points to +- _dl_tlsdesc_dynamic itself, and 8(%rax) points to a struct +- tlsdesc_dynamic_arg object. It must return in %rax the offset +- between the thread pointer and the object denoted by the +- argument, without clobbering any registers. +- +- The assembly code that follows is a rendition of the following +- C code, hand-optimized a little bit. +- +-ptrdiff_t +-_dl_tlsdesc_dynamic (register struct tlsdesc *tdp asm ("%rax")) +-{ +- struct tlsdesc_dynamic_arg *td = tdp->arg; +- dtv_t *dtv = *(dtv_t **)((char *)__thread_pointer + DTV_OFFSET); +- if (__builtin_expect (td->gen_count <= dtv[0].counter +- && (dtv[td->tlsinfo.ti_module].pointer.val +- != TLS_DTV_UNALLOCATED), +- 1)) +- return dtv[td->tlsinfo.ti_module].pointer.val + td->tlsinfo.ti_offset +- - __thread_pointer; +- +- return __tls_get_addr_internal (&td->tlsinfo) - __thread_pointer; +-} +-*/ +- cfi_startproc +- .align 16 +-_dl_tlsdesc_dynamic: +- _CET_ENDBR +- /* Preserve call-clobbered registers that we modify. +- We need two scratch regs anyway. */ +- movq %rsi, -16(%rsp) +- mov %fs:DTV_OFFSET, %RSI_LP +- movq %rdi, -8(%rsp) +- movq TLSDESC_ARG(%rax), %rdi +- movq (%rsi), %rax +- cmpq %rax, TLSDESC_GEN_COUNT(%rdi) +- ja .Lslow +- movq TLSDESC_MODID(%rdi), %rax +- salq $4, %rax +- movq (%rax,%rsi), %rax +- cmpq $-1, %rax +- je .Lslow +- addq TLSDESC_MODOFF(%rdi), %rax +-.Lret: +- movq -16(%rsp), %rsi +- sub %fs:0, %RAX_LP +- movq -8(%rsp), %rdi +- ret +-.Lslow: +- /* Besides rdi and rsi, saved above, save rdx, rcx, r8, r9, +- r10 and r11. Also, align the stack, that's off by 8 bytes. */ +- subq $72, %rsp +- cfi_adjust_cfa_offset (72) +- movq %rdx, 8(%rsp) +- movq %rcx, 16(%rsp) +- movq %r8, 24(%rsp) +- movq %r9, 32(%rsp) +- movq %r10, 40(%rsp) +- movq %r11, 48(%rsp) +- /* %rdi already points to the tlsinfo data structure. */ +- call HIDDEN_JUMPTARGET (__tls_get_addr) +- movq 8(%rsp), %rdx +- movq 16(%rsp), %rcx +- movq 24(%rsp), %r8 +- movq 32(%rsp), %r9 +- movq 40(%rsp), %r10 +- movq 48(%rsp), %r11 +- addq $72, %rsp +- cfi_adjust_cfa_offset (-72) +- jmp .Lret +- cfi_endproc +- .size _dl_tlsdesc_dynamic, .-_dl_tlsdesc_dynamic ++# define USE_FXSAVE ++# define STATE_SAVE_ALIGNMENT 16 ++# define _dl_tlsdesc_dynamic _dl_tlsdesc_dynamic_fxsave ++# include "dl-tlsdesc-dynamic.h" ++# undef _dl_tlsdesc_dynamic ++# undef USE_FXSAVE ++ ++# define USE_XSAVE ++# define STATE_SAVE_ALIGNMENT 64 ++# define _dl_tlsdesc_dynamic _dl_tlsdesc_dynamic_xsave ++# include "dl-tlsdesc-dynamic.h" ++# undef _dl_tlsdesc_dynamic ++# undef USE_XSAVE ++ ++# define USE_XSAVEC ++# define STATE_SAVE_ALIGNMENT 64 ++# define _dl_tlsdesc_dynamic _dl_tlsdesc_dynamic_xsavec ++# include "dl-tlsdesc-dynamic.h" ++# undef _dl_tlsdesc_dynamic ++# undef USE_XSAVEC + #endif /* SHARED */ +diff --git a/sysdeps/x86_64/dl-trampoline-save.h b/sysdeps/x86_64/dl-trampoline-save.h +new file mode 100644 +index 0000000000..84eac4a8ac +--- /dev/null ++++ b/sysdeps/x86_64/dl-trampoline-save.h +@@ -0,0 +1,34 @@ ++/* x86-64 PLT trampoline register save macros. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#ifndef DL_STACK_ALIGNMENT ++/* Due to GCC bug: ++ ++ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066 ++ ++ __tls_get_addr may be called with 8-byte stack alignment. Although ++ this bug has been fixed in GCC 4.9.4, 5.3 and 6, we can't assume ++ that stack will be always aligned at 16 bytes. */ ++# define DL_STACK_ALIGNMENT 8 ++#endif ++ ++/* True if _dl_runtime_resolve should align stack for STATE_SAVE or align ++ stack to 16 bytes before calling _dl_fixup. */ ++#define DL_RUNTIME_RESOLVE_REALIGN_STACK \ ++ (STATE_SAVE_ALIGNMENT > DL_STACK_ALIGNMENT \ ++ || 16 > DL_STACK_ALIGNMENT) +diff --git a/sysdeps/x86_64/dl-trampoline-state.h b/sysdeps/x86_64/dl-trampoline-state.h +new file mode 100644 +index 0000000000..575f120797 +--- /dev/null ++++ b/sysdeps/x86_64/dl-trampoline-state.h +@@ -0,0 +1,51 @@ ++/* x86-64 PLT dl-trampoline state macros. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#if (STATE_SAVE_ALIGNMENT % 16) != 0 ++# error STATE_SAVE_ALIGNMENT must be multiple of 16 ++#endif ++ ++#if (STATE_SAVE_OFFSET % STATE_SAVE_ALIGNMENT) != 0 ++# error STATE_SAVE_OFFSET must be multiple of STATE_SAVE_ALIGNMENT ++#endif ++ ++#if DL_RUNTIME_RESOLVE_REALIGN_STACK ++/* Local stack area before jumping to function address: RBX. */ ++# define LOCAL_STORAGE_AREA 8 ++# define BASE rbx ++# ifdef USE_FXSAVE ++/* Use fxsave to save XMM registers. */ ++# define REGISTER_SAVE_AREA (512 + STATE_SAVE_OFFSET) ++# if (REGISTER_SAVE_AREA % 16) != 0 ++# error REGISTER_SAVE_AREA must be multiple of 16 ++# endif ++# endif ++#else ++# ifndef USE_FXSAVE ++# error USE_FXSAVE must be defined ++# endif ++/* Use fxsave to save XMM registers. */ ++# define REGISTER_SAVE_AREA (512 + STATE_SAVE_OFFSET + 8) ++/* Local stack area before jumping to function address: All saved ++ registers. */ ++# define LOCAL_STORAGE_AREA REGISTER_SAVE_AREA ++# define BASE rsp ++# if (REGISTER_SAVE_AREA % 16) != 8 ++# error REGISTER_SAVE_AREA must be odd multiple of 8 ++# endif ++#endif +diff --git a/sysdeps/x86_64/dl-trampoline.S b/sysdeps/x86_64/dl-trampoline.S +index b2e7e0f69b..87c5137837 100644 +--- a/sysdeps/x86_64/dl-trampoline.S ++++ b/sysdeps/x86_64/dl-trampoline.S +@@ -22,25 +22,7 @@ + #include <features-offsets.h> + #include <link-defines.h> + #include <isa-level.h> +- +-#ifndef DL_STACK_ALIGNMENT +-/* Due to GCC bug: +- +- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066 +- +- __tls_get_addr may be called with 8-byte stack alignment. Although +- this bug has been fixed in GCC 4.9.4, 5.3 and 6, we can't assume +- that stack will be always aligned at 16 bytes. We use unaligned +- 16-byte move to load and store SSE registers, which has no penalty +- on modern processors if stack is 16-byte aligned. */ +-# define DL_STACK_ALIGNMENT 8 +-#endif +- +-/* True if _dl_runtime_resolve should align stack for STATE_SAVE or align +- stack to 16 bytes before calling _dl_fixup. */ +-#define DL_RUNTIME_RESOLVE_REALIGN_STACK \ +- (STATE_SAVE_ALIGNMENT > DL_STACK_ALIGNMENT \ +- || 16 > DL_STACK_ALIGNMENT) ++#include "dl-trampoline-save.h" + + /* Area on stack to save and restore registers used for parameter + passing when calling _dl_fixup. */ +diff --git a/sysdeps/x86_64/dl-trampoline.h b/sysdeps/x86_64/dl-trampoline.h +index f55c6ea040..d9ccfb40d4 100644 +--- a/sysdeps/x86_64/dl-trampoline.h ++++ b/sysdeps/x86_64/dl-trampoline.h +@@ -27,39 +27,7 @@ + # undef LOCAL_STORAGE_AREA + # undef BASE + +-# if (STATE_SAVE_ALIGNMENT % 16) != 0 +-# error STATE_SAVE_ALIGNMENT must be multiple of 16 +-# endif +- +-# if (STATE_SAVE_OFFSET % STATE_SAVE_ALIGNMENT) != 0 +-# error STATE_SAVE_OFFSET must be multiple of STATE_SAVE_ALIGNMENT +-# endif +- +-# if DL_RUNTIME_RESOLVE_REALIGN_STACK +-/* Local stack area before jumping to function address: RBX. */ +-# define LOCAL_STORAGE_AREA 8 +-# define BASE rbx +-# ifdef USE_FXSAVE +-/* Use fxsave to save XMM registers. */ +-# define REGISTER_SAVE_AREA (512 + STATE_SAVE_OFFSET) +-# if (REGISTER_SAVE_AREA % 16) != 0 +-# error REGISTER_SAVE_AREA must be multiple of 16 +-# endif +-# endif +-# else +-# ifndef USE_FXSAVE +-# error USE_FXSAVE must be defined +-# endif +-/* Use fxsave to save XMM registers. */ +-# define REGISTER_SAVE_AREA (512 + STATE_SAVE_OFFSET + 8) +-/* Local stack area before jumping to function address: All saved +- registers. */ +-# define LOCAL_STORAGE_AREA REGISTER_SAVE_AREA +-# define BASE rsp +-# if (REGISTER_SAVE_AREA % 16) != 8 +-# error REGISTER_SAVE_AREA must be odd multiple of 8 +-# endif +-# endif ++# include "dl-trampoline-state.h" + + .globl _dl_runtime_resolve + .hidden _dl_runtime_resolve + +commit 853e915fdd6ae6c5f1a7a68d2594ec8dbfef1286 +Author: H.J. Lu <hjl.tools@gmail.com> +Date: Wed Feb 28 12:08:03 2024 -0800 + + x86-64: Update _dl_tlsdesc_dynamic to preserve AMX registers + + _dl_tlsdesc_dynamic should also preserve AMX registers which are + caller-saved. Add X86_XSTATE_TILECFG_ID and X86_XSTATE_TILEDATA_ID + to x86-64 TLSDESC_CALL_STATE_SAVE_MASK. Compute the AMX state size + and save it in xsave_state_full_size which is only used by + _dl_tlsdesc_dynamic_xsave and _dl_tlsdesc_dynamic_xsavec. This fixes + the AMX part of BZ #31372. Tested on AMX processor. + + AMX test is enabled only for compilers with the fix for + + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114098 + + GCC 14 and GCC 11/12/13 branches have the bug fix. + Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com> + + (cherry picked from commit 9b7091415af47082664717210ac49d51551456ab) + +diff --git a/sysdeps/unix/sysv/linux/x86_64/Makefile b/sysdeps/unix/sysv/linux/x86_64/Makefile +index 4223feb95f..9a1e7aa646 100644 +--- a/sysdeps/unix/sysv/linux/x86_64/Makefile ++++ b/sysdeps/unix/sysv/linux/x86_64/Makefile +@@ -63,6 +63,33 @@ $(objpfx)libx86-64-isa-level%.os: $(..)/sysdeps/unix/sysv/linux/x86_64/x86-64-is + $(objpfx)libx86-64-isa-level.so: $(objpfx)libx86-64-isa-level-1.so + cp $< $@ + endif ++ ++ifeq (yes,$(have-mamx-tile)) ++tests += \ ++ tst-gnu2-tls2-amx \ ++# tests ++ ++modules-names += \ ++ tst-gnu2-tls2-amx-mod0 \ ++ tst-gnu2-tls2-amx-mod1 \ ++ tst-gnu2-tls2-amx-mod2 \ ++# modules-names ++ ++$(objpfx)tst-gnu2-tls2-amx: $(shared-thread-library) ++$(objpfx)tst-gnu2-tls2-amx.out: \ ++ $(objpfx)tst-gnu2-tls2-amx-mod0.so \ ++ $(objpfx)tst-gnu2-tls2-amx-mod1.so \ ++ $(objpfx)tst-gnu2-tls2-amx-mod2.so ++$(objpfx)tst-gnu2-tls2-amx-mod0.so: $(libsupport) ++$(objpfx)tst-gnu2-tls2-amx-mod1.so: $(libsupport) ++$(objpfx)tst-gnu2-tls2-amx-mod2.so: $(libsupport) ++ ++CFLAGS-tst-gnu2-tls2-amx.c += -mamx-tile ++CFLAGS-tst-gnu2-tls2-amx-mod0.c += -mamx-tile -mtls-dialect=gnu2 ++CFLAGS-tst-gnu2-tls2-amx-mod1.c += -mamx-tile -mtls-dialect=gnu2 ++CFLAGS-tst-gnu2-tls2-amx-mod2.c += -mamx-tile -mtls-dialect=gnu2 ++endif ++ + endif # $(subdir) == elf + + ifneq ($(enable-cet),no) +diff --git a/sysdeps/unix/sysv/linux/x86_64/include/asm/prctl.h b/sysdeps/unix/sysv/linux/x86_64/include/asm/prctl.h +index 2f511321ad..ef4631bf4b 100644 +--- a/sysdeps/unix/sysv/linux/x86_64/include/asm/prctl.h ++++ b/sysdeps/unix/sysv/linux/x86_64/include/asm/prctl.h +@@ -20,3 +20,8 @@ + # define ARCH_SHSTK_SHSTK 0x1 + # define ARCH_SHSTK_WRSS 0x2 + #endif ++ ++#ifndef ARCH_GET_XCOMP_PERM ++# define ARCH_GET_XCOMP_PERM 0x1022 ++# define ARCH_REQ_XCOMP_PERM 0x1023 ++#endif +diff --git a/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx-mod0.c b/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx-mod0.c +new file mode 100644 +index 0000000000..2e0c7b91b7 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx-mod0.c +@@ -0,0 +1,2 @@ ++#include "tst-gnu2-tls2-amx.h" ++#include <tst-gnu2-tls2mod0.c> +diff --git a/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx-mod1.c b/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx-mod1.c +new file mode 100644 +index 0000000000..b8a8ccf1c1 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx-mod1.c +@@ -0,0 +1,2 @@ ++#include "tst-gnu2-tls2-amx.h" ++#include <tst-gnu2-tls2mod1.c> +diff --git a/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx-mod2.c b/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx-mod2.c +new file mode 100644 +index 0000000000..cdf4a8f363 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx-mod2.c +@@ -0,0 +1,2 @@ ++#include "tst-gnu2-tls2-amx.h" ++#include <tst-gnu2-tls2mod2.c> +diff --git a/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx.c b/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx.c +new file mode 100644 +index 0000000000..ae4dd82556 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx.c +@@ -0,0 +1,83 @@ ++/* Test TLSDESC relocation with AMX. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <http://www.gnu.org/licenses/>. */ ++ ++#include <stdbool.h> ++#include <asm/prctl.h> ++#include <support/check.h> ++#include "tst-gnu2-tls2-amx.h" ++ ++extern int arch_prctl (int, ...); ++ ++#define X86_XSTATE_TILECFG_ID 17 ++#define X86_XSTATE_TILEDATA_ID 18 ++ ++/* Initialize tile config. */ ++__attribute__ ((noinline, noclone)) ++static void ++init_tile_config (__tilecfg *tileinfo) ++{ ++ int i; ++ tileinfo->palette_id = 1; ++ tileinfo->start_row = 0; ++ ++ tileinfo->colsb[0] = MAX_ROWS; ++ tileinfo->rows[0] = MAX_ROWS; ++ ++ for (i = 1; i < 4; ++i) ++ { ++ tileinfo->colsb[i] = MAX_COLS; ++ tileinfo->rows[i] = MAX_ROWS; ++ } ++ ++ _tile_loadconfig (tileinfo); ++} ++ ++static bool ++enable_amx (void) ++{ ++ uint64_t bitmask; ++ if (arch_prctl (ARCH_GET_XCOMP_PERM, &bitmask) != 0) ++ return false; ++ ++ if ((bitmask & (1 << X86_XSTATE_TILECFG_ID)) == 0) ++ return false; ++ ++ if (arch_prctl (ARCH_REQ_XCOMP_PERM, X86_XSTATE_TILEDATA_ID) != 0) ++ return false; ++ ++ /* Load tile configuration. */ ++ __tilecfg tile_data = { 0 }; ++ init_tile_config (&tile_data); ++ ++ return true; ++} ++ ++/* An architecture can define it to clobber caller-saved registers in ++ malloc below to verify that the implicit TLSDESC call won't change ++ caller-saved registers. */ ++static void ++clear_tile_register (void) ++{ ++ _tile_zero (2); ++} ++ ++#define MOD(i) "tst-gnu2-tls2-amx-mod" #i ".so" ++#define IS_SUPPORTED() enable_amx () ++#define PREPARE_MALLOC() clear_tile_register () ++ ++#include <elf/tst-gnu2-tls2.c> +diff --git a/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx.h b/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx.h +new file mode 100644 +index 0000000000..1845a3caba +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx.h +@@ -0,0 +1,63 @@ ++/* Test TLSDESC relocation with AMX. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <http://www.gnu.org/licenses/>. */ ++ ++#include <stdint.h> ++#include <string.h> ++#include <x86intrin.h> ++#include <support/check.h> ++ ++#define MAX_ROWS 16 ++#define MAX_COLS 64 ++#define MAX 1024 ++#define STRIDE 64 ++ ++typedef struct __tile_config ++{ ++ uint8_t palette_id; ++ uint8_t start_row; ++ uint8_t reserved_0[14]; ++ uint16_t colsb[16]; ++ uint8_t rows[16]; ++} __tilecfg __attribute__ ((aligned (64))); ++ ++/* Initialize int8_t buffer */ ++static inline void ++init_buffer (int8_t *buf, int8_t value) ++{ ++ int rows, colsb, i, j; ++ rows = MAX_ROWS; ++ colsb = MAX_COLS; ++ ++ for (i = 0; i < rows; i++) ++ for (j = 0; j < colsb; j++) ++ buf[i * colsb + j] = value; ++} ++ ++#define BEFORE_TLSDESC_CALL() \ ++ int8_t src[MAX]; \ ++ int8_t res[MAX]; \ ++ /* Initialize src with data */ \ ++ init_buffer (src, 2); \ ++ /* Load tile rows from memory. */ \ ++ _tile_loadd (2, src, STRIDE); ++ ++#define AFTER_TLSDESC_CALL() \ ++ /* Store the tile data to memory. */ \ ++ _tile_stored (2, res, STRIDE); \ ++ _tile_release (); \ ++ TEST_VERIFY_EXIT (memcmp (src, res, sizeof (res)) == 0); +diff --git a/sysdeps/x86/cpu-features-offsets.sym b/sysdeps/x86/cpu-features-offsets.sym +index 6a8fd29813..21fc88d651 100644 +--- a/sysdeps/x86/cpu-features-offsets.sym ++++ b/sysdeps/x86/cpu-features-offsets.sym +@@ -3,3 +3,4 @@ + #include <ldsodefs.h> + + XSAVE_STATE_SIZE_OFFSET offsetof (struct cpu_features, xsave_state_size) ++XSAVE_STATE_FULL_SIZE_OFFSET offsetof (struct cpu_features, xsave_state_full_size) +diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c +index 835113b42f..d71e8d3d2e 100644 +--- a/sysdeps/x86/cpu-features.c ++++ b/sysdeps/x86/cpu-features.c +@@ -307,6 +307,8 @@ update_active (struct cpu_features *cpu_features) + __cpuid_count (0xd, 0, eax, ebx, ecx, edx); + if (ebx != 0) + { ++ /* NB: On AMX capable processors, ebx always includes AMX ++ states. */ + unsigned int xsave_state_full_size + = ALIGN_UP (ebx + STATE_SAVE_OFFSET, 64); + +@@ -320,6 +322,11 @@ update_active (struct cpu_features *cpu_features) + { + unsigned int xstate_comp_offsets[32]; + unsigned int xstate_comp_sizes[32]; ++#ifdef __x86_64__ ++ unsigned int xstate_amx_comp_offsets[32]; ++ unsigned int xstate_amx_comp_sizes[32]; ++ unsigned int amx_ecx; ++#endif + unsigned int i; + + xstate_comp_offsets[0] = 0; +@@ -327,16 +334,39 @@ update_active (struct cpu_features *cpu_features) + xstate_comp_offsets[2] = 576; + xstate_comp_sizes[0] = 160; + xstate_comp_sizes[1] = 256; ++#ifdef __x86_64__ ++ xstate_amx_comp_offsets[0] = 0; ++ xstate_amx_comp_offsets[1] = 160; ++ xstate_amx_comp_offsets[2] = 576; ++ xstate_amx_comp_sizes[0] = 160; ++ xstate_amx_comp_sizes[1] = 256; ++#endif + + for (i = 2; i < 32; i++) + { +- if ((STATE_SAVE_MASK & (1 << i)) != 0) ++ if ((FULL_STATE_SAVE_MASK & (1 << i)) != 0) + { + __cpuid_count (0xd, i, eax, ebx, ecx, edx); +- xstate_comp_sizes[i] = eax; ++#ifdef __x86_64__ ++ /* Include this in xsave_state_full_size. */ ++ amx_ecx = ecx; ++ xstate_amx_comp_sizes[i] = eax; ++ if ((AMX_STATE_SAVE_MASK & (1 << i)) != 0) ++ { ++ /* Exclude this from xsave_state_size. */ ++ ecx = 0; ++ xstate_comp_sizes[i] = 0; ++ } ++ else ++#endif ++ xstate_comp_sizes[i] = eax; + } + else + { ++#ifdef __x86_64__ ++ amx_ecx = 0; ++ xstate_amx_comp_sizes[i] = 0; ++#endif + ecx = 0; + xstate_comp_sizes[i] = 0; + } +@@ -349,6 +379,15 @@ update_active (struct cpu_features *cpu_features) + if ((ecx & (1 << 1)) != 0) + xstate_comp_offsets[i] + = ALIGN_UP (xstate_comp_offsets[i], 64); ++#ifdef __x86_64__ ++ xstate_amx_comp_offsets[i] ++ = (xstate_amx_comp_offsets[i - 1] ++ + xstate_amx_comp_sizes[i - 1]); ++ if ((amx_ecx & (1 << 1)) != 0) ++ xstate_amx_comp_offsets[i] ++ = ALIGN_UP (xstate_amx_comp_offsets[i], ++ 64); ++#endif + } + } + +@@ -357,6 +396,18 @@ update_active (struct cpu_features *cpu_features) + = xstate_comp_offsets[31] + xstate_comp_sizes[31]; + if (size) + { ++#ifdef __x86_64__ ++ unsigned int amx_size ++ = (xstate_amx_comp_offsets[31] ++ + xstate_amx_comp_sizes[31]); ++ amx_size = ALIGN_UP (amx_size + STATE_SAVE_OFFSET, ++ 64); ++ /* Set xsave_state_full_size to the compact AMX ++ state size for XSAVEC. NB: xsave_state_full_size ++ is only used in _dl_tlsdesc_dynamic_xsave and ++ _dl_tlsdesc_dynamic_xsavec. */ ++ cpu_features->xsave_state_full_size = amx_size; ++#endif + cpu_features->xsave_state_size + = ALIGN_UP (size + STATE_SAVE_OFFSET, 64); + CPU_FEATURE_SET (cpu_features, XSAVEC); +diff --git a/sysdeps/x86/include/cpu-features.h b/sysdeps/x86/include/cpu-features.h +index b9bf3115b6..cd7bd27cf3 100644 +--- a/sysdeps/x86/include/cpu-features.h ++++ b/sysdeps/x86/include/cpu-features.h +@@ -934,6 +934,8 @@ struct cpu_features + /* The full state size for XSAVE when XSAVEC is disabled by + + GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVEC ++ ++ and the AMX state size when XSAVEC is available. + */ + unsigned int xsave_state_full_size; + /* Data cache size for use in memory and string routines, typically +diff --git a/sysdeps/x86/sysdep.h b/sysdeps/x86/sysdep.h +index 485cad9c02..db8e576e91 100644 +--- a/sysdeps/x86/sysdep.h ++++ b/sysdeps/x86/sysdep.h +@@ -56,6 +56,14 @@ + | (1 << X86_XSTATE_ZMM_H_ID) \ + | (1 << X86_XSTATE_ZMM_ID) \ + | (1 << X86_XSTATE_APX_F_ID)) ++ ++/* AMX state mask. */ ++# define AMX_STATE_SAVE_MASK \ ++ ((1 << X86_XSTATE_TILECFG_ID) | (1 << X86_XSTATE_TILEDATA_ID)) ++ ++/* States to be included in xsave_state_full_size. */ ++# define FULL_STATE_SAVE_MASK \ ++ (STATE_SAVE_MASK | AMX_STATE_SAVE_MASK) + #else + /* Offset for fxsave/xsave area used by _dl_tlsdesc_dynamic. Since i386 + doesn't have red-zone, use 0 here. */ +@@ -68,13 +76,17 @@ + | (1 << X86_XSTATE_BNDREGS_ID) \ + | (1 << X86_XSTATE_K_ID) \ + | (1 << X86_XSTATE_ZMM_H_ID)) ++ ++/* States to be included in xsave_state_size. */ ++# define FULL_STATE_SAVE_MASK STATE_SAVE_MASK + #endif + + /* States which should be saved for TLSDESC_CALL and TLS_DESC_CALL. +- Compiler assumes that all registers, including x87 FPU stack registers, +- are unchanged after CALL, except for EFLAGS and RAX/EAX. */ ++ Compiler assumes that all registers, including AMX and x87 FPU ++ stack registers, are unchanged after CALL, except for EFLAGS and ++ RAX/EAX. */ + #define TLSDESC_CALL_STATE_SAVE_MASK \ +- (STATE_SAVE_MASK | (1 << X86_XSTATE_X87_ID)) ++ (FULL_STATE_SAVE_MASK | (1 << X86_XSTATE_X87_ID)) + + /* Constants for bits in __x86_string_control: */ + +diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure +index 418cc4a9b8..04a534fa12 100755 +--- a/sysdeps/x86_64/configure ++++ b/sysdeps/x86_64/configure +@@ -134,6 +134,34 @@ fi + config_vars="$config_vars + enable-cet = $enable_cet" + ++# Check if -mamx-tile works properly. ++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -mamx-tile works properly" >&5 ++printf %s "checking whether -mamx-tile works properly... " >&6; } ++if test ${libc_cv_x86_have_amx_tile+y} ++then : ++ printf %s "(cached) " >&6 ++else $as_nop ++ cat > conftest.c <<EOF ++#include <x86intrin.h> ++EOF ++ libc_cv_x86_have_amx_tile=no ++ if { ac_try='${CC-cc} -E $CFLAGS -mamx-tile conftest.c > conftest.i' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; }; then ++ if grep -q __builtin_ia32_ldtilecfg conftest.i; then ++ libc_cv_x86_have_amx_tile=yes ++ fi ++ fi ++ rm -rf conftest* ++fi ++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_have_amx_tile" >&5 ++printf "%s\n" "$libc_cv_x86_have_amx_tile" >&6; } ++config_vars="$config_vars ++have-mamx-tile = $libc_cv_x86_have_amx_tile" ++ + test -n "$critic_missing" && as_fn_error $? " + *** $critic_missing" "$LINENO" 5 + +diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac +index d1f803c02e..c714c47351 100644 +--- a/sysdeps/x86_64/configure.ac ++++ b/sysdeps/x86_64/configure.ac +@@ -61,5 +61,20 @@ elif test $enable_cet = permissive; then + fi + LIBC_CONFIG_VAR([enable-cet], [$enable_cet]) + ++# Check if -mamx-tile works properly. ++AC_CACHE_CHECK(whether -mamx-tile works properly, ++ libc_cv_x86_have_amx_tile, [dnl ++cat > conftest.c <<EOF ++#include <x86intrin.h> ++EOF ++ libc_cv_x86_have_amx_tile=no ++ if AC_TRY_COMMAND(${CC-cc} -E $CFLAGS -mamx-tile conftest.c > conftest.i); then ++ if grep -q __builtin_ia32_ldtilecfg conftest.i; then ++ libc_cv_x86_have_amx_tile=yes ++ fi ++ fi ++ rm -rf conftest*]) ++LIBC_CONFIG_VAR([have-mamx-tile], [$libc_cv_x86_have_amx_tile]) ++ + test -n "$critic_missing" && AC_MSG_ERROR([ + *** $critic_missing]) +diff --git a/sysdeps/x86_64/dl-tlsdesc-dynamic.h b/sysdeps/x86_64/dl-tlsdesc-dynamic.h +index 0c2e8d5320..9f02cfc3eb 100644 +--- a/sysdeps/x86_64/dl-tlsdesc-dynamic.h ++++ b/sysdeps/x86_64/dl-tlsdesc-dynamic.h +@@ -99,7 +99,7 @@ _dl_tlsdesc_dynamic: + # endif + #else + /* Allocate stack space of the required size to save the state. */ +- sub _rtld_local_ro+RTLD_GLOBAL_RO_DL_X86_CPU_FEATURES_OFFSET+XSAVE_STATE_SIZE_OFFSET(%rip), %RSP_LP ++ sub _rtld_local_ro+RTLD_GLOBAL_RO_DL_X86_CPU_FEATURES_OFFSET+XSAVE_STATE_FULL_SIZE_OFFSET(%rip), %RSP_LP + #endif + /* Besides rdi and rsi, saved above, save rcx, rdx, r8, r9, + r10 and r11. */ + +commit 354cabcb2634abe16da7a2ba5e648aac1204b58e +Author: H.J. Lu <hjl.tools@gmail.com> +Date: Mon Mar 18 06:40:16 2024 -0700 + + x86-64: Allocate state buffer space for RDI, RSI and RBX + + _dl_tlsdesc_dynamic preserves RDI, RSI and RBX before realigning stack. + After realigning stack, it saves RCX, RDX, R8, R9, R10 and R11. Define + TLSDESC_CALL_REGISTER_SAVE_AREA to allocate space for RDI, RSI and RBX + to avoid clobbering saved RDI, RSI and RBX values on stack by xsave to + STATE_SAVE_OFFSET(%rsp). + + +==================+<- stack frame start aligned at 8 or 16 bytes + | |<- RDI saved in the red zone + | |<- RSI saved in the red zone + | |<- RBX saved in the red zone + | |<- paddings for stack realignment of 64 bytes + |------------------|<- xsave buffer end aligned at 64 bytes + | |<- + | |<- + | |<- + |------------------|<- xsave buffer start at STATE_SAVE_OFFSET(%rsp) + | |<- 8-byte padding for 64-byte alignment + | |<- 8-byte padding for 64-byte alignment + | |<- R11 + | |<- R10 + | |<- R9 + | |<- R8 + | |<- RDX + | |<- RCX + +==================+<- RSP aligned at 64 bytes + + Define TLSDESC_CALL_REGISTER_SAVE_AREA, the total register save area size + for all integer registers by adding 24 to STATE_SAVE_OFFSET since RDI, RSI + and RBX are saved onto stack without adjusting stack pointer first, using + the red-zone. This fixes BZ #31501. + Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com> + + (cherry picked from commit 717ebfa85c8240d32d0d19d86a484c31c55c9617) + +diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c +index d71e8d3d2e..6fe1b728c6 100644 +--- a/sysdeps/x86/cpu-features.c ++++ b/sysdeps/x86/cpu-features.c +@@ -310,7 +310,7 @@ update_active (struct cpu_features *cpu_features) + /* NB: On AMX capable processors, ebx always includes AMX + states. */ + unsigned int xsave_state_full_size +- = ALIGN_UP (ebx + STATE_SAVE_OFFSET, 64); ++ = ALIGN_UP (ebx + TLSDESC_CALL_REGISTER_SAVE_AREA, 64); + + cpu_features->xsave_state_size + = xsave_state_full_size; +@@ -400,8 +400,10 @@ update_active (struct cpu_features *cpu_features) + unsigned int amx_size + = (xstate_amx_comp_offsets[31] + + xstate_amx_comp_sizes[31]); +- amx_size = ALIGN_UP (amx_size + STATE_SAVE_OFFSET, +- 64); ++ amx_size ++ = ALIGN_UP ((amx_size ++ + TLSDESC_CALL_REGISTER_SAVE_AREA), ++ 64); + /* Set xsave_state_full_size to the compact AMX + state size for XSAVEC. NB: xsave_state_full_size + is only used in _dl_tlsdesc_dynamic_xsave and +@@ -409,7 +411,8 @@ update_active (struct cpu_features *cpu_features) + cpu_features->xsave_state_full_size = amx_size; + #endif + cpu_features->xsave_state_size +- = ALIGN_UP (size + STATE_SAVE_OFFSET, 64); ++ = ALIGN_UP (size + TLSDESC_CALL_REGISTER_SAVE_AREA, ++ 64); + CPU_FEATURE_SET (cpu_features, XSAVEC); + } + } +diff --git a/sysdeps/x86/sysdep.h b/sysdeps/x86/sysdep.h +index db8e576e91..7359149e17 100644 +--- a/sysdeps/x86/sysdep.h ++++ b/sysdeps/x86/sysdep.h +@@ -38,14 +38,59 @@ + #ifdef __x86_64__ + /* Offset for fxsave/xsave area used by _dl_runtime_resolve. Also need + space to preserve RCX, RDX, RSI, RDI, R8, R9 and RAX. It must be +- aligned to 16 bytes for fxsave and 64 bytes for xsave. +- +- NB: Is is non-zero because of the 128-byte red-zone. Some registers +- are saved on stack without adjusting stack pointer first. When we +- update stack pointer to allocate more space, we need to take the +- red-zone into account. */ ++ aligned to 16 bytes for fxsave and 64 bytes for xsave. It is non-zero ++ because MOV, instead of PUSH, is used to save registers onto stack. ++ ++ +==================+<- stack frame start aligned at 8 or 16 bytes ++ | |<- paddings for stack realignment of 64 bytes ++ |------------------|<- xsave buffer end aligned at 64 bytes ++ | |<- ++ | |<- ++ | |<- ++ |------------------|<- xsave buffer start at STATE_SAVE_OFFSET(%rsp) ++ | |<- 8-byte padding for 64-byte alignment ++ | |<- R9 ++ | |<- R8 ++ | |<- RDI ++ | |<- RSI ++ | |<- RDX ++ | |<- RCX ++ | |<- RAX ++ +==================+<- RSP aligned at 64 bytes ++ ++ */ + # define STATE_SAVE_OFFSET (8 * 7 + 8) + ++/* _dl_tlsdesc_dynamic preserves RDI, RSI and RBX before realigning ++ stack. After realigning stack, it saves RCX, RDX, R8, R9, R10 and ++ R11. Allocate space for RDI, RSI and RBX to avoid clobbering saved ++ RDI, RSI and RBX values on stack by xsave. ++ ++ +==================+<- stack frame start aligned at 8 or 16 bytes ++ | |<- RDI saved in the red zone ++ | |<- RSI saved in the red zone ++ | |<- RBX saved in the red zone ++ | |<- paddings for stack realignment of 64 bytes ++ |------------------|<- xsave buffer end aligned at 64 bytes ++ | |<- ++ | |<- ++ | |<- ++ |------------------|<- xsave buffer start at STATE_SAVE_OFFSET(%rsp) ++ | |<- 8-byte padding for 64-byte alignment ++ | |<- 8-byte padding for 64-byte alignment ++ | |<- R11 ++ | |<- R10 ++ | |<- R9 ++ | |<- R8 ++ | |<- RDX ++ | |<- RCX ++ +==================+<- RSP aligned at 64 bytes ++ ++ Define the total register save area size for all integer registers by ++ adding 24 to STATE_SAVE_OFFSET since RDI, RSI and RBX are saved onto ++ stack without adjusting stack pointer first, using the red-zone. */ ++# define TLSDESC_CALL_REGISTER_SAVE_AREA (STATE_SAVE_OFFSET + 24) ++ + /* Save SSE, AVX, AVX512, mask, bound and APX registers. Bound and APX + registers are mutually exclusive. */ + # define STATE_SAVE_MASK \ +@@ -66,8 +111,9 @@ + (STATE_SAVE_MASK | AMX_STATE_SAVE_MASK) + #else + /* Offset for fxsave/xsave area used by _dl_tlsdesc_dynamic. Since i386 +- doesn't have red-zone, use 0 here. */ ++ uses PUSH to save registers onto stack, use 0 here. */ + # define STATE_SAVE_OFFSET 0 ++# define TLSDESC_CALL_REGISTER_SAVE_AREA 0 + + /* Save SSE, AVX, AXV512, mask and bound registers. */ + # define STATE_SAVE_MASK \ +diff --git a/sysdeps/x86_64/tst-gnu2-tls2mod1.S b/sysdeps/x86_64/tst-gnu2-tls2mod1.S +new file mode 100644 +index 0000000000..1d636669ba +--- /dev/null ++++ b/sysdeps/x86_64/tst-gnu2-tls2mod1.S +@@ -0,0 +1,87 @@ ++/* Check if TLSDESC relocation preserves %rdi, %rsi and %rbx. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <http://www.gnu.org/licenses/>. */ ++ ++#include <sysdep.h> ++ ++/* On AVX512 machines, OFFSET == 40 caused _dl_tlsdesc_dynamic_xsavec ++ to clobber %rdi, %rsi and %rbx. On Intel AVX CPUs, the state size ++ is 960 bytes and this test didn't fail. It may be due to the unused ++ last 128 bytes. On AMD AVX CPUs, the state size is 832 bytes and ++ this test might fail without the fix. */ ++#ifndef OFFSET ++# define OFFSET 40 ++#endif ++ ++ .text ++ .p2align 4 ++ .globl apply_tls ++ .type apply_tls, @function ++apply_tls: ++ cfi_startproc ++ _CET_ENDBR ++ pushq %rbp ++ cfi_def_cfa_offset (16) ++ cfi_offset (6, -16) ++ movdqu (%RDI_LP), %xmm0 ++ lea tls_var1@TLSDESC(%rip), %RAX_LP ++ mov %RSP_LP, %RBP_LP ++ cfi_def_cfa_register (6) ++ /* Align stack to 64 bytes. */ ++ and $-64, %RSP_LP ++ sub $OFFSET, %RSP_LP ++ pushq %rbx ++ /* Set %ebx to 0xbadbeef. */ ++ movl $0xbadbeef, %ebx ++ movl $0xbadbeef, %esi ++ movq %rdi, saved_rdi(%rip) ++ movq %rsi, saved_rsi(%rip) ++ call *tls_var1@TLSCALL(%RAX_LP) ++ /* Check if _dl_tlsdesc_dynamic preserves %rdi, %rsi and %rbx. */ ++ cmpq saved_rdi(%rip), %rdi ++ jne L(hlt) ++ cmpq saved_rsi(%rip), %rsi ++ jne L(hlt) ++ cmpl $0xbadbeef, %ebx ++ jne L(hlt) ++ add %fs:0, %RAX_LP ++ movups %xmm0, 32(%RAX_LP) ++ movdqu 16(%RDI_LP), %xmm1 ++ mov %RAX_LP, %RBX_LP ++ movups %xmm1, 48(%RAX_LP) ++ lea 32(%RBX_LP), %RAX_LP ++ pop %rbx ++ leave ++ cfi_def_cfa (7, 8) ++ ret ++L(hlt): ++ hlt ++ cfi_endproc ++ .size apply_tls, .-apply_tls ++ .hidden tls_var1 ++ .globl tls_var1 ++ .section .tbss,"awT",@nobits ++ .align 16 ++ .type tls_var1, @object ++ .size tls_var1, 3200 ++tls_var1: ++ .zero 3200 ++ .local saved_rdi ++ .comm saved_rdi,8,8 ++ .local saved_rsi ++ .comm saved_rsi,8,8 ++ .section .note.GNU-stack,"",@progbits + +commit 15aebdbada54098787715448c94701f17033fc92 +Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> +Date: Tue Mar 12 13:21:18 2024 -0300 + + Ignore undefined symbols for -mtls-dialect=gnu2 + + So it does not fail for arm config that defaults to -mtp=soft (which + issues a call to __aeabi_read_tp). + Reviewed-by: H.J. Lu <hjl.tools@gmail.com> + + (cherry picked from commit 968b0ca9440040a2b31248a572891f0e55c1ab10) + +diff --git a/configure b/configure +index 59ff1e415d..117b48a421 100755 +--- a/configure ++++ b/configure +@@ -7020,7 +7020,7 @@ void foo (void) + } + EOF + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=gnu2 -nostdlib -nostartfiles +- conftest.c -o conftest 1>&5' ++ -shared conftest.c -o conftest 1>&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? +diff --git a/configure.ac b/configure.ac +index 65799e5685..19b88a47a5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1297,7 +1297,7 @@ void foo (void) + } + EOF + if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=gnu2 -nostdlib -nostartfiles +- conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD]) ++ -shared conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD]) + then + libc_cv_mtls_dialect_gnu2=yes + else + +commit a8ba52bde58c69f2b31da62ad2311f119adf6cb9 +Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> +Date: Tue Mar 12 13:21:19 2024 -0300 + + arm: Update _dl_tlsdesc_dynamic to preserve caller-saved registers (BZ 31372) + + ARM _dl_tlsdesc_dynamic slow path has two issues: + + * The ip/r12 is defined by AAPCS as a scratch register, and gcc is + used to save the stack pointer before on some function calls. So it + should also be saved/restored as well. It fixes the tst-gnu2-tls2. + + * None of the possible VFP registers are saved/restored. ARM has the + additional complexity to have different VFP bank sizes (depending of + VFP support by the chip). + + The tst-gnu2-tls2 test is extended to check for VFP registers, although + only for hardfp builds. Different than setcontext, _dl_tlsdesc_dynamic + does not have HWCAP_ARM_IWMMXT (I don't have a way to properly test + it and it is almost a decade since newer hardware was released). + + With this patch there is no need to mark tst-gnu2-tls2 as XFAIL. + + Checked on arm-linux-gnueabihf. + Reviewed-by: H.J. Lu <hjl.tools@gmail.com> + + (cherry picked from commit 64c7e344289ed085517c2227d8e3b06388242c13) + +diff --git a/config.h.in b/config.h.in +index 44a34072a4..4d33c63a84 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -141,6 +141,9 @@ + /* LOONGARCH floating-point ABI for ld.so. */ + #undef LOONGARCH_ABI_FRLEN + ++/* Define whether ARM used hard-float and support VFPvX-D32. */ ++#undef HAVE_ARM_PCS_VFP_D32 ++ + /* Linux specific: minimum supported kernel version. */ + #undef __LINUX_KERNEL_VERSION + +diff --git a/elf/Makefile b/elf/Makefile +index c5c37a9147..030db4d207 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -3056,10 +3056,6 @@ $(objpfx)tst-gnu2-tls2.out: \ + $(objpfx)tst-gnu2-tls2mod2.so + + ifeq (yes,$(have-mtls-dialect-gnu2)) +-# This test fails if dl_tlsdesc_dynamic doesn't preserve all caller-saved +-# registers. See https://sourceware.org/bugzilla/show_bug.cgi?id=31372 +-test-xfail-tst-gnu2-tls2 = yes +- + CFLAGS-tst-tlsgap-mod0.c += -mtls-dialect=gnu2 + CFLAGS-tst-tlsgap-mod1.c += -mtls-dialect=gnu2 + CFLAGS-tst-tlsgap-mod2.c += -mtls-dialect=gnu2 +diff --git a/elf/tst-gnu2-tls2.h b/elf/tst-gnu2-tls2.h +index 77964a57a3..1ade8151e2 100644 +--- a/elf/tst-gnu2-tls2.h ++++ b/elf/tst-gnu2-tls2.h +@@ -27,6 +27,10 @@ extern struct tls *apply_tls (struct tls *); + + /* An architecture can define them to verify that clobber caller-saved + registers aren't changed by the implicit TLSDESC call. */ ++#ifndef INIT_TLSDESC_CALL ++# define INIT_TLSDESC_CALL() ++#endif ++ + #ifndef BEFORE_TLSDESC_CALL + # define BEFORE_TLSDESC_CALL() + #endif +diff --git a/elf/tst-gnu2-tls2mod0.c b/elf/tst-gnu2-tls2mod0.c +index 45556a0e17..3fe3c14277 100644 +--- a/elf/tst-gnu2-tls2mod0.c ++++ b/elf/tst-gnu2-tls2mod0.c +@@ -16,13 +16,14 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include "tst-gnu2-tls2.h" ++#include <tst-gnu2-tls2.h> + + __thread struct tls tls_var0 __attribute__ ((visibility ("hidden"))); + + struct tls * + apply_tls (struct tls *p) + { ++ INIT_TLSDESC_CALL (); + BEFORE_TLSDESC_CALL (); + tls_var0 = *p; + struct tls *ret = &tls_var0; +diff --git a/elf/tst-gnu2-tls2mod1.c b/elf/tst-gnu2-tls2mod1.c +index e10b9dbc0a..e210538468 100644 +--- a/elf/tst-gnu2-tls2mod1.c ++++ b/elf/tst-gnu2-tls2mod1.c +@@ -16,13 +16,14 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include "tst-gnu2-tls2.h" ++#include <tst-gnu2-tls2.h> + + __thread struct tls tls_var1[100] __attribute__ ((visibility ("hidden"))); + + struct tls * + apply_tls (struct tls *p) + { ++ INIT_TLSDESC_CALL (); + BEFORE_TLSDESC_CALL (); + tls_var1[1] = *p; + struct tls *ret = &tls_var1[1]; +diff --git a/elf/tst-gnu2-tls2mod2.c b/elf/tst-gnu2-tls2mod2.c +index 141af51e55..6d3031dc5f 100644 +--- a/elf/tst-gnu2-tls2mod2.c ++++ b/elf/tst-gnu2-tls2mod2.c +@@ -16,13 +16,14 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include "tst-gnu2-tls2.h" ++#include <tst-gnu2-tls2.h> + + __thread struct tls tls_var2 __attribute__ ((visibility ("hidden"))); + + struct tls * + apply_tls (struct tls *p) + { ++ INIT_TLSDESC_CALL (); + BEFORE_TLSDESC_CALL (); + tls_var2 = *p; + struct tls *ret = &tls_var2; +diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure +index 35e2918922..4ef4d46cbd 100644 +--- a/sysdeps/arm/configure ++++ b/sysdeps/arm/configure +@@ -187,6 +187,38 @@ else + default-abi = soft" + fi + ++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether VFP supports 32 registers" >&5 ++printf %s "checking whether VFP supports 32 registers... " >&6; } ++if test ${libc_cv_arm_pcs_vfp_d32+y} ++then : ++ printf %s "(cached) " >&6 ++else $as_nop ++ ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++void foo (void) ++{ ++ asm volatile ("vldr d16,=17" : : : "d16"); ++} ++ ++_ACEOF ++if ac_fn_c_try_compile "$LINENO" ++then : ++ libc_cv_arm_pcs_vfp_d32=yes ++else $as_nop ++ libc_cv_arm_pcs_vfp_d32=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi ++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_pcs_vfp_d32" >&5 ++printf "%s\n" "$libc_cv_arm_pcs_vfp_d32" >&6; } ++if test "$libc_cv_arm_pcs_vfp_d32" = yes ; ++then ++ printf "%s\n" "#define HAVE_ARM_PCS_VFP_D32 1" >>confdefs.h ++ ++fi ++ + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether PC-relative relocs in movw/movt work properly" >&5 + printf %s "checking whether PC-relative relocs in movw/movt work properly... " >&6; } + if test ${libc_cv_arm_pcrel_movw+y} +diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac +index 5172e30bbe..cd00ddc9d9 100644 +--- a/sysdeps/arm/configure.ac ++++ b/sysdeps/arm/configure.ac +@@ -21,6 +21,21 @@ else + LIBC_CONFIG_VAR([default-abi], [soft]) + fi + ++AC_CACHE_CHECK([whether VFP supports 32 registers], ++ libc_cv_arm_pcs_vfp_d32, [ ++AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ ++void foo (void) ++{ ++ asm volatile ("vldr d16,=17" : : : "d16"); ++} ++]])], ++ [libc_cv_arm_pcs_vfp_d32=yes], ++ [libc_cv_arm_pcs_vfp_d32=no])]) ++if test "$libc_cv_arm_pcs_vfp_d32" = yes ; ++then ++ AC_DEFINE(HAVE_ARM_PCS_VFP_D32) ++fi ++ + AC_CACHE_CHECK([whether PC-relative relocs in movw/movt work properly], + libc_cv_arm_pcrel_movw, [ + cat > conftest.s <<\EOF +diff --git a/sysdeps/arm/dl-tlsdesc.S b/sysdeps/arm/dl-tlsdesc.S +index 764c56e70f..ada106521d 100644 +--- a/sysdeps/arm/dl-tlsdesc.S ++++ b/sysdeps/arm/dl-tlsdesc.S +@@ -19,6 +19,7 @@ + #include <sysdep.h> + #include <arm-features.h> + #include <tls.h> ++#include <rtld-global-offsets.h> + #include "tlsdesc.h" + + .text +@@ -83,14 +84,20 @@ _dl_tlsdesc_dynamic(struct tlsdesc *tdp) + .align 2 + _dl_tlsdesc_dynamic: + /* Our calling convention is to clobber r0, r1 and the processor +- flags. All others that are modified must be saved */ +- eabi_save ({r2,r3,r4,lr}) +- push {r2,r3,r4,lr} +- cfi_adjust_cfa_offset (16) ++ flags. All others that are modified must be saved. r5 is ++ used as the hwcap value to avoid reload after __tls_get_addr ++ call. If required we will save the vector register on the slow ++ path. */ ++ eabi_save ({r2,r3,r4,r5,ip,lr}) ++ push {r2,r3,r4,r5,ip,lr} ++ cfi_adjust_cfa_offset (24) + cfi_rel_offset (r2,0) + cfi_rel_offset (r3,4) + cfi_rel_offset (r4,8) +- cfi_rel_offset (lr,12) ++ cfi_rel_offset (r5,12) ++ cfi_rel_offset (ip,16) ++ cfi_rel_offset (lr,20) ++ + ldr r1, [r0] /* td */ + GET_TLS (lr) + mov r4, r0 /* r4 = tp */ +@@ -113,22 +120,69 @@ _dl_tlsdesc_dynamic: + rsbne r0, r4, r3 + bne 2f + 1: mov r0, r1 ++ ++ /* Load the hwcap to check for vector support. */ ++ ldr r2, 3f ++ ldr r1, .Lrtld_global_ro ++0: add r2, pc, r2 ++ ldr r2, [r2, r1] ++ ldr r5, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET] ++ ++#ifdef __SOFTFP__ ++ tst r5, #HWCAP_ARM_VFP ++ beq .Lno_vfp ++#endif ++ ++ /* Store the VFP registers. Don't use VFP instructions directly ++ because this code is used in non-VFP multilibs. */ ++#define VFP_STACK_REQ (32*8 + 8) ++ sub sp, sp, VFP_STACK_REQ ++ cfi_adjust_cfa_offset (VFP_STACK_REQ) ++ mov r3, sp ++ .inst 0xeca30b20 /* vstmia r3!, {d0-d15} */ ++ tst r5, #HWCAP_ARM_VFPD32 ++ beq 4f ++ .inst 0xece30b20 /* vstmia r3!, {d16-d31} */ ++ /* Store the floating-point status register. */ ++4: .inst 0xeef12a10 /* vmrs r2, fpscr */ ++ str r2, [r3] ++.Lno_vfp: + bl __tls_get_addr + rsb r0, r4, r0 ++#ifdef __SOFTFP__ ++ tst r5, #HWCAP_ARM_VFP ++ beq 2f ++#endif ++ mov r3, sp ++ .inst 0xecb30b20 /* vldmia r3!, {d0-d15} */ ++ tst r5, #HWCAP_ARM_VFPD32 ++ beq 5f ++ .inst 0xecf30b20 /* vldmia r3!, {d16-d31} */ ++ ldr r4, [r3] ++5: .inst 0xeee14a10 /* vmsr fpscr, r4 */ ++ add sp, sp, VFP_STACK_REQ ++ cfi_adjust_cfa_offset (-VFP_STACK_REQ) ++ + 2: + #if ((defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)) \ + || defined (ARM_ALWAYS_BX)) +- pop {r2,r3,r4, lr} +- cfi_adjust_cfa_offset (-16) ++ pop {r2,r3,r4,r5,ip, lr} ++ cfi_adjust_cfa_offset (-20) + cfi_restore (lr) ++ cfi_restore (ip) ++ cfi_restore (r5) + cfi_restore (r4) + cfi_restore (r3) + cfi_restore (r2) + bx lr + #else +- pop {r2,r3,r4, pc} ++ pop {r2,r3,r4,r5,ip, pc} + #endif + eabi_fnend + cfi_endproc + .size _dl_tlsdesc_dynamic, .-_dl_tlsdesc_dynamic ++ ++3: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS ++.Lrtld_global_ro: ++ .long C_SYMBOL_NAME(_rtld_global_ro)(GOT) + #endif /* SHARED */ +diff --git a/sysdeps/arm/tst-gnu2-tls2.h b/sysdeps/arm/tst-gnu2-tls2.h +new file mode 100644 +index 0000000000..e413ac21fb +--- /dev/null ++++ b/sysdeps/arm/tst-gnu2-tls2.h +@@ -0,0 +1,128 @@ ++/* Test TLSDESC relocation. ARM version. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <config.h> ++#include <sys/auxv.h> ++#include <string.h> ++#include <stdlib.h> ++#include <endian.h> ++ ++#ifndef __SOFTFP__ ++ ++# ifdef HAVE_ARM_PCS_VFP_D32 ++# define SAVE_VFP_D32 \ ++ asm volatile ("vldr d16,=17" : : : "d16"); \ ++ asm volatile ("vldr d17,=18" : : : "d17"); \ ++ asm volatile ("vldr d18,=19" : : : "d18"); \ ++ asm volatile ("vldr d19,=20" : : : "d19"); \ ++ asm volatile ("vldr d20,=21" : : : "d20"); \ ++ asm volatile ("vldr d21,=22" : : : "d21"); \ ++ asm volatile ("vldr d22,=23" : : : "d22"); \ ++ asm volatile ("vldr d23,=24" : : : "d23"); \ ++ asm volatile ("vldr d24,=25" : : : "d24"); \ ++ asm volatile ("vldr d25,=26" : : : "d25"); \ ++ asm volatile ("vldr d26,=27" : : : "d26"); \ ++ asm volatile ("vldr d27,=28" : : : "d27"); \ ++ asm volatile ("vldr d28,=29" : : : "d28"); \ ++ asm volatile ("vldr d29,=30" : : : "d29"); \ ++ asm volatile ("vldr d30,=31" : : : "d30"); \ ++ asm volatile ("vldr d31,=32" : : : "d31"); ++# else ++# define SAVE_VFP_D32 ++# endif ++ ++# define INIT_TLSDESC_CALL() \ ++ unsigned long hwcap = getauxval (AT_HWCAP) ++ ++/* Set each vector register to a value from 1 to 32 before the TLS access, ++ dump to memory after TLS access, and compare with the expected values. */ ++ ++# define BEFORE_TLSDESC_CALL() \ ++ if (hwcap & HWCAP_ARM_VFP) \ ++ { \ ++ asm volatile ("vldr d0,=1" : : : "d0"); \ ++ asm volatile ("vldr d1,=2" : : : "d1"); \ ++ asm volatile ("vldr d2,=3" : : : "d1"); \ ++ asm volatile ("vldr d3,=4" : : : "d3"); \ ++ asm volatile ("vldr d4,=5" : : : "d4"); \ ++ asm volatile ("vldr d5,=6" : : : "d5"); \ ++ asm volatile ("vldr d6,=7" : : : "d6"); \ ++ asm volatile ("vldr d7,=8" : : : "d7"); \ ++ asm volatile ("vldr d8,=9" : : : "d8"); \ ++ asm volatile ("vldr d9,=10" : : : "d9"); \ ++ asm volatile ("vldr d10,=11" : : : "d10"); \ ++ asm volatile ("vldr d11,=12" : : : "d11"); \ ++ asm volatile ("vldr d12,=13" : : : "d12"); \ ++ asm volatile ("vldr d13,=14" : : : "d13"); \ ++ asm volatile ("vldr d14,=15" : : : "d14"); \ ++ asm volatile ("vldr d15,=16" : : : "d15"); \ ++ } \ ++ if (hwcap & HWCAP_ARM_VFPD32) \ ++ { \ ++ SAVE_VFP_D32 \ ++ } ++ ++# define VFP_STACK_REQ (16*8) ++# if __BYTE_ORDER == __BIG_ENDIAN ++# define DISP 7 ++# else ++# define DISP 0 ++# endif ++ ++# ifdef HAVE_ARM_PCS_VFP_D32 ++# define CHECK_VFP_D32 \ ++ char vfp[VFP_STACK_REQ]; \ ++ asm volatile ("vstmia %0, {d16-d31}\n" \ ++ : \ ++ : "r" (vfp) \ ++ : "memory"); \ ++ \ ++ char expected[VFP_STACK_REQ] = { 0 }; \ ++ for (int i = 0; i < 16; ++i) \ ++ expected[i * 8 + DISP] = i + 17; \ ++ \ ++ if (memcmp (vfp, expected, VFP_STACK_REQ) != 0) \ ++ abort (); ++# else ++# define CHECK_VFP_D32 ++# endif ++ ++# define AFTER_TLSDESC_CALL() \ ++ if (hwcap & HWCAP_ARM_VFP) \ ++ { \ ++ char vfp[VFP_STACK_REQ]; \ ++ asm volatile ("vstmia %0, {d0-d15}\n" \ ++ : \ ++ : "r" (vfp) \ ++ : "memory"); \ ++ \ ++ char expected[VFP_STACK_REQ] = { 0 }; \ ++ for (int i = 0; i < 16; ++i) \ ++ expected[i * 8 + DISP] = i + 1; \ ++ \ ++ if (memcmp (vfp, expected, VFP_STACK_REQ) != 0) \ ++ abort (); \ ++ } \ ++ if (hwcap & HWCAP_ARM_VFPD32) \ ++ { \ ++ CHECK_VFP_D32 \ ++ } ++ ++#endif /* __SOFTFP__ */ ++ ++#include_next <tst-gnu2-tls2.h> + +commit aded2fc004e7ee85cf0b45b1382552d41e555a23 +Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> +Date: Tue Mar 12 13:21:20 2024 -0300 + + elf: Enable TLS descriptor tests on aarch64 + + The aarch64 uses 'trad' for traditional tls and 'desc' for tls + descriptors, but unlike other targets it defaults to 'desc'. The + gnutls2 configure check does not set aarch64 as an ABI that uses + TLS descriptors, which then disable somes stests. + + Also rename the internal machinery fron gnu2 to tls descriptors. + + Checked on aarch64-linux-gnu. + Reviewed-by: H.J. Lu <hjl.tools@gmail.com> + + (cherry picked from commit 3d53d18fc71c5d9ef4773b8bce04d54b80181926) + +diff --git a/configure b/configure +index 117b48a421..432e40a592 100755 +--- a/configure ++++ b/configure +@@ -653,7 +653,7 @@ LIBGD + libc_cv_cc_loop_to_function + libc_cv_cc_submachine + libc_cv_cc_nofma +-libc_cv_mtls_dialect_gnu2 ++libc_cv_mtls_descriptor + libc_cv_has_glob_dat + libc_cv_fpie + libc_cv_z_execstack +@@ -4760,6 +4760,9 @@ libc_config_ok=no + # whether to use such directories. + with_fp_cond=1 + ++# A preconfigure script may define another name to TLS descriptor variant ++mtls_descriptor=gnu2 ++ + if frags=`ls -d $srcdir/sysdeps/*/preconfigure 2> /dev/null` + then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysdeps preconfigure fragments" >&5 +@@ -7006,9 +7009,9 @@ fi + printf "%s\n" "$libc_cv_has_glob_dat" >&6; } + + +-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -mtls-dialect=gnu2" >&5 +-printf %s "checking for -mtls-dialect=gnu2... " >&6; } +-if test ${libc_cv_mtls_dialect_gnu2+y} ++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tls descriptor support" >&5 ++printf %s "checking for tls descriptor support... " >&6; } ++if test ${libc_cv_mtls_descriptor+y} + then : + printf %s "(cached) " >&6 + else $as_nop +@@ -7019,7 +7022,7 @@ void foo (void) + i = 10; + } + EOF +-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=gnu2 -nostdlib -nostartfiles ++if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=$mtls_descriptor -nostdlib -nostartfiles + -shared conftest.c -o conftest 1>&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 +@@ -7027,17 +7030,17 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=gnu2 -nostdlib -nost + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then +- libc_cv_mtls_dialect_gnu2=yes ++ libc_cv_mtls_descriptor=$mtls_descriptor + else +- libc_cv_mtls_dialect_gnu2=no ++ libc_cv_mtls_descriptor=no + fi + rm -f conftest* + fi +-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mtls_dialect_gnu2" >&5 +-printf "%s\n" "$libc_cv_mtls_dialect_gnu2" >&6; } ++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mtls_descriptor" >&5 ++printf "%s\n" "$libc_cv_mtls_descriptor" >&6; } + + config_vars="$config_vars +-have-mtls-dialect-gnu2 = $libc_cv_mtls_dialect_gnu2" ++have-mtls-descriptor = $libc_cv_mtls_descriptor" + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -Wno-ignored-attributes is required for aliases" >&5 + printf %s "checking if -Wno-ignored-attributes is required for aliases... " >&6; } +diff --git a/configure.ac b/configure.ac +index 19b88a47a5..bdc385d03c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -442,6 +442,9 @@ libc_config_ok=no + # whether to use such directories. + with_fp_cond=1 + ++# A preconfigure script may define another name to TLS descriptor variant ++mtls_descriptor=gnu2 ++ + dnl Let sysdeps/*/preconfigure act here. + LIBC_PRECONFIGURE([$srcdir], [for sysdeps]) + +@@ -1287,7 +1290,7 @@ fi + rm -f conftest*]) + AC_SUBST(libc_cv_has_glob_dat) + +-AC_CACHE_CHECK([for -mtls-dialect=gnu2], libc_cv_mtls_dialect_gnu2, ++AC_CACHE_CHECK([for tls descriptor support], libc_cv_mtls_descriptor, + [dnl + cat > conftest.c <<EOF + __thread int i; +@@ -1296,16 +1299,16 @@ void foo (void) + i = 10; + } + EOF +-if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=gnu2 -nostdlib -nostartfiles ++if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=$mtls_descriptor -nostdlib -nostartfiles + -shared conftest.c -o conftest 1>&AS_MESSAGE_LOG_FD]) + then +- libc_cv_mtls_dialect_gnu2=yes ++ libc_cv_mtls_descriptor=$mtls_descriptor + else +- libc_cv_mtls_dialect_gnu2=no ++ libc_cv_mtls_descriptor=no + fi + rm -f conftest*]) +-AC_SUBST(libc_cv_mtls_dialect_gnu2) +-LIBC_CONFIG_VAR([have-mtls-dialect-gnu2], [$libc_cv_mtls_dialect_gnu2]) ++AC_SUBST(libc_cv_mtls_descriptor) ++LIBC_CONFIG_VAR([have-mtls-descriptor], [$libc_cv_mtls_descriptor]) + + dnl clang emits an warning for a double alias redirection, to warn the + dnl original symbol is sed even when weak definition overrides it. +diff --git a/elf/Makefile b/elf/Makefile +index 030db4d207..69aa423c4b 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -999,13 +999,13 @@ modules-names-tests = $(filter-out ifuncmod% tst-tlsmod%,\ + # For +depfiles in Makerules. + extra-test-objs += tst-auditmod17.os + +-ifeq (yes,$(have-mtls-dialect-gnu2)) ++ifneq (no,$(have-mtls-descriptor)) + tests += tst-gnu2-tls1 + modules-names += tst-gnu2-tls1mod + $(objpfx)tst-gnu2-tls1: $(objpfx)tst-gnu2-tls1mod.so + tst-gnu2-tls1mod.so-no-z-defs = yes +-CFLAGS-tst-gnu2-tls1mod.c += -mtls-dialect=gnu2 +-endif # $(have-mtls-dialect-gnu2) ++CFLAGS-tst-gnu2-tls1mod.c += -mtls-dialect=$(have-mtls-descriptor) ++endif # $(have-mtls-descriptor) + + ifeq (yes,$(have-protected-data)) + modules-names += tst-protected1moda tst-protected1modb +@@ -2972,11 +2972,11 @@ $(objpfx)tst-tls-allocation-failure-static-patched.out: \ + $(objpfx)tst-audit-tlsdesc: $(objpfx)tst-audit-tlsdesc-mod1.so \ + $(objpfx)tst-audit-tlsdesc-mod2.so \ + $(shared-thread-library) +-ifeq (yes,$(have-mtls-dialect-gnu2)) ++ifneq (no,$(have-mtls-descriptor)) + # The test is valid for all TLS types, but we want to exercise GNU2 + # TLS if possible. +-CFLAGS-tst-audit-tlsdesc-mod1.c += -mtls-dialect=gnu2 +-CFLAGS-tst-audit-tlsdesc-mod2.c += -mtls-dialect=gnu2 ++CFLAGS-tst-audit-tlsdesc-mod1.c += -mtls-dialect=$(have-mtls-descriptor) ++CFLAGS-tst-audit-tlsdesc-mod2.c += -mtls-dialect=$(have-mtls-descriptor) + endif + $(objpfx)tst-audit-tlsdesc-dlopen: $(shared-thread-library) + $(objpfx)tst-audit-tlsdesc-dlopen.out: $(objpfx)tst-audit-tlsdesc-mod1.so \ +@@ -3055,11 +3055,11 @@ $(objpfx)tst-gnu2-tls2.out: \ + $(objpfx)tst-gnu2-tls2mod1.so \ + $(objpfx)tst-gnu2-tls2mod2.so + +-ifeq (yes,$(have-mtls-dialect-gnu2)) +-CFLAGS-tst-tlsgap-mod0.c += -mtls-dialect=gnu2 +-CFLAGS-tst-tlsgap-mod1.c += -mtls-dialect=gnu2 +-CFLAGS-tst-tlsgap-mod2.c += -mtls-dialect=gnu2 +-CFLAGS-tst-gnu2-tls2mod0.c += -mtls-dialect=gnu2 +-CFLAGS-tst-gnu2-tls2mod1.c += -mtls-dialect=gnu2 +-CFLAGS-tst-gnu2-tls2mod2.c += -mtls-dialect=gnu2 ++ifneq (no,$(have-mtls-descriptor)) ++CFLAGS-tst-tlsgap-mod0.c += -mtls-dialect=$(have-mtls-descriptor) ++CFLAGS-tst-tlsgap-mod1.c += -mtls-dialect=$(have-mtls-descriptor) ++CFLAGS-tst-tlsgap-mod2.c += -mtls-dialect=$(have-mtls-descriptor) ++CFLAGS-tst-gnu2-tls2mod0.c += -mtls-dialect=$(have-mtls-descriptor) ++CFLAGS-tst-gnu2-tls2mod1.c += -mtls-dialect=$(have-mtls-descriptor) ++CFLAGS-tst-gnu2-tls2mod2.c += -mtls-dialect=$(have-mtls-descriptor) + endif +diff --git a/sysdeps/aarch64/preconfigure b/sysdeps/aarch64/preconfigure +index d9bd1f8558..19657b627b 100644 +--- a/sysdeps/aarch64/preconfigure ++++ b/sysdeps/aarch64/preconfigure +@@ -2,5 +2,6 @@ case "$machine" in + aarch64*) + base_machine=aarch64 + machine=aarch64 ++ mtls_descriptor=desc + ;; + esac +diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile +index d5cea717a9..619474eca9 100644 +--- a/sysdeps/arm/Makefile ++++ b/sysdeps/arm/Makefile +@@ -13,15 +13,15 @@ $(objpfx)libgcc-stubs.a: $(objpfx)aeabi_unwind_cpp_pr1.os + lib-noranlib: $(objpfx)libgcc-stubs.a + + ifeq ($(build-shared),yes) +-ifeq (yes,$(have-mtls-dialect-gnu2)) ++ifneq (no,$(have-mtls-descriptor)) + tests += tst-armtlsdescloc tst-armtlsdescextnow tst-armtlsdescextlazy + modules-names += tst-armtlsdesclocmod + modules-names += tst-armtlsdescextlazymod tst-armtlsdescextnowmod + CPPFLAGS-tst-armtlsdescextnowmod.c += -Dstatic= + CPPFLAGS-tst-armtlsdescextlazymod.c += -Dstatic= +-CFLAGS-tst-armtlsdesclocmod.c += -mtls-dialect=gnu2 +-CFLAGS-tst-armtlsdescextnowmod.c += -mtls-dialect=gnu2 +-CFLAGS-tst-armtlsdescextlazymod.c += -mtls-dialect=gnu2 ++CFLAGS-tst-armtlsdesclocmod.c += -mtls-dialect=$(have-mtls-descriptor) ++CFLAGS-tst-armtlsdescextnowmod.c += -mtls-dialect=$(have-mtls-descriptor) ++CFLAGS-tst-armtlsdescextlazymod.c += -mtls-dialect=$(have-mtls-descriptor) + LDFLAGS-tst-armtlsdescextnowmod.so += -Wl,-z,now + tst-armtlsdescloc-ENV = LD_BIND_NOW=1 + tst-armtlsdescextnow-ENV = LD_BIND_NOW=1 + +commit 5a461f2949ded98d8211939f84988bc464c7b4fe +Author: Andreas Schwab <schwab@suse.de> +Date: Tue Mar 19 13:49:50 2024 +0100 + + Add tst-gnu2-tls2mod1 to test-internal-extras + + That allows sysdeps/x86_64/tst-gnu2-tls2mod1.S to use internal headers. + + Fixes: 717ebfa85c ("x86-64: Allocate state buffer space for RDI, RSI and RBX") + (cherry picked from commit fd7ee2e6c5eb49e4a630a9978b4d668bff6354ee) + +diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile +index e8babc9a4e..9d374a3299 100644 +--- a/sysdeps/x86_64/Makefile ++++ b/sysdeps/x86_64/Makefile +@@ -210,6 +210,8 @@ tst-plt-rewrite2-ENV = GLIBC_TUNABLES=glibc.cpu.plt_rewrite=2 + $(objpfx)tst-plt-rewrite2: $(objpfx)tst-plt-rewritemod2.so + endif + ++test-internal-extras += tst-gnu2-tls2mod1 ++ + endif # $(subdir) == elf + + ifeq ($(subdir),csu) + +commit aa4249266e9906c4bc833e4847f4d8feef59504f +Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> +Date: Thu Feb 8 10:08:38 2024 -0300 + + x86: Fix Zen3/Zen4 ERMS selection (BZ 30994) + + The REP MOVSB usage on memcpy/memmove does not show much performance + improvement on Zen3/Zen4 cores compared to the vectorized loops. Also, + as from BZ 30994, if the source is aligned and the destination is not + the performance can be 20x slower. + + The performance difference is noticeable with small buffer sizes, closer + to the lower bounds limits when memcpy/memmove starts to use ERMS. The + performance of REP MOVSB is similar to vectorized instruction on the + size limit (the L2 cache). Also, there is no drawback to multiple cores + sharing the cache. + + Checked on x86_64-linux-gnu on Zen3. + Reviewed-by: H.J. Lu <hjl.tools@gmail.com> + + (cherry picked from commit 0c0d39fe4aeb0f69b26e76337c5dfd5530d5d44e) + +diff --git a/sysdeps/x86/dl-cacheinfo.h b/sysdeps/x86/dl-cacheinfo.h +index d5101615e3..f34d12846c 100644 +--- a/sysdeps/x86/dl-cacheinfo.h ++++ b/sysdeps/x86/dl-cacheinfo.h +@@ -791,7 +791,6 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) + long int data = -1; + long int shared = -1; + long int shared_per_thread = -1; +- long int core = -1; + unsigned int threads = 0; + unsigned long int level1_icache_size = -1; + unsigned long int level1_icache_linesize = -1; +@@ -809,7 +808,6 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) + if (cpu_features->basic.kind == arch_kind_intel) + { + data = handle_intel (_SC_LEVEL1_DCACHE_SIZE, cpu_features); +- core = handle_intel (_SC_LEVEL2_CACHE_SIZE, cpu_features); + shared = handle_intel (_SC_LEVEL3_CACHE_SIZE, cpu_features); + shared_per_thread = shared; + +@@ -822,7 +820,8 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) + = handle_intel (_SC_LEVEL1_DCACHE_ASSOC, cpu_features); + level1_dcache_linesize + = handle_intel (_SC_LEVEL1_DCACHE_LINESIZE, cpu_features); +- level2_cache_size = core; ++ level2_cache_size ++ = handle_intel (_SC_LEVEL2_CACHE_SIZE, cpu_features); + level2_cache_assoc + = handle_intel (_SC_LEVEL2_CACHE_ASSOC, cpu_features); + level2_cache_linesize +@@ -835,12 +834,12 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) + level4_cache_size + = handle_intel (_SC_LEVEL4_CACHE_SIZE, cpu_features); + +- get_common_cache_info (&shared, &shared_per_thread, &threads, core); ++ get_common_cache_info (&shared, &shared_per_thread, &threads, ++ level2_cache_size); + } + else if (cpu_features->basic.kind == arch_kind_zhaoxin) + { + data = handle_zhaoxin (_SC_LEVEL1_DCACHE_SIZE); +- core = handle_zhaoxin (_SC_LEVEL2_CACHE_SIZE); + shared = handle_zhaoxin (_SC_LEVEL3_CACHE_SIZE); + shared_per_thread = shared; + +@@ -849,19 +848,19 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) + level1_dcache_size = data; + level1_dcache_assoc = handle_zhaoxin (_SC_LEVEL1_DCACHE_ASSOC); + level1_dcache_linesize = handle_zhaoxin (_SC_LEVEL1_DCACHE_LINESIZE); +- level2_cache_size = core; ++ level2_cache_size = handle_zhaoxin (_SC_LEVEL2_CACHE_SIZE); + level2_cache_assoc = handle_zhaoxin (_SC_LEVEL2_CACHE_ASSOC); + level2_cache_linesize = handle_zhaoxin (_SC_LEVEL2_CACHE_LINESIZE); + level3_cache_size = shared; + level3_cache_assoc = handle_zhaoxin (_SC_LEVEL3_CACHE_ASSOC); + level3_cache_linesize = handle_zhaoxin (_SC_LEVEL3_CACHE_LINESIZE); + +- get_common_cache_info (&shared, &shared_per_thread, &threads, core); ++ get_common_cache_info (&shared, &shared_per_thread, &threads, ++ level2_cache_size); + } + else if (cpu_features->basic.kind == arch_kind_amd) + { + data = handle_amd (_SC_LEVEL1_DCACHE_SIZE); +- core = handle_amd (_SC_LEVEL2_CACHE_SIZE); + shared = handle_amd (_SC_LEVEL3_CACHE_SIZE); + + level1_icache_size = handle_amd (_SC_LEVEL1_ICACHE_SIZE); +@@ -869,7 +868,7 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) + level1_dcache_size = data; + level1_dcache_assoc = handle_amd (_SC_LEVEL1_DCACHE_ASSOC); + level1_dcache_linesize = handle_amd (_SC_LEVEL1_DCACHE_LINESIZE); +- level2_cache_size = core; ++ level2_cache_size = handle_amd (_SC_LEVEL2_CACHE_SIZE);; + level2_cache_assoc = handle_amd (_SC_LEVEL2_CACHE_ASSOC); + level2_cache_linesize = handle_amd (_SC_LEVEL2_CACHE_LINESIZE); + level3_cache_size = shared; +@@ -880,12 +879,12 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) + if (shared <= 0) + { + /* No shared L3 cache. All we have is the L2 cache. */ +- shared = core; ++ shared = level2_cache_size; + } + else if (cpu_features->basic.family < 0x17) + { + /* Account for exclusive L2 and L3 caches. */ +- shared += core; ++ shared += level2_cache_size; + } + + shared_per_thread = shared; +@@ -987,6 +986,12 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) + if (CPU_FEATURE_USABLE_P (cpu_features, FSRM)) + rep_movsb_threshold = 2112; + ++ /* For AMD CPUs that support ERMS (Zen3+), REP MOVSB is in a lot of ++ cases slower than the vectorized path (and for some alignments, ++ it is really slow, check BZ #30994). */ ++ if (cpu_features->basic.kind == arch_kind_amd) ++ rep_movsb_threshold = non_temporal_threshold; ++ + /* The default threshold to use Enhanced REP STOSB. */ + unsigned long int rep_stosb_threshold = 2048; + +@@ -1028,16 +1033,9 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) + SIZE_MAX); + + unsigned long int rep_movsb_stop_threshold; +- /* ERMS feature is implemented from AMD Zen3 architecture and it is +- performing poorly for data above L2 cache size. Henceforth, adding +- an upper bound threshold parameter to limit the usage of Enhanced +- REP MOVSB operations and setting its value to L2 cache size. */ +- if (cpu_features->basic.kind == arch_kind_amd) +- rep_movsb_stop_threshold = core; + /* Setting the upper bound of ERMS to the computed value of +- non-temporal threshold for architectures other than AMD. */ +- else +- rep_movsb_stop_threshold = non_temporal_threshold; ++ non-temporal threshold for all architectures. */ ++ rep_movsb_stop_threshold = non_temporal_threshold; + + cpu_features->data_cache_size = data; + cpu_features->shared_cache_size = shared; + +commit 6484a92698039c4a7a510f0214e22d067b0d78b3 +Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> +Date: Thu Feb 8 10:08:39 2024 -0300 + + x86: Do not prefer ERMS for memset on Zen3+ + + For AMD Zen3+ architecture, the performance of the vectorized loop is + slightly better than ERMS. + + Checked on x86_64-linux-gnu on Zen3. + Reviewed-by: H.J. Lu <hjl.tools@gmail.com> + + (cherry picked from commit 272708884cb750f12f5c74a00e6620c19dc6d567) + +diff --git a/sysdeps/x86/dl-cacheinfo.h b/sysdeps/x86/dl-cacheinfo.h +index f34d12846c..5a98f70364 100644 +--- a/sysdeps/x86/dl-cacheinfo.h ++++ b/sysdeps/x86/dl-cacheinfo.h +@@ -1021,6 +1021,11 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) + minimum value is fixed. */ + rep_stosb_threshold = TUNABLE_GET (x86_rep_stosb_threshold, + long int, NULL); ++ if (cpu_features->basic.kind == arch_kind_amd ++ && !TUNABLE_IS_INITIALIZED (x86_rep_stosb_threshold)) ++ /* For AMD Zen3+ architecture, the performance of the vectorized loop is ++ slightly better than ERMS. */ ++ rep_stosb_threshold = SIZE_MAX; + + TUNABLE_SET_WITH_BOUNDS (x86_data_cache_size, data, 0, SIZE_MAX); + TUNABLE_SET_WITH_BOUNDS (x86_shared_cache_size, shared, 0, SIZE_MAX); + +commit 5d070d12b3a52bc44dd1b71743abc4b6243862ae +Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> +Date: Thu Feb 8 10:08:40 2024 -0300 + + x86: Expand the comment on when REP STOSB is used on memset + + Reviewed-by: H.J. Lu <hjl.tools@gmail.com> + (cherry picked from commit 491e55beab7457ed310a4a47496f4a333c5d1032) + +diff --git a/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S b/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S +index 9984c3ca0f..97839a2248 100644 +--- a/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S ++++ b/sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S +@@ -21,7 +21,9 @@ + 2. If size is less than VEC, use integer register stores. + 3. If size is from VEC_SIZE to 2 * VEC_SIZE, use 2 VEC stores. + 4. If size is from 2 * VEC_SIZE to 4 * VEC_SIZE, use 4 VEC stores. +- 5. If size is more to 4 * VEC_SIZE, align to 4 * VEC_SIZE with ++ 5. On machines ERMS feature, if size is greater or equal than ++ __x86_rep_stosb_threshold then REP STOSB will be used. ++ 6. If size is more to 4 * VEC_SIZE, align to 4 * VEC_SIZE with + 4 VEC stores and store 4 * VEC at a time until done. */ + + #include <sysdep.h> + +commit 31c7d69af59da0da80caa74b2ec6ae149013384d +Author: Florian Weimer <fweimer@redhat.com> +Date: Fri Feb 16 07:40:37 2024 +0100 + + i386: Use generic memrchr in libc (bug 31316) + + Before this change, we incorrectly used the SSE2 variant in the + implementation, without checking that the system actually supports + SSE2. + + Tested-by: Sam James <sam@gentoo.org> + (cherry picked from commit 0d9166c2245cad4ac520b337dee40c9a583872b6) + +diff --git a/sysdeps/i386/i686/multiarch/memrchr-c.c b/sysdeps/i386/i686/multiarch/memrchr-c.c +index ef7bbbe792..20bfdf3af3 100644 +--- a/sysdeps/i386/i686/multiarch/memrchr-c.c ++++ b/sysdeps/i386/i686/multiarch/memrchr-c.c +@@ -5,3 +5,4 @@ extern void *__memrchr_ia32 (const void *, int, size_t); + #endif + + #include "string/memrchr.c" ++strong_alias (__memrchr_ia32, __GI___memrchr) +diff --git a/sysdeps/i386/i686/multiarch/memrchr-sse2.S b/sysdeps/i386/i686/multiarch/memrchr-sse2.S +index d9dae04171..e123f87435 100644 +--- a/sysdeps/i386/i686/multiarch/memrchr-sse2.S ++++ b/sysdeps/i386/i686/multiarch/memrchr-sse2.S +@@ -720,5 +720,4 @@ L(ret_null): + ret + + END (__memrchr_sse2) +-strong_alias (__memrchr_sse2, __GI___memrchr) + #endif + +commit b0e0a07018098c2c5927796be5681a298c312626 +Author: Joe Ramsay <Joe.Ramsay@arm.com> +Date: Tue Feb 20 16:44:13 2024 +0000 + + aarch64/fpu: Sync libmvec routines from 2.39 and before with AOR + + This includes a fix for big-endian in AdvSIMD log, some cosmetic + changes, and numerous small optimisations mainly around inlining and + using indexed variants of MLA intrinsics. + Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> + + (cherry picked from commit e302e1021391d13a9611ba3a910df128830bd19e) + +diff --git a/sysdeps/aarch64/fpu/acos_advsimd.c b/sysdeps/aarch64/fpu/acos_advsimd.c +index a8eabb5e71..0a86c9823a 100644 +--- a/sysdeps/aarch64/fpu/acos_advsimd.c ++++ b/sysdeps/aarch64/fpu/acos_advsimd.c +@@ -40,8 +40,8 @@ static const struct data + }; + + #define AllMask v_u64 (0xffffffffffffffff) +-#define Oneu (0x3ff0000000000000) +-#define Small (0x3e50000000000000) /* 2^-53. */ ++#define Oneu 0x3ff0000000000000 ++#define Small 0x3e50000000000000 /* 2^-53. */ + + #if WANT_SIMD_EXCEPT + static float64x2_t VPCS_ATTR NOINLINE +diff --git a/sysdeps/aarch64/fpu/asin_advsimd.c b/sysdeps/aarch64/fpu/asin_advsimd.c +index 141646e954..2de6eff407 100644 +--- a/sysdeps/aarch64/fpu/asin_advsimd.c ++++ b/sysdeps/aarch64/fpu/asin_advsimd.c +@@ -39,8 +39,8 @@ static const struct data + }; + + #define AllMask v_u64 (0xffffffffffffffff) +-#define One (0x3ff0000000000000) +-#define Small (0x3e50000000000000) /* 2^-12. */ ++#define One 0x3ff0000000000000 ++#define Small 0x3e50000000000000 /* 2^-12. */ + + #if WANT_SIMD_EXCEPT + static float64x2_t VPCS_ATTR NOINLINE +diff --git a/sysdeps/aarch64/fpu/atan2_sve.c b/sysdeps/aarch64/fpu/atan2_sve.c +index 09a4c559b8..04fa71fa37 100644 +--- a/sysdeps/aarch64/fpu/atan2_sve.c ++++ b/sysdeps/aarch64/fpu/atan2_sve.c +@@ -37,9 +37,6 @@ static const struct data + .pi_over_2 = 0x1.921fb54442d18p+0, + }; + +-/* Useful constants. */ +-#define SignMask sv_u64 (0x8000000000000000) +- + /* Special cases i.e. 0, infinity, nan (fall back to scalar calls). */ + static svfloat64_t NOINLINE + special_case (svfloat64_t y, svfloat64_t x, svfloat64_t ret, +@@ -72,14 +69,15 @@ svfloat64_t SV_NAME_D2 (atan2) (svfloat64_t y, svfloat64_t x, const svbool_t pg) + svbool_t cmp_y = zeroinfnan (iy, pg); + svbool_t cmp_xy = svorr_z (pg, cmp_x, cmp_y); + +- svuint64_t sign_x = svand_x (pg, ix, SignMask); +- svuint64_t sign_y = svand_x (pg, iy, SignMask); +- svuint64_t sign_xy = sveor_x (pg, sign_x, sign_y); +- + svfloat64_t ax = svabs_x (pg, x); + svfloat64_t ay = svabs_x (pg, y); ++ svuint64_t iax = svreinterpret_u64 (ax); ++ svuint64_t iay = svreinterpret_u64 (ay); ++ ++ svuint64_t sign_x = sveor_x (pg, ix, iax); ++ svuint64_t sign_y = sveor_x (pg, iy, iay); ++ svuint64_t sign_xy = sveor_x (pg, sign_x, sign_y); + +- svbool_t pred_xlt0 = svcmplt (pg, x, 0.0); + svbool_t pred_aygtax = svcmpgt (pg, ay, ax); + + /* Set up z for call to atan. */ +@@ -88,8 +86,9 @@ svfloat64_t SV_NAME_D2 (atan2) (svfloat64_t y, svfloat64_t x, const svbool_t pg) + svfloat64_t z = svdiv_x (pg, n, d); + + /* Work out the correct shift. */ +- svfloat64_t shift = svsel (pred_xlt0, sv_f64 (-2.0), sv_f64 (0.0)); +- shift = svsel (pred_aygtax, svadd_x (pg, shift, 1.0), shift); ++ svfloat64_t shift = svreinterpret_f64 (svlsr_x (pg, sign_x, 1)); ++ shift = svsel (pred_aygtax, sv_f64 (1.0), shift); ++ shift = svreinterpret_f64 (svorr_x (pg, sign_x, svreinterpret_u64 (shift))); + shift = svmul_x (pg, shift, data_ptr->pi_over_2); + + /* Use split Estrin scheme for P(z^2) with deg(P)=19. */ +@@ -109,10 +108,10 @@ svfloat64_t SV_NAME_D2 (atan2) (svfloat64_t y, svfloat64_t x, const svbool_t pg) + ret = svadd_m (pg, ret, shift); + + /* Account for the sign of x and y. */ +- ret = svreinterpret_f64 (sveor_x (pg, svreinterpret_u64 (ret), sign_xy)); +- + if (__glibc_unlikely (svptest_any (pg, cmp_xy))) +- return special_case (y, x, ret, cmp_xy); +- +- return ret; ++ return special_case ( ++ y, x, ++ svreinterpret_f64 (sveor_x (pg, svreinterpret_u64 (ret), sign_xy)), ++ cmp_xy); ++ return svreinterpret_f64 (sveor_x (pg, svreinterpret_u64 (ret), sign_xy)); + } +diff --git a/sysdeps/aarch64/fpu/atan2f_sve.c b/sysdeps/aarch64/fpu/atan2f_sve.c +index b92f83cdea..9ea197147c 100644 +--- a/sysdeps/aarch64/fpu/atan2f_sve.c ++++ b/sysdeps/aarch64/fpu/atan2f_sve.c +@@ -32,10 +32,8 @@ static const struct data + .pi_over_2 = 0x1.921fb6p+0f, + }; + +-#define SignMask sv_u32 (0x80000000) +- + /* Special cases i.e. 0, infinity, nan (fall back to scalar calls). */ +-static inline svfloat32_t ++static svfloat32_t NOINLINE + special_case (svfloat32_t y, svfloat32_t x, svfloat32_t ret, + const svbool_t cmp) + { +@@ -67,14 +65,15 @@ svfloat32_t SV_NAME_F2 (atan2) (svfloat32_t y, svfloat32_t x, const svbool_t pg) + svbool_t cmp_y = zeroinfnan (iy, pg); + svbool_t cmp_xy = svorr_z (pg, cmp_x, cmp_y); + +- svuint32_t sign_x = svand_x (pg, ix, SignMask); +- svuint32_t sign_y = svand_x (pg, iy, SignMask); +- svuint32_t sign_xy = sveor_x (pg, sign_x, sign_y); +- + svfloat32_t ax = svabs_x (pg, x); + svfloat32_t ay = svabs_x (pg, y); ++ svuint32_t iax = svreinterpret_u32 (ax); ++ svuint32_t iay = svreinterpret_u32 (ay); ++ ++ svuint32_t sign_x = sveor_x (pg, ix, iax); ++ svuint32_t sign_y = sveor_x (pg, iy, iay); ++ svuint32_t sign_xy = sveor_x (pg, sign_x, sign_y); + +- svbool_t pred_xlt0 = svcmplt (pg, x, 0.0); + svbool_t pred_aygtax = svcmpgt (pg, ay, ax); + + /* Set up z for call to atan. */ +@@ -83,11 +82,12 @@ svfloat32_t SV_NAME_F2 (atan2) (svfloat32_t y, svfloat32_t x, const svbool_t pg) + svfloat32_t z = svdiv_x (pg, n, d); + + /* Work out the correct shift. */ +- svfloat32_t shift = svsel (pred_xlt0, sv_f32 (-2.0), sv_f32 (0.0)); +- shift = svsel (pred_aygtax, svadd_x (pg, shift, 1.0), shift); ++ svfloat32_t shift = svreinterpret_f32 (svlsr_x (pg, sign_x, 1)); ++ shift = svsel (pred_aygtax, sv_f32 (1.0), shift); ++ shift = svreinterpret_f32 (svorr_x (pg, sign_x, svreinterpret_u32 (shift))); + shift = svmul_x (pg, shift, sv_f32 (data_ptr->pi_over_2)); + +- /* Use split Estrin scheme for P(z^2) with deg(P)=7. */ ++ /* Use pure Estrin scheme for P(z^2) with deg(P)=7. */ + svfloat32_t z2 = svmul_x (pg, z, z); + svfloat32_t z4 = svmul_x (pg, z2, z2); + svfloat32_t z8 = svmul_x (pg, z4, z4); +@@ -101,10 +101,12 @@ svfloat32_t SV_NAME_F2 (atan2) (svfloat32_t y, svfloat32_t x, const svbool_t pg) + ret = svadd_m (pg, ret, shift); + + /* Account for the sign of x and y. */ +- ret = svreinterpret_f32 (sveor_x (pg, svreinterpret_u32 (ret), sign_xy)); + + if (__glibc_unlikely (svptest_any (pg, cmp_xy))) +- return special_case (y, x, ret, cmp_xy); ++ return special_case ( ++ y, x, ++ svreinterpret_f32 (sveor_x (pg, svreinterpret_u32 (ret), sign_xy)), ++ cmp_xy); + +- return ret; ++ return svreinterpret_f32 (sveor_x (pg, svreinterpret_u32 (ret), sign_xy)); + } +diff --git a/sysdeps/aarch64/fpu/cos_advsimd.c b/sysdeps/aarch64/fpu/cos_advsimd.c +index 2897e8b909..3924c9ce44 100644 +--- a/sysdeps/aarch64/fpu/cos_advsimd.c ++++ b/sysdeps/aarch64/fpu/cos_advsimd.c +@@ -63,8 +63,7 @@ float64x2_t VPCS_ATTR V_NAME_D1 (cos) (float64x2_t x) + special-case handler later. */ + r = vbslq_f64 (cmp, v_f64 (1.0), r); + #else +- cmp = vcageq_f64 (d->range_val, x); +- cmp = vceqzq_u64 (cmp); /* cmp = ~cmp. */ ++ cmp = vcageq_f64 (x, d->range_val); + r = x; + #endif + +diff --git a/sysdeps/aarch64/fpu/cosf_advsimd.c b/sysdeps/aarch64/fpu/cosf_advsimd.c +index 60abc8dfcf..d0c285b03a 100644 +--- a/sysdeps/aarch64/fpu/cosf_advsimd.c ++++ b/sysdeps/aarch64/fpu/cosf_advsimd.c +@@ -64,8 +64,7 @@ float32x4_t VPCS_ATTR NOINLINE V_NAME_F1 (cos) (float32x4_t x) + special-case handler later. */ + r = vbslq_f32 (cmp, v_f32 (1.0f), r); + #else +- cmp = vcageq_f32 (d->range_val, x); +- cmp = vceqzq_u32 (cmp); /* cmp = ~cmp. */ ++ cmp = vcageq_f32 (x, d->range_val); + r = x; + #endif + +diff --git a/sysdeps/aarch64/fpu/exp10_advsimd.c b/sysdeps/aarch64/fpu/exp10_advsimd.c +index fe7149b191..eeb31ca839 100644 +--- a/sysdeps/aarch64/fpu/exp10_advsimd.c ++++ b/sysdeps/aarch64/fpu/exp10_advsimd.c +@@ -57,7 +57,7 @@ const static struct data + # define BigBound v_u64 (0x4070000000000000) /* asuint64 (0x1p8). */ + # define Thres v_u64 (0x2070000000000000) /* BigBound - TinyBound. */ + +-static inline float64x2_t VPCS_ATTR ++static float64x2_t VPCS_ATTR NOINLINE + special_case (float64x2_t x, float64x2_t y, uint64x2_t cmp) + { + /* If fenv exceptions are to be triggered correctly, fall back to the scalar +@@ -72,7 +72,7 @@ special_case (float64x2_t x, float64x2_t y, uint64x2_t cmp) + # define SpecialBias1 v_u64 (0x7000000000000000) /* 0x1p769. */ + # define SpecialBias2 v_u64 (0x3010000000000000) /* 0x1p-254. */ + +-static float64x2_t VPCS_ATTR NOINLINE ++static inline float64x2_t VPCS_ATTR + special_case (float64x2_t s, float64x2_t y, float64x2_t n, + const struct data *d) + { +diff --git a/sysdeps/aarch64/fpu/exp10f_advsimd.c b/sysdeps/aarch64/fpu/exp10f_advsimd.c +index 7ee0c90948..ab117b69da 100644 +--- a/sysdeps/aarch64/fpu/exp10f_advsimd.c ++++ b/sysdeps/aarch64/fpu/exp10f_advsimd.c +@@ -25,7 +25,8 @@ + static const struct data + { + float32x4_t poly[5]; +- float32x4_t shift, log10_2, log2_10_hi, log2_10_lo; ++ float32x4_t log10_2_and_inv, shift; ++ + #if !WANT_SIMD_EXCEPT + float32x4_t scale_thresh; + #endif +@@ -38,9 +39,9 @@ static const struct data + .poly = { V4 (0x1.26bb16p+1f), V4 (0x1.5350d2p+1f), V4 (0x1.04744ap+1f), + V4 (0x1.2d8176p+0f), V4 (0x1.12b41ap-1f) }, + .shift = V4 (0x1.8p23f), +- .log10_2 = V4 (0x1.a934fp+1), +- .log2_10_hi = V4 (0x1.344136p-2), +- .log2_10_lo = V4 (-0x1.ec10cp-27), ++ ++ /* Stores constants 1/log10(2), log10(2)_high, log10(2)_low, 0. */ ++ .log10_2_and_inv = { 0x1.a934fp+1, 0x1.344136p-2, -0x1.ec10cp-27, 0 }, + #if !WANT_SIMD_EXCEPT + .scale_thresh = V4 (ScaleBound) + #endif +@@ -98,24 +99,22 @@ float32x4_t VPCS_ATTR NOINLINE V_NAME_F1 (exp10) (float32x4_t x) + #if WANT_SIMD_EXCEPT + /* asuint(x) - TinyBound >= BigBound - TinyBound. */ + uint32x4_t cmp = vcgeq_u32 ( +- vsubq_u32 (vandq_u32 (vreinterpretq_u32_f32 (x), v_u32 (0x7fffffff)), +- TinyBound), +- Thres); ++ vsubq_u32 (vreinterpretq_u32_f32 (vabsq_f32 (x)), TinyBound), Thres); + float32x4_t xm = x; + /* If any lanes are special, mask them with 1 and retain a copy of x to allow + special case handler to fix special lanes later. This is only necessary if + fenv exceptions are to be triggered correctly. */ + if (__glibc_unlikely (v_any_u32 (cmp))) +- x = vbslq_f32 (cmp, v_f32 (1), x); ++ x = v_zerofy_f32 (x, cmp); + #endif + + /* exp10(x) = 2^n * 10^r = 2^n * (1 + poly (r)), + with poly(r) in [1/sqrt(2), sqrt(2)] and + x = r + n * log10 (2), with r in [-log10(2)/2, log10(2)/2]. */ +- float32x4_t z = vfmaq_f32 (d->shift, x, d->log10_2); ++ float32x4_t z = vfmaq_laneq_f32 (d->shift, x, d->log10_2_and_inv, 0); + float32x4_t n = vsubq_f32 (z, d->shift); +- float32x4_t r = vfmsq_f32 (x, n, d->log2_10_hi); +- r = vfmsq_f32 (r, n, d->log2_10_lo); ++ float32x4_t r = vfmsq_laneq_f32 (x, n, d->log10_2_and_inv, 1); ++ r = vfmsq_laneq_f32 (r, n, d->log10_2_and_inv, 2); + uint32x4_t e = vshlq_n_u32 (vreinterpretq_u32_f32 (z), 23); + + float32x4_t scale = vreinterpretq_f32_u32 (vaddq_u32 (e, ExponentBias)); +diff --git a/sysdeps/aarch64/fpu/exp2_advsimd.c b/sysdeps/aarch64/fpu/exp2_advsimd.c +index 391a93180c..ae1e63d503 100644 +--- a/sysdeps/aarch64/fpu/exp2_advsimd.c ++++ b/sysdeps/aarch64/fpu/exp2_advsimd.c +@@ -24,6 +24,7 @@ + #define IndexMask (N - 1) + #define BigBound 1022.0 + #define UOFlowBound 1280.0 ++#define TinyBound 0x2000000000000000 /* asuint64(0x1p-511). */ + + static const struct data + { +@@ -48,14 +49,13 @@ lookup_sbits (uint64x2_t i) + + #if WANT_SIMD_EXCEPT + +-# define TinyBound 0x2000000000000000 /* asuint64(0x1p-511). */ + # define Thres 0x2080000000000000 /* asuint64(512.0) - TinyBound. */ + + /* Call scalar exp2 as a fallback. */ + static float64x2_t VPCS_ATTR NOINLINE +-special_case (float64x2_t x) ++special_case (float64x2_t x, float64x2_t y, uint64x2_t is_special) + { +- return v_call_f64 (exp2, x, x, v_u64 (0xffffffffffffffff)); ++ return v_call_f64 (exp2, x, y, is_special); + } + + #else +@@ -65,7 +65,7 @@ special_case (float64x2_t x) + # define SpecialBias1 0x7000000000000000 /* 0x1p769. */ + # define SpecialBias2 0x3010000000000000 /* 0x1p-254. */ + +-static float64x2_t VPCS_ATTR ++static inline float64x2_t VPCS_ATTR + special_case (float64x2_t s, float64x2_t y, float64x2_t n, + const struct data *d) + { +@@ -94,10 +94,10 @@ float64x2_t V_NAME_D1 (exp2) (float64x2_t x) + #if WANT_SIMD_EXCEPT + uint64x2_t ia = vreinterpretq_u64_f64 (vabsq_f64 (x)); + cmp = vcgeq_u64 (vsubq_u64 (ia, v_u64 (TinyBound)), v_u64 (Thres)); +- /* If any special case (inf, nan, small and large x) is detected, +- fall back to scalar for all lanes. */ +- if (__glibc_unlikely (v_any_u64 (cmp))) +- return special_case (x); ++ /* Mask special lanes and retain a copy of x for passing to special-case ++ handler. */ ++ float64x2_t xc = x; ++ x = v_zerofy_f64 (x, cmp); + #else + cmp = vcagtq_f64 (x, d->scale_big_bound); + #endif +@@ -120,9 +120,11 @@ float64x2_t V_NAME_D1 (exp2) (float64x2_t x) + float64x2_t y = v_pairwise_poly_3_f64 (r, r2, d->poly); + y = vmulq_f64 (r, y); + +-#if !WANT_SIMD_EXCEPT + if (__glibc_unlikely (v_any_u64 (cmp))) ++#if !WANT_SIMD_EXCEPT + return special_case (s, y, n, d); ++#else ++ return special_case (xc, vfmaq_f64 (s, s, y), cmp); + #endif + return vfmaq_f64 (s, s, y); + } +diff --git a/sysdeps/aarch64/fpu/exp2f_sve.c b/sysdeps/aarch64/fpu/exp2f_sve.c +index 9a5a523a10..8a686e3e05 100644 +--- a/sysdeps/aarch64/fpu/exp2f_sve.c ++++ b/sysdeps/aarch64/fpu/exp2f_sve.c +@@ -20,6 +20,8 @@ + #include "sv_math.h" + #include "poly_sve_f32.h" + ++#define Thres 0x1.5d5e2ap+6f ++ + static const struct data + { + float poly[5]; +@@ -33,7 +35,7 @@ static const struct data + .shift = 0x1.903f8p17f, + /* Roughly 87.3. For x < -Thres, the result is subnormal and not handled + correctly by FEXPA. */ +- .thres = 0x1.5d5e2ap+6f, ++ .thres = Thres, + }; + + static svfloat32_t NOINLINE +diff --git a/sysdeps/aarch64/fpu/exp_advsimd.c b/sysdeps/aarch64/fpu/exp_advsimd.c +index fd215f1d2c..5e3a9a0d44 100644 +--- a/sysdeps/aarch64/fpu/exp_advsimd.c ++++ b/sysdeps/aarch64/fpu/exp_advsimd.c +@@ -54,7 +54,7 @@ const static volatile struct + # define BigBound v_u64 (0x4080000000000000) /* asuint64 (0x1p9). */ + # define SpecialBound v_u64 (0x2080000000000000) /* BigBound - TinyBound. */ + +-static inline float64x2_t VPCS_ATTR ++static float64x2_t VPCS_ATTR NOINLINE + special_case (float64x2_t x, float64x2_t y, uint64x2_t cmp) + { + /* If fenv exceptions are to be triggered correctly, fall back to the scalar +@@ -69,7 +69,7 @@ special_case (float64x2_t x, float64x2_t y, uint64x2_t cmp) + # define SpecialBias1 v_u64 (0x7000000000000000) /* 0x1p769. */ + # define SpecialBias2 v_u64 (0x3010000000000000) /* 0x1p-254. */ + +-static float64x2_t VPCS_ATTR NOINLINE ++static inline float64x2_t VPCS_ATTR + special_case (float64x2_t s, float64x2_t y, float64x2_t n) + { + /* 2^(n/N) may overflow, break it up into s1*s2. */ +diff --git a/sysdeps/aarch64/fpu/expm1_advsimd.c b/sysdeps/aarch64/fpu/expm1_advsimd.c +index 0b85bd06f3..3628398674 100644 +--- a/sysdeps/aarch64/fpu/expm1_advsimd.c ++++ b/sysdeps/aarch64/fpu/expm1_advsimd.c +@@ -23,7 +23,7 @@ + static const struct data + { + float64x2_t poly[11]; +- float64x2_t invln2, ln2_lo, ln2_hi, shift; ++ float64x2_t invln2, ln2, shift; + int64x2_t exponent_bias; + #if WANT_SIMD_EXCEPT + uint64x2_t thresh, tiny_bound; +@@ -38,8 +38,7 @@ static const struct data + V2 (0x1.71ddf82db5bb4p-19), V2 (0x1.27e517fc0d54bp-22), + V2 (0x1.af5eedae67435p-26), V2 (0x1.1f143d060a28ap-29) }, + .invln2 = V2 (0x1.71547652b82fep0), +- .ln2_hi = V2 (0x1.62e42fefa39efp-1), +- .ln2_lo = V2 (0x1.abc9e3b39803fp-56), ++ .ln2 = { 0x1.62e42fefa39efp-1, 0x1.abc9e3b39803fp-56 }, + .shift = V2 (0x1.8p52), + .exponent_bias = V2 (0x3ff0000000000000), + #if WANT_SIMD_EXCEPT +@@ -83,7 +82,7 @@ float64x2_t VPCS_ATTR V_NAME_D1 (expm1) (float64x2_t x) + x = v_zerofy_f64 (x, special); + #else + /* Large input, NaNs and Infs. */ +- uint64x2_t special = vceqzq_u64 (vcaltq_f64 (x, d->oflow_bound)); ++ uint64x2_t special = vcageq_f64 (x, d->oflow_bound); + #endif + + /* Reduce argument to smaller range: +@@ -93,8 +92,8 @@ float64x2_t VPCS_ATTR V_NAME_D1 (expm1) (float64x2_t x) + where 2^i is exact because i is an integer. */ + float64x2_t n = vsubq_f64 (vfmaq_f64 (d->shift, d->invln2, x), d->shift); + int64x2_t i = vcvtq_s64_f64 (n); +- float64x2_t f = vfmsq_f64 (x, n, d->ln2_hi); +- f = vfmsq_f64 (f, n, d->ln2_lo); ++ float64x2_t f = vfmsq_laneq_f64 (x, n, d->ln2, 0); ++ f = vfmsq_laneq_f64 (f, n, d->ln2, 1); + + /* Approximate expm1(f) using polynomial. + Taylor expansion for expm1(x) has the form: +diff --git a/sysdeps/aarch64/fpu/expm1f_advsimd.c b/sysdeps/aarch64/fpu/expm1f_advsimd.c +index 8d4c9a2193..93db200f61 100644 +--- a/sysdeps/aarch64/fpu/expm1f_advsimd.c ++++ b/sysdeps/aarch64/fpu/expm1f_advsimd.c +@@ -23,7 +23,8 @@ + static const struct data + { + float32x4_t poly[5]; +- float32x4_t invln2, ln2_lo, ln2_hi, shift; ++ float32x4_t invln2_and_ln2; ++ float32x4_t shift; + int32x4_t exponent_bias; + #if WANT_SIMD_EXCEPT + uint32x4_t thresh; +@@ -34,9 +35,8 @@ static const struct data + /* Generated using fpminimax with degree=5 in [-log(2)/2, log(2)/2]. */ + .poly = { V4 (0x1.fffffep-2), V4 (0x1.5554aep-3), V4 (0x1.555736p-5), + V4 (0x1.12287cp-7), V4 (0x1.6b55a2p-10) }, +- .invln2 = V4 (0x1.715476p+0f), +- .ln2_hi = V4 (0x1.62e4p-1f), +- .ln2_lo = V4 (0x1.7f7d1cp-20f), ++ /* Stores constants: invln2, ln2_hi, ln2_lo, 0. */ ++ .invln2_and_ln2 = { 0x1.715476p+0f, 0x1.62e4p-1f, 0x1.7f7d1cp-20f, 0 }, + .shift = V4 (0x1.8p23f), + .exponent_bias = V4 (0x3f800000), + #if !WANT_SIMD_EXCEPT +@@ -80,7 +80,7 @@ float32x4_t VPCS_ATTR NOINLINE V_NAME_F1 (expm1) (float32x4_t x) + x = v_zerofy_f32 (x, special); + #else + /* Handles very large values (+ve and -ve), +/-NaN, +/-Inf. */ +- uint32x4_t special = vceqzq_u32 (vcaltq_f32 (x, d->oflow_bound)); ++ uint32x4_t special = vcagtq_f32 (x, d->oflow_bound); + #endif + + /* Reduce argument to smaller range: +@@ -88,10 +88,11 @@ float32x4_t VPCS_ATTR NOINLINE V_NAME_F1 (expm1) (float32x4_t x) + and f = x - i * ln2, then f is in [-ln2/2, ln2/2]. + exp(x) - 1 = 2^i * (expm1(f) + 1) - 1 + where 2^i is exact because i is an integer. */ +- float32x4_t j = vsubq_f32 (vfmaq_f32 (d->shift, d->invln2, x), d->shift); ++ float32x4_t j = vsubq_f32 ( ++ vfmaq_laneq_f32 (d->shift, x, d->invln2_and_ln2, 0), d->shift); + int32x4_t i = vcvtq_s32_f32 (j); +- float32x4_t f = vfmsq_f32 (x, j, d->ln2_hi); +- f = vfmsq_f32 (f, j, d->ln2_lo); ++ float32x4_t f = vfmsq_laneq_f32 (x, j, d->invln2_and_ln2, 1); ++ f = vfmsq_laneq_f32 (f, j, d->invln2_and_ln2, 2); + + /* Approximate expm1(f) using polynomial. + Taylor expansion for expm1(x) has the form: +diff --git a/sysdeps/aarch64/fpu/log_advsimd.c b/sysdeps/aarch64/fpu/log_advsimd.c +index 067ae79613..21df61728c 100644 +--- a/sysdeps/aarch64/fpu/log_advsimd.c ++++ b/sysdeps/aarch64/fpu/log_advsimd.c +@@ -58,8 +58,13 @@ lookup (uint64x2_t i) + uint64_t i1 = (i[1] >> (52 - V_LOG_TABLE_BITS)) & IndexMask; + float64x2_t e0 = vld1q_f64 (&__v_log_data.table[i0].invc); + float64x2_t e1 = vld1q_f64 (&__v_log_data.table[i1].invc); ++#if __BYTE_ORDER == __LITTLE_ENDIAN + e.invc = vuzp1q_f64 (e0, e1); + e.logc = vuzp2q_f64 (e0, e1); ++#else ++ e.invc = vuzp1q_f64 (e1, e0); ++ e.logc = vuzp2q_f64 (e1, e0); ++#endif + return e; + } + +diff --git a/sysdeps/aarch64/fpu/sin_advsimd.c b/sysdeps/aarch64/fpu/sin_advsimd.c +index efce183e86..a0d9d3b819 100644 +--- a/sysdeps/aarch64/fpu/sin_advsimd.c ++++ b/sysdeps/aarch64/fpu/sin_advsimd.c +@@ -75,8 +75,7 @@ float64x2_t VPCS_ATTR V_NAME_D1 (sin) (float64x2_t x) + r = vbslq_f64 (cmp, vreinterpretq_f64_u64 (cmp), x); + #else + r = x; +- cmp = vcageq_f64 (d->range_val, x); +- cmp = vceqzq_u64 (cmp); /* cmp = ~cmp. */ ++ cmp = vcageq_f64 (x, d->range_val); + #endif + + /* n = rint(|x|/pi). */ +diff --git a/sysdeps/aarch64/fpu/sinf_advsimd.c b/sysdeps/aarch64/fpu/sinf_advsimd.c +index 60cf3f2ca1..375dfc3331 100644 +--- a/sysdeps/aarch64/fpu/sinf_advsimd.c ++++ b/sysdeps/aarch64/fpu/sinf_advsimd.c +@@ -67,8 +67,7 @@ float32x4_t VPCS_ATTR NOINLINE V_NAME_F1 (sin) (float32x4_t x) + r = vbslq_f32 (cmp, vreinterpretq_f32_u32 (cmp), x); + #else + r = x; +- cmp = vcageq_f32 (d->range_val, x); +- cmp = vceqzq_u32 (cmp); /* cmp = ~cmp. */ ++ cmp = vcageq_f32 (x, d->range_val); + #endif + + /* n = rint(|x|/pi) */ +diff --git a/sysdeps/aarch64/fpu/tan_advsimd.c b/sysdeps/aarch64/fpu/tan_advsimd.c +index d7e5ba7b1a..0459821ab2 100644 +--- a/sysdeps/aarch64/fpu/tan_advsimd.c ++++ b/sysdeps/aarch64/fpu/tan_advsimd.c +@@ -23,7 +23,7 @@ + static const struct data + { + float64x2_t poly[9]; +- float64x2_t half_pi_hi, half_pi_lo, two_over_pi, shift; ++ float64x2_t half_pi, two_over_pi, shift; + #if !WANT_SIMD_EXCEPT + float64x2_t range_val; + #endif +@@ -34,8 +34,7 @@ static const struct data + V2 (0x1.226e5e5ecdfa3p-7), V2 (0x1.d6c7ddbf87047p-9), + V2 (0x1.7ea75d05b583ep-10), V2 (0x1.289f22964a03cp-11), + V2 (0x1.4e4fd14147622p-12) }, +- .half_pi_hi = V2 (0x1.921fb54442d18p0), +- .half_pi_lo = V2 (0x1.1a62633145c07p-54), ++ .half_pi = { 0x1.921fb54442d18p0, 0x1.1a62633145c07p-54 }, + .two_over_pi = V2 (0x1.45f306dc9c883p-1), + .shift = V2 (0x1.8p52), + #if !WANT_SIMD_EXCEPT +@@ -56,15 +55,15 @@ special_case (float64x2_t x) + + /* Vector approximation for double-precision tan. + Maximum measured error is 3.48 ULP: +- __v_tan(0x1.4457047ef78d8p+20) got -0x1.f6ccd8ecf7dedp+37 +- want -0x1.f6ccd8ecf7deap+37. */ ++ _ZGVnN2v_tan(0x1.4457047ef78d8p+20) got -0x1.f6ccd8ecf7dedp+37 ++ want -0x1.f6ccd8ecf7deap+37. */ + float64x2_t VPCS_ATTR V_NAME_D1 (tan) (float64x2_t x) + { + const struct data *dat = ptr_barrier (&data); +- /* Our argument reduction cannot calculate q with sufficient accuracy for very +- large inputs. Fall back to scalar routine for all lanes if any are too +- large, or Inf/NaN. If fenv exceptions are expected, also fall back for tiny +- input to avoid underflow. */ ++ /* Our argument reduction cannot calculate q with sufficient accuracy for ++ very large inputs. Fall back to scalar routine for all lanes if any are ++ too large, or Inf/NaN. If fenv exceptions are expected, also fall back for ++ tiny input to avoid underflow. */ + #if WANT_SIMD_EXCEPT + uint64x2_t iax = vreinterpretq_u64_f64 (vabsq_f64 (x)); + /* iax - tiny_bound > range_val - tiny_bound. */ +@@ -82,8 +81,8 @@ float64x2_t VPCS_ATTR V_NAME_D1 (tan) (float64x2_t x) + /* Use q to reduce x to r in [-pi/4, pi/4], by: + r = x - q * pi/2, in extended precision. */ + float64x2_t r = x; +- r = vfmsq_f64 (r, q, dat->half_pi_hi); +- r = vfmsq_f64 (r, q, dat->half_pi_lo); ++ r = vfmsq_laneq_f64 (r, q, dat->half_pi, 0); ++ r = vfmsq_laneq_f64 (r, q, dat->half_pi, 1); + /* Further reduce r to [-pi/8, pi/8], to be reconstructed using double angle + formula. */ + r = vmulq_n_f64 (r, 0.5); +@@ -106,14 +105,15 @@ float64x2_t VPCS_ATTR V_NAME_D1 (tan) (float64x2_t x) + and reciprocity around pi/2: + tan(x) = 1 / (tan(pi/2 - x)) + to assemble result using change-of-sign and conditional selection of +- numerator/denominator, dependent on odd/even-ness of q (hence quadrant). */ ++ numerator/denominator, dependent on odd/even-ness of q (hence quadrant). ++ */ + float64x2_t n = vfmaq_f64 (v_f64 (-1), p, p); + float64x2_t d = vaddq_f64 (p, p); + + uint64x2_t no_recip = vtstq_u64 (vreinterpretq_u64_s64 (qi), v_u64 (1)); + + #if !WANT_SIMD_EXCEPT +- uint64x2_t special = vceqzq_u64 (vcaleq_f64 (x, dat->range_val)); ++ uint64x2_t special = vcageq_f64 (x, dat->range_val); + if (__glibc_unlikely (v_any_u64 (special))) + return special_case (x); + #endif +diff --git a/sysdeps/aarch64/fpu/tanf_advsimd.c b/sysdeps/aarch64/fpu/tanf_advsimd.c +index 1f16103f8a..5a7489390a 100644 +--- a/sysdeps/aarch64/fpu/tanf_advsimd.c ++++ b/sysdeps/aarch64/fpu/tanf_advsimd.c +@@ -23,7 +23,8 @@ + static const struct data + { + float32x4_t poly[6]; +- float32x4_t neg_half_pi_1, neg_half_pi_2, neg_half_pi_3, two_over_pi, shift; ++ float32x4_t pi_consts; ++ float32x4_t shift; + #if !WANT_SIMD_EXCEPT + float32x4_t range_val; + #endif +@@ -31,10 +32,9 @@ static const struct data + /* Coefficients generated using FPMinimax. */ + .poly = { V4 (0x1.55555p-2f), V4 (0x1.11166p-3f), V4 (0x1.b88a78p-5f), + V4 (0x1.7b5756p-6f), V4 (0x1.4ef4cep-8f), V4 (0x1.0e1e74p-7f) }, +- .neg_half_pi_1 = V4 (-0x1.921fb6p+0f), +- .neg_half_pi_2 = V4 (0x1.777a5cp-25f), +- .neg_half_pi_3 = V4 (0x1.ee59dap-50f), +- .two_over_pi = V4 (0x1.45f306p-1f), ++ /* Stores constants: (-pi/2)_high, (-pi/2)_mid, (-pi/2)_low, and 2/pi. */ ++ .pi_consts ++ = { -0x1.921fb6p+0f, 0x1.777a5cp-25f, 0x1.ee59dap-50f, 0x1.45f306p-1f }, + .shift = V4 (0x1.8p+23f), + #if !WANT_SIMD_EXCEPT + .range_val = V4 (0x1p15f), +@@ -58,10 +58,11 @@ eval_poly (float32x4_t z, const struct data *d) + { + float32x4_t z2 = vmulq_f32 (z, z); + #if WANT_SIMD_EXCEPT +- /* Tiny z (<= 0x1p-31) will underflow when calculating z^4. If fp exceptions +- are to be triggered correctly, sidestep this by fixing such lanes to 0. */ ++ /* Tiny z (<= 0x1p-31) will underflow when calculating z^4. ++ If fp exceptions are to be triggered correctly, ++ sidestep this by fixing such lanes to 0. */ + uint32x4_t will_uflow +- = vcleq_u32 (vreinterpretq_u32_f32 (vabsq_f32 (z)), TinyBound); ++ = vcleq_u32 (vreinterpretq_u32_f32 (vabsq_f32 (z)), TinyBound); + if (__glibc_unlikely (v_any_u32 (will_uflow))) + z2 = vbslq_f32 (will_uflow, v_f32 (0), z2); + #endif +@@ -94,16 +95,16 @@ float32x4_t VPCS_ATTR NOINLINE V_NAME_F1 (tan) (float32x4_t x) + #endif + + /* n = rint(x/(pi/2)). */ +- float32x4_t q = vfmaq_f32 (d->shift, d->two_over_pi, x); ++ float32x4_t q = vfmaq_laneq_f32 (d->shift, x, d->pi_consts, 3); + float32x4_t n = vsubq_f32 (q, d->shift); + /* Determine if x lives in an interval, where |tan(x)| grows to infinity. */ + uint32x4_t pred_alt = vtstq_u32 (vreinterpretq_u32_f32 (q), v_u32 (1)); + + /* r = x - n * (pi/2) (range reduction into -pi./4 .. pi/4). */ + float32x4_t r; +- r = vfmaq_f32 (x, d->neg_half_pi_1, n); +- r = vfmaq_f32 (r, d->neg_half_pi_2, n); +- r = vfmaq_f32 (r, d->neg_half_pi_3, n); ++ r = vfmaq_laneq_f32 (x, n, d->pi_consts, 0); ++ r = vfmaq_laneq_f32 (r, n, d->pi_consts, 1); ++ r = vfmaq_laneq_f32 (r, n, d->pi_consts, 2); + + /* If x lives in an interval, where |tan(x)| + - is finite, then use a polynomial approximation of the form + +commit 395a89f61e19fa916ae4cc93fc10d81a28ce3039 +Author: Szabolcs Nagy <szabolcs.nagy@arm.com> +Date: Wed Mar 13 14:34:14 2024 +0000 + + aarch64: fix check for SVE support in assembler + + Due to GCC bug 110901 -mcpu can override -march setting when compiling + asm code and thus a compiler targetting a specific cpu can fail the + configure check even when binutils gas supports SVE. + + The workaround is that explicit .arch directive overrides both -mcpu + and -march, and since that's what the actual SVE memcpy uses the + configure check should use that too even if the GCC issue is fixed + independently. + + Reviewed-by: Florian Weimer <fweimer@redhat.com> + (cherry picked from commit 73c26018ed0ecd9c807bb363cc2c2ab4aca66a82) + +diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure +old mode 100644 +new mode 100755 +index ca57edce47..9606137e8d +--- a/sysdeps/aarch64/configure ++++ b/sysdeps/aarch64/configure +@@ -325,9 +325,10 @@ then : + printf %s "(cached) " >&6 + else $as_nop + cat > conftest.s <<\EOF +- ptrue p0.b ++ .arch armv8.2-a+sve ++ ptrue p0.b + EOF +-if { ac_try='${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&5' ++if { ac_try='${CC-cc} -c conftest.s 1>&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? +diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac +index 27874eceb4..56d12d661d 100644 +--- a/sysdeps/aarch64/configure.ac ++++ b/sysdeps/aarch64/configure.ac +@@ -90,9 +90,10 @@ LIBC_CONFIG_VAR([aarch64-variant-pcs], [$libc_cv_aarch64_variant_pcs]) + # Check if asm support armv8.2-a+sve + AC_CACHE_CHECK([for SVE support in assembler], [libc_cv_aarch64_sve_asm], [dnl + cat > conftest.s <<\EOF +- ptrue p0.b ++ .arch armv8.2-a+sve ++ ptrue p0.b + EOF +-if AC_TRY_COMMAND(${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&AS_MESSAGE_LOG_FD); then ++if AC_TRY_COMMAND(${CC-cc} -c conftest.s 1>&AS_MESSAGE_LOG_FD); then + libc_cv_aarch64_sve_asm=yes + else + libc_cv_aarch64_sve_asm=no + +commit 9d92452c70805a2e2dbbdb2b1ffc34bd86e1c8df +Author: Wilco Dijkstra <wilco.dijkstra@arm.com> +Date: Thu Mar 21 16:48:33 2024 +0000 + + AArch64: Check kernel version for SVE ifuncs + + Old Linux kernels disable SVE after every system call. Calling the + SVE-optimized memcpy afterwards will then cause a trap to reenable SVE. + As a result, applications with a high use of syscalls may run slower with + the SVE memcpy. This is true for kernels between 4.15.0 and before 6.2.0, + except for 5.14.0 which was patched. Avoid this by checking the kernel + version and selecting the SVE ifunc on modern kernels. + + Parse the kernel version reported by uname() into a 24-bit kernel.major.minor + value without calling any library functions. If uname() is not supported or + if the version format is not recognized, assume the kernel is modern. + + Tested-by: Florian Weimer <fweimer@redhat.com> + Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com> + (cherry picked from commit 2e94e2f5d2bf2de124c8ad7da85463355e54ccb2) + +diff --git a/sysdeps/aarch64/cpu-features.h b/sysdeps/aarch64/cpu-features.h +index 77a782422a..5f2da91ebb 100644 +--- a/sysdeps/aarch64/cpu-features.h ++++ b/sysdeps/aarch64/cpu-features.h +@@ -71,6 +71,7 @@ struct cpu_features + /* Currently, the GLIBC memory tagging tunable only defines 8 bits. */ + uint8_t mte_state; + bool sve; ++ bool prefer_sve_ifuncs; + bool mops; + }; + +diff --git a/sysdeps/aarch64/multiarch/init-arch.h b/sysdeps/aarch64/multiarch/init-arch.h +index c52860efb2..61dc40088f 100644 +--- a/sysdeps/aarch64/multiarch/init-arch.h ++++ b/sysdeps/aarch64/multiarch/init-arch.h +@@ -36,5 +36,7 @@ + MTE_ENABLED (); \ + bool __attribute__((unused)) sve = \ + GLRO(dl_aarch64_cpu_features).sve; \ ++ bool __attribute__((unused)) prefer_sve_ifuncs = \ ++ GLRO(dl_aarch64_cpu_features).prefer_sve_ifuncs; \ + bool __attribute__((unused)) mops = \ + GLRO(dl_aarch64_cpu_features).mops; +diff --git a/sysdeps/aarch64/multiarch/memcpy.c b/sysdeps/aarch64/multiarch/memcpy.c +index d12eccfca5..ce53567dab 100644 +--- a/sysdeps/aarch64/multiarch/memcpy.c ++++ b/sysdeps/aarch64/multiarch/memcpy.c +@@ -47,7 +47,7 @@ select_memcpy_ifunc (void) + { + if (IS_A64FX (midr)) + return __memcpy_a64fx; +- return __memcpy_sve; ++ return prefer_sve_ifuncs ? __memcpy_sve : __memcpy_generic; + } + + if (IS_THUNDERX (midr)) +diff --git a/sysdeps/aarch64/multiarch/memmove.c b/sysdeps/aarch64/multiarch/memmove.c +index 2081eeb4d4..fe95037be3 100644 +--- a/sysdeps/aarch64/multiarch/memmove.c ++++ b/sysdeps/aarch64/multiarch/memmove.c +@@ -47,7 +47,7 @@ select_memmove_ifunc (void) + { + if (IS_A64FX (midr)) + return __memmove_a64fx; +- return __memmove_sve; ++ return prefer_sve_ifuncs ? __memmove_sve : __memmove_generic; + } + + if (IS_THUNDERX (midr)) +diff --git a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c +index b1a3f673f0..c0b047bc0d 100644 +--- a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c ++++ b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c +@@ -21,6 +21,7 @@ + #include <sys/auxv.h> + #include <elf/dl-hwcaps.h> + #include <sys/prctl.h> ++#include <sys/utsname.h> + #include <dl-tunables-parse.h> + + #define DCZID_DZP_MASK (1 << 4) +@@ -62,6 +63,46 @@ get_midr_from_mcpu (const struct tunable_str_t *mcpu) + return UINT64_MAX; + } + ++#if __LINUX_KERNEL_VERSION < 0x060200 ++ ++/* Return true if we prefer using SVE in string ifuncs. Old kernels disable ++ SVE after every system call which results in unnecessary traps if memcpy ++ uses SVE. This is true for kernels between 4.15.0 and before 6.2.0, except ++ for 5.14.0 which was patched. For these versions return false to avoid using ++ SVE ifuncs. ++ Parse the kernel version into a 24-bit kernel.major.minor value without ++ calling any library functions. If uname() is not supported or if the version ++ format is not recognized, assume the kernel is modern and return true. */ ++ ++static inline bool ++prefer_sve_ifuncs (void) ++{ ++ struct utsname buf; ++ const char *p = &buf.release[0]; ++ int kernel = 0; ++ int val; ++ ++ if (__uname (&buf) < 0) ++ return true; ++ ++ for (int shift = 16; shift >= 0; shift -= 8) ++ { ++ for (val = 0; *p >= '0' && *p <= '9'; p++) ++ val = val * 10 + *p - '0'; ++ kernel |= (val & 255) << shift; ++ if (*p++ != '.') ++ break; ++ } ++ ++ if (kernel >= 0x060200 || kernel == 0x050e00) ++ return true; ++ if (kernel >= 0x040f00) ++ return false; ++ return true; ++} ++ ++#endif ++ + static inline void + init_cpu_features (struct cpu_features *cpu_features) + { +@@ -126,6 +167,13 @@ init_cpu_features (struct cpu_features *cpu_features) + /* Check if SVE is supported. */ + cpu_features->sve = GLRO (dl_hwcap) & HWCAP_SVE; + ++ cpu_features->prefer_sve_ifuncs = cpu_features->sve; ++ ++#if __LINUX_KERNEL_VERSION < 0x060200 ++ if (cpu_features->sve) ++ cpu_features->prefer_sve_ifuncs = prefer_sve_ifuncs (); ++#endif ++ + /* Check if MOPS is supported. */ + cpu_features->mops = GLRO (dl_hwcap2) & HWCAP2_MOPS; + } + +commit 9883f4304cfb1558d0f1e6d9f48c4ab0a35355fe +Author: H.J. Lu <hjl.tools@gmail.com> +Date: Wed Feb 28 09:51:14 2024 -0800 + + x86-64: Don't use SSE resolvers for ISA level 3 or above + + When glibc is built with ISA level 3 or above enabled, SSE resolvers + aren't available and glibc fails to build: + + ld: .../elf/librtld.os: in function `init_cpu_features': + .../elf/../sysdeps/x86/cpu-features.c:1200:(.text+0x1445f): undefined reference to `_dl_runtime_resolve_fxsave' + ld: .../elf/librtld.os: relocation R_X86_64_PC32 against undefined hidden symbol `_dl_runtime_resolve_fxsave' can not be used when making a shared object + /usr/local/bin/ld: final link failed: bad value + + For ISA level 3 or above, don't use _dl_runtime_resolve_fxsave nor + _dl_tlsdesc_dynamic_fxsave. + + This fixes BZ #31429. + Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com> + + (cherry picked from commit befe2d3c4dec8be2cdd01a47132e47bdb7020922) + +diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c +index 6fe1b728c6..b8abe733ab 100644 +--- a/sysdeps/x86/cpu-features.c ++++ b/sysdeps/x86/cpu-features.c +@@ -18,6 +18,7 @@ + + #include <dl-hwcap.h> + #include <libc-pointer-arith.h> ++#include <isa-level.h> + #include <get-isa-level.h> + #include <cacheinfo.h> + #include <dl-cacheinfo.h> +@@ -1198,7 +1199,9 @@ no_cpuid: + TUNABLE_CALLBACK (set_x86_shstk)); + #endif + ++#if MINIMUM_X86_ISA_LEVEL < AVX_X86_ISA_LEVEL + if (GLRO(dl_x86_cpu_features).xsave_state_size != 0) ++#endif + { + if (CPU_FEATURE_USABLE_P (cpu_features, XSAVEC)) + { +@@ -1219,22 +1222,24 @@ no_cpuid: + #endif + } + } ++#if MINIMUM_X86_ISA_LEVEL < AVX_X86_ISA_LEVEL + else + { +-#ifdef __x86_64__ ++# ifdef __x86_64__ + GLRO(dl_x86_64_runtime_resolve) = _dl_runtime_resolve_fxsave; +-# ifdef SHARED ++# ifdef SHARED + GLRO(dl_x86_tlsdesc_dynamic) = _dl_tlsdesc_dynamic_fxsave; +-# endif +-#else +-# ifdef SHARED ++# endif ++# else ++# ifdef SHARED + if (CPU_FEATURE_USABLE_P (cpu_features, FXSR)) + GLRO(dl_x86_tlsdesc_dynamic) = _dl_tlsdesc_dynamic_fxsave; + else + GLRO(dl_x86_tlsdesc_dynamic) = _dl_tlsdesc_dynamic_fnsave; ++# endif + # endif +-#endif + } ++#endif + + #ifdef SHARED + # ifdef __x86_64__ +diff --git a/sysdeps/x86_64/dl-tlsdesc.S b/sysdeps/x86_64/dl-tlsdesc.S +index ea69f5223a..057a10862a 100644 +--- a/sysdeps/x86_64/dl-tlsdesc.S ++++ b/sysdeps/x86_64/dl-tlsdesc.S +@@ -20,6 +20,7 @@ + #include <tls.h> + #include <cpu-features-offsets.h> + #include <features-offsets.h> ++#include <isa-level.h> + #include "tlsdesc.h" + #include "dl-trampoline-save.h" + +@@ -79,12 +80,14 @@ _dl_tlsdesc_undefweak: + .size _dl_tlsdesc_undefweak, .-_dl_tlsdesc_undefweak + + #ifdef SHARED +-# define USE_FXSAVE +-# define STATE_SAVE_ALIGNMENT 16 +-# define _dl_tlsdesc_dynamic _dl_tlsdesc_dynamic_fxsave +-# include "dl-tlsdesc-dynamic.h" +-# undef _dl_tlsdesc_dynamic +-# undef USE_FXSAVE ++# if MINIMUM_X86_ISA_LEVEL < AVX_X86_ISA_LEVEL ++# define USE_FXSAVE ++# define STATE_SAVE_ALIGNMENT 16 ++# define _dl_tlsdesc_dynamic _dl_tlsdesc_dynamic_fxsave ++# include "dl-tlsdesc-dynamic.h" ++# undef _dl_tlsdesc_dynamic ++# undef USE_FXSAVE ++# endif + + # define USE_XSAVE + # define STATE_SAVE_ALIGNMENT 64 + +commit 7b92f46f04c6cbce19d19ae1099628431858996c +Author: Sunil K Pandey <skpgkp2@gmail.com> +Date: Thu Feb 29 17:57:02 2024 -0800 + + x86-64: Simplify minimum ISA check ifdef conditional with if + + Replace minimum ISA check ifdef conditional with if. Since + MINIMUM_X86_ISA_LEVEL and AVX_X86_ISA_LEVEL are compile time constants, + compiler will perform constant folding optimization, getting same + results. + + Reviewed-by: H.J. Lu <hjl.tools@gmail.com> + (cherry picked from commit b6e3898194bbae78910bbe9cd086937014961e45) + +diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c +index b8abe733ab..3d7c2819d7 100644 +--- a/sysdeps/x86/cpu-features.c ++++ b/sysdeps/x86/cpu-features.c +@@ -1199,9 +1199,8 @@ no_cpuid: + TUNABLE_CALLBACK (set_x86_shstk)); + #endif + +-#if MINIMUM_X86_ISA_LEVEL < AVX_X86_ISA_LEVEL +- if (GLRO(dl_x86_cpu_features).xsave_state_size != 0) +-#endif ++ if (MINIMUM_X86_ISA_LEVEL >= AVX_X86_ISA_LEVEL ++ || (GLRO(dl_x86_cpu_features).xsave_state_size != 0)) + { + if (CPU_FEATURE_USABLE_P (cpu_features, XSAVEC)) + { +@@ -1222,24 +1221,22 @@ no_cpuid: + #endif + } + } +-#if MINIMUM_X86_ISA_LEVEL < AVX_X86_ISA_LEVEL + else + { +-# ifdef __x86_64__ ++#ifdef __x86_64__ + GLRO(dl_x86_64_runtime_resolve) = _dl_runtime_resolve_fxsave; +-# ifdef SHARED ++# ifdef SHARED + GLRO(dl_x86_tlsdesc_dynamic) = _dl_tlsdesc_dynamic_fxsave; +-# endif +-# else +-# ifdef SHARED ++# endif ++#else ++# ifdef SHARED + if (CPU_FEATURE_USABLE_P (cpu_features, FXSR)) + GLRO(dl_x86_tlsdesc_dynamic) = _dl_tlsdesc_dynamic_fxsave; + else + GLRO(dl_x86_tlsdesc_dynamic) = _dl_tlsdesc_dynamic_fnsave; +-# endif + # endif +- } + #endif ++ } + + #ifdef SHARED + # ifdef __x86_64__ + +commit edb9a76e3008725e9dc035d38a58e849a3bde0f1 +Author: Florian Weimer <fweimer@redhat.com> +Date: Sun Apr 14 08:24:51 2024 +0200 + + powerpc: Fix ld.so address determination for PCREL mode (bug 31640) + + This seems to have stopped working with some GCC 14 versions, + which clobber r2. With other compilers, the kernel-provided + r2 value is still available at this point. + + Reviewed-by: Peter Bergner <bergner@linux.ibm.com> + (cherry picked from commit 14e56bd4ce15ac2d1cc43f762eb2e6b83fec1afe) + +diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h +index c6682f3445..2b6f5d2b08 100644 +--- a/sysdeps/powerpc/powerpc64/dl-machine.h ++++ b/sysdeps/powerpc/powerpc64/dl-machine.h +@@ -78,6 +78,7 @@ elf_host_tolerates_class (const Elf64_Ehdr *ehdr) + static inline Elf64_Addr + elf_machine_load_address (void) __attribute__ ((const)); + ++#ifndef __PCREL__ + static inline Elf64_Addr + elf_machine_load_address (void) + { +@@ -105,6 +106,24 @@ elf_machine_dynamic (void) + /* Then subtract off the load address offset. */ + return runtime_dynamic - elf_machine_load_address() ; + } ++#else /* __PCREL__ */ ++/* In PCREL mode, r2 may have been clobbered. Rely on relative ++ relocations instead. */ ++ ++static inline ElfW(Addr) ++elf_machine_load_address (void) ++{ ++ extern const ElfW(Ehdr) __ehdr_start attribute_hidden; ++ return (ElfW(Addr)) &__ehdr_start; ++} ++ ++static inline ElfW(Addr) ++elf_machine_dynamic (void) ++{ ++ extern ElfW(Dyn) _DYNAMIC[] attribute_hidden; ++ return (ElfW(Addr)) _DYNAMIC - elf_machine_load_address (); ++} ++#endif /* __PCREL__ */ + + /* The PLT uses Elf64_Rela relocs. */ + #define elf_machine_relplt elf_machine_rela + +commit 04df8652eb1919da18d54b3dcd6db1675993d45d +Author: H.J. Lu <hjl.tools@gmail.com> +Date: Thu Feb 15 11:19:56 2024 -0800 + + Apply the Makefile sorting fix + + Apply the Makefile sorting fix generated by sort-makefile-lines.py. + + (cherry picked from commit ef7f4b1fef67430a8f3cfc77fa6aada2add851d7) + +diff --git a/sysdeps/loongarch/lp64/multiarch/Makefile b/sysdeps/loongarch/lp64/multiarch/Makefile +index fe863e1ba4..01762ef526 100644 +--- a/sysdeps/loongarch/lp64/multiarch/Makefile ++++ b/sysdeps/loongarch/lp64/multiarch/Makefile +@@ -1,52 +1,52 @@ + ifeq ($(subdir),string) + sysdep_routines += \ +- strlen-aligned \ +- strlen-lsx \ +- strlen-lasx \ +- strnlen-aligned \ +- strnlen-lsx \ +- strnlen-lasx \ ++ memchr-aligned \ ++ memchr-lasx \ ++ memchr-lsx \ ++ memcmp-aligned \ ++ memcmp-lasx \ ++ memcmp-lsx \ ++ memcpy-aligned \ ++ memcpy-unaligned \ ++ memmove-lasx \ ++ memmove-lsx \ ++ memmove-unaligned \ ++ memrchr-generic \ ++ memrchr-lasx \ ++ memrchr-lsx \ ++ memset-aligned \ ++ memset-lasx \ ++ memset-lsx \ ++ memset-unaligned \ ++ rawmemchr-aligned \ ++ rawmemchr-lasx \ ++ rawmemchr-lsx \ ++ stpcpy-aligned \ ++ stpcpy-lasx \ ++ stpcpy-lsx \ ++ stpcpy-unaligned \ + strchr-aligned \ +- strchr-lsx \ + strchr-lasx \ +- strrchr-aligned \ +- strrchr-lsx \ +- strrchr-lasx \ ++ strchr-lsx \ + strchrnul-aligned \ +- strchrnul-lsx \ + strchrnul-lasx \ ++ strchrnul-lsx \ + strcmp-aligned \ + strcmp-lsx \ +- strncmp-aligned \ +- strncmp-lsx \ + strcpy-aligned \ +- strcpy-unaligned \ +- strcpy-lsx \ + strcpy-lasx \ +- stpcpy-aligned \ +- stpcpy-unaligned \ +- stpcpy-lsx \ +- stpcpy-lasx \ +- memcpy-aligned \ +- memcpy-unaligned \ +- memmove-unaligned \ +- memmove-lsx \ +- memmove-lasx \ +- rawmemchr-aligned \ +- rawmemchr-lsx \ +- rawmemchr-lasx \ +- memchr-aligned \ +- memchr-lsx \ +- memchr-lasx \ +- memrchr-generic \ +- memrchr-lsx \ +- memrchr-lasx \ +- memset-aligned \ +- memset-unaligned \ +- memset-lsx \ +- memset-lasx \ +- memcmp-aligned \ +- memcmp-lsx \ +- memcmp-lasx \ ++ strcpy-lsx \ ++ strcpy-unaligned \ ++ strlen-aligned \ ++ strlen-lasx \ ++ strlen-lsx \ ++ strncmp-aligned \ ++ strncmp-lsx \ ++ strnlen-aligned \ ++ strnlen-lasx \ ++ strnlen-lsx \ ++ strrchr-aligned \ ++ strrchr-lasx \ ++ strrchr-lsx \ + # sysdep_routines + endif +diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile +index 992aabe43e..5311b594af 100644 +--- a/sysdeps/x86/Makefile ++++ b/sysdeps/x86/Makefile +@@ -15,18 +15,18 @@ CFLAGS-dl-get-cpu-features.os += $(rtld-early-cflags) + CFLAGS-get-cpuid-feature-leaf.o += $(no-stack-protector) + + tests += \ +- tst-get-cpu-features \ +- tst-get-cpu-features-static \ + tst-cpu-features-cpuinfo \ + tst-cpu-features-cpuinfo-static \ + tst-cpu-features-supports \ + tst-cpu-features-supports-static \ ++ tst-get-cpu-features \ ++ tst-get-cpu-features-static \ + tst-hwcap-tunables \ + # tests + tests-static += \ +- tst-get-cpu-features-static \ + tst-cpu-features-cpuinfo-static \ + tst-cpu-features-supports-static \ ++ tst-get-cpu-features-static \ + # tests-static + ifeq (yes,$(have-ifunc)) + ifeq (yes,$(have-gcc-ifunc)) +diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile +index 9d374a3299..0ede447405 100644 +--- a/sysdeps/x86_64/Makefile ++++ b/sysdeps/x86_64/Makefile +@@ -252,6 +252,10 @@ sysdep-dl-routines += dl-cet + + tests += \ + tst-cet-legacy-1 \ ++ tst-cet-legacy-10 \ ++ tst-cet-legacy-10-static \ ++ tst-cet-legacy-10a \ ++ tst-cet-legacy-10a-static \ + tst-cet-legacy-1a \ + tst-cet-legacy-2 \ + tst-cet-legacy-2a \ +@@ -263,15 +267,11 @@ tests += \ + tst-cet-legacy-8 \ + tst-cet-legacy-9 \ + tst-cet-legacy-9-static \ +- tst-cet-legacy-10 \ +- tst-cet-legacy-10-static \ +- tst-cet-legacy-10a \ +- tst-cet-legacy-10a-static \ + # tests + tests-static += \ +- tst-cet-legacy-9-static \ + tst-cet-legacy-10-static \ + tst-cet-legacy-10a-static \ ++ tst-cet-legacy-9-static \ + # tests-static + tst-cet-legacy-1a-ARGS = -- $(host-test-program-cmd) + +diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile +index ea81753b70..e1a490dd98 100644 +--- a/sysdeps/x86_64/fpu/multiarch/Makefile ++++ b/sysdeps/x86_64/fpu/multiarch/Makefile +@@ -4,10 +4,10 @@ libm-sysdep_routines += \ + s_ceilf-c \ + s_floor-c \ + s_floorf-c \ +- s_rint-c \ +- s_rintf-c \ + s_nearbyint-c \ + s_nearbyintf-c \ ++ s_rint-c \ ++ s_rintf-c \ + s_roundeven-c \ + s_roundevenf-c \ + s_trunc-c \ +@@ -21,10 +21,10 @@ libm-sysdep_routines += \ + s_floorf-sse4_1 \ + s_nearbyint-sse4_1 \ + s_nearbyintf-sse4_1 \ +- s_roundeven-sse4_1 \ +- s_roundevenf-sse4_1 \ + s_rint-sse4_1 \ + s_rintf-sse4_1 \ ++ s_roundeven-sse4_1 \ ++ s_roundevenf-sse4_1 \ + s_trunc-sse4_1 \ + s_truncf-sse4_1 \ + # libm-sysdep_routines +@@ -84,12 +84,12 @@ CFLAGS-s_cosf-fma.c = -mfma -mavx2 + CFLAGS-s_sincosf-fma.c = -mfma -mavx2 + + libm-sysdep_routines += \ ++ e_asin-fma4 \ ++ e_atan2-fma4 \ + e_exp-fma4 \ + e_log-fma4 \ + e_pow-fma4 \ +- e_asin-fma4 \ + s_atan-fma4 \ +- e_atan2-fma4 \ + s_sin-fma4 \ + s_sincos-fma4 \ + s_tan-fma4 \ +@@ -106,10 +106,10 @@ CFLAGS-s_tan-fma4.c = -mfma4 + CFLAGS-s_sincos-fma4.c = -mfma4 + + libm-sysdep_routines += \ ++ e_atan2-avx \ + e_exp-avx \ + e_log-avx \ + s_atan-avx \ +- e_atan2-avx \ + s_sin-avx \ + s_sincos-avx \ + s_tan-avx \ +diff --git a/sysdeps/x86_64/multiarch/Makefile b/sysdeps/x86_64/multiarch/Makefile +index e1e894c963..d3d2270394 100644 +--- a/sysdeps/x86_64/multiarch/Makefile ++++ b/sysdeps/x86_64/multiarch/Makefile +@@ -4,8 +4,8 @@ sysdep_routines += \ + memchr-avx2 \ + memchr-avx2-rtm \ + memchr-evex \ +- memchr-evex512 \ + memchr-evex-rtm \ ++ memchr-evex512 \ + memchr-sse2 \ + memcmp-avx2-movbe \ + memcmp-avx2-movbe-rtm \ +@@ -37,8 +37,8 @@ sysdep_routines += \ + rawmemchr-avx2 \ + rawmemchr-avx2-rtm \ + rawmemchr-evex \ +- rawmemchr-evex512 \ + rawmemchr-evex-rtm \ ++ rawmemchr-evex512 \ + rawmemchr-sse2 \ + stpcpy-avx2 \ + stpcpy-avx2-rtm \ + +commit 423099a03264ea28298f47355d7811b8efe03c97 +Author: Sunil K Pandey <skpgkp2@gmail.com> +Date: Tue Feb 13 12:23:14 2024 -0800 + + x86_64: Exclude SSE, AVX and FMA4 variants in libm multiarch + + When glibc is built with ISA level 3 or higher by default, the resulting + glibc binaries won't run on SSE or FMA4 processors. Exclude SSE, AVX and + FMA4 variants in libm multiarch when ISA level 3 or higher is enabled by + default. + + When glibc is built with ISA level 2 enabled by default, only keep SSE4.1 + variant. + + Fixes BZ 31335. + + NB: elf/tst-valgrind-smoke test fails with ISA level 4, because valgrind + doesn't support AVX512 instructions: + + https://bugs.kde.org/show_bug.cgi?id=383010 + + Reviewed-by: H.J. Lu <hjl.tools@gmail.com> + (cherry picked from commit 9f78a7c1d0963282608da836b840f0d5ae1c478e) + +diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure +index 1f4c2d67fd..2a5421bb31 100644 +--- a/sysdeps/x86/configure ++++ b/sysdeps/x86/configure +@@ -98,6 +98,7 @@ printf "%s\n" "$libc_cv_have_x86_lahf_sahf" >&6; } + if test $libc_cv_have_x86_lahf_sahf = yes; then + printf "%s\n" "#define HAVE_X86_LAHF_SAHF 1" >>confdefs.h + ++ ISAFLAG="-DHAVE_X86_LAHF_SAHF" + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MOVBE instruction support" >&5 + printf %s "checking for MOVBE instruction support... " >&6; } +@@ -120,9 +121,41 @@ printf "%s\n" "$libc_cv_have_x86_movbe" >&6; } + if test $libc_cv_have_x86_movbe = yes; then + printf "%s\n" "#define HAVE_X86_MOVBE 1" >>confdefs.h + ++ ISAFLAG="$ISAFLAG -DHAVE_X86_MOVBE" + fi ++ ++ # Check for ISA level support. ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ISA level support" >&5 ++printf %s "checking for ISA level support... " >&6; } ++if test ${libc_cv_have_x86_isa_level+y} ++then : ++ printf %s "(cached) " >&6 ++else $as_nop ++ cat > conftest.c <<EOF ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL >= 4 ++libc_cv_have_x86_isa_level=4 ++#elif MINIMUM_X86_ISA_LEVEL == 3 ++libc_cv_have_x86_isa_level=3 ++#elif MINIMUM_X86_ISA_LEVEL == 2 ++libc_cv_have_x86_isa_level=2 ++#else ++libc_cv_have_x86_isa_level=baseline ++#endif ++EOF ++ eval `${CC-cc} $CFLAGS $CPPFLAGS $ISAFLAG -I$srcdir -E conftest.c | grep libc_cv_have_x86_isa_level` ++ rm -rf conftest* ++fi ++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_have_x86_isa_level" >&5 ++printf "%s\n" "$libc_cv_have_x86_isa_level" >&6; } ++else ++ libc_cv_have_x86_isa_level=baseline + fi + config_vars="$config_vars ++have-x86-isa-level = $libc_cv_have_x86_isa_level" ++config_vars="$config_vars ++x86-isa-level-3-or-above = 3 4" ++config_vars="$config_vars + enable-x86-isa-level = $libc_cv_include_x86_isa_level" + + printf "%s\n" "#define SUPPORT_STATIC_PIE 1" >>confdefs.h +diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac +index 437a50623b..78ff7c8f41 100644 +--- a/sysdeps/x86/configure.ac ++++ b/sysdeps/x86/configure.ac +@@ -72,6 +72,7 @@ if test $libc_cv_include_x86_isa_level = yes; then + fi]) + if test $libc_cv_have_x86_lahf_sahf = yes; then + AC_DEFINE(HAVE_X86_LAHF_SAHF) ++ ISAFLAG="-DHAVE_X86_LAHF_SAHF" + fi + AC_CACHE_CHECK([for MOVBE instruction support], + libc_cv_have_x86_movbe, [dnl +@@ -81,8 +82,31 @@ if test $libc_cv_include_x86_isa_level = yes; then + fi]) + if test $libc_cv_have_x86_movbe = yes; then + AC_DEFINE(HAVE_X86_MOVBE) ++ ISAFLAG="$ISAFLAG -DHAVE_X86_MOVBE" + fi ++ ++ # Check for ISA level support. ++ AC_CACHE_CHECK([for ISA level support], ++ libc_cv_have_x86_isa_level, [dnl ++cat > conftest.c <<EOF ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL >= 4 ++libc_cv_have_x86_isa_level=4 ++#elif MINIMUM_X86_ISA_LEVEL == 3 ++libc_cv_have_x86_isa_level=3 ++#elif MINIMUM_X86_ISA_LEVEL == 2 ++libc_cv_have_x86_isa_level=2 ++#else ++libc_cv_have_x86_isa_level=baseline ++#endif ++EOF ++ eval `${CC-cc} $CFLAGS $CPPFLAGS $ISAFLAG -I$srcdir -E conftest.c | grep libc_cv_have_x86_isa_level` ++ rm -rf conftest*]) ++else ++ libc_cv_have_x86_isa_level=baseline + fi ++LIBC_CONFIG_VAR([have-x86-isa-level], [$libc_cv_have_x86_isa_level]) ++LIBC_CONFIG_VAR([x86-isa-level-3-or-above], [3 4]) + LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level]) + + dnl Static PIE is supported. +diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile +index e1a490dd98..6ddd50240c 100644 +--- a/sysdeps/x86_64/fpu/multiarch/Makefile ++++ b/sysdeps/x86_64/fpu/multiarch/Makefile +@@ -1,49 +1,4 @@ + ifeq ($(subdir),math) +-libm-sysdep_routines += \ +- s_ceil-c \ +- s_ceilf-c \ +- s_floor-c \ +- s_floorf-c \ +- s_nearbyint-c \ +- s_nearbyintf-c \ +- s_rint-c \ +- s_rintf-c \ +- s_roundeven-c \ +- s_roundevenf-c \ +- s_trunc-c \ +- s_truncf-c \ +-# libm-sysdep_routines +- +-libm-sysdep_routines += \ +- s_ceil-sse4_1 \ +- s_ceilf-sse4_1 \ +- s_floor-sse4_1 \ +- s_floorf-sse4_1 \ +- s_nearbyint-sse4_1 \ +- s_nearbyintf-sse4_1 \ +- s_rint-sse4_1 \ +- s_rintf-sse4_1 \ +- s_roundeven-sse4_1 \ +- s_roundevenf-sse4_1 \ +- s_trunc-sse4_1 \ +- s_truncf-sse4_1 \ +-# libm-sysdep_routines +- +-libm-sysdep_routines += \ +- e_asin-fma \ +- e_atan2-fma \ +- e_exp-fma \ +- e_log-fma \ +- e_log2-fma \ +- e_pow-fma \ +- s_atan-fma \ +- s_expm1-fma \ +- s_log1p-fma \ +- s_sin-fma \ +- s_sincos-fma \ +- s_tan-fma \ +-# libm-sysdep_routines +- + CFLAGS-e_asin-fma.c = -mfma -mavx2 + CFLAGS-e_atan2-fma.c = -mfma -mavx2 + CFLAGS-e_exp-fma.c = -mfma -mavx2 +@@ -57,23 +12,6 @@ CFLAGS-s_sin-fma.c = -mfma -mavx2 + CFLAGS-s_tan-fma.c = -mfma -mavx2 + CFLAGS-s_sincos-fma.c = -mfma -mavx2 + +-libm-sysdep_routines += \ +- s_cosf-sse2 \ +- s_sincosf-sse2 \ +- s_sinf-sse2 \ +-# libm-sysdep_routines +- +-libm-sysdep_routines += \ +- e_exp2f-fma \ +- e_expf-fma \ +- e_log2f-fma \ +- e_logf-fma \ +- e_powf-fma \ +- s_cosf-fma \ +- s_sincosf-fma \ +- s_sinf-fma \ +-# libm-sysdep_routines +- + CFLAGS-e_exp2f-fma.c = -mfma -mavx2 + CFLAGS-e_expf-fma.c = -mfma -mavx2 + CFLAGS-e_log2f-fma.c = -mfma -mavx2 +@@ -83,17 +21,93 @@ CFLAGS-s_sinf-fma.c = -mfma -mavx2 + CFLAGS-s_cosf-fma.c = -mfma -mavx2 + CFLAGS-s_sincosf-fma.c = -mfma -mavx2 + ++# Check if ISA level is 3 or above. ++ifneq (,$(filter $(have-x86-isa-level),$(x86-isa-level-3-or-above))) + libm-sysdep_routines += \ ++ s_ceil-avx \ ++ s_ceilf-avx \ ++ s_floor-avx \ ++ s_floorf-avx \ ++ s_nearbyint-avx \ ++ s_nearbyintf-avx \ ++ s_rint-avx \ ++ s_rintf-avx \ ++ s_roundeven-avx \ ++ s_roundevenf-avx \ ++ s_trunc-avx \ ++ s_truncf-avx \ ++# libm-sysdep_routines ++else ++libm-sysdep_routines += \ ++ e_asin-fma \ + e_asin-fma4 \ ++ e_atan2-avx \ ++ e_atan2-fma \ + e_atan2-fma4 \ ++ e_exp-avx \ ++ e_exp-fma \ + e_exp-fma4 \ ++ e_exp2f-fma \ ++ e_expf-fma \ ++ e_log-avx \ ++ e_log-fma \ + e_log-fma4 \ ++ e_log2-fma \ ++ e_log2f-fma \ ++ e_logf-fma \ ++ e_pow-fma \ + e_pow-fma4 \ ++ e_powf-fma \ ++ s_atan-avx \ ++ s_atan-fma \ + s_atan-fma4 \ ++ s_ceil-sse4_1 \ ++ s_ceilf-sse4_1 \ ++ s_cosf-fma \ ++ s_cosf-sse2 \ ++ s_expm1-fma \ ++ s_floor-sse4_1 \ ++ s_floorf-sse4_1 \ ++ s_log1p-fma \ ++ s_nearbyint-sse4_1 \ ++ s_nearbyintf-sse4_1 \ ++ s_rint-sse4_1 \ ++ s_rintf-sse4_1 \ ++ s_roundeven-sse4_1 \ ++ s_roundevenf-sse4_1 \ ++ s_sin-avx \ ++ s_sin-fma \ + s_sin-fma4 \ ++ s_sincos-avx \ ++ s_sincos-fma \ + s_sincos-fma4 \ ++ s_sincosf-fma \ ++ s_sincosf-sse2 \ ++ s_sinf-fma \ ++ s_sinf-sse2 \ ++ s_tan-avx \ ++ s_tan-fma \ + s_tan-fma4 \ ++ s_trunc-sse4_1 \ ++ s_truncf-sse4_1 \ + # libm-sysdep_routines ++ifeq ($(have-x86-isa-level),baseline) ++libm-sysdep_routines += \ ++ s_ceil-c \ ++ s_ceilf-c \ ++ s_floor-c \ ++ s_floorf-c \ ++ s_nearbyint-c \ ++ s_nearbyintf-c \ ++ s_rint-c \ ++ s_rintf-c \ ++ s_roundeven-c \ ++ s_roundevenf-c \ ++ s_trunc-c \ ++ s_truncf-c \ ++# libm-sysdep_routines ++endif ++endif + + CFLAGS-e_asin-fma4.c = -mfma4 + CFLAGS-e_atan2-fma4.c = -mfma4 +@@ -105,16 +119,6 @@ CFLAGS-s_sin-fma4.c = -mfma4 + CFLAGS-s_tan-fma4.c = -mfma4 + CFLAGS-s_sincos-fma4.c = -mfma4 + +-libm-sysdep_routines += \ +- e_atan2-avx \ +- e_exp-avx \ +- e_log-avx \ +- s_atan-avx \ +- s_sin-avx \ +- s_sincos-avx \ +- s_tan-avx \ +-# libm-sysdep_routines +- + CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX + CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX + CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX +diff --git a/sysdeps/x86_64/fpu/multiarch/e_asin.c b/sysdeps/x86_64/fpu/multiarch/e_asin.c +index 2eaa6c2c04..d64fca2586 100644 +--- a/sysdeps/x86_64/fpu/multiarch/e_asin.c ++++ b/sysdeps/x86_64/fpu/multiarch/e_asin.c +@@ -16,26 +16,29 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-finite.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-finite.h> + + extern double __redirect_ieee754_asin (double); + extern double __redirect_ieee754_acos (double); + +-#define SYMBOL_NAME ieee754_asin +-#include "ifunc-fma4.h" ++# define SYMBOL_NAME ieee754_asin ++# include "ifunc-fma4.h" + + libc_ifunc_redirected (__redirect_ieee754_asin, __ieee754_asin, + IFUNC_SELECTOR ()); + libm_alias_finite (__ieee754_asin, __asin) + +-#undef SYMBOL_NAME +-#define SYMBOL_NAME ieee754_acos +-#include "ifunc-fma4.h" ++# undef SYMBOL_NAME ++# define SYMBOL_NAME ieee754_acos ++# include "ifunc-fma4.h" + + libc_ifunc_redirected (__redirect_ieee754_acos, __ieee754_acos, + IFUNC_SELECTOR ()); + libm_alias_finite (__ieee754_acos, __acos) + +-#define __ieee754_acos __ieee754_acos_sse2 +-#define __ieee754_asin __ieee754_asin_sse2 ++# define __ieee754_acos __ieee754_acos_sse2 ++# define __ieee754_asin __ieee754_asin_sse2 ++#endif + #include <sysdeps/ieee754/dbl-64/e_asin.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/e_atan2.c b/sysdeps/x86_64/fpu/multiarch/e_atan2.c +index 17ee4f3c36..8a86c14ded 100644 +--- a/sysdeps/x86_64/fpu/multiarch/e_atan2.c ++++ b/sysdeps/x86_64/fpu/multiarch/e_atan2.c +@@ -16,16 +16,19 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-finite.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-finite.h> + + extern double __redirect_ieee754_atan2 (double, double); + +-#define SYMBOL_NAME ieee754_atan2 +-#include "ifunc-avx-fma4.h" ++# define SYMBOL_NAME ieee754_atan2 ++# include "ifunc-avx-fma4.h" + + libc_ifunc_redirected (__redirect_ieee754_atan2, + __ieee754_atan2, IFUNC_SELECTOR ()); + libm_alias_finite (__ieee754_atan2, __atan2) + +-#define __ieee754_atan2 __ieee754_atan2_sse2 ++# define __ieee754_atan2 __ieee754_atan2_sse2 ++#endif + #include <sysdeps/ieee754/dbl-64/e_atan2.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp.c b/sysdeps/x86_64/fpu/multiarch/e_exp.c +index 406b7ebd44..d56329291a 100644 +--- a/sysdeps/x86_64/fpu/multiarch/e_exp.c ++++ b/sysdeps/x86_64/fpu/multiarch/e_exp.c +@@ -16,17 +16,20 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <math.h> +-#include <libm-alias-finite.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <math.h> ++# include <libm-alias-finite.h> + + extern double __redirect_ieee754_exp (double); + +-#define SYMBOL_NAME ieee754_exp +-#include "ifunc-avx-fma4.h" ++# define SYMBOL_NAME ieee754_exp ++# include "ifunc-avx-fma4.h" + + libc_ifunc_redirected (__redirect_ieee754_exp, __ieee754_exp, + IFUNC_SELECTOR ()); + libm_alias_finite (__ieee754_exp, __exp) + +-#define __exp __ieee754_exp_sse2 ++# define __exp __ieee754_exp_sse2 ++#endif + #include <sysdeps/ieee754/dbl-64/e_exp.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp2f.c b/sysdeps/x86_64/fpu/multiarch/e_exp2f.c +index 804fd6be85..06fe5028d6 100644 +--- a/sysdeps/x86_64/fpu/multiarch/e_exp2f.c ++++ b/sysdeps/x86_64/fpu/multiarch/e_exp2f.c +@@ -16,25 +16,28 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-float.h> +-#include <libm-alias-finite.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-float.h> ++# include <libm-alias-finite.h> + + extern float __redirect_exp2f (float); + +-#define SYMBOL_NAME exp2f +-#include "ifunc-fma.h" ++# define SYMBOL_NAME exp2f ++# include "ifunc-fma.h" + + libc_ifunc_redirected (__redirect_exp2f, __exp2f, IFUNC_SELECTOR ()); + +-#ifdef SHARED ++# ifdef SHARED + versioned_symbol (libm, __ieee754_exp2f, exp2f, GLIBC_2_27); + libm_alias_float_other (__exp2, exp2) +-#else ++# else + libm_alias_float (__exp2, exp2) +-#endif ++# endif + + strong_alias (__exp2f, __ieee754_exp2f) + libm_alias_finite (__exp2f, __exp2f) + +-#define __exp2f __exp2f_sse2 ++# define __exp2f __exp2f_sse2 ++#endif + #include <sysdeps/ieee754/flt-32/e_exp2f.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/e_expf.c b/sysdeps/x86_64/fpu/multiarch/e_expf.c +index 4a7e2a5bce..19d767f636 100644 +--- a/sysdeps/x86_64/fpu/multiarch/e_expf.c ++++ b/sysdeps/x86_64/fpu/multiarch/e_expf.c +@@ -16,28 +16,31 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-float.h> +-#include <libm-alias-finite.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-float.h> ++# include <libm-alias-finite.h> + + extern float __redirect_expf (float); + +-#define SYMBOL_NAME expf +-#include "ifunc-fma.h" ++# define SYMBOL_NAME expf ++# include "ifunc-fma.h" + + libc_ifunc_redirected (__redirect_expf, __expf, IFUNC_SELECTOR ()); + +-#ifdef SHARED ++# ifdef SHARED + __hidden_ver1 (__expf, __GI___expf, __redirect_expf) + __attribute__ ((visibility ("hidden"))); + + versioned_symbol (libm, __ieee754_expf, expf, GLIBC_2_27); + libm_alias_float_other (__exp, exp) +-#else ++# else + libm_alias_float (__exp, exp) +-#endif ++# endif + + strong_alias (__expf, __ieee754_expf) + libm_alias_finite (__expf, __expf) + +-#define __expf __expf_sse2 ++# define __expf __expf_sse2 ++#endif + #include <sysdeps/ieee754/flt-32/e_expf.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/e_log.c b/sysdeps/x86_64/fpu/multiarch/e_log.c +index 067fbf58c3..d80c1b1463 100644 +--- a/sysdeps/x86_64/fpu/multiarch/e_log.c ++++ b/sysdeps/x86_64/fpu/multiarch/e_log.c +@@ -16,17 +16,20 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <math.h> +-#include <libm-alias-finite.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <math.h> ++# include <libm-alias-finite.h> + + extern double __redirect_ieee754_log (double); + +-#define SYMBOL_NAME ieee754_log +-#include "ifunc-avx-fma4.h" ++# define SYMBOL_NAME ieee754_log ++# include "ifunc-avx-fma4.h" + + libc_ifunc_redirected (__redirect_ieee754_log, __ieee754_log, + IFUNC_SELECTOR ()); + libm_alias_finite (__ieee754_log, __log) + +-#define __log __ieee754_log_sse2 ++# define __log __ieee754_log_sse2 ++#endif + #include <sysdeps/ieee754/dbl-64/e_log.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/e_log2.c b/sysdeps/x86_64/fpu/multiarch/e_log2.c +index 9c57a2f6cc..9686782c09 100644 +--- a/sysdeps/x86_64/fpu/multiarch/e_log2.c ++++ b/sysdeps/x86_64/fpu/multiarch/e_log2.c +@@ -16,28 +16,31 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-double.h> +-#include <libm-alias-finite.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-double.h> ++# include <libm-alias-finite.h> + + extern double __redirect_log2 (double); + +-#define SYMBOL_NAME log2 +-#include "ifunc-fma.h" ++# define SYMBOL_NAME log2 ++# include "ifunc-fma.h" + + libc_ifunc_redirected (__redirect_log2, __log2, IFUNC_SELECTOR ()); + +-#ifdef SHARED ++# ifdef SHARED + __hidden_ver1 (__log2, __GI___log2, __redirect_log2) + __attribute__ ((visibility ("hidden"))); + + versioned_symbol (libm, __ieee754_log2, log2, GLIBC_2_29); + libm_alias_double_other (__log2, log2) +-#else ++# else + libm_alias_double (__log2, log2) +-#endif ++# endif + + strong_alias (__log2, __ieee754_log2) + libm_alias_finite (__log2, __log2) + +-#define __log2 __log2_sse2 ++# define __log2 __log2_sse2 ++#endif + #include <sysdeps/ieee754/dbl-64/e_log2.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/e_log2f.c b/sysdeps/x86_64/fpu/multiarch/e_log2f.c +index 2b45c87f38..8ada46e11e 100644 +--- a/sysdeps/x86_64/fpu/multiarch/e_log2f.c ++++ b/sysdeps/x86_64/fpu/multiarch/e_log2f.c +@@ -16,28 +16,31 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-float.h> +-#include <libm-alias-finite.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-float.h> ++# include <libm-alias-finite.h> + + extern float __redirect_log2f (float); + +-#define SYMBOL_NAME log2f +-#include "ifunc-fma.h" ++# define SYMBOL_NAME log2f ++# include "ifunc-fma.h" + + libc_ifunc_redirected (__redirect_log2f, __log2f, IFUNC_SELECTOR ()); + +-#ifdef SHARED ++# ifdef SHARED + __hidden_ver1 (__log2f, __GI___log2f, __redirect_log2f) + __attribute__ ((visibility ("hidden"))); + + versioned_symbol (libm, __ieee754_log2f, log2f, GLIBC_2_27); + libm_alias_float_other (__log2, log2) +-#else ++# else + libm_alias_float (__log2, log2) +-#endif ++# endif + + strong_alias (__log2f, __ieee754_log2f) + libm_alias_finite (__log2f, __log2f) + +-#define __log2f __log2f_sse2 ++# define __log2f __log2f_sse2 ++#endif + #include <sysdeps/ieee754/flt-32/e_log2f.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/e_logf.c b/sysdeps/x86_64/fpu/multiarch/e_logf.c +index 97e23c8fea..a3978d9a8e 100644 +--- a/sysdeps/x86_64/fpu/multiarch/e_logf.c ++++ b/sysdeps/x86_64/fpu/multiarch/e_logf.c +@@ -16,28 +16,31 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-float.h> +-#include <libm-alias-finite.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-float.h> ++# include <libm-alias-finite.h> + + extern float __redirect_logf (float); + +-#define SYMBOL_NAME logf +-#include "ifunc-fma.h" ++# define SYMBOL_NAME logf ++# include "ifunc-fma.h" + + libc_ifunc_redirected (__redirect_logf, __logf, IFUNC_SELECTOR ()); + +-#ifdef SHARED ++# ifdef SHARED + __hidden_ver1 (__logf, __GI___logf, __redirect_logf) + __attribute__ ((visibility ("hidden"))); + + versioned_symbol (libm, __ieee754_logf, logf, GLIBC_2_27); + libm_alias_float_other (__log, log) +-#else ++# else + libm_alias_float (__log, log) +-#endif ++# endif + + strong_alias (__logf, __ieee754_logf) + libm_alias_finite (__logf, __logf) + +-#define __logf __logf_sse2 ++# define __logf __logf_sse2 ++#endif + #include <sysdeps/ieee754/flt-32/e_logf.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/e_pow.c b/sysdeps/x86_64/fpu/multiarch/e_pow.c +index 42618e7112..f8f17aff9f 100644 +--- a/sysdeps/x86_64/fpu/multiarch/e_pow.c ++++ b/sysdeps/x86_64/fpu/multiarch/e_pow.c +@@ -16,17 +16,20 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <math.h> +-#include <libm-alias-finite.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <math.h> ++# include <libm-alias-finite.h> + + extern double __redirect_ieee754_pow (double, double); + +-#define SYMBOL_NAME ieee754_pow +-#include "ifunc-fma4.h" ++# define SYMBOL_NAME ieee754_pow ++# include "ifunc-fma4.h" + + libc_ifunc_redirected (__redirect_ieee754_pow, + __ieee754_pow, IFUNC_SELECTOR ()); + libm_alias_finite (__ieee754_pow, __pow) + +-#define __pow __ieee754_pow_sse2 ++# define __pow __ieee754_pow_sse2 ++#endif + #include <sysdeps/ieee754/dbl-64/e_pow.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/e_powf.c b/sysdeps/x86_64/fpu/multiarch/e_powf.c +index 8e6ce13cc1..8b1a4c7d04 100644 +--- a/sysdeps/x86_64/fpu/multiarch/e_powf.c ++++ b/sysdeps/x86_64/fpu/multiarch/e_powf.c +@@ -16,31 +16,34 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-float.h> +-#include <libm-alias-finite.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-float.h> ++# include <libm-alias-finite.h> + +-#define powf __redirect_powf +-#define __DECL_SIMD___redirect_powf +-#include <math.h> +-#undef powf ++# define powf __redirect_powf ++# define __DECL_SIMD___redirect_powf ++# include <math.h> ++# undef powf + +-#define SYMBOL_NAME powf +-#include "ifunc-fma.h" ++# define SYMBOL_NAME powf ++# include "ifunc-fma.h" + + libc_ifunc_redirected (__redirect_powf, __powf, IFUNC_SELECTOR ()); + +-#ifdef SHARED ++# ifdef SHARED + __hidden_ver1 (__powf, __GI___powf, __redirect_powf) + __attribute__ ((visibility ("hidden"))); + + versioned_symbol (libm, __ieee754_powf, powf, GLIBC_2_27); + libm_alias_float_other (__pow, pow) +-#else ++# else + libm_alias_float (__pow, pow) +-#endif ++# endif + + strong_alias (__powf, __ieee754_powf) + libm_alias_finite (__powf, __powf) + +-#define __powf __powf_sse2 ++# define __powf __powf_sse2 ++#endif + #include <sysdeps/ieee754/flt-32/e_powf.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan.c b/sysdeps/x86_64/fpu/multiarch/s_atan.c +index 71bad096a9..4d2c6ce006 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_atan.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_atan.c +@@ -16,15 +16,18 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-double.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-double.h> + + extern double __redirect_atan (double); + +-#define SYMBOL_NAME atan +-#include "ifunc-avx-fma4.h" ++# define SYMBOL_NAME atan ++# include "ifunc-avx-fma4.h" + + libc_ifunc_redirected (__redirect_atan, __atan, IFUNC_SELECTOR ()); + libm_alias_double (__atan, atan) + +-#define __atan __atan_sse2 ++# define __atan __atan_sse2 ++#endif + #include <sysdeps/ieee754/dbl-64/s_atan.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil-avx.S b/sysdeps/x86_64/fpu/multiarch/s_ceil-avx.S +new file mode 100644 +index 0000000000..e6c1106753 +--- /dev/null ++++ b/sysdeps/x86_64/fpu/multiarch/s_ceil-avx.S +@@ -0,0 +1,28 @@ ++/* AVX implementation of ceil function. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <sysdep.h> ++#include <libm-alias-double.h> ++ ++ .text ++ENTRY(__ceil) ++ vroundsd $10, %xmm0, %xmm0, %xmm0 ++ ret ++END(__ceil) ++ ++libm_alias_double (__ceil, ceil) +diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil-sse4_1.S b/sysdeps/x86_64/fpu/multiarch/s_ceil-sse4_1.S +index 64119011ad..dba756c38f 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_ceil-sse4_1.S ++++ b/sysdeps/x86_64/fpu/multiarch/s_ceil-sse4_1.S +@@ -17,8 +17,20 @@ + + #include <sysdep.h> + ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-double.h> ++# define __ceil_sse41 __ceil ++ .text ++#else + .section .text.sse4.1,"ax",@progbits ++#endif ++ + ENTRY(__ceil_sse41) + roundsd $10, %xmm0, %xmm0 + ret + END(__ceil_sse41) ++ ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++libm_alias_double (__ceil, ceil) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil.c b/sysdeps/x86_64/fpu/multiarch/s_ceil.c +index cc028addee..46c8e91e19 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_ceil.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_ceil.c +@@ -16,17 +16,20 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#define NO_MATH_REDIRECT +-#include <libm-alias-double.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < SSE4_1_X86_ISA_LEVEL ++# define NO_MATH_REDIRECT ++# include <libm-alias-double.h> + +-#define ceil __redirect_ceil +-#define __ceil __redirect___ceil +-#include <math.h> +-#undef ceil +-#undef __ceil ++# define ceil __redirect_ceil ++# define __ceil __redirect___ceil ++# include <math.h> ++# undef ceil ++# undef __ceil + +-#define SYMBOL_NAME ceil +-#include "ifunc-sse4_1.h" ++# define SYMBOL_NAME ceil ++# include "ifunc-sse4_1.h" + + libc_ifunc_redirected (__redirect_ceil, __ceil, IFUNC_SELECTOR ()); + libm_alias_double (__ceil, ceil) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceilf-avx.S b/sysdeps/x86_64/fpu/multiarch/s_ceilf-avx.S +new file mode 100644 +index 0000000000..b4d8ac0455 +--- /dev/null ++++ b/sysdeps/x86_64/fpu/multiarch/s_ceilf-avx.S +@@ -0,0 +1,28 @@ ++/* AVX implementation of ceilf function. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <sysdep.h> ++#include <libm-alias-float.h> ++ ++ .text ++ENTRY(__ceilf) ++ vroundss $10, %xmm0, %xmm0, %xmm0 ++ ret ++END(__ceilf) ++ ++libm_alias_float (__ceil, ceil) +diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceilf-sse4_1.S b/sysdeps/x86_64/fpu/multiarch/s_ceilf-sse4_1.S +index dd9a9f6b71..9abc87b91a 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_ceilf-sse4_1.S ++++ b/sysdeps/x86_64/fpu/multiarch/s_ceilf-sse4_1.S +@@ -17,8 +17,20 @@ + + #include <sysdep.h> + ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-float.h> ++# define __ceilf_sse41 __ceilf ++ .text ++#else + .section .text.sse4.1,"ax",@progbits ++#endif ++ + ENTRY(__ceilf_sse41) + roundss $10, %xmm0, %xmm0 + ret + END(__ceilf_sse41) ++ ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++libm_alias_float (__ceil, ceil) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceilf.c b/sysdeps/x86_64/fpu/multiarch/s_ceilf.c +index 97a0ca7d19..bb53108f73 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_ceilf.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_ceilf.c +@@ -16,17 +16,20 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#define NO_MATH_REDIRECT +-#include <libm-alias-float.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < SSE4_1_X86_ISA_LEVEL ++# define NO_MATH_REDIRECT ++# include <libm-alias-float.h> + +-#define ceilf __redirect_ceilf +-#define __ceilf __redirect___ceilf +-#include <math.h> +-#undef ceilf +-#undef __ceilf ++# define ceilf __redirect_ceilf ++# define __ceilf __redirect___ceilf ++# include <math.h> ++# undef ceilf ++# undef __ceilf + +-#define SYMBOL_NAME ceilf +-#include "ifunc-sse4_1.h" ++# define SYMBOL_NAME ceilf ++# include "ifunc-sse4_1.h" + + libc_ifunc_redirected (__redirect_ceilf, __ceilf, IFUNC_SELECTOR ()); + libm_alias_float (__ceil, ceil) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_cosf.c b/sysdeps/x86_64/fpu/multiarch/s_cosf.c +index 2703c576df..8a02e04538 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_cosf.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_cosf.c +@@ -16,13 +16,18 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-float.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-float.h> + + extern float __redirect_cosf (float); + +-#define SYMBOL_NAME cosf +-#include "ifunc-fma.h" ++# define SYMBOL_NAME cosf ++# include "ifunc-fma.h" + + libc_ifunc_redirected (__redirect_cosf, __cosf, IFUNC_SELECTOR ()); + + libm_alias_float (__cos, cos) ++#else ++# include <sysdeps/ieee754/flt-32/s_cosf.c> ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_expm1.c b/sysdeps/x86_64/fpu/multiarch/s_expm1.c +index 8a2d69f9b2..d58ef3d8f5 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_expm1.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_expm1.c +@@ -16,21 +16,24 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-double.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-double.h> + + extern double __redirect_expm1 (double); + +-#define SYMBOL_NAME expm1 +-#include "ifunc-fma.h" ++# define SYMBOL_NAME expm1 ++# include "ifunc-fma.h" + + libc_ifunc_redirected (__redirect_expm1, __expm1, IFUNC_SELECTOR ()); + libm_alias_double (__expm1, expm1) + +-#define __expm1 __expm1_sse2 ++# define __expm1 __expm1_sse2 + + /* NB: __expm1 may be expanded to __expm1_sse2 in the following + prototypes. */ + extern long double __expm1l (long double); + extern long double __expm1f128 (long double); + ++#endif + #include <sysdeps/ieee754/dbl-64/s_expm1.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor-avx.S b/sysdeps/x86_64/fpu/multiarch/s_floor-avx.S +new file mode 100644 +index 0000000000..ff74b5a8bf +--- /dev/null ++++ b/sysdeps/x86_64/fpu/multiarch/s_floor-avx.S +@@ -0,0 +1,28 @@ ++/* AVX implementation of floor function. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <sysdep.h> ++#include <libm-alias-double.h> ++ ++ .text ++ENTRY(__floor) ++ vroundsd $9, %xmm0, %xmm0, %xmm0 ++ ret ++END(__floor) ++ ++libm_alias_double (__floor, floor) +diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor-sse4_1.S b/sysdeps/x86_64/fpu/multiarch/s_floor-sse4_1.S +index 2f7521f39f..c9b9b0639b 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_floor-sse4_1.S ++++ b/sysdeps/x86_64/fpu/multiarch/s_floor-sse4_1.S +@@ -17,8 +17,20 @@ + + #include <sysdep.h> + ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-double.h> ++# define __floor_sse41 __floor ++ .text ++#else + .section .text.sse4.1,"ax",@progbits ++#endif ++ + ENTRY(__floor_sse41) + roundsd $9, %xmm0, %xmm0 + ret + END(__floor_sse41) ++ ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++libm_alias_double (__floor, floor) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor.c b/sysdeps/x86_64/fpu/multiarch/s_floor.c +index 8cebd48e10..2c87dd0056 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_floor.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_floor.c +@@ -16,17 +16,20 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#define NO_MATH_REDIRECT +-#include <libm-alias-double.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < SSE4_1_X86_ISA_LEVEL ++# define NO_MATH_REDIRECT ++# include <libm-alias-double.h> + +-#define floor __redirect_floor +-#define __floor __redirect___floor +-#include <math.h> +-#undef floor +-#undef __floor ++# define floor __redirect_floor ++# define __floor __redirect___floor ++# include <math.h> ++# undef floor ++# undef __floor + +-#define SYMBOL_NAME floor +-#include "ifunc-sse4_1.h" ++# define SYMBOL_NAME floor ++# include "ifunc-sse4_1.h" + + libc_ifunc_redirected (__redirect_floor, __floor, IFUNC_SELECTOR ()); + libm_alias_double (__floor, floor) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_floorf-avx.S b/sysdeps/x86_64/fpu/multiarch/s_floorf-avx.S +new file mode 100644 +index 0000000000..c378baae8e +--- /dev/null ++++ b/sysdeps/x86_64/fpu/multiarch/s_floorf-avx.S +@@ -0,0 +1,28 @@ ++/* AVX implementation of floorf function. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <sysdep.h> ++#include <libm-alias-float.h> ++ ++ .text ++ENTRY(__floorf) ++ vroundss $9, %xmm0, %xmm0, %xmm0 ++ ret ++END(__floorf) ++ ++libm_alias_float (__floor, floor) +diff --git a/sysdeps/x86_64/fpu/multiarch/s_floorf-sse4_1.S b/sysdeps/x86_64/fpu/multiarch/s_floorf-sse4_1.S +index 5f6020d27d..c2216899db 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_floorf-sse4_1.S ++++ b/sysdeps/x86_64/fpu/multiarch/s_floorf-sse4_1.S +@@ -17,8 +17,20 @@ + + #include <sysdep.h> + ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-float.h> ++# define __floorf_sse41 __floorf ++ .text ++#else + .section .text.sse4.1,"ax",@progbits ++#endif ++ + ENTRY(__floorf_sse41) + roundss $9, %xmm0, %xmm0 + ret + END(__floorf_sse41) ++ ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++libm_alias_float (__floor, floor) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_floorf.c b/sysdeps/x86_64/fpu/multiarch/s_floorf.c +index a14e18b03c..a277802b6d 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_floorf.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_floorf.c +@@ -16,17 +16,20 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#define NO_MATH_REDIRECT +-#include <libm-alias-float.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < SSE4_1_X86_ISA_LEVEL ++# define NO_MATH_REDIRECT ++# include <libm-alias-float.h> + +-#define floorf __redirect_floorf +-#define __floorf __redirect___floorf +-#include <math.h> +-#undef floorf +-#undef __floorf ++# define floorf __redirect_floorf ++# define __floorf __redirect___floorf ++# include <math.h> ++# undef floorf ++# undef __floorf + +-#define SYMBOL_NAME floorf +-#include "ifunc-sse4_1.h" ++# define SYMBOL_NAME floorf ++# include "ifunc-sse4_1.h" + + libc_ifunc_redirected (__redirect_floorf, __floorf, IFUNC_SELECTOR ()); + libm_alias_float (__floor, floor) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_log1p.c b/sysdeps/x86_64/fpu/multiarch/s_log1p.c +index a8e1a3f21b..3fa1185d81 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_log1p.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_log1p.c +@@ -16,14 +16,17 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-double.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-double.h> + + extern double __redirect_log1p (double); + +-#define SYMBOL_NAME log1p +-#include "ifunc-fma.h" ++# define SYMBOL_NAME log1p ++# include "ifunc-fma.h" + + libc_ifunc_redirected (__redirect_log1p, __log1p, IFUNC_SELECTOR ()); + +-#define __log1p __log1p_sse2 ++# define __log1p __log1p_sse2 ++#endif + #include <sysdeps/ieee754/dbl-64/s_log1p.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/s_nearbyint-avx.S b/sysdeps/x86_64/fpu/multiarch/s_nearbyint-avx.S +new file mode 100644 +index 0000000000..5bfdf73c28 +--- /dev/null ++++ b/sysdeps/x86_64/fpu/multiarch/s_nearbyint-avx.S +@@ -0,0 +1,28 @@ ++/* AVX implementation of nearbyint function. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <sysdep.h> ++#include <libm-alias-double.h> ++ ++ .text ++ENTRY(__nearbyint) ++ vroundsd $0xc, %xmm0, %xmm0, %xmm0 ++ ret ++END(__nearbyint) ++ ++libm_alias_double (__nearbyint, nearbyint) +diff --git a/sysdeps/x86_64/fpu/multiarch/s_nearbyint-sse4_1.S b/sysdeps/x86_64/fpu/multiarch/s_nearbyint-sse4_1.S +index 674f7eb40a..9d84410a1f 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_nearbyint-sse4_1.S ++++ b/sysdeps/x86_64/fpu/multiarch/s_nearbyint-sse4_1.S +@@ -17,8 +17,20 @@ + + #include <sysdep.h> + ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-double.h> ++# define __nearbyint_sse41 __nearbyint ++ .text ++#else + .section .text.sse4.1,"ax",@progbits ++#endif ++ + ENTRY(__nearbyint_sse41) + roundsd $0xc, %xmm0, %xmm0 + ret + END(__nearbyint_sse41) ++ ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++libm_alias_double (__nearbyint, nearbyint) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c b/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c +index 693e42dd4e..057a7ca60f 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c +@@ -16,17 +16,20 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-double.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-double.h> + +-#define nearbyint __redirect_nearbyint +-#define __nearbyint __redirect___nearbyint +-#include <math.h> +-#undef nearbyint +-#undef __nearbyint ++# define nearbyint __redirect_nearbyint ++# define __nearbyint __redirect___nearbyint ++# include <math.h> ++# undef nearbyint ++# undef __nearbyint + +-#define SYMBOL_NAME nearbyint +-#include "ifunc-sse4_1.h" ++# define SYMBOL_NAME nearbyint ++# include "ifunc-sse4_1.h" + + libc_ifunc_redirected (__redirect_nearbyint, __nearbyint, + IFUNC_SELECTOR ()); + libm_alias_double (__nearbyint, nearbyint) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_nearbyintf-avx.S b/sysdeps/x86_64/fpu/multiarch/s_nearbyintf-avx.S +new file mode 100644 +index 0000000000..1dbaed0324 +--- /dev/null ++++ b/sysdeps/x86_64/fpu/multiarch/s_nearbyintf-avx.S +@@ -0,0 +1,28 @@ ++/* AVX implmentation of nearbyintf function. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <sysdep.h> ++#include <libm-alias-float.h> ++ ++ .text ++ENTRY(__nearbyintf) ++ vroundss $0xc, %xmm0, %xmm0, %xmm0 ++ ret ++END(__nearbyintf) ++ ++libm_alias_float (__nearbyint, nearbyint) +diff --git a/sysdeps/x86_64/fpu/multiarch/s_nearbyintf-sse4_1.S b/sysdeps/x86_64/fpu/multiarch/s_nearbyintf-sse4_1.S +index 5892bd7563..3cf35f92d6 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_nearbyintf-sse4_1.S ++++ b/sysdeps/x86_64/fpu/multiarch/s_nearbyintf-sse4_1.S +@@ -17,8 +17,20 @@ + + #include <sysdep.h> + ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-float.h> ++# define __nearbyintf_sse41 __nearbyintf ++ .text ++#else + .section .text.sse4.1,"ax",@progbits ++#endif ++ + ENTRY(__nearbyintf_sse41) + roundss $0xc, %xmm0, %xmm0 + ret + END(__nearbyintf_sse41) ++ ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++libm_alias_float (__nearbyint, nearbyint) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c b/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c +index a0ac009f4b..41f374ba72 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c +@@ -16,17 +16,20 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-float.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-float.h> + +-#define nearbyintf __redirect_nearbyintf +-#define __nearbyintf __redirect___nearbyintf +-#include <math.h> +-#undef nearbyintf +-#undef __nearbyintf ++# define nearbyintf __redirect_nearbyintf ++# define __nearbyintf __redirect___nearbyintf ++# include <math.h> ++# undef nearbyintf ++# undef __nearbyintf + +-#define SYMBOL_NAME nearbyintf +-#include "ifunc-sse4_1.h" ++# define SYMBOL_NAME nearbyintf ++# include "ifunc-sse4_1.h" + + libc_ifunc_redirected (__redirect_nearbyintf, __nearbyintf, + IFUNC_SELECTOR ()); + libm_alias_float (__nearbyint, nearbyint) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_rint-avx.S b/sysdeps/x86_64/fpu/multiarch/s_rint-avx.S +new file mode 100644 +index 0000000000..2b403b331f +--- /dev/null ++++ b/sysdeps/x86_64/fpu/multiarch/s_rint-avx.S +@@ -0,0 +1,28 @@ ++/* AVX implementation of rint function. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <sysdep.h> ++#include <libm-alias-double.h> ++ ++ .text ++ENTRY(__rint) ++ vroundsd $4, %xmm0, %xmm0, %xmm0 ++ ret ++END(__rint) ++ ++libm_alias_double (__rint, rint) +diff --git a/sysdeps/x86_64/fpu/multiarch/s_rint-sse4_1.S b/sysdeps/x86_64/fpu/multiarch/s_rint-sse4_1.S +index 405372991b..8cd9cf759f 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_rint-sse4_1.S ++++ b/sysdeps/x86_64/fpu/multiarch/s_rint-sse4_1.S +@@ -17,8 +17,20 @@ + + #include <sysdep.h> + ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-double.h> ++# define __rint_sse41 __rint ++ .text ++#else + .section .text.sse4.1,"ax",@progbits ++#endif ++ + ENTRY(__rint_sse41) + roundsd $4, %xmm0, %xmm0 + ret + END(__rint_sse41) ++ ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++libm_alias_double (__rint, rint) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_rint.c b/sysdeps/x86_64/fpu/multiarch/s_rint.c +index 754c87e004..18623b7d99 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_rint.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_rint.c +@@ -16,17 +16,20 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#define NO_MATH_REDIRECT +-#include <libm-alias-double.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < SSE4_1_X86_ISA_LEVEL ++# define NO_MATH_REDIRECT ++# include <libm-alias-double.h> + +-#define rint __redirect_rint +-#define __rint __redirect___rint +-#include <math.h> +-#undef rint +-#undef __rint ++# define rint __redirect_rint ++# define __rint __redirect___rint ++# include <math.h> ++# undef rint ++# undef __rint + +-#define SYMBOL_NAME rint +-#include "ifunc-sse4_1.h" ++# define SYMBOL_NAME rint ++# include "ifunc-sse4_1.h" + + libc_ifunc_redirected (__redirect_rint, __rint, IFUNC_SELECTOR ()); + libm_alias_double (__rint, rint) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_rintf-avx.S b/sysdeps/x86_64/fpu/multiarch/s_rintf-avx.S +new file mode 100644 +index 0000000000..171c2867f4 +--- /dev/null ++++ b/sysdeps/x86_64/fpu/multiarch/s_rintf-avx.S +@@ -0,0 +1,28 @@ ++/* AVX implementation of rintf function. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <sysdep.h> ++#include <libm-alias-float.h> ++ ++ .text ++ENTRY(__rintf) ++ vroundss $4, %xmm0, %xmm0, %xmm0 ++ ret ++END(__rintf) ++ ++libm_alias_float (__rint, rint) +diff --git a/sysdeps/x86_64/fpu/multiarch/s_rintf-sse4_1.S b/sysdeps/x86_64/fpu/multiarch/s_rintf-sse4_1.S +index 8ac67ce767..fc1e70f0c9 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_rintf-sse4_1.S ++++ b/sysdeps/x86_64/fpu/multiarch/s_rintf-sse4_1.S +@@ -17,8 +17,20 @@ + + #include <sysdep.h> + ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-float.h> ++# define __rintf_sse41 __rintf ++ .text ++#else + .section .text.sse4.1,"ax",@progbits ++#endif ++ + ENTRY(__rintf_sse41) + roundss $4, %xmm0, %xmm0 + ret + END(__rintf_sse41) ++ ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++libm_alias_float (__rint, rint) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_rintf.c b/sysdeps/x86_64/fpu/multiarch/s_rintf.c +index e9d6b7a5f2..e275368dec 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_rintf.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_rintf.c +@@ -16,17 +16,20 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#define NO_MATH_REDIRECT +-#include <libm-alias-float.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < SSE4_1_X86_ISA_LEVEL ++# define NO_MATH_REDIRECT ++# include <libm-alias-float.h> + +-#define rintf __redirect_rintf +-#define __rintf __redirect___rintf +-#include <math.h> +-#undef rintf +-#undef __rintf ++# define rintf __redirect_rintf ++# define __rintf __redirect___rintf ++# include <math.h> ++# undef rintf ++# undef __rintf + +-#define SYMBOL_NAME rintf +-#include "ifunc-sse4_1.h" ++# define SYMBOL_NAME rintf ++# include "ifunc-sse4_1.h" + + libc_ifunc_redirected (__redirect_rintf, __rintf, IFUNC_SELECTOR ()); + libm_alias_float (__rint, rint) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_roundeven-avx.S b/sysdeps/x86_64/fpu/multiarch/s_roundeven-avx.S +new file mode 100644 +index 0000000000..576790355c +--- /dev/null ++++ b/sysdeps/x86_64/fpu/multiarch/s_roundeven-avx.S +@@ -0,0 +1,28 @@ ++/* AVX implementation of roundeven function. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <sysdep.h> ++#include <libm-alias-double.h> ++ ++ .text ++ENTRY(__roundeven) ++ vroundsd $8, %xmm0, %xmm0, %xmm0 ++ ret ++END(__roundeven) ++ ++libm_alias_double (__roundeven, roundeven) +diff --git a/sysdeps/x86_64/fpu/multiarch/s_roundeven-sse4_1.S b/sysdeps/x86_64/fpu/multiarch/s_roundeven-sse4_1.S +index 5ef102336b..f00be56c59 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_roundeven-sse4_1.S ++++ b/sysdeps/x86_64/fpu/multiarch/s_roundeven-sse4_1.S +@@ -17,8 +17,20 @@ + + #include <sysdep.h> + ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-double.h> ++# define __roundeven_sse41 __roundeven ++ .text ++#else + .section .text.sse4.1,"ax",@progbits ++#endif ++ + ENTRY(__roundeven_sse41) + roundsd $8, %xmm0, %xmm0 + ret + END(__roundeven_sse41) ++ ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++libm_alias_double (__roundeven, roundeven) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_roundeven.c b/sysdeps/x86_64/fpu/multiarch/s_roundeven.c +index 8737b32e26..139aad088f 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_roundeven.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_roundeven.c +@@ -16,16 +16,19 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-double.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-double.h> + +-#define roundeven __redirect_roundeven +-#define __roundeven __redirect___roundeven +-#include <math.h> +-#undef roundeven +-#undef __roundeven ++# define roundeven __redirect_roundeven ++# define __roundeven __redirect___roundeven ++# include <math.h> ++# undef roundeven ++# undef __roundeven + +-#define SYMBOL_NAME roundeven +-#include "ifunc-sse4_1.h" ++# define SYMBOL_NAME roundeven ++# include "ifunc-sse4_1.h" + + libc_ifunc_redirected (__redirect_roundeven, __roundeven, IFUNC_SELECTOR ()); + libm_alias_double (__roundeven, roundeven) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_roundevenf-avx.S b/sysdeps/x86_64/fpu/multiarch/s_roundevenf-avx.S +new file mode 100644 +index 0000000000..42c359f4cd +--- /dev/null ++++ b/sysdeps/x86_64/fpu/multiarch/s_roundevenf-avx.S +@@ -0,0 +1,28 @@ ++/* AVX implementation of roundevenf function. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <sysdep.h> ++#include <libm-alias-float.h> ++ ++ .text ++ENTRY(__roundevenf) ++ vroundss $8, %xmm0, %xmm0, %xmm0 ++ ret ++END(__roundevenf) ++ ++libm_alias_float (__roundeven, roundeven) +diff --git a/sysdeps/x86_64/fpu/multiarch/s_roundevenf-sse4_1.S b/sysdeps/x86_64/fpu/multiarch/s_roundevenf-sse4_1.S +index 792c90ba07..6b148e4353 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_roundevenf-sse4_1.S ++++ b/sysdeps/x86_64/fpu/multiarch/s_roundevenf-sse4_1.S +@@ -17,8 +17,20 @@ + + #include <sysdep.h> + ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-float.h> ++# define __roundevenf_sse41 __roundevenf ++ .text ++#else + .section .text.sse4.1,"ax",@progbits ++#endif ++ + ENTRY(__roundevenf_sse41) + roundss $8, %xmm0, %xmm0 + ret + END(__roundevenf_sse41) ++ ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++libm_alias_float (__roundeven, roundeven) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_roundevenf.c b/sysdeps/x86_64/fpu/multiarch/s_roundevenf.c +index e96016a4d5..2fb090075d 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_roundevenf.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_roundevenf.c +@@ -16,16 +16,19 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-float.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-float.h> + +-#define roundevenf __redirect_roundevenf +-#define __roundevenf __redirect___roundevenf +-#include <math.h> +-#undef roundevenf +-#undef __roundevenf ++# define roundevenf __redirect_roundevenf ++# define __roundevenf __redirect___roundevenf ++# include <math.h> ++# undef roundevenf ++# undef __roundevenf + +-#define SYMBOL_NAME roundevenf +-#include "ifunc-sse4_1.h" ++# define SYMBOL_NAME roundevenf ++# include "ifunc-sse4_1.h" + + libc_ifunc_redirected (__redirect_roundevenf, __roundevenf, IFUNC_SELECTOR ()); + libm_alias_float (__roundeven, roundeven) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin.c b/sysdeps/x86_64/fpu/multiarch/s_sin.c +index 355cc0092e..21e77943a3 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_sin.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_sin.c +@@ -16,24 +16,27 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-double.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-double.h> + + extern double __redirect_sin (double); + extern double __redirect_cos (double); + +-#define SYMBOL_NAME sin +-#include "ifunc-avx-fma4.h" ++# define SYMBOL_NAME sin ++# include "ifunc-avx-fma4.h" + + libc_ifunc_redirected (__redirect_sin, __sin, IFUNC_SELECTOR ()); + libm_alias_double (__sin, sin) + +-#undef SYMBOL_NAME +-#define SYMBOL_NAME cos +-#include "ifunc-avx-fma4.h" ++# undef SYMBOL_NAME ++# define SYMBOL_NAME cos ++# include "ifunc-avx-fma4.h" + + libc_ifunc_redirected (__redirect_cos, __cos, IFUNC_SELECTOR ()); + libm_alias_double (__cos, cos) + +-#define __cos __cos_sse2 +-#define __sin __sin_sse2 ++# define __cos __cos_sse2 ++# define __sin __sin_sse2 ++#endif + #include <sysdeps/ieee754/dbl-64/s_sin.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/s_sincos.c b/sysdeps/x86_64/fpu/multiarch/s_sincos.c +index 70107e999c..b35757f8de 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_sincos.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_sincos.c +@@ -16,15 +16,18 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-double.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-double.h> + + extern void __redirect_sincos (double, double *, double *); + +-#define SYMBOL_NAME sincos +-#include "ifunc-fma4.h" ++# define SYMBOL_NAME sincos ++# include "ifunc-fma4.h" + + libc_ifunc_redirected (__redirect_sincos, __sincos, IFUNC_SELECTOR ()); + libm_alias_double (__sincos, sincos) + +-#define __sincos __sincos_sse2 ++# define __sincos __sincos_sse2 ++#endif + #include <sysdeps/ieee754/dbl-64/s_sincos.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/s_sincosf.c b/sysdeps/x86_64/fpu/multiarch/s_sincosf.c +index 80bc028451..0ea9b40e84 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_sincosf.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_sincosf.c +@@ -16,13 +16,18 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-float.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-float.h> + + extern void __redirect_sincosf (float, float *, float *); + +-#define SYMBOL_NAME sincosf +-#include "ifunc-fma.h" ++# define SYMBOL_NAME sincosf ++# include "ifunc-fma.h" + + libc_ifunc_redirected (__redirect_sincosf, __sincosf, IFUNC_SELECTOR ()); + + libm_alias_float (__sincos, sincos) ++#else ++# include <sysdeps/ieee754/flt-32/s_sincosf.c> ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_sinf.c b/sysdeps/x86_64/fpu/multiarch/s_sinf.c +index a32b9e9550..c61624e3ee 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_sinf.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_sinf.c +@@ -16,13 +16,18 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-float.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-float.h> + + extern float __redirect_sinf (float); + +-#define SYMBOL_NAME sinf +-#include "ifunc-fma.h" ++# define SYMBOL_NAME sinf ++# include "ifunc-fma.h" + + libc_ifunc_redirected (__redirect_sinf, __sinf, IFUNC_SELECTOR ()); + + libm_alias_float (__sin, sin) ++#else ++# include <sysdeps/ieee754/flt-32/s_sinf.c> ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan.c b/sysdeps/x86_64/fpu/multiarch/s_tan.c +index f9a2474a13..125d992ba1 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_tan.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_tan.c +@@ -16,15 +16,18 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#include <libm-alias-double.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL ++# include <libm-alias-double.h> + + extern double __redirect_tan (double); + +-#define SYMBOL_NAME tan +-#include "ifunc-avx-fma4.h" ++# define SYMBOL_NAME tan ++# include "ifunc-avx-fma4.h" + + libc_ifunc_redirected (__redirect_tan, __tan, IFUNC_SELECTOR ()); + libm_alias_double (__tan, tan) + +-#define __tan __tan_sse2 ++# define __tan __tan_sse2 ++#endif + #include <sysdeps/ieee754/dbl-64/s_tan.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/s_trunc-avx.S b/sysdeps/x86_64/fpu/multiarch/s_trunc-avx.S +new file mode 100644 +index 0000000000..b3e87e9606 +--- /dev/null ++++ b/sysdeps/x86_64/fpu/multiarch/s_trunc-avx.S +@@ -0,0 +1,28 @@ ++/* AVX implementation of trunc function. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <sysdep.h> ++#include <libm-alias-double.h> ++ ++ .text ++ENTRY(__trunc) ++ vroundsd $11, %xmm0, %xmm0, %xmm0 ++ ret ++END(__trunc) ++ ++libm_alias_double (__trunc, trunc) +diff --git a/sysdeps/x86_64/fpu/multiarch/s_trunc-sse4_1.S b/sysdeps/x86_64/fpu/multiarch/s_trunc-sse4_1.S +index b496a6ef49..2b79174eed 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_trunc-sse4_1.S ++++ b/sysdeps/x86_64/fpu/multiarch/s_trunc-sse4_1.S +@@ -18,8 +18,20 @@ + + #include <sysdep.h> + ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-double.h> ++# define __trunc_sse41 __trunc ++ .text ++#else + .section .text.sse4.1,"ax",@progbits ++#endif ++ + ENTRY(__trunc_sse41) + roundsd $11, %xmm0, %xmm0 + ret + END(__trunc_sse41) ++ ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++libm_alias_double (__trunc, trunc) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_trunc.c b/sysdeps/x86_64/fpu/multiarch/s_trunc.c +index 9bc9df8744..ea89c4f85d 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_trunc.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_trunc.c +@@ -16,17 +16,20 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#define NO_MATH_REDIRECT +-#include <libm-alias-double.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < SSE4_1_X86_ISA_LEVEL ++# define NO_MATH_REDIRECT ++# include <libm-alias-double.h> + +-#define trunc __redirect_trunc +-#define __trunc __redirect___trunc +-#include <math.h> +-#undef trunc +-#undef __trunc ++# define trunc __redirect_trunc ++# define __trunc __redirect___trunc ++# include <math.h> ++# undef trunc ++# undef __trunc + +-#define SYMBOL_NAME trunc +-#include "ifunc-sse4_1.h" ++# define SYMBOL_NAME trunc ++# include "ifunc-sse4_1.h" + + libc_ifunc_redirected (__redirect_trunc, __trunc, IFUNC_SELECTOR ()); + libm_alias_double (__trunc, trunc) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_truncf-avx.S b/sysdeps/x86_64/fpu/multiarch/s_truncf-avx.S +new file mode 100644 +index 0000000000..f31ac7d7f7 +--- /dev/null ++++ b/sysdeps/x86_64/fpu/multiarch/s_truncf-avx.S +@@ -0,0 +1,28 @@ ++/* AVX implementation of truncf function. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <sysdep.h> ++#include <libm-alias-float.h> ++ ++ .text ++ENTRY(__truncf) ++ vroundss $11, %xmm0, %xmm0, %xmm0 ++ ret ++END(__truncf) ++ ++libm_alias_float (__trunc, trunc) +diff --git a/sysdeps/x86_64/fpu/multiarch/s_truncf-sse4_1.S b/sysdeps/x86_64/fpu/multiarch/s_truncf-sse4_1.S +index 22e9a83307..60498b2cb2 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_truncf-sse4_1.S ++++ b/sysdeps/x86_64/fpu/multiarch/s_truncf-sse4_1.S +@@ -18,8 +18,20 @@ + + #include <sysdep.h> + ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++# include <libm-alias-float.h> ++# define __truncf_sse41 __truncf ++ .text ++#else + .section .text.sse4.1,"ax",@progbits ++#endif ++ + ENTRY(__truncf_sse41) + roundss $11, %xmm0, %xmm0 + ret + END(__truncf_sse41) ++ ++#if MINIMUM_X86_ISA_LEVEL == SSE4_1_X86_ISA_LEVEL ++libm_alias_float (__trunc, trunc) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/s_truncf.c b/sysdeps/x86_64/fpu/multiarch/s_truncf.c +index dae01d166a..92435ce39d 100644 +--- a/sysdeps/x86_64/fpu/multiarch/s_truncf.c ++++ b/sysdeps/x86_64/fpu/multiarch/s_truncf.c +@@ -16,17 +16,20 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-#define NO_MATH_REDIRECT +-#include <libm-alias-float.h> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL < SSE4_1_X86_ISA_LEVEL ++# define NO_MATH_REDIRECT ++# include <libm-alias-float.h> + +-#define truncf __redirect_truncf +-#define __truncf __redirect___truncf +-#include <math.h> +-#undef truncf +-#undef __truncf ++# define truncf __redirect_truncf ++# define __truncf __redirect___truncf ++# include <math.h> ++# undef truncf ++# undef __truncf + +-#define SYMBOL_NAME truncf +-#include "ifunc-sse4_1.h" ++# define SYMBOL_NAME truncf ++# include "ifunc-sse4_1.h" + + libc_ifunc_redirected (__redirect_truncf, __truncf, IFUNC_SELECTOR ()); + libm_alias_float (__trunc, trunc) ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/w_exp.c b/sysdeps/x86_64/fpu/multiarch/w_exp.c +index 27eee98a0a..3584187e0e 100644 +--- a/sysdeps/x86_64/fpu/multiarch/w_exp.c ++++ b/sysdeps/x86_64/fpu/multiarch/w_exp.c +@@ -1 +1,6 @@ +-#include <sysdeps/../math/w_exp.c> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL >= AVX2_X86_ISA_LEVEL ++# include <sysdeps/ieee754/dbl-64/w_exp.c> ++#else ++# include <sysdeps/../math/w_exp.c> ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/w_log.c b/sysdeps/x86_64/fpu/multiarch/w_log.c +index 9b2b018711..414ca3ca3d 100644 +--- a/sysdeps/x86_64/fpu/multiarch/w_log.c ++++ b/sysdeps/x86_64/fpu/multiarch/w_log.c +@@ -1 +1,6 @@ +-#include <sysdeps/../math/w_log.c> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL >= AVX2_X86_ISA_LEVEL ++# include <sysdeps/ieee754/dbl-64/w_log.c> ++#else ++# include <sysdeps/../math/w_log.c> ++#endif +diff --git a/sysdeps/x86_64/fpu/multiarch/w_pow.c b/sysdeps/x86_64/fpu/multiarch/w_pow.c +index b50c1988de..d5fcc4f871 100644 +--- a/sysdeps/x86_64/fpu/multiarch/w_pow.c ++++ b/sysdeps/x86_64/fpu/multiarch/w_pow.c +@@ -1 +1,6 @@ +-#include <sysdeps/../math/w_pow.c> ++#include <sysdeps/x86/isa-level.h> ++#if MINIMUM_X86_ISA_LEVEL >= AVX2_X86_ISA_LEVEL ++# include <sysdeps/ieee754/dbl-64/w_pow.c> ++#else ++# include <sysdeps/../math/w_pow.c> ++#endif + +commit 31da30f23cddd36db29d5b6a1c7619361b271fb4 +Author: Charles Fol <folcharles@gmail.com> +Date: Thu Mar 28 12:25:38 2024 -0300 + + iconv: ISO-2022-CN-EXT: fix out-of-bound writes when writing escape sequence (CVE-2024-2961) + + ISO-2022-CN-EXT uses escape sequences to indicate character set changes + (as specified by RFC 1922). While the SOdesignation has the expected + bounds checks, neither SS2designation nor SS3designation have its; + allowing a write overflow of 1, 2, or 3 bytes with fixed values: + '$+I', '$+J', '$+K', '$+L', '$+M', or '$*H'. + + Checked on aarch64-linux-gnu. + + Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> + Reviewed-by: Carlos O'Donell <carlos@redhat.com> + Tested-by: Carlos O'Donell <carlos@redhat.com> + + (cherry picked from commit f9dc609e06b1136bb0408be9605ce7973a767ada) + +diff --git a/iconvdata/Makefile b/iconvdata/Makefile +index ea019ce5c0..7196a8744b 100644 +--- a/iconvdata/Makefile ++++ b/iconvdata/Makefile +@@ -75,7 +75,8 @@ ifeq (yes,$(build-shared)) + tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \ + tst-iconv6 bug-iconv5 bug-iconv6 tst-iconv7 bug-iconv8 bug-iconv9 \ + bug-iconv10 bug-iconv11 bug-iconv12 tst-iconv-big5-hkscs-to-2ucs4 \ +- bug-iconv13 bug-iconv14 bug-iconv15 ++ bug-iconv13 bug-iconv14 bug-iconv15 \ ++ tst-iconv-iso-2022-cn-ext + ifeq ($(have-thread-library),yes) + tests += bug-iconv3 + endif +@@ -330,6 +331,8 @@ $(objpfx)bug-iconv14.out: $(addprefix $(objpfx), $(gconv-modules)) \ + $(addprefix $(objpfx),$(modules.so)) + $(objpfx)bug-iconv15.out: $(addprefix $(objpfx), $(gconv-modules)) \ + $(addprefix $(objpfx),$(modules.so)) ++$(objpfx)tst-iconv-iso-2022-cn-ext.out: $(addprefix $(objpfx), $(gconv-modules)) \ ++ $(addprefix $(objpfx),$(modules.so)) + + $(objpfx)iconv-test.out: run-iconv-test.sh \ + $(addprefix $(objpfx), $(gconv-modules)) \ +diff --git a/iconvdata/iso-2022-cn-ext.c b/iconvdata/iso-2022-cn-ext.c +index b34c8a36f4..cce29b1969 100644 +--- a/iconvdata/iso-2022-cn-ext.c ++++ b/iconvdata/iso-2022-cn-ext.c +@@ -574,6 +574,12 @@ DIAG_IGNORE_Os_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); + { \ + const char *escseq; \ + \ ++ if (outptr + 4 > outend) \ ++ { \ ++ result = __GCONV_FULL_OUTPUT; \ ++ break; \ ++ } \ ++ \ + assert (used == CNS11643_2_set); /* XXX */ \ + escseq = "*H"; \ + *outptr++ = ESC; \ +@@ -587,6 +593,12 @@ DIAG_IGNORE_Os_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); + { \ + const char *escseq; \ + \ ++ if (outptr + 4 > outend) \ ++ { \ ++ result = __GCONV_FULL_OUTPUT; \ ++ break; \ ++ } \ ++ \ + assert ((used >> 5) >= 3 && (used >> 5) <= 7); \ + escseq = "+I+J+K+L+M" + ((used >> 5) - 3) * 2; \ + *outptr++ = ESC; \ +diff --git a/iconvdata/tst-iconv-iso-2022-cn-ext.c b/iconvdata/tst-iconv-iso-2022-cn-ext.c +new file mode 100644 +index 0000000000..96a8765fd5 +--- /dev/null ++++ b/iconvdata/tst-iconv-iso-2022-cn-ext.c +@@ -0,0 +1,128 @@ ++/* Verify ISO-2022-CN-EXT does not write out of the bounds. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <stdio.h> ++#include <string.h> ++ ++#include <errno.h> ++#include <iconv.h> ++#include <sys/mman.h> ++ ++#include <support/xunistd.h> ++#include <support/check.h> ++#include <support/support.h> ++ ++/* The test sets up a two memory page buffer with the second page marked ++ PROT_NONE to trigger a fault if the conversion writes beyond the exact ++ expected amount. Then we carry out various conversions and precisely ++ place the start of the output buffer in order to trigger a SIGSEGV if the ++ process writes anywhere between 1 and page sized bytes more (only one ++ PROT_NONE page is setup as a canary) than expected. These tests exercise ++ all three of the cases in ISO-2022-CN-EXT where the converter must switch ++ character sets and may run out of buffer space while doing the ++ operation. */ ++ ++static int ++do_test (void) ++{ ++ iconv_t cd = iconv_open ("ISO-2022-CN-EXT", "UTF-8"); ++ TEST_VERIFY_EXIT (cd != (iconv_t) -1); ++ ++ char *ntf; ++ size_t ntfsize; ++ char *outbufbase; ++ { ++ int pgz = getpagesize (); ++ TEST_VERIFY_EXIT (pgz > 0); ++ ntfsize = 2 * pgz; ++ ++ ntf = xmmap (NULL, ntfsize, PROT_READ | PROT_WRITE, MAP_PRIVATE ++ | MAP_ANONYMOUS, -1); ++ xmprotect (ntf + pgz, pgz, PROT_NONE); ++ ++ outbufbase = ntf + pgz; ++ } ++ ++ /* Check if SOdesignation escape sequence does not trigger an OOB write. */ ++ { ++ char inbuf[] = "\xe4\xba\xa4\xe6\x8d\xa2"; ++ ++ for (int i = 0; i < 9; i++) ++ { ++ char *inp = inbuf; ++ size_t inleft = sizeof (inbuf) - 1; ++ ++ char *outp = outbufbase - i; ++ size_t outleft = i; ++ ++ TEST_VERIFY_EXIT (iconv (cd, &inp, &inleft, &outp, &outleft) ++ == (size_t) -1); ++ TEST_COMPARE (errno, E2BIG); ++ ++ TEST_VERIFY_EXIT (iconv (cd, NULL, NULL, NULL, NULL) == 0); ++ } ++ } ++ ++ /* Same as before for SS2designation. */ ++ { ++ char inbuf[] = "㴽 \xe3\xb4\xbd"; ++ ++ for (int i = 0; i < 14; i++) ++ { ++ char *inp = inbuf; ++ size_t inleft = sizeof (inbuf) - 1; ++ ++ char *outp = outbufbase - i; ++ size_t outleft = i; ++ ++ TEST_VERIFY_EXIT (iconv (cd, &inp, &inleft, &outp, &outleft) ++ == (size_t) -1); ++ TEST_COMPARE (errno, E2BIG); ++ ++ TEST_VERIFY_EXIT (iconv (cd, NULL, NULL, NULL, NULL) == 0); ++ } ++ } ++ ++ /* Same as before for SS3designation. */ ++ { ++ char inbuf[] = "劄 \xe5\x8a\x84"; ++ ++ for (int i = 0; i < 14; i++) ++ { ++ char *inp = inbuf; ++ size_t inleft = sizeof (inbuf) - 1; ++ ++ char *outp = outbufbase - i; ++ size_t outleft = i; ++ ++ TEST_VERIFY_EXIT (iconv (cd, &inp, &inleft, &outp, &outleft) ++ == (size_t) -1); ++ TEST_COMPARE (errno, E2BIG); ++ ++ TEST_VERIFY_EXIT (iconv (cd, NULL, NULL, NULL, NULL) == 0); ++ } ++ } ++ ++ TEST_VERIFY_EXIT (iconv_close (cd) != -1); ++ ++ xmunmap (ntf, ntfsize); ++ ++ return 0; ++} ++ ++#include <support/test-driver.c> diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 4d6fb5a54b398..7418abaa1ba5c 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -36,6 +36,7 @@ , withLinuxHeaders ? false , profilingLibraries ? false , withGd ? false +, enableCET ? false , extraBuildInputs ? [] , extraNativeBuildInputs ? [] , ... @@ -43,7 +44,7 @@ let version = "2.39"; - patchSuffix = "-5"; + patchSuffix = "-31"; sha256 = "sha256-93vUfPgXDFc2Wue/hmlsEYrbOxINMlnGTFAtPcHi2SY="; in @@ -59,11 +60,15 @@ stdenv.mkDerivation ({ [ /* No tarballs for stable upstream branch, only https://sourceware.org/git/glibc.git and using git would complicate bootstrapping. $ git fetch --all -p && git checkout origin/release/2.39/master && git describe - glibc-2.39-5-ge0910f1d32 - $ git show --minimal --reverse glibc-2.39.. > 2.39-master.patch + glibc-2.39-31-g31da30f23c + $ git show --minimal --reverse glibc-2.39.. ':!ADVISORIES' > 2.39-master.patch To compare the archive contents zdiff can be used. $ diff -u 2.39-master.patch ../nixpkgs/pkgs/development/libraries/glibc/2.39-master.patch + + Please note that each commit has changes to the file ADVISORIES excluded since + that conflicts with the directory advisories/ making cross-builds from + hosts with case-insensitive file-systems impossible. */ ./2.39-master.patch @@ -154,9 +159,9 @@ stdenv.mkDerivation ({ # and on aarch64 with binutils 2.30 or later. # https://sourceware.org/glibc/wiki/PortStatus "--enable-static-pie" - ] ++ lib.optionals stdenv.hostPlatform.isx86_64 [ + ] ++ lib.optionals (enableCET != false) [ # Enable Intel Control-flow Enforcement Technology (CET) support - "--enable-cet" + "--enable-cet${if builtins.isString enableCET then "=${enableCET}" else ""}" ] ++ lib.optionals withLinuxHeaders [ "--enable-kernel=3.10.0" # RHEL 7 and derivatives, seems oldest still supported kernel ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ @@ -208,7 +213,7 @@ stdenv.mkDerivation ({ passthru = { inherit version; minorRelease = version; }; } -// (removeAttrs args [ "withLinuxHeaders" "withGd" "postInstall" "makeFlags" ]) // +// (removeAttrs args [ "withLinuxHeaders" "withGd" "enableCET" "postInstall" "makeFlags" ]) // { src = fetchurl { diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 3f7331461fea5..e07c354aa4e09 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -2,6 +2,7 @@ , withLinuxHeaders ? true , profilingLibraries ? false , withGd ? false +, enableCET ? if stdenv.hostPlatform.isx86_64 then "permissive" else false , pkgsBuildBuild , libgcc }: @@ -15,7 +16,7 @@ let in (callPackage ./common.nix { inherit stdenv; } { - inherit withLinuxHeaders withGd profilingLibraries; + inherit withLinuxHeaders withGd profilingLibraries enableCET; pname = "glibc" + lib.optionalString withGd "-gd" + lib.optionalString (stdenv.cc.isGNU && libgcc==null) "-nolibgcc"; }).overrideAttrs(previousAttrs: { diff --git a/pkgs/development/libraries/glibmm/2.68.nix b/pkgs/development/libraries/glibmm/2.68.nix index c3c444f407e00..acace1c6a5bfe 100644 --- a/pkgs/development/libraries/glibmm/2.68.nix +++ b/pkgs/development/libraries/glibmm/2.68.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation rec { pname = "glibmm"; - version = "2.78.1"; + version = "2.80.0"; outputs = [ "out" "dev" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-9HPyl10mw0CeES7RHtNkBvs4Q/qXXfV1wi1MuEMIX2E="; + hash = "sha256-U5sKKeFalmdsTwWUVBJQVmxcpE2l1Nh6NzL6LQeQnko="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/glibmm/default.nix b/pkgs/development/libraries/glibmm/default.nix index 8800070ab61fb..f9f8a4568a579 100644 --- a/pkgs/development/libraries/glibmm/default.nix +++ b/pkgs/development/libraries/glibmm/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "glibmm"; - version = "2.66.6"; + version = "2.66.7"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-U1h0JZgYHlNR17+NoHK/k+bdXxeNJ2QNTkYryPFOFS8="; + hash = "sha256-/gLB5fWCWUDYK1a27DGhLAbAXBWDz+Yvk00HY+HlQrM="; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/gnome-online-accounts/default.nix b/pkgs/development/libraries/gnome-online-accounts/default.nix index c06e45356ac8a..740f7d94f1d99 100644 --- a/pkgs/development/libraries/gnome-online-accounts/default.nix +++ b/pkgs/development/libraries/gnome-online-accounts/default.nix @@ -7,38 +7,37 @@ , meson , ninja , libxslt -, gtk3 +, gtk4 , enableBackend ? stdenv.isLinux -, webkitgtk_4_1 , json-glib +, libadwaita , librest_1_0 , libxml2 , libsecret , gtk-doc , gobject-introspection , gettext -, icu , glib-networking , libsoup_3 , docbook-xsl-nons , docbook_xml_dtd_412 , gnome -, gcr +, gcr_4 , libkrb5 , gvfs , dbus -, wrapGAppsHook +, wrapGAppsHook4 }: stdenv.mkDerivation (finalAttrs: { pname = "gnome-online-accounts"; - version = "3.48.1"; + version = "3.50.1"; outputs = [ "out" "dev" ] ++ lib.optionals enableBackend [ "man" "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/gnome-online-accounts/${lib.versions.majorMinor finalAttrs.version}/gnome-online-accounts-${finalAttrs.version}.tar.xz"; - hash = "sha256-PqDHEIS/WVzOXKo3zv8uhT0OyWRLsB/UZDMArblRf4o="; + hash = "sha256-Qu5D/R4pQrn/YQYlLM3INGAoFVCL96OlLAvf/6Vur0A="; }; mesonFlags = [ @@ -46,7 +45,7 @@ stdenv.mkDerivation (finalAttrs: { "-Dgoabackend=${lib.boolToString enableBackend}" "-Dgtk_doc=${lib.boolToString enableBackend}" "-Dman=${lib.boolToString enableBackend}" - "-Dmedia_server=true" + "-Dwebdav=true" ]; nativeBuildInputs = [ @@ -61,28 +60,24 @@ stdenv.mkDerivation (finalAttrs: { ninja pkg-config vala - wrapGAppsHook + wrapGAppsHook4 ]; buildInputs = [ - gcr + gcr_4 glib glib-networking - gtk3 + gtk4 + libadwaita gvfs # OwnCloud, Google Drive - icu json-glib libkrb5 librest_1_0 libxml2 libsecret libsoup_3 - ] ++ lib.optionals enableBackend [ - webkitgtk_4_1 ]; - env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; - separateDebugInfo = true; passthru = { diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix index 3817d8bb9ced8..23f1e2262d128 100644 --- a/pkgs/development/libraries/gobject-introspection/default.nix +++ b/pkgs/development/libraries/gobject-introspection/default.nix @@ -22,6 +22,7 @@ , nixStoreDir ? builtins.storeDir , x11Support ? true , testers +, propagateFullGlib ? true }: # now that gobject-introspection creates large .gir files (eg gtk3 case) @@ -33,10 +34,13 @@ let pp.mako pp.markdown ]; + + # https://discourse.gnome.org/t/dealing-with-glib-and-gobject-introspection-circular-dependency/18701 + glib' = glib.override { withIntrospection = false; }; in stdenv.mkDerivation (finalAttrs: { pname = "gobject-introspection"; - version = "1.78.1"; + version = "1.80.1"; # outputs TODO: share/gobject-introspection-1.0/tests is needed during build # by pygobject3 (and maybe others), but it's only searched in $out @@ -45,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "mirror://gnome/sources/gobject-introspection/${lib.versions.majorMinor finalAttrs.version}/gobject-introspection-${finalAttrs.version}.tar.xz"; - sha256 = "vXur2Zr3JY52gZ5Fukprw5lgj+di2D/ePKwDPFCEG7Q="; + hash = "sha256-od98Qk4VvaGrY5wA6QUbmt9c6hqeUS+KYDtTzRmbxtg="; }; patches = [ @@ -92,7 +96,7 @@ stdenv.mkDerivation (finalAttrs: { propagatedBuildInputs = [ libffi - glib + (if propagateFullGlib then glib else glib') ]; mesonFlags = [ diff --git a/pkgs/development/libraries/gsettings-desktop-schemas/default.nix b/pkgs/development/libraries/gsettings-desktop-schemas/default.nix index f898f3d3bcd87..c33011f4b01de 100644 --- a/pkgs/development/libraries/gsettings-desktop-schemas/default.nix +++ b/pkgs/development/libraries/gsettings-desktop-schemas/default.nix @@ -13,11 +13,11 @@ stdenv.mkDerivation rec { pname = "gsettings-desktop-schemas"; - version = "45.0"; + version = "46.0"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz"; - sha256 = "NlyNBNr3mzjIs9yWJjSaAk+eS+/dMf7edLQvep++CuI="; + hash = "sha256-STpGoRYbY4jVeqcvYyp5zpbELV/70dCwD0luxYdvhXU="; }; strictDeps = true; diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index bec1cb762ce4f..b94769af76f44 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -18,13 +18,14 @@ , opencv4 , faad2 , ldacbt +, liblc3 , libass , libkate , lrdf , ladspaH , lcms2 , libnice -, webrtc-audio-processing +, webrtc-audio-processing_1 , lilv , lv2 , serd @@ -44,6 +45,7 @@ , flite , gsm , json-glib +, libajantv2 , libaom , libdc1394 , libde265 @@ -68,6 +70,7 @@ , zbar , wayland-protocols , wildmidi +, svt-av1 , fluidsynth , libva , libvdpau @@ -109,13 +112,13 @@ stdenv.mkDerivation rec { pname = "gst-plugins-bad"; - version = "1.22.9"; + version = "1.24.2"; outputs = [ "out" "dev" ]; src = fetchurl { url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; - hash = "sha256-G8ZdD9X1OjY2Vk79P88xjD7c3sOcQQmlA8H8ggOECh0="; + hash = "sha256-RI4yeHvIK1hsbLL4HJqO9AT+pPd/JVZv4G5Zej9ZE2s="; }; patches = [ @@ -147,10 +150,10 @@ stdenv.mkDerivation rec { json-glib lcms2 ldacbt + liblc3 libass libkate - webrtc-audio-processing # required by webrtcdsp - #webrtc-audio-processing_1 # required by isac + webrtc-audio-processing_1 libbs2b libmodplug openjpeg @@ -192,6 +195,7 @@ stdenv.mkDerivation rec { zxing-cpp usrsctp wildmidi + svt-av1 ] ++ lib.optionals opencvSupport [ opencv4 ] ++ lib.optionals enableZbar [ @@ -217,6 +221,7 @@ stdenv.mkDerivation rec { chromaprint flite + libajantv2 libdrm libgudev sbc @@ -260,6 +265,7 @@ stdenv.mkDerivation rec { "-Damfcodec=disabled" # Windows-only "-Davtp=disabled" "-Ddirectshow=disabled" # Windows-only + "-Dqt6d3d11=disabled" # Windows-only "-Ddts=disabled" # required `libdca` library not packaged in nixpkgs as of writing, and marked as "BIG FAT WARNING: libdca is still in early development" "-Dzbar=${if enableZbar then "enabled" else "disabled"}" "-Dfaac=${if faacSupport then "enabled" else "disabled"}" @@ -287,11 +293,11 @@ stdenv.mkDerivation rec { "-Dwasapi=disabled" # not packaged in nixpkgs as of writing / no Windows support "-Dwasapi2=disabled" # not packaged in nixpkgs as of writing / no Windows support "-Dwpe=disabled" # required `wpe-webkit` library not packaged in nixpkgs as of writing - "-Disac=disabled" # depends on `webrtc-audio-coding-1` not compatible with 0.3 "-Dgs=disabled" # depends on `google-cloud-cpp` "-Donnx=disabled" # depends on `libonnxruntime` not packaged in nixpkgs as of writing "-Dopenaptx=enabled" # since gstreamer-1.20.1 `libfreeaptx` is supported for circumventing the dubious license conflict with `libopenaptx` "-Dopencv=${if opencvSupport then "enabled" else "disabled"}" # Reduces rebuild size when `config.cudaSupport = true` + "-Daja=disabled" # should pass libajantv2 via aja-sdk-dir instead "-Dmicrodns=${if microdnsSupport then "enabled" else "disabled"}" "-Dbluez=${if bluezSupport then "enabled" else "disabled"}" (lib.mesonEnable "doc" enableDocumentation) @@ -302,8 +308,8 @@ stdenv.mkDerivation rec { "-Dva=disabled" # see comment on `libva` in `buildInputs` ] ++ lib.optionals (!stdenv.isLinux || !guiSupport) [ "-Ddirectfb=disabled" - ] - ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ + "-Daja=disabled" "-Dchromaprint=disabled" "-Dflite=disabled" "-Dkms=disabled" # renders to libdrm output @@ -312,6 +318,7 @@ stdenv.mkDerivation rec { "-Dspandsp=disabled" "-Ddvb=disabled" "-Dfbdev=disabled" + "-Duvcgadget=disabled" # requires gudev "-Duvch264=disabled" # requires gudev "-Dv4l2codecs=disabled" # requires gudev "-Dladspa=disabled" # requires lrdf @@ -319,7 +326,7 @@ stdenv.mkDerivation rec { "-Dqsv=disabled" # Linux (and Windows) x86 only ] ++ lib.optionals (!gst-plugins-base.glEnabled) [ "-Dgl=disabled" - ] ++ lib.optionals (!gst-plugins-base.waylandEnabled) [ + ] ++ lib.optionals (!gst-plugins-base.waylandEnabled || !guiSupport) [ "-Dgtk3=disabled" # Wayland-based GTK sink "-Dwayland=disabled" ] ++ lib.optionals (!gst-plugins-base.glEnabled) [ diff --git a/pkgs/development/libraries/gstreamer/bad/fix-paths.patch b/pkgs/development/libraries/gstreamer/bad/fix-paths.patch index ea832cc9f60b1..207ed16aa0b08 100644 --- a/pkgs/development/libraries/gstreamer/bad/fix-paths.patch +++ b/pkgs/development/libraries/gstreamer/bad/fix-paths.patch @@ -1,24 +1,24 @@ -diff --git a/gst-libs/gst/cuda/gstcudaloader.c b/gst-libs/gst/cuda/gstcudaloader.c -index fffcbefd2b..6f738d3af3 100644 ---- a/gst-libs/gst/cuda/gstcudaloader.c -+++ b/gst-libs/gst/cuda/gstcudaloader.c -@@ -165,6 +165,11 @@ gst_cuda_load_library (void) - return TRUE; +diff --git a/gst-libs/gst/cuda/gstcudaloader.cpp b/gst-libs/gst/cuda/gstcudaloader.cpp +index 11718b8..d4144c1 100644 +--- a/gst-libs/gst/cuda/gstcudaloader.cpp ++++ b/gst-libs/gst/cuda/gstcudaloader.cpp +@@ -229,6 +229,11 @@ gst_cuda_load_library_once_func (void) + "CUDA plugin loader"); module = g_module_open (filename, G_MODULE_BIND_LAZY); + -+ if (module == NULL) { ++ if (module == nullptr) { + module = g_module_open ("@driverLink@/lib/" CUDA_LIBNAME, G_MODULE_BIND_LAZY); + } + - if (module == NULL) { + if (module == nullptr) { GST_WARNING ("Could not open library %s, %s", filename, g_module_error ()); - return FALSE; + return; diff --git a/sys/nvcodec/gstcuvidloader.c b/sys/nvcodec/gstcuvidloader.c -index e957e062e0..004ec2dcd5 100644 +index c51a428..ea0e1b5 100644 --- a/sys/nvcodec/gstcuvidloader.c +++ b/sys/nvcodec/gstcuvidloader.c -@@ -85,6 +85,11 @@ gst_cuvid_load_library (guint api_major_ver, guint api_minor_ver) +@@ -87,6 +87,11 @@ gst_cuvid_load_library (guint api_major_ver, guint api_minor_ver) return TRUE; module = g_module_open (filename, G_MODULE_BIND_LAZY); @@ -31,10 +31,10 @@ index e957e062e0..004ec2dcd5 100644 GST_WARNING ("Could not open library %s, %s", filename, g_module_error ()); return FALSE; diff --git a/sys/nvcodec/gstnvenc.c b/sys/nvcodec/gstnvenc.c -index 106857a954..3bab9989f0 100644 +index c65c85a..57232bb 100644 --- a/sys/nvcodec/gstnvenc.c +++ b/sys/nvcodec/gstnvenc.c -@@ -907,6 +907,11 @@ gst_nvenc_load_library (guint * api_major_ver, guint * api_minor_ver) +@@ -919,6 +919,11 @@ gst_nvenc_load_library (guint * api_major_ver, guint * api_minor_ver) }; module = g_module_open (NVENC_LIBRARY_NAME, G_MODULE_BIND_LAZY); diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix index 066ffbc1308e0..72dbef5c6dee0 100644 --- a/pkgs/development/libraries/gstreamer/base/default.nix +++ b/pkgs/development/libraries/gstreamer/base/default.nix @@ -24,6 +24,7 @@ , libXext , libXi , libXv +, libdrm , enableWayland ? stdenv.isLinux , wayland , wayland-protocols @@ -45,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "gst-plugins-base"; - version = "1.22.9"; + version = "1.24.2"; outputs = [ "out" "dev" ]; @@ -53,7 +54,7 @@ stdenv.mkDerivation (finalAttrs: { inherit (finalAttrs) pname version; in fetchurl { url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; - hash = "sha256-+sPg3S2Ok3A4izS/jCG4nV9jvDz8Es1/3I/GwcugMzQ="; + hash = "sha256-KC8cyAZcm2Lragog+56DKPjlKW3yRYtyNtqnKcQa52k="; }; strictDeps = true; @@ -88,6 +89,7 @@ stdenv.mkDerivation (finalAttrs: { tremor pango ] ++ lib.optionals (!stdenv.isDarwin) [ + libdrm libGL libvisual ] ++ lib.optionals stdenv.isDarwin [ @@ -106,6 +108,8 @@ stdenv.mkDerivation (finalAttrs: { propagatedBuildInputs = [ gstreamer + ] ++ lib.optionals (!stdenv.isDarwin) [ + libdrm ]; mesonFlags = [ @@ -122,6 +126,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional (!enableAlsa) "-Dalsa=disabled" ++ lib.optional (!enableCdparanoia) "-Dcdparanoia=disabled" ++ lib.optionals stdenv.isDarwin [ + "-Ddrm=disabled" "-Dlibvisual=disabled" ]; diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix index be56527ec47bd..eb9231155b80a 100644 --- a/pkgs/development/libraries/gstreamer/core/default.nix +++ b/pkgs/development/libraries/gstreamer/core/default.nix @@ -17,6 +17,7 @@ , Cocoa , CoreServices , gobject-introspection +, rustc , testers # Checks meson.is_cross_build(), so even canExecute isn't enough. , enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc @@ -24,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "gstreamer"; - version = "1.22.9"; + version = "1.24.2"; outputs = [ "bin" @@ -36,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: { inherit (finalAttrs) pname version; in fetchurl { url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; - hash = "sha256-HnEk00fozcgPCOwdNwwgG+UTACrxECuyDoPFJ5y0jr0="; + hash = "sha256-nK/dI70YDxaBxWzTpoeahJfM8k2m9CKmtvNW+gdKhIE="; }; depsBuildBuild = [ @@ -56,6 +57,7 @@ stdenv.mkDerivation (finalAttrs: { glib bash-completion gobject-introspection + rustc ] ++ lib.optionals stdenv.isLinux [ libcap # for setcap binary ] ++ lib.optionals enableDocumentation [ @@ -94,7 +96,8 @@ stdenv.mkDerivation (finalAttrs: { gst/parse/gen_grammar.py.in \ gst/parse/gen_lex.py.in \ libs/gst/helpers/ptp_helper_post_install.sh \ - scripts/extract-release-date-from-doap-file.py + scripts/extract-release-date-from-doap-file.py \ + docs/gst-plugins-doc-cache-generator.py ''; postInstall = '' diff --git a/pkgs/development/libraries/gstreamer/devtools/default.nix b/pkgs/development/libraries/gstreamer/devtools/default.nix index 343f161cc3d48..5b1d4c8618cea 100644 --- a/pkgs/development/libraries/gstreamer/devtools/default.nix +++ b/pkgs/development/libraries/gstreamer/devtools/default.nix @@ -17,11 +17,11 @@ stdenv.mkDerivation rec { pname = "gst-devtools"; - version = "1.22.9"; + version = "1.24.2"; src = fetchurl { url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; - hash = "sha256-AuKUALROnMYDqmRE3uVya1ftq+9kVebQkh/+1vE4QO4="; + hash = "sha256-/dfDDBqhuweADdmKUeVSEQZWGYNeSIn1yS/oI7hs2PQ="; }; outputs = [ diff --git a/pkgs/development/libraries/gstreamer/ges/default.nix b/pkgs/development/libraries/gstreamer/ges/default.nix index adb737bb1be71..0838dec0fdb06 100644 --- a/pkgs/development/libraries/gstreamer/ges/default.nix +++ b/pkgs/development/libraries/gstreamer/ges/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { pname = "gst-editing-services"; - version = "1.22.9"; + version = "1.24.2"; outputs = [ "out" @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; - hash = "sha256-NVOtOALczeDA7xRhiBrNm1W934rfdR3ky1G3+MtQRA0="; + hash = "sha256-cgF3jqXZN0QMU9dDndEqpaxoQGiK8fBJmFInUHS5kHM="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix index 19b786a86063c..1cf3fef79f08a 100644 --- a/pkgs/development/libraries/gstreamer/good/default.nix +++ b/pkgs/development/libraries/gstreamer/good/default.nix @@ -16,7 +16,9 @@ , libavc1394 , libiec61883 , libvpx +, libdrm , speex +, opencore-amr , flac , taglib , libshout @@ -56,13 +58,13 @@ assert raspiCameraSupport -> (stdenv.isLinux && stdenv.isAarch32); stdenv.mkDerivation rec { pname = "gst-plugins-good"; - version = "1.22.9"; + version = "1.24.2"; outputs = [ "out" "dev" ]; src = fetchurl { url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; - hash = "sha256-JpWfz+v/9jfU6gjvQDFrrzG2G7dymCCwaE6ADDoUeLY="; + hash = "sha256-bjR8ctS4sohtiQ/+n2dnqe2wLyAViOjDpXLc0I2YUr0="; }; patches = [ @@ -106,6 +108,7 @@ stdenv.mkDerivation rec { libdv libvpx speex + opencore-amr flac taglib cairo @@ -128,6 +131,8 @@ stdenv.mkDerivation rec { xorg.libXext xorg.libXfixes xorg.libXdamage + xorg.libXtst + xorg.libXi ] ++ lib.optionals gtkSupport [ # for gtksink gtk3 @@ -143,6 +148,7 @@ stdenv.mkDerivation rec { ]) ++ lib.optionals stdenv.isDarwin [ Cocoa ] ++ lib.optionals stdenv.isLinux [ + libdrm libGL libv4l libpulseaudio diff --git a/pkgs/development/libraries/gstreamer/libav/default.nix b/pkgs/development/libraries/gstreamer/libav/default.nix index ae54995a1c3e2..35d0b461d9bc9 100644 --- a/pkgs/development/libraries/gstreamer/libav/default.nix +++ b/pkgs/development/libraries/gstreamer/libav/default.nix @@ -18,11 +18,11 @@ stdenv.mkDerivation rec { pname = "gst-libav"; - version = "1.22.9"; + version = "1.24.2"; src = fetchurl { url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; - hash = "sha256-GS99J9IcHnxywzmiZHqbDCR/7cYupQKRFfjD4i67h9g="; + hash = "sha256-lig4ZI4Uzop4Miqxb4TH2E2Gpte+u2V0rAXeqEp8fJs="; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix index b49da94955e3a..cb848efca39f9 100644 --- a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix +++ b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix @@ -15,11 +15,11 @@ stdenv.mkDerivation rec { pname = "gst-rtsp-server"; - version = "1.22.9"; + version = "1.24.2"; src = fetchurl { url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; - hash = "sha256-gIrxSPiUBP90hQ+MpScr7Uv+Z/liAjHcRRT9B+sm0KQ="; + hash = "sha256-5MhKeGdefv7zsm6cueLkJzGEIbStnuS1E2767rtrugw="; }; outputs = [ diff --git a/pkgs/development/libraries/gstreamer/ugly/default.nix b/pkgs/development/libraries/gstreamer/ugly/default.nix index d64fcae68965b..40b6e169c225a 100644 --- a/pkgs/development/libraries/gstreamer/ugly/default.nix +++ b/pkgs/development/libraries/gstreamer/ugly/default.nix @@ -15,7 +15,6 @@ , x264 , libintl , lib -, opencore-amr , IOKit , CoreFoundation , DiskArbitration @@ -26,13 +25,13 @@ stdenv.mkDerivation rec { pname = "gst-plugins-ugly"; - version = "1.22.9"; + version = "1.24.2"; outputs = [ "out" "dev" ]; src = fetchurl { url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; - hash = "sha256-C/aF1mAVoB3T/BZxtkocissyHdnUq54Fopqxl4KqYjY="; + hash = "sha256-RdqYvxBAyUcv1Z9icSgt4lo3IauFt4qq+BBJSVUPvvU="; }; nativeBuildInputs = [ @@ -49,7 +48,6 @@ stdenv.mkDerivation rec { gst-plugins-base orc libintl - opencore-amr ] ++ lib.optionals enableGplPlugins [ a52dec libcdio diff --git a/pkgs/development/libraries/gstreamer/vaapi/default.nix b/pkgs/development/libraries/gstreamer/vaapi/default.nix index 1a63588397075..a5cd9cace4e74 100644 --- a/pkgs/development/libraries/gstreamer/vaapi/default.nix +++ b/pkgs/development/libraries/gstreamer/vaapi/default.nix @@ -24,11 +24,11 @@ stdenv.mkDerivation rec { pname = "gstreamer-vaapi"; - version = "1.22.9"; + version = "1.24.2"; src = fetchurl { url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; - hash = "sha256-i6INqMTL9bKVPbqQRnLEJ10AU+FSj5f9+OWZQseIPKg="; + hash = "sha256-zFq4yIRD4PW/I9YRC0qsM99Z5K5ib1NtlosWBcx7li8="; }; outputs = [ diff --git a/pkgs/development/libraries/gstreamer/viperfx/default.nix b/pkgs/development/libraries/gstreamer/viperfx/default.nix index 83c7d75e98c1a..0f8e8914e2e9c 100644 --- a/pkgs/development/libraries/gstreamer/viperfx/default.nix +++ b/pkgs/development/libraries/gstreamer/viperfx/default.nix @@ -2,7 +2,7 @@ , stdenv , fetchFromGitHub , pkg-config -, wrapGAppsHook +, wrapGAppsHook3 , gst_all_1 , cmake }: @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-0so4jV56nl3tZHuZpvtyMrpOZ4tNJ59Pyj6zbV5bJ5Y="; }; - nativeBuildInputs = [ cmake pkg-config wrapGAppsHook ]; + nativeBuildInputs = [ cmake pkg-config wrapGAppsHook3 ]; propagatedBuildInputs = [ gst_all_1.gstreamer diff --git a/pkgs/development/libraries/gtk-frdp/default.nix b/pkgs/development/libraries/gtk-frdp/default.nix index 72cefea7e59a6..3819c2043a1da 100644 --- a/pkgs/development/libraries/gtk-frdp/default.nix +++ b/pkgs/development/libraries/gtk-frdp/default.nix @@ -8,21 +8,21 @@ , gobject-introspection , glib , gtk3 -, freerdp +, freerdp3 , fuse3 , unstableGitUpdater }: stdenv.mkDerivation rec { pname = "gtk-frdp"; - version = "unstable-2023-09-16"; + version = "unstable-2024-03-01"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "GNOME"; repo = pname; - rev = "62fc62c5ccb7634f0bc87c57a4673877c24c94ed"; - sha256 = "H+ebFWjpmp4Ua22Bd6K3LsxNHqEbtpawnzA5ry8+XFc="; + rev = "11e9fcbee8ca5ec70456dd5b616b2560d7f73adc"; + sha256 = "2e/bAZFRTbBU4ZfgMFHiN9JwVm4qXSRtirPvbC3oT5s="; }; nativeBuildInputs = [ @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { buildInputs = [ glib gtk3 - freerdp + freerdp3 fuse3 ]; diff --git a/pkgs/development/libraries/gtk/4.x.nix b/pkgs/development/libraries/gtk/4.x.nix index 036d1ab0d49d0..341827b248e0d 100644 --- a/pkgs/development/libraries/gtk/4.x.nix +++ b/pkgs/development/libraries/gtk/4.x.nix @@ -39,10 +39,11 @@ , waylandSupport ? stdenv.isLinux , libGL # experimental and can cause crashes in inspector -, vulkanSupport ? false +, vulkanSupport ? stdenv.isLinux , shaderc , vulkan-loader , vulkan-headers +, libdrm , wayland , wayland-protocols , wayland-scanner @@ -69,7 +70,7 @@ in stdenv.mkDerivation (finalAttrs: { pname = "gtk4"; - version = "4.12.5"; + version = "4.14.3"; outputs = [ "out" "dev" ] ++ lib.optionals x11Support [ "devdoc" ]; outputBin = "dev"; @@ -81,7 +82,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = with finalAttrs; "mirror://gnome/sources/gtk/${lib.versions.majorMinor version}/gtk-${version}.tar.xz"; - sha256 = "KLNW1ZDuaO9ibi75ggst0hRBSEqaBCpaPwxA6d/E9Pg="; + hash = "sha256-K+XIWL3vEQTTeEjJd5wIk3LI0xUD9u/EuU5TtUb8mkM="; }; depsBuildBuild = [ @@ -116,6 +117,7 @@ stdenv.mkDerivation (finalAttrs: { isocodes ] ++ lib.optionals vulkanSupport [ vulkan-headers + libdrm ] ++ [ gst_all_1.gst-plugins-base gst_all_1.gst-plugins-bad @@ -161,7 +163,7 @@ stdenv.mkDerivation (finalAttrs: { vulkan-loader ] ++ [ # Required for GSettings schemas at runtime. - # Will be picked up by wrapGAppsHook. + # Will be picked up by wrapGAppsHook4. gsettings-desktop-schemas ]; @@ -199,7 +201,7 @@ stdenv.mkDerivation (finalAttrs: { --replace 'if not meson.is_cross_build()' 'if ${lib.boolToString compileSchemas}' files=( - build-aux/meson/gen-demo-header.py + build-aux/meson/gen-profile-conf.py build-aux/meson/gen-visibility-macros.py demos/gtk-demo/geninclude.py gdk/broadway/gen-c-array.py diff --git a/pkgs/development/libraries/gtkmm/4.x.nix b/pkgs/development/libraries/gtkmm/4.x.nix index 21bfdd858c294..36ff98d9f1654 100644 --- a/pkgs/development/libraries/gtkmm/4.x.nix +++ b/pkgs/development/libraries/gtkmm/4.x.nix @@ -18,13 +18,13 @@ stdenv.mkDerivation rec { pname = "gtkmm"; - version = "4.12.0"; + version = "4.14.0"; outputs = [ "out" "dev" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "+8PnYYEjNFwBSO9xq7ZUjUIfUrsiT72jSHW2d9wDLJI="; + hash = "sha256-k1CgREt0TKPcaVhuvRtnB1IJIrbZ9PIyEDzmA6Jx7No="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/gtksourceview/5.x.nix b/pkgs/development/libraries/gtksourceview/5.x.nix index c54017312e1ed..93f5bb519495d 100644 --- a/pkgs/development/libraries/gtksourceview/5.x.nix +++ b/pkgs/development/libraries/gtksourceview/5.x.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "gtksourceview"; - version = "5.10.0"; + version = "5.12.0"; outputs = [ "out" "dev" "devdoc" ]; @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { inherit (finalAttrs) pname version; in fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "s4owEMNPWeE7BRdenSDKAqMRBEP+wrHldHQTgBvJwj8="; + hash = "sha256-2vMv9dMVDWOFkX01A6hbngR7oViysDB5MUycAIE/oB8="; }; patches = [ @@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: { ]; mesonFlags = [ - "-Dgtk_doc=true" + "-Ddocumentation=true" ]; doCheck = stdenv.isLinux; diff --git a/pkgs/development/libraries/gvfs/default.nix b/pkgs/development/libraries/gvfs/default.nix index 20278435cedfa..aba944becf763 100644 --- a/pkgs/development/libraries/gvfs/default.nix +++ b/pkgs/development/libraries/gvfs/default.nix @@ -29,10 +29,10 @@ , libmtp , gnomeSupport ? false , gnome -, gcr +, gcr_4 , glib-networking , gnome-online-accounts -, wrapGAppsHook +, wrapGAppsHook3 , libimobiledevice , libbluray , libcdio-paranoia @@ -40,17 +40,19 @@ , openssh , libsecret , libgdata +, libmsgraph , python3 +, python3Packages , gsettings-desktop-schemas }: stdenv.mkDerivation rec { pname = "gvfs"; - version = "1.52.2"; + version = "1.54.0"; src = fetchurl { url = "mirror://gnome/sources/gvfs/${lib.versions.majorMinor version}/gvfs-${version}.tar.xz"; - hash = "sha256-pkOs6qBTyqwNjv+aAV9jbkvRuwnP4nhk40fbZ0YOe5E="; + hash = "sha256-9T2B34bC6GzdJRgsLYpmmiI3HoNiPe0bnVQW3Pxt42Y="; }; patches = [ @@ -70,7 +72,7 @@ stdenv.mkDerivation rec { python3 pkg-config gettext - wrapGAppsHook + wrapGAppsHook3 libxslt docbook_xsl docbook_xml_dtd_42 @@ -100,11 +102,12 @@ stdenv.mkDerivation rec { polkit libcdio-paranoia ] ++ lib.optionals gnomeSupport [ - gcr + gcr_4 glib-networking # TLS support gnome-online-accounts libsecret libgdata + libmsgraph ]; mesonFlags = [ @@ -126,6 +129,7 @@ stdenv.mkDerivation rec { "-Dgoa=false" "-Dkeyring=false" "-Dgoogle=false" + "-Donedrive=false" ] ++ lib.optionals (avahi == null) [ "-Ddnssd=false" ] ++ lib.optionals (samba == null) [ diff --git a/pkgs/development/libraries/icu/make-icu.nix b/pkgs/development/libraries/icu/make-icu.nix index 836a7e3c73a69..b130c346dbaa3 100644 --- a/pkgs/development/libraries/icu/make-icu.nix +++ b/pkgs/development/libraries/icu/make-icu.nix @@ -75,6 +75,8 @@ let { from = "\${pkglibdir}/pkgdata.inc"; to = "${placeholder "dev"}/lib/icu/pkgdata.inc"; } # --incpkgdatafile ]; in '' + rm $out/share/icu/${version}/install-sh $out/share/icu/${version}/mkinstalldirs # Avoid having a runtime dependency on bash + substituteInPlace "$dev/bin/icu-config" \ ${lib.concatMapStringsSep " " (r: "--replace '${r.from}' '${r.to}'") replacements} ''); diff --git a/pkgs/development/libraries/kde-frameworks/kded.nix b/pkgs/development/libraries/kde-frameworks/kded.nix index 02364ba72f367..e369b8fbae41f 100644 --- a/pkgs/development/libraries/kde-frameworks/kded.nix +++ b/pkgs/development/libraries/kde-frameworks/kded.nix @@ -1,5 +1,5 @@ { - mkDerivation, lib, propagate, wrapGAppsHook, + mkDerivation, lib, propagate, wrapGAppsHook3, extra-cmake-modules, kdoctools, gsettings-desktop-schemas, kconfig, kcoreaddons, kcrash, kdbusaddons, kservice, qtbase, @@ -7,7 +7,7 @@ mkDerivation { pname = "kded"; - nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ]; + nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook3 ]; buildInputs = [ gsettings-desktop-schemas kconfig kcoreaddons kcrash kdbusaddons kservice qtbase diff --git a/pkgs/development/libraries/libadwaita/default.nix b/pkgs/development/libraries/libadwaita/default.nix index bb520e7c2274f..1301f9fe923d9 100644 --- a/pkgs/development/libraries/libadwaita/default.nix +++ b/pkgs/development/libraries/libadwaita/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "libadwaita"; - version = "1.4.4"; + version = "1.5.0"; outputs = [ "out" "dev" "devdoc" ]; outputBin = "devdoc"; # demo app @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "GNOME"; repo = "libadwaita"; rev = finalAttrs.version; - hash = "sha256-AZP5OH/LIroBeKioe7AIVx0FvFdTpWJ1INdRPZcjmHQ="; + hash = "sha256-uEaBI2jHlMdVprMGRZe/8HszO3nEBUJaJtvJjrMOjE4="; }; depsBuildBuild = [ diff --git a/pkgs/development/libraries/libajantv2/default.nix b/pkgs/development/libraries/libajantv2/default.nix index 89d609b327abe..278752b18738d 100644 --- a/pkgs/development/libraries/libajantv2/default.nix +++ b/pkgs/development/libraries/libajantv2/default.nix @@ -28,6 +28,21 @@ stdenv.mkDerivation rec { pkg-config ]; + postInstall = '' + mkdir -p "$out/lib/pkgconfig" + cat >"$out/lib/pkgconfig/libajantv2.pc" <<EOF + prefix=$out + libdir=\''${prefix}/lib + includedir=\''${prefix}/include/ajalibraries + + Name: libajantv2 + Description: Library for controlling AJA NTV2 video devices + Version: ${version} + Libs: -L\''${libdir} -lajantv2 + Cflags: -I\''${includedir} -I\''${includedir}/ajantv2/includes + EOF + ''; + meta = with lib; { description = "AJA NTV2 Open Source Static Libs and Headers for building applications that only wish to statically link against"; homepage = "https://github.com/aja-video/ntv2"; diff --git a/pkgs/development/libraries/libarchive/default.nix b/pkgs/development/libraries/libarchive/default.nix index ac8ebcb3eb1cb..11a065654c9cf 100644 --- a/pkgs/development/libraries/libarchive/default.nix +++ b/pkgs/development/libraries/libarchive/default.nix @@ -1,12 +1,12 @@ { lib , stdenv , fetchFromGitHub -, fetchpatch , acl , attr , autoreconfHook , bzip2 , e2fsprogs +, glibcLocalesUtf8 , lzo , openssl , pkg-config @@ -28,29 +28,15 @@ assert xarSupport -> libxml2 != null; stdenv.mkDerivation (finalAttrs: { pname = "libarchive"; - version = "3.7.2"; + version = "3.7.3"; src = fetchFromGitHub { owner = "libarchive"; repo = "libarchive"; rev = "v${finalAttrs.version}"; - hash = "sha256-p2JgJ/rvqaQ6yyXSh+ehScUH565ud5bQncl+lOnsWfc="; + hash = "sha256-bfuEhw8l/flGyHNRguVcygyTYCLdnv5PAo7QGb2LybQ="; }; - patches = [ - # Pull fix for test failure on 32-bit systems: - (fetchpatch { - name = "32-bit-tests-fix.patch"; - url = "https://github.com/libarchive/libarchive/commit/3bd918d92f8c34ba12de9c6604d96f9e262a59fc.patch"; - hash = "sha256-RM3xFM6S2DkM5DJ0kAba8eLzEXuY5/7AaU06maHJ6rM="; - }) - (fetchpatch { - name = "fix-suspicious-commit-from-known-bad-actor.patch"; - url = "https://github.com/libarchive/libarchive/commit/6110e9c82d8ba830c3440f36b990483ceaaea52c.patch"; - hash = "sha256-/j6rJ0xWhtXU0YCu1LOokxxNppy5Of6Q0XyO4U6la7M="; - }) - ]; - outputs = [ "out" "lib" "dev" ]; postPatch = let @@ -70,17 +56,18 @@ stdenv.mkDerivation (finalAttrs: { "cpio/test/test_format_newc.c" ]; removeTest = testPath: '' - substituteInPlace Makefile.am --replace "${testPath}" "" + substituteInPlace Makefile.am --replace-fail "${testPath}" "" rm "${testPath}" ''; in '' - substituteInPlace Makefile.am --replace '/bin/pwd' "$(type -P pwd)" + substituteInPlace Makefile.am --replace-fail '/bin/pwd' "$(type -P pwd)" ${lib.concatStringsSep "\n" (map removeTest skipTestPaths)} ''; nativeBuildInputs = [ autoreconfHook + glibcLocalesUtf8 # test_I test requires an UTF-8 locale pkg-config ]; @@ -107,6 +94,11 @@ stdenv.mkDerivation (finalAttrs: { # https://github.com/libarchive/libarchive/issues/1475 doCheck = !stdenv.hostPlatform.isMusl; + preCheck = '' + # Need an UTF-8 locale for test_I test. + export LANG=en_US.UTF-8 + ''; + preFixup = '' sed -i $lib/lib/libarchive.la \ -e 's|-lcrypto|-L${lib.getLib openssl}/lib -lcrypto|' \ diff --git a/pkgs/development/libraries/libcloudproviders/default.nix b/pkgs/development/libraries/libcloudproviders/default.nix index 6161ea78174d4..8b6722d9cde7d 100644 --- a/pkgs/development/libraries/libcloudproviders/default.nix +++ b/pkgs/development/libraries/libcloudproviders/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/libcloudproviders/${lib.versions.majorMinor version}/libcloudproviders-${version}.tar.xz"; - sha256 = "O3URCzpP3vTFxaRA5IcB/gVNKuBh0VbIkTa7W6BedLc="; + hash = "sha256-O3URCzpP3vTFxaRA5IcB/gVNKuBh0VbIkTa7W6BedLc="; }; outputs = [ "out" "dev" "devdoc" ]; diff --git a/pkgs/development/libraries/libdex/default.nix b/pkgs/development/libraries/libdex/default.nix index 2837086934217..a81cc2669529f 100644 --- a/pkgs/development/libraries/libdex/default.nix +++ b/pkgs/development/libraries/libdex/default.nix @@ -1,6 +1,6 @@ { stdenv , lib -, fetchFromGitLab +, fetchurl , gi-docgen , gobject-introspection , meson @@ -14,16 +14,13 @@ stdenv.mkDerivation rec { pname = "libdex"; - version = "0.4.3"; + version = "0.6.0"; outputs = [ "out" "dev" "devdoc" ]; - src = fetchFromGitLab { - domain = "gitlab.gnome.org"; - owner = "GNOME"; - repo = "libdex"; - rev = version; - sha256 = "0GNlgJgAOE3JGwu/6Zsh4sjFapA7nUcGD3lgZZJ0BfQ="; + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + hash = "sha256-HojSsAYo5Ya3I7f7pRXM6XUvrxISLN5aPA1biDmYUio="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/libgnomekbd/default.nix b/pkgs/development/libraries/libgnomekbd/default.nix index fc9924b508342..a5c278956f2d7 100644 --- a/pkgs/development/libraries/libgnomekbd/default.nix +++ b/pkgs/development/libraries/libgnomekbd/default.nix @@ -8,7 +8,7 @@ , glib , gtk3 , libxklavier -, wrapGAppsHook +, wrapGAppsHook3 , gnome }: @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { meson ninja pkg-config - wrapGAppsHook + wrapGAppsHook3 glib gobject-introspection ]; diff --git a/pkgs/development/libraries/libgweather/default.nix b/pkgs/development/libraries/libgweather/default.nix index 58fb14167bd39..971b234364704 100644 --- a/pkgs/development/libraries/libgweather/default.nix +++ b/pkgs/development/libraries/libgweather/default.nix @@ -21,13 +21,13 @@ stdenv.mkDerivation rec { pname = "libgweather"; - version = "4.4.0"; + version = "4.4.2"; outputs = [ "out" "dev" ] ++ lib.optional withIntrospection "devdoc"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "Nm6Gb/KnCLiUz+qUdbjo/1TLPitHfqcqit4Nq+5fSKQ="; + hash = "sha256-puQntHcK2kiUXzqpBq9xD8gzz/DULfkfGCgwJ0DXlOw="; }; patches = [ diff --git a/pkgs/development/libraries/libhandy/default.nix b/pkgs/development/libraries/libhandy/default.nix index 19dcb4248f9b5..a43ee0986be81 100644 --- a/pkgs/development/libraries/libhandy/default.nix +++ b/pkgs/development/libraries/libhandy/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-BbSXIpBz/1V/ELMm4HTFBm+HQ6MC1IIKuXvLXNLasIc="; + hash = "sha256-BbSXIpBz/1V/ELMm4HTFBm+HQ6MC1IIKuXvLXNLasIc="; }; depsBuildBuild = [ diff --git a/pkgs/development/libraries/libical/default.nix b/pkgs/development/libraries/libical/default.nix index 9cfe47fcb4d53..45ca2faf30b9f 100644 --- a/pkgs/development/libraries/libical/default.nix +++ b/pkgs/development/libraries/libical/default.nix @@ -81,6 +81,14 @@ stdenv.mkDerivation rec { ./respect-env-tzdir.patch ]; + postPatch = '' + # Fix typo in test env setup + # https://github.com/libical/libical/commit/03c02ced21494413920744a400c638b0cb5d493f + substituteInPlace src/test/libical-glib/CMakeLists.txt \ + --replace-fail "''${CMAKE_BINARY_DIR}/src/libical-glib;\$ENV{GI_TYPELIB_PATH}" "''${CMAKE_BINARY_DIR}/src/libical-glib:\$ENV{GI_TYPELIB_PATH}" \ + --replace-fail "''${LIBRARY_OUTPUT_PATH};\$ENV{LD_LIBRARY_PATH}" "''${LIBRARY_OUTPUT_PATH}:\$ENV{LD_LIBRARY_PATH}" + ''; + # Using install check so we do not have to manually set # LD_LIBRARY_PATH and GI_TYPELIB_PATH variables # Musl does not support TZDIR. diff --git a/pkgs/development/libraries/libjxl/default.nix b/pkgs/development/libraries/libjxl/default.nix index c91ae27f68054..ab9ff488b3518 100644 --- a/pkgs/development/libraries/libjxl/default.nix +++ b/pkgs/development/libraries/libjxl/default.nix @@ -27,7 +27,7 @@ in stdenv.mkDerivation rec { pname = "libjxl"; - version = "0.9.1"; + version = "0.10.2"; outputs = [ "out" "dev" ]; @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { owner = "libjxl"; repo = "libjxl"; rev = "v${version}"; - hash = "sha256-n5KNbbw6NQRROEM7Cojla/igRCFNawUq7nfhzJlMlPI="; + hash = "sha256-Ip/5fbzt6OfIrHJajnxEe14ppvX1hJ1FSJUBEE/h5YQ="; # There are various submodules in `third_party/`. fetchSubmodules = true; }; diff --git a/pkgs/development/libraries/liblc3/default.nix b/pkgs/development/libraries/liblc3/default.nix index bcefd8311fbf2..3e1be4ba272ec 100644 --- a/pkgs/development/libraries/liblc3/default.nix +++ b/pkgs/development/libraries/liblc3/default.nix @@ -7,7 +7,7 @@ let name = "liblc3"; - version = "1.1.0"; + version = "1.1.1"; in stdenv.mkDerivation { pname = name; @@ -17,7 +17,7 @@ stdenv.mkDerivation { owner = "google"; repo = "liblc3"; rev = "v${version}"; - sha256 = "sha256-pKd9wOrDjKhWX8vTsg6qkE71FQlsC7VM/uq0ss1vsAQ="; + sha256 = "sha256-h9qy04FqlHXp0bOUoP4+WqI0yrM78e56S+DEn3HztYo="; }; outputs = [ "out" "dev" ]; @@ -27,11 +27,14 @@ stdenv.mkDerivation { ninja ]; + # LTO does not work on Darwin: https://github.com/NixOS/nixpkgs/issues/19098 + mesonFlags = lib.optionals stdenv.isDarwin [ "-Db_lto=false" ]; + meta = with lib; { description = "LC3 (Low Complexity Communication Codec) is an efficient low latency audio codec"; homepage = "https://github.com/google/liblc3"; license = licenses.asl20; - platforms = platforms.linux; + platforms = platforms.unix; maintainers = with maintainers; [ jansol ]; }; } diff --git a/pkgs/development/libraries/libmodulemd/default.nix b/pkgs/development/libraries/libmodulemd/default.nix index ce16753cf5405..93e7eb9933fc8 100644 --- a/pkgs/development/libraries/libmodulemd/default.nix +++ b/pkgs/development/libraries/libmodulemd/default.nix @@ -1,6 +1,7 @@ -{ lib, stdenv -, substituteAll +{ stdenv +, lib , fetchFromGitHub +, fetchpatch2 , pkg-config , meson , ninja @@ -29,10 +30,15 @@ stdenv.mkDerivation rec { }; patches = [ - # Use proper glib devdoc path. - (substituteAll { - src = ./glib-devdoc.patch; - glib_devdoc = glib.devdoc; + # Adapt to GLib 2.79 documentation + # https://github.com/fedora-modularity/libmodulemd/pull/612 + (fetchpatch2 { + url = "https://github.com/fedora-modularity/libmodulemd/commit/9d2809090cc0cccd7bab67453dc00cf43a289082.patch"; + hash = "sha256-dMtc6GN6lIDjUReFUhEFJ/8wosASo3tLu4ve72BCXQ8="; + }) + (fetchpatch2 { + url = "https://github.com/fedora-modularity/libmodulemd/commit/29c339a31b1c753dcdef041e5c2e0e600e48b59d.patch"; + hash = "sha256-uniHrQdbcXlJk2hq106SgV/E330LfxDc07E4FbOMLr0="; }) ]; @@ -57,6 +63,12 @@ stdenv.mkDerivation rec { "-Dgobject_overrides_dir_py3=${placeholder "py"}/${python3.sitePackages}/gi/overrides" ]; + postPatch = '' + # Use proper glib devdoc path + substituteInPlace meson.build --replace-fail \ + "glib_docpath = join_paths(glib_prefix," "glib_docpath = join_paths('${lib.getOutput "devdoc" glib}'," + ''; + postFixup = '' # Python overrides depend our own typelibs and other packages mkdir -p "$py/nix-support" @@ -69,6 +81,6 @@ stdenv.mkDerivation rec { homepage = "https://github.com/fedora-modularity/libmodulemd"; license = licenses.mit; maintainers = with maintainers; [ ]; - platforms = platforms.linux ++ platforms.darwin ; + platforms = platforms.linux ++ platforms.darwin; }; } diff --git a/pkgs/development/libraries/libmodulemd/glib-devdoc.patch b/pkgs/development/libraries/libmodulemd/glib-devdoc.patch deleted file mode 100644 index cde42d8e0b2e8..0000000000000 --- a/pkgs/development/libraries/libmodulemd/glib-devdoc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/meson.build b/meson.build -index a8b02b4..dd31a76 100644 ---- a/meson.build -+++ b/meson.build -@@ -67,7 +67,7 @@ test = find_program('test') - with_docs = get_option('with_docs') - if with_docs - gtkdoc = dependency('gtk-doc') -- glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') -+ glib_docpath = join_paths('@glib_devdoc@', 'share', 'gtk-doc', 'html') - - ret = run_command ([test, '-e', join_paths(glib_docpath, 'glib/index.html')]) - if ret.returncode() != 0 diff --git a/pkgs/development/libraries/libopus/default.nix b/pkgs/development/libraries/libopus/default.nix index 3592c537ac441..d247b8b0efa6c 100644 --- a/pkgs/development/libraries/libopus/default.nix +++ b/pkgs/development/libraries/libopus/default.nix @@ -18,15 +18,14 @@ stdenv.mkDerivation (finalAttrs: { pname = "libopus"; - version = "1.5.1"; + version = "1.5.2"; src = fetchurl { url = "https://downloads.xiph.org/releases/opus/opus-${finalAttrs.version}.tar.gz"; - hash = "sha256-uEYQlZuNQXthGqEqIlZeCjcyCXxjidGQmNhEVD40D4U="; + hash = "sha256-ZcHS94ufL7IAgsOMvkfJUa1YOTRYduRpQWEu6H+afOE="; }; patches = [ - ./fix-pkg-config-paths.patch # Some tests time out easily on slower machines ./test-timeout.patch ]; diff --git a/pkgs/development/libraries/libopus/fix-pkg-config-paths.patch b/pkgs/development/libraries/libopus/fix-pkg-config-paths.patch deleted file mode 100644 index d54b7f5558c9f..0000000000000 --- a/pkgs/development/libraries/libopus/fix-pkg-config-paths.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- i/meson.build -+++ w/meson.build -@@ -591,8 +591,8 @@ pkgconf = configuration_data() - - pkgconf.set('prefix', join_paths(get_option('prefix'))) - pkgconf.set('exec_prefix', '${prefix}') --pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir'))) --pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir'))) -+pkgconf.set('libdir', '${prefix}' / get_option('libdir')) -+pkgconf.set('includedir', '${prefix}' / get_option('includedir')) - pkgconf.set('VERSION', opus_version) - pkgconf.set('PC_BUILD', pc_build) - pkgconf.set('LIBM', libm.found() ? '-lm' : '') diff --git a/pkgs/development/libraries/libpanel/default.nix b/pkgs/development/libraries/libpanel/default.nix index 05b863ad20114..55faa7e628603 100644 --- a/pkgs/development/libraries/libpanel/default.nix +++ b/pkgs/development/libraries/libpanel/default.nix @@ -15,14 +15,14 @@ stdenv.mkDerivation rec { pname = "libpanel"; - version = "1.4.1"; + version = "1.6.0"; outputs = [ "out" "dev" "devdoc" ]; outputBin = "dev"; src = fetchurl { url = "mirror://gnome/sources/libpanel/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "mEENAOc0hX7N8zuaIN17D7ONi20x1Dabr8HGc5Krud4="; + hash = "sha256-t3NJSjxpMANFzY4nAnRI0RiRgwJswTeAL4hkF8bqMLY="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/libpeas/2.x.nix b/pkgs/development/libraries/libpeas/2.x.nix index 61fe424e2c224..141114f0f34ce 100644 --- a/pkgs/development/libraries/libpeas/2.x.nix +++ b/pkgs/development/libraries/libpeas/2.x.nix @@ -17,13 +17,13 @@ stdenv.mkDerivation rec { pname = "libpeas"; - version = "2.0.1"; + version = "2.0.2"; outputs = [ "out" "dev" "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - hash = "sha256-ndwdUfOGY9pN9SFjBRt7LOo6JCz67p9afhQPB4TIqnc="; + hash = "sha256-8w3/7WPKL0BHe0DhccCjH4DZFCW6Hh5HMg7mQlSA7MM="; }; patches = [ diff --git a/pkgs/development/libraries/libpeas/default.nix b/pkgs/development/libraries/libpeas/default.nix index 922bfba9ad232..9a94b2aa93263 100644 --- a/pkgs/development/libraries/libpeas/default.nix +++ b/pkgs/development/libraries/libpeas/default.nix @@ -13,7 +13,7 @@ , gobject-introspection , python3 , ncurses -, wrapGAppsHook +, wrapGAppsHook3 }: stdenv.mkDerivation rec { @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { gettext gi-docgen gobject-introspection - wrapGAppsHook + wrapGAppsHook3 ]; buildInputs = [ diff --git a/pkgs/development/libraries/libsecret/default.nix b/pkgs/development/libraries/libsecret/default.nix index 040722ea406e8..10eee1a6bbb00 100644 --- a/pkgs/development/libraries/libsecret/default.nix +++ b/pkgs/development/libraries/libsecret/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchurl +, fetchpatch2 , glib , meson , ninja @@ -33,6 +34,14 @@ stdenv.mkDerivation rec { hash = "sha256-Fj0I14O+bUq5qXnOtaT+y8HZZg08NBaMWBMBzVORKyA="; }; + patches = [ + # https://gitlab.gnome.org/GNOME/libsecret/-/merge_requests/141 + (fetchpatch2 { + url = "https://gitlab.gnome.org/GNOME/libsecret/-/commit/208989323211c756dff690115e5cbde5ef7491ce.patch"; + hash = "sha256-DtRbqyyoMttEYf6B16m9O72Yjurv6rpbnqH7AlrAU4k="; + }) + ]; + depsBuildBuild = [ pkg-config ]; diff --git a/pkgs/development/libraries/libshumate/default.nix b/pkgs/development/libraries/libshumate/default.nix index 6306fd2a55487..cc6723162a085 100644 --- a/pkgs/development/libraries/libshumate/default.nix +++ b/pkgs/development/libraries/libshumate/default.nix @@ -1,37 +1,46 @@ { lib , stdenv -, fetchFromGitLab +, fetchurl +, fetchpatch2 , gi-docgen , meson , ninja , pkg-config , vala , gobject-introspection +, gperf , glib , cairo , sqlite , libsoup_3 , gtk4 , libsysprof-capture +, json-glib +, protobufc , xvfb-run , gnome }: stdenv.mkDerivation rec { pname = "libshumate"; - version = "1.1.3"; + version = "1.2.1"; outputs = [ "out" "dev" "devdoc" ]; outputBin = "devdoc"; # demo app - src = fetchFromGitLab { - domain = "gitlab.gnome.org"; - owner = "GNOME"; - repo = "libshumate"; - rev = version; - sha256 = "+h0dKLECtvfsxwD5aRTIgiNI9jG/tortUJYFiYMe60g="; + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + hash = "sha256-EQXuB34hR/KgOc3fphb6XLlDiIPdlAQn4RaZ3NZUnBE="; }; + patches = [ + (fetchpatch2 { + # Fix tests https://gitlab.gnome.org/GNOME/libshumate/-/merge_requests/236 + url = "https://gitlab.gnome.org/GNOME/libshumate/-/commit/852615b0df2252ea67f4f82e9ace2fc2794467b3.patch"; + hash = "sha256-Ksye3zNNYmzP4O+QFDVODXUkFJOLDVMEZNfGXwbxWhs="; + }) + ]; + depsBuildBuild = [ # required to find native gi-docgen when cross compiling pkg-config @@ -44,6 +53,7 @@ stdenv.mkDerivation rec { pkg-config vala gobject-introspection + gperf ]; buildInputs = [ @@ -53,6 +63,8 @@ stdenv.mkDerivation rec { libsoup_3 gtk4 libsysprof-capture + json-glib + protobufc ]; nativeCheckInputs = [ diff --git a/pkgs/development/libraries/libusb1/default.nix b/pkgs/development/libraries/libusb1/default.nix index 9103689546173..9114fe5ec47f5 100644 --- a/pkgs/development/libraries/libusb1/default.nix +++ b/pkgs/development/libraries/libusb1/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , fetchpatch , autoreconfHook +, doxygen , pkg-config , enableUdev ? stdenv.isLinux && !stdenv.hostPlatform.isStatic , udev @@ -11,6 +12,7 @@ , Security , withExamples ? false , withStatic ? false +, withDocs ? stdenv.buildPlatform.canExecute stdenv.hostPlatform }: stdenv.mkDerivation rec { @@ -24,9 +26,12 @@ stdenv.mkDerivation rec { sha256 = "sha256-OtzYxWwiba0jRK9X+4deWWDDTeZWlysEt0qMyGUarDo="; }; - outputs = [ "out" "dev" ]; + outputs = [ "out" "dev" ] ++ lib.optionals withDocs [ "doc" ]; - nativeBuildInputs = [ pkg-config autoreconfHook ]; + nativeBuildInputs = [ + pkg-config + autoreconfHook + ] ++ lib.optionals withDocs [ doxygen ]; propagatedBuildInputs = lib.optional enableUdev udev ++ lib.optionals stdenv.isDarwin [ libobjc IOKit Security ]; @@ -40,6 +45,12 @@ stdenv.mkDerivation rec { lib.optional (!enableUdev) "--disable-udev" ++ lib.optional (withExamples) "--enable-examples-build"; + postBuild = lib.optionalString withDocs '' + make -C doc + mkdir -p "$doc/share/doc/libusb" + cp -r doc/api-1.0/* "$doc/share/doc/libusb/" + ''; + preFixup = lib.optionalString enableUdev '' sed 's,-ludev,-L${lib.getLib udev}/lib -ludev,' -i $out/lib/libusb-1.0.la ''; diff --git a/pkgs/development/libraries/libwacom/default.nix b/pkgs/development/libraries/libwacom/default.nix index 8e9840325bb96..58c9b7c7f6669 100644 --- a/pkgs/development/libraries/libwacom/default.nix +++ b/pkgs/development/libraries/libwacom/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { pname = "libwacom"; - version = "2.10.0"; + version = "2.11.0"; outputs = [ "out" "dev" ]; @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { owner = "linuxwacom"; repo = "libwacom"; rev = "libwacom-${version}"; - hash = "sha256-mH0aBDXeaz0tZLwNPSWUepHu52DnlvPyQFw3EByIwys="; + hash = "sha256-TQOe954Zos3VpAG5M/O5je9dr8d4gOXIwy4xl3o+e1g="; }; postPatch = '' diff --git a/pkgs/development/libraries/libwebp/default.nix b/pkgs/development/libraries/libwebp/default.nix index 2605dabf125a0..2662d4e940081 100644 --- a/pkgs/development/libraries/libwebp/default.nix +++ b/pkgs/development/libraries/libwebp/default.nix @@ -27,13 +27,13 @@ stdenv.mkDerivation rec { pname = "libwebp"; - version = "1.3.2"; + version = "1.4.0"; src = fetchFromGitHub { owner = "webmproject"; repo = pname; rev = "v${version}"; - hash = "sha256-UYO2Fmm8nzQR8VBC26wEwWd3qZTD+6MHKcmKBoNcpEE="; + hash = "sha256-OR/VzKNn3mnwjf+G+RkEGAaaKrhVlAu1e2oTRwdsPj8="; }; configureFlags = [ @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; passthru.tests = { - inherit freeimage gd graphicsmagick imagemagick imlib2 libjxl opencv vips; + inherit gd graphicsmagick imagemagick imlib2 libjxl opencv vips; inherit (python3.pkgs) pillow imread; haskell-webp = haskellPackages.webp; }; diff --git a/pkgs/development/libraries/llhttp/default.nix b/pkgs/development/libraries/llhttp/default.nix index 8bd80151c0940..dfdd8200b5565 100644 --- a/pkgs/development/libraries/llhttp/default.nix +++ b/pkgs/development/libraries/llhttp/default.nix @@ -1,14 +1,14 @@ -{ lib, stdenv, fetchFromGitHub, cmake, testers }: +{ lib, stdenv, fetchFromGitHub, cmake, testers, python3 }: stdenv.mkDerivation (finalAttrs: { pname = "llhttp"; - version = "9.2.0"; + version = "9.2.1"; src = fetchFromGitHub { owner = "nodejs"; repo = "llhttp"; rev = "release/v${finalAttrs.version}"; - hash = "sha256-DX/CuTyvc2OfAVWvlJr6wVHwSuqWmqQt34vM1FEazwE="; + hash = "sha256-cnEp7Ds32bqu3jeUU/rqJOr/VW3KNmJU4pmNNaTpXRs="; }; outputs = [ "out" "dev" ]; @@ -21,8 +21,13 @@ stdenv.mkDerivation (finalAttrs: { "-DBUILD_STATIC_LIBS=ON" ]; - passthru.tests.pkg-config = testers.hasPkgConfigModules { - package = finalAttrs.finalPackage; + passthru.tests = { + inherit (python3.pkgs) aiohttp; + + pkg-config = testers.hasPkgConfigModules { + package = finalAttrs.finalPackage; + moduleNames = [ "libllhttp" ]; + }; }; meta = with lib; { @@ -30,7 +35,6 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://llhttp.org/"; changelog = "https://github.com/nodejs/llhttp/releases/tag/release/v${finalAttrs.version}"; license = licenses.mit; - pkgConfigModules = [ "libllhttp" ]; maintainers = [ ]; platforms = platforms.all; }; diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index a544e1b25466e..7568ec0de1580 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -1,80 +1,110 @@ -{ stdenv, lib, fetchurl, fetchpatch, fetchCrate, buildPackages -, meson, pkg-config, ninja -, intltool, bison, flex, file, python3Packages, wayland-scanner -, expat, libdrm, xorg, wayland, wayland-protocols, openssl -, llvmPackages, libffi, libomxil-bellagio, libva-minimal -, elfutils, libvdpau -, libglvnd, libunwind, lm_sensors -, vulkan-loader, glslang -, galliumDrivers ? - if stdenv.isLinux then - [ - "d3d12" # WSL emulated GPU (aka Dozen) - "kmsro" # special "render only" driver for GPUs without a display controller - "nouveau" # Nvidia - "radeonsi" # new AMD (GCN+) - "r300" # very old AMD - "r600" # less old AMD - "swrast" # software renderer (aka LLVMPipe) - "svga" # VMWare virtualized GPU - "virgl" # QEMU virtualized GPU (aka VirGL) - "zink" # generic OpenGL over Vulkan, experimental - ] ++ lib.optionals (stdenv.isAarch64 || stdenv.isAarch32) [ - "etnaviv" # Vivante GPU designs (mostly NXP/Marvell SoCs) - "freedreno" # Qualcomm Adreno (all Qualcomm SoCs) - "lima" # ARM Mali 4xx - "panfrost" # ARM Mali Midgard and up (T/G series) - "vc4" # Broadcom VC4 (Raspberry Pi 0-3) - ] ++ lib.optionals stdenv.isAarch64 [ - "tegra" # Nvidia Tegra SoCs - "v3d" # Broadcom VC5 (Raspberry Pi 4) - ] ++ lib.optionals stdenv.hostPlatform.isx86 [ - "iris" # new Intel, could work on non-x86 with PCIe cards, but doesn't build as of 22.3.4 - "crocus" # Intel legacy, x86 only - "i915" # Intel extra legacy, x86 only - ] - else [ "auto" ] -, vulkanDrivers ? - if stdenv.isLinux then - [ - "amd" # AMD (aka RADV) - "microsoft-experimental" # WSL virtualized GPU (aka DZN/Dozen) - "nouveau-experimental" # Nouveau (aka NVK) - "swrast" # software renderer (aka Lavapipe) - ] - ++ lib.optionals (stdenv.hostPlatform.isAarch -> lib.versionAtLeast stdenv.hostPlatform.parsed.cpu.version "6") [ - # QEMU virtualized GPU (aka VirGL) - # Requires ATOMIC_INT_LOCK_FREE == 2. - "virtio" - ] - ++ lib.optionals stdenv.isAarch64 [ - "broadcom" # Broadcom VC5 (Raspberry Pi 4, aka V3D) - "freedreno" # Qualcomm Adreno (all Qualcomm SoCs) - "imagination-experimental" # PowerVR Rogue (currently N/A) - "panfrost" # ARM Mali Midgard and up (T/G series) - ] - ++ lib.optionals stdenv.hostPlatform.isx86 [ - "intel" # Intel (aka ANV), could work on non-x86 with PCIe cards, but doesn't build - "intel_hasvk" # Intel Haswell/Broadwell, "legacy" Vulkan driver (https://www.phoronix.com/news/Intel-HasVK-Drop-Dead-Code) - ] - else [ "auto" ] -, eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" ] -, vulkanLayers ? lib.optionals (!stdenv.isDarwin) [ "device-select" "overlay" "intel-nullhw" ] # No Vulkan support on Darwin -, OpenGL, Xplugin -, withValgrind ? lib.meta.availableOn stdenv.hostPlatform valgrind-light && !valgrind-light.meta.broken, valgrind-light -, withLibunwind ? lib.meta.availableOn stdenv.hostPlatform libunwind -, enableGalliumNine ? stdenv.isLinux -, enableOSMesa ? stdenv.isLinux -, enableOpenCL ? stdenv.isLinux && stdenv.isx86_64 -, enablePatentEncumberedCodecs ? true +{ lib +, OpenGL +, Xplugin +, bison +, buildPackages +, directx-headers +, elfutils +, expat +, fetchCrate +, fetchpatch +, fetchurl +, file +, flex +, glslang +, intltool , jdupes -, rustPlatform +, libdrm +, libffi +, libglvnd +, libomxil-bellagio +, libunwind +, libva-minimal +, libvdpau +, llvmPackages +, lm_sensors +, meson +, ninja +, openssl +, pkg-config +, python3Packages , rust-bindgen +, rustPlatform , rustc , spirv-llvm-translator -, zstd -, directx-headers +, stdenv , udev +, valgrind-light +, vulkan-loader +, wayland +, wayland-protocols +, wayland-scanner +, xorg +, zstd +, withValgrind ? + lib.meta.availableOn stdenv.hostPlatform valgrind-light + && !valgrind-light.meta.broken +, withLibunwind ? lib.meta.availableOn stdenv.hostPlatform libunwind +, enableGalliumNine ? stdenv.isLinux +, enableOSMesa ? stdenv.isLinux +, enableOpenCL ? stdenv.isLinux && stdenv.isx86_64 +, enablePatentEncumberedCodecs ? true + +, galliumDrivers ? + if stdenv.isLinux + then [ + "d3d12" # WSL emulated GPU (aka Dozen) + "kmsro" # special "render only" driver for GPUs without a display controller + "nouveau" # Nvidia + "radeonsi" # new AMD (GCN+) + "r300" # very old AMD + "r600" # less old AMD + "swrast" # software renderer (aka LLVMPipe) + "svga" # VMWare virtualized GPU + "virgl" # QEMU virtualized GPU (aka VirGL) + "zink" # generic OpenGL over Vulkan, experimental + ] ++ lib.optionals (stdenv.isAarch64 || stdenv.isAarch32) [ + "etnaviv" # Vivante GPU designs (mostly NXP/Marvell SoCs) + "freedreno" # Qualcomm Adreno (all Qualcomm SoCs) + "lima" # ARM Mali 4xx + "panfrost" # ARM Mali Midgard and up (T/G series) + "vc4" # Broadcom VC4 (Raspberry Pi 0-3) + ] ++ lib.optionals stdenv.isAarch64 [ + "tegra" # Nvidia Tegra SoCs + "v3d" # Broadcom VC5 (Raspberry Pi 4) + ] ++ lib.optionals stdenv.hostPlatform.isx86 [ + "iris" # new Intel, could work on non-x86 with PCIe cards, but doesn't build as of 22.3.4 + "crocus" # Intel legacy, x86 only + "i915" # Intel extra legacy, x86 only + ] + else [ "auto" ] +, vulkanDrivers ? + if stdenv.isLinux + then [ + "amd" # AMD (aka RADV) + "microsoft-experimental" # WSL virtualized GPU (aka DZN/Dozen) + "nouveau-experimental" # Nouveau (aka NVK) + "swrast" # software renderer (aka Lavapipe) + ] ++ lib.optionals (stdenv.hostPlatform.isAarch -> lib.versionAtLeast stdenv.hostPlatform.parsed.cpu.version "6") [ + # QEMU virtualized GPU (aka VirGL) + # Requires ATOMIC_INT_LOCK_FREE == 2. + "virtio" + ] ++ lib.optionals stdenv.isAarch64 [ + "broadcom" # Broadcom VC5 (Raspberry Pi 4, aka V3D) + "freedreno" # Qualcomm Adreno (all Qualcomm SoCs) + "imagination-experimental" # PowerVR Rogue (currently N/A) + "panfrost" # ARM Mali Midgard and up (T/G series) + ] ++ lib.optionals stdenv.hostPlatform.isx86 [ + "intel" # Intel (aka ANV), could work on non-x86 with PCIe cards, but doesn't build + "intel_hasvk" # Intel Haswell/Broadwell, "legacy" Vulkan driver (https://www.phoronix.com/news/Intel-HasVK-Drop-Dead-Code) + ] + else [ "auto" ] +, eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" ] +, vulkanLayers ? lib.optionals (!stdenv.isDarwin) [ # No Vulkan support on Darwin + "device-select" + "overlay" + "intel-nullhw" +] }: # When updating this package, please verify at least these build (assuming x86_64-linux): @@ -106,7 +136,7 @@ let hash = "sha256-VWRCZJO0/DJbNu0/V9TLaqlwMot65YjInWT9VWg57DY="; } { - pname = "syn"; + pname = "syn"; version = "2.0.39"; hash = "sha256-Mjen2L/omhVbhU/+Ao65mogs3BP3fY+Bodab3uU63EI="; } @@ -157,14 +187,20 @@ self = stdenv.mkDerivation { ${copyRustDeps} ''; - outputs = [ "out" "dev" "drivers" ] - ++ lib.optional enableOSMesa "osmesa" - ++ lib.optional stdenv.isLinux "driversdev" - ++ lib.optional enableOpenCL "opencl" + outputs = [ + "out" "dev" "drivers" + ] ++ lib.optionals enableOSMesa [ + "osmesa" + ] ++ lib.optionals stdenv.isLinux [ + "driversdev" + ] ++ lib.optionals enableOpenCL [ + "opencl" + ] ++ lib.optionals haveDozen [ # the Dozen drivers depend on libspirv2dxil, but link it statically, and - # libspirv2dxil itself is pretty chonky, so relocate it to its own output - # in case anything wants to use it at some point - ++ lib.optional haveDozen "spirv2dxil"; + # libspirv2dxil itself is pretty chonky, so relocate it to its own output in + # case anything wants to use it at some point + "spirv2dxil" + ]; # Keep build-ids so drivers can use them for caching, etc. # Also some drivers segfault without this. @@ -181,101 +217,152 @@ self = stdenv.mkDerivation { # Don't build in debug mode # https://gitlab.freedesktop.org/mesa/mesa/blob/master/docs/meson.html#L327 - "-Db_ndebug=true" + (lib.mesonBool "b_ndebug" true) - "-Ddri-search-path=${libglvnd.driverLink}/lib/dri" + (lib.mesonOption "dri-search-path" "${libglvnd.driverLink}/lib/dri") - "-Dplatforms=${lib.concatStringsSep "," eglPlatforms}" - "-Dgallium-drivers=${lib.concatStringsSep "," galliumDrivers}" - "-Dvulkan-drivers=${lib.concatStringsSep "," vulkanDrivers}" + (lib.mesonOption "platforms" (lib.concatStringsSep "," eglPlatforms)) + (lib.mesonOption "gallium-drivers" (lib.concatStringsSep "," galliumDrivers)) + (lib.mesonOption "vulkan-drivers" (lib.concatStringsSep "," vulkanDrivers)) - "-Ddri-drivers-path=${placeholder "drivers"}/lib/dri" - "-Dvdpau-libs-path=${placeholder "drivers"}/lib/vdpau" - "-Domx-libs-path=${placeholder "drivers"}/lib/bellagio" - "-Dva-libs-path=${placeholder "drivers"}/lib/dri" - "-Dd3d-drivers-path=${placeholder "drivers"}/lib/d3d" + (lib.mesonOption "dri-drivers-path" "${placeholder "drivers"}/lib/dri") + (lib.mesonOption "vdpau-libs-path" "${placeholder "drivers"}/lib/vdpau") + (lib.mesonOption "omx-libs-path" "${placeholder "drivers"}/lib/bellagio") + (lib.mesonOption "va-libs-path" "${placeholder "drivers"}/lib/dri") + (lib.mesonOption "d3d-drivers-path" "${placeholder "drivers"}/lib/d3d") - "-Dgallium-nine=${lib.boolToString enableGalliumNine}" # Direct3D in Wine - "-Dosmesa=${lib.boolToString enableOSMesa}" # used by wine - "-Dmicrosoft-clc=disabled" # Only relevant on Windows (OpenCL 1.2 API on top of D3D12) + (lib.mesonBool "gallium-nine" enableGalliumNine) # Direct3D in Wine + (lib.mesonBool "osmesa" enableOSMesa) # used by wine + (lib.mesonEnable "microsoft-clc" false) # Only relevant on Windows (OpenCL 1.2 API on top of D3D12) # To enable non-mesa gbm backends to be found (e.g. Nvidia) - "-Dgbm-backends-path=${libglvnd.driverLink}/lib/gbm:${placeholder "out"}/lib/gbm" + (lib.mesonOption "gbm-backends-path" "${libglvnd.driverLink}/lib/gbm:${placeholder "out"}/lib/gbm") # meson auto_features enables these features, but we do not want them - "-Dandroid-libbacktrace=disabled" - + (lib.mesonEnable "android-libbacktrace" false) ] ++ lib.optionals stdenv.isLinux [ - "-Dglvnd=true" + (lib.mesonBool "glvnd" true) # Enable RT for Intel hardware # https://gitlab.freedesktop.org/mesa/mesa/-/issues/9080 (lib.mesonEnable "intel-clc" (stdenv.buildPlatform == stdenv.hostPlatform)) ] ++ lib.optionals stdenv.isDarwin [ # Disable features that are explicitly unsupported on the platform - "-Dgbm=disabled" - "-Dxlib-lease=disabled" - "-Degl=disabled" - "-Dgallium-vdpau=disabled" - "-Dgallium-va=disabled" - "-Dgallium-xa=disabled" - "-Dlmsensors=disabled" + (lib.mesonEnable "gbm" false) + (lib.mesonEnable "xlib-lease" false) + (lib.mesonEnable "egl" false) + (lib.mesonEnable "gallium-vdpau" false) + (lib.mesonEnable "gallium-va" false) + (lib.mesonEnable "gallium-xa" false) + (lib.mesonEnable "lmsensors" false) ] ++ lib.optionals enableOpenCL [ # Clover, old OpenCL frontend - "-Dgallium-opencl=icd" - "-Dopencl-spirv=true" + (lib.mesonOption "gallium-opencl" "icd") + (lib.mesonBool "opencl-spirv" true) # Rusticl, new OpenCL frontend - "-Dgallium-rusticl=true" - "-Dclang-libdir=${llvmPackages.clang-unwrapped.lib}/lib" - ] ++ lib.optionals (!withValgrind) [ - "-Dvalgrind=disabled" - ] ++ lib.optionals (!withLibunwind) [ - "-Dlibunwind=disabled" - ] ++ lib.optional enablePatentEncumberedCodecs - "-Dvideo-codecs=all" - ++ lib.optional (vulkanLayers != []) "-D vulkan-layers=${builtins.concatStringsSep "," vulkanLayers}"; + (lib.mesonBool "gallium-rusticl" true) + (lib.mesonOption "clang-libdir" "${llvmPackages.clang-unwrapped.lib}/lib") + ] ++ lib.optionals (!withValgrind) [ + (lib.mesonEnable "valgrind" false) + ] ++ lib.optionals (!withLibunwind) [ + (lib.mesonEnable "libunwind" false) + ] + ++ lib.optionals enablePatentEncumberedCodecs [ + (lib.mesonOption "video-codecs" "all") + ] ++ lib.optionals (vulkanLayers != []) [ + (lib.mesonOption "vulkan-layers" (builtins.concatStringsSep "," vulkanLayers)) + ]; strictDeps = true; buildInputs = with xorg; [ - expat glslang llvmPackages.libllvm libglvnd xorgproto - libX11 libXext libxcb libXt libXfixes libxshmfence libXrandr - libffi libvdpau libXvMC - libpthreadstubs openssl + expat + glslang + libffi + libglvnd + libvdpau + llvmPackages.libllvm + openssl zstd - ] ++ lib.optionals withLibunwind [ + ] ++ (with xorg; [ + libX11 + libXext + libXfixes + libXrandr + libXt + libXvMC + libpthreadstubs + libxcb + libxshmfence + xorgproto + ]) ++ lib.optionals withLibunwind [ libunwind ] ++ [ python3Packages.python # for shebang - ] ++ lib.optionals haveWayland [ wayland wayland-protocols ] - ++ lib.optionals stdenv.isLinux [ libomxil-bellagio libva-minimal udev lm_sensors ] - ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [ elfutils ] - ++ lib.optionals enableOpenCL [ llvmPackages.libclc llvmPackages.clang llvmPackages.clang-unwrapped spirv-llvm-translator ] - ++ lib.optional withValgrind valgrind-light - ++ lib.optional haveZink vulkan-loader - ++ lib.optional haveDozen directx-headers; - - depsBuildBuild = [ pkg-config ] - # Adding this unconditionally makes x86_64-darwin pick up an older toolchain, as - # we explicitly call Mesa with 11.0 stdenv, but buildPackages is still 10.something, - # and Mesa can't build with that. + ] ++ lib.optionals haveWayland [ + wayland + wayland-protocols + ] ++ lib.optionals stdenv.isLinux [ + libomxil-bellagio + libva-minimal + lm_sensors + udev + ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [ + elfutils + ] ++ lib.optionals enableOpenCL [ + llvmPackages.libclc + llvmPackages.clang + llvmPackages.clang-unwrapped + spirv-llvm-translator + ] ++ lib.optionals withValgrind [ + valgrind-light + ] ++ lib.optionals haveZink [ + vulkan-loader + ] ++ lib.optionals haveDozen [ + directx-headers + ]; + + depsBuildBuild = [ + pkg-config + ] ++ lib.optionals (!stdenv.isDarwin) [ + # Adding this unconditionally makes x86_64-darwin pick up an older + # toolchain, as we explicitly call Mesa with 11.0 stdenv, but buildPackages + # is still 10.something, and Mesa can't build with that. # FIXME: figure this out, or figure out how to get rid of Mesa on Darwin, # whichever is easier. - ++ lib.optional (!stdenv.isDarwin) buildPackages.stdenv.cc; + buildPackages.stdenv.cc + ]; nativeBuildInputs = [ - meson pkg-config ninja - intltool bison flex file - python3Packages.python python3Packages.mako python3Packages.ply - jdupes glslang - rustc rust-bindgen rustPlatform.bindgenHook - ] ++ lib.optional haveWayland wayland-scanner; - - propagatedBuildInputs = with xorg; [ - libXdamage libXxf86vm - ] ++ lib.optional withLibdrm libdrm - ++ lib.optionals stdenv.isDarwin [ OpenGL Xplugin ]; + meson + pkg-config + ninja + intltool + bison + flex + file + python3Packages.python + python3Packages.mako + python3Packages.ply + jdupes + glslang + rustc + rust-bindgen + rustPlatform.bindgenHook + ] ++ lib.optionals haveWayland [ + wayland-scanner + ]; + + propagatedBuildInputs = (with xorg; [ + libXdamage + libXxf86vm + ]) ++ lib.optionals withLibdrm [ + libdrm + ] ++ lib.optionals stdenv.isDarwin [ + OpenGL + Xplugin + ]; doCheck = false; @@ -373,9 +460,12 @@ self = stdenv.mkDerivation { ''} ''; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ "-fno-common" ] ++ lib.optionals enableOpenCL [ - "-UPIPE_SEARCH_DIR" - "-DPIPE_SEARCH_DIR=\"${placeholder "opencl"}/lib/gallium-pipe\"" + env.NIX_CFLAGS_COMPILE = toString ( + lib.optionals stdenv.isDarwin [ + "-fno-common" + ] ++ lib.optionals enableOpenCL [ + "-UPIPE_SEARCH_DIR" + "-DPIPE_SEARCH_DIR=\"${placeholder "opencl"}/lib/gallium-pipe\"" ]); passthru = { @@ -395,7 +485,7 @@ self = stdenv.mkDerivation { }; }; - meta = with lib; { + meta = { description = "An open source 3D graphics library"; longDescription = '' The Mesa project began as an open-source implementation of the OpenGL @@ -408,9 +498,9 @@ self = stdenv.mkDerivation { ''; homepage = "https://www.mesa3d.org/"; changelog = "https://www.mesa3d.org/relnotes/${version}.html"; - license = licenses.mit; # X11 variant, in most files - platforms = platforms.mesaPlatforms; - maintainers = with maintainers; [ primeos vcunat ]; # Help is welcome :) + license = with lib.licenses; [ mit ]; # X11 variant, in most files + platforms = lib.platforms.mesaPlatforms; + maintainers = with lib.maintainers; [ primeos vcunat ]; # Help is welcome :) }; }; diff --git a/pkgs/development/libraries/msgpack-c/default.nix b/pkgs/development/libraries/msgpack-c/default.nix index 41d174bce7d9f..63a712b0881e3 100644 --- a/pkgs/development/libraries/msgpack-c/default.nix +++ b/pkgs/development/libraries/msgpack-c/default.nix @@ -8,13 +8,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "msgpack-c"; - version = "6.0.0"; + version = "6.0.1"; src = fetchFromGitHub { owner = "msgpack"; repo = "msgpack-c"; rev = "refs/tags/c-${finalAttrs.version}"; - hash = "sha256-TfC37QKwqvHxsLPgsEqJYkb7mpRQekbntbBPV4v4FO8="; + hash = "sha256-BXnK7xNRdZvbSz7tERf/PDJkmxbqAC6trH+h36O/v6k="; }; strictDeps = true; @@ -24,8 +24,9 @@ stdenv.mkDerivation (finalAttrs: { ]; cmakeFlags = [ - "-DMSGPACK_BUILD_EXAMPLES=OFF" # examples are not installed even if built - ] ++ lib.optional (!finalAttrs.finalPackage.doCheck) "-DMSGPACK_BUILD_TESTS=OFF"; + (lib.cmakeBool "MSGPACK_BUILD_EXAMPLES" false) # examples are not installed even if built + (lib.cmakeBool "MSGPACK_BUILD_TESTS" finalAttrs.finalPackage.doCheck) + ]; checkInputs = [ gtest diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 359ed2832d24d..0e144726cf85f 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -237,6 +237,8 @@ let in { # intended version "policy": # - 1.1 as long as some package exists, which does not build without it + # (tracking issue: https://github.com/NixOS/nixpkgs/issues/269713) + # try to remove in 24.05 for the first time, if possible then # - latest 3.x LTS # - latest 3.x non-LTS as preview/for development # @@ -245,7 +247,7 @@ in { # If you do upgrade here, please update in pkgs/top-level/release.nix # the permitted insecure version to ensure it gets cached for our users - # and backport this to stable release (23.05). + # and backport this to stable release (at time of writing this 23.11). openssl_1_1 = common { version = "1.1.1w"; hash = "sha256-zzCYlQy02FOtlcCEHx+cbT3BAtzPys1SHZOSUgi3asg="; @@ -259,7 +261,7 @@ in { withDocs = true; extraMeta = { knownVulnerabilities = [ - "OpenSSL 1.1 is reaching its end of life on 2023/09/11 and cannot be supported through the NixOS 23.05 release cycle. https://www.openssl.org/blog/blog/2023/03/28/1.1.1-EOL/" + "OpenSSL 1.1 is reaching its end of life on 2023/09/11 and cannot be supported through the NixOS 23.11 release cycle. https://www.openssl.org/blog/blog/2023/03/28/1.1.1-EOL/" ]; }; }; diff --git a/pkgs/development/libraries/pango/default.nix b/pkgs/development/libraries/pango/default.nix index 34288773705a6..70408877fe0e9 100644 --- a/pkgs/development/libraries/pango/default.nix +++ b/pkgs/development/libraries/pango/default.nix @@ -24,13 +24,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "pango"; - version = "1.51.2"; + version = "1.52.2"; outputs = [ "bin" "out" "dev" ] ++ lib.optional withIntrospection "devdoc"; src = fetchurl { url = with finalAttrs; "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-PbpAfytfwRfhkvMCXwocyO3B/ZuTSxxXiyuXNCE5QVo="; + hash = "sha256-0Adq/gEIKBS4U97smfk0ns5fLOg5CLjlj/c2tB94qWs="; }; depsBuildBuild = [ diff --git a/pkgs/development/libraries/pangomm/2.48.nix b/pkgs/development/libraries/pangomm/2.48.nix index 0e8bbe80dd843..fa4148e06aa02 100644 --- a/pkgs/development/libraries/pangomm/2.48.nix +++ b/pkgs/development/libraries/pangomm/2.48.nix @@ -14,13 +14,13 @@ stdenv.mkDerivation rec { pname = "pangomm"; - version= "2.50.2"; + version= "2.52.0"; outputs = [ "out" "dev" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-G8WrTqMoBEJYDWgxgibas2zu38Moj52DcRz3z6tQqfs="; + hash = "sha256-NKE0EmpkhP8S93Q1jDbsxE0OnfCU4bg3ltl3S7fSSUc="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/qtkeychain/default.nix b/pkgs/development/libraries/qtkeychain/default.nix index 564eb31a71395..9d27d92c62f84 100644 --- a/pkgs/development/libraries/qtkeychain/default.nix +++ b/pkgs/development/libraries/qtkeychain/default.nix @@ -23,9 +23,6 @@ stdenv.mkDerivation rec { dontWrapQtApps = true; - # HACK `propagatedSandboxProfile` does not appear to actually propagate the sandbox profile from `qtbase` - sandboxProfile = toString qtbase.__propagatedSandboxProfile or null; - cmakeFlags = [ "-DBUILD_WITH_QT6=${if lib.versions.major qtbase.version == "6" then "ON" else "OFF"}" "-DQT_TRANSLATIONS_DIR=share/qt/translations" diff --git a/pkgs/development/libraries/re2/default.nix b/pkgs/development/libraries/re2/default.nix index d1223811c686c..0254a42416bae 100644 --- a/pkgs/development/libraries/re2/default.nix +++ b/pkgs/development/libraries/re2/default.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation rec { pname = "re2"; - version = "2024-03-01"; + version = "2024-04-01"; src = fetchFromGitHub { owner = "google"; repo = "re2"; rev = version; - hash = "sha256-VuI9OsfGTdVywdyVfBrSzXSjbSfevne+YQ2oOz4R3DM="; + hash = "sha256-qRNV0O55L+r2rNSUJjU6nMqkPWXENZQvyr5riTU3e5o="; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/s2n-tls/default.nix b/pkgs/development/libraries/s2n-tls/default.nix index 8ef3df4992618..36f11372775d7 100644 --- a/pkgs/development/libraries/s2n-tls/default.nix +++ b/pkgs/development/libraries/s2n-tls/default.nix @@ -8,13 +8,13 @@ stdenv.mkDerivation rec { pname = "s2n-tls"; - version = "1.4.9"; + version = "1.4.12"; src = fetchFromGitHub { owner = "aws"; repo = pname; rev = "v${version}"; - hash = "sha256-YH35+kCvPjeBYMMJi7YdAGk/ds3YPm5SSKpoWfbCI3M="; + hash = "sha256-gOCnRuJ1YM+SkrOJ/5TGANl442e7Umh3HK5DFNLJi/A="; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix index 7ecd6a88d13c9..842bc3af9834a 100644 --- a/pkgs/development/libraries/science/math/openblas/default.nix +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -142,7 +142,7 @@ let in stdenv.mkDerivation rec { pname = "openblas"; - version = "0.3.26"; + version = "0.3.27"; outputs = [ "out" "dev" ]; @@ -150,9 +150,17 @@ stdenv.mkDerivation rec { owner = "OpenMathLib"; repo = "OpenBLAS"; rev = "v${version}"; - hash = "sha256-AA3+x3SXkcg3g7bROZYLpWAbxnRedmQBZPe+rBJKxJ8="; + hash = "sha256-VKDFSPwHGZMa2DoOXbSKNQRsl07LatMLK1lHVcEep8U="; }; + patches = [ + (fetchpatch { + name = "no-gemm3m-tests-static.patch"; + url = "https://github.com/OpenMathLib/OpenBLAS/commit/48e017de095018c60d83355804a3075658b4970c.patch"; + hash = "sha256-Wa6EE0M1H0efVn26pOKpi0dFGLuPuzmvAzpBLrAYe5k="; + }) + ]; + postPatch = '' # cc1: error: invalid feature modifier 'sve2' in '-march=armv8.5-a+sve+sve2+bf16' substituteInPlace Makefile.arm64 --replace "+sve2+bf16" "" @@ -255,7 +263,7 @@ EOF ''; passthru.tests = { - inherit (python3.pkgs) numpy scipy; + inherit (python3.pkgs) numpy scipy scikit-learn; inherit ceres-solver giac octave opencv; }; diff --git a/pkgs/development/libraries/snappy/default.nix b/pkgs/development/libraries/snappy/default.nix index 004dd388385fd..869c56ed73007 100644 --- a/pkgs/development/libraries/snappy/default.nix +++ b/pkgs/development/libraries/snappy/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation rec { pname = "snappy"; - version = "1.1.10"; + version = "1.2.0"; src = fetchFromGitHub { owner = "google"; repo = "snappy"; rev = version; - hash = "sha256-wYZkKVDXKCugycx/ZYhjV0BjM/NrEM0R6A4WFhs/WPU="; + hash = "sha256-mpEeUoJs+lGlqh1m6Mmr8UnbtQDn/8kfkeQdFwo2rQ0="; }; patches = [ @@ -23,11 +23,6 @@ stdenv.mkDerivation rec { url = "https://build.opensuse.org/public/source/openSUSE:Factory/snappy/reenable-rtti.patch?rev=a759aa6fba405cd40025e3f0ab89941d"; sha256 = "sha256-RMuM5yd6zP1eekN/+vfS54EyY4cFbGDVor1E1vj3134="; }) - # Fix -Wsign-compare warning on clang. - (fetchpatch { - url = "https://github.com/google/snappy/commit/27f34a580be4a3becf5f8c0cba13433f53c21337.patch"; - sha256 = "sha256-eq6ueeMAkd2bYmPJcKAZZzd5QlXyeWOrsxFIwR8KOpQ="; - }) ]; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/spice-gtk/default.nix b/pkgs/development/libraries/spice-gtk/default.nix index d160a6a5f6dc6..fd7428213fc9c 100644 --- a/pkgs/development/libraries/spice-gtk/default.nix +++ b/pkgs/development/libraries/spice-gtk/default.nix @@ -36,7 +36,7 @@ , wayland-protocols , wayland-scanner , zlib -, wrapGAppsHook +, wrapGAppsHook3 , withPolkit ? stdenv.isLinux }: @@ -89,7 +89,7 @@ stdenv.mkDerivation rec { python3.pkgs.pyparsing python3.pkgs.six vala - wrapGAppsHook + wrapGAppsHook3 ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ mesonEmulatorHook ] ++ lib.optionals stdenv.isLinux [ diff --git a/pkgs/development/libraries/template-glib/default.nix b/pkgs/development/libraries/template-glib/default.nix index fae25d959d3d0..71960010d56da 100644 --- a/pkgs/development/libraries/template-glib/default.nix +++ b/pkgs/development/libraries/template-glib/default.nix @@ -18,13 +18,13 @@ stdenv.mkDerivation rec { pname = "template-glib"; - version = "3.36.1"; + version = "3.36.2"; outputs = [ "out" "dev" "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "OxZ6Fzha10WvviD634EGxm0wxb10bVqh2b236AP2pQM="; + hash = "sha256-ACDzpAGIjOdjs6F1CML1jpGXKkg6DFR6/bfMviVhmUg="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/tracker-miners/default.nix b/pkgs/development/libraries/tracker-miners/default.nix index 6d9d1628e4e70..21cb3f97b3be8 100644 --- a/pkgs/development/libraries/tracker-miners/default.nix +++ b/pkgs/development/libraries/tracker-miners/default.nix @@ -47,11 +47,11 @@ stdenv.mkDerivation rec { pname = "tracker-miners"; - version = "3.6.2"; + version = "3.7.1"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "Ctci89Uywh11fPSI+UKWBnnqj0V5Je+pdlbtTJ6bpP8="; + hash = "sha256-UKOr5Az7CzXO1D7HFtvxNomS5ETvegur8gLHrGqy9vQ="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/tracker/default.nix b/pkgs/development/libraries/tracker/default.nix index 48fc561ddd13b..5c1e088592e54 100644 --- a/pkgs/development/libraries/tracker/default.nix +++ b/pkgs/development/libraries/tracker/default.nix @@ -25,6 +25,7 @@ , libsoup , libsoup_3 , json-glib +, avahi , systemd , dbus , writeText @@ -33,13 +34,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "tracker"; - version = "3.6.0"; + version = "3.7.1"; outputs = [ "out" "dev" "devdoc" ]; src = fetchurl { url = with finalAttrs; "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "Ulks/hm6/9FtvkdHW+fadQ29C2Mz/XrLYPqp2lvEDfI="; + hash = "sha256-zZG4he6YOc3lOH+OBe0kpxCNFidinLaxsqpRqWA+Ewo="; }; strictDeps = true; @@ -75,6 +76,7 @@ stdenv.mkDerivation (finalAttrs: { libsoup_3 libuuid json-glib + avahi libstemmer dbus ] ++ lib.optionals stdenv.isLinux [ diff --git a/pkgs/development/libraries/vte/default.nix b/pkgs/development/libraries/vte/default.nix index be55952fe2e1a..3473b96f494c8 100644 --- a/pkgs/development/libraries/vte/default.nix +++ b/pkgs/development/libraries/vte/default.nix @@ -22,7 +22,7 @@ , pcre2 , cairo , fribidi -, zlib +, lz4 , icu , systemd , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd @@ -31,14 +31,14 @@ stdenv.mkDerivation (finalAttrs: { pname = "vte"; - version = "0.74.2"; + version = "0.76.0"; outputs = [ "out" "dev" ] ++ lib.optional (gtkVersion != null) "devdoc"; src = fetchurl { url = "mirror://gnome/sources/vte/${lib.versions.majorMinor finalAttrs.version}/vte-${finalAttrs.version}.tar.xz"; - sha256 = "sha256-pTX7Kpj+qKJEnNGgLMz1GQEx3d/1LnFa/azj/rU26uc="; + hash = "sha256-u84wuPUENwsS1kOcB6gpk+l9fpr+LdNngXzVj/Ap/9o="; }; patches = [ @@ -48,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: { (fetchpatch { name = "0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch"; url = "https://git.alpinelinux.org/aports/plain/community/vte3/fix-W_EXITCODE.patch?id=4d35c076ce77bfac7655f60c4c3e4c86933ab7dd"; - sha256 = "FkVyhsM0mRUzZmS2Gh172oqwcfXv6PyD6IEgjBhy2uU="; + hash = "sha256-FkVyhsM0mRUzZmS2Gh172oqwcfXv6PyD6IEgjBhy2uU="; }) ]; @@ -71,7 +71,7 @@ stdenv.mkDerivation (finalAttrs: { gnutls pango # duplicated with propagatedBuildInputs to support gtkVersion == null pcre2 - zlib + lz4 icu ] ++ lib.optionals systemdSupport [ systemd diff --git a/pkgs/development/libraries/wildmidi/default.nix b/pkgs/development/libraries/wildmidi/default.nix index c09ee248d2113..19a8ae3d3957e 100644 --- a/pkgs/development/libraries/wildmidi/default.nix +++ b/pkgs/development/libraries/wildmidi/default.nix @@ -1,17 +1,17 @@ -{ lib, stdenv, fetchFromGitHub, writeTextFile, cmake, alsa-lib, OpenAL, freepats }: +{ lib, stdenv, fetchFromGitHub, writeTextFile, cmake, alsa-lib, OpenAL, CoreAudioKit, freepats }: let defaultCfgPath = "${placeholder "out"}/etc/wildmidi/wildmidi.cfg"; in stdenv.mkDerivation rec { pname = "wildmidi"; - version = "0.4.5"; + version = "0.4.6"; src = fetchFromGitHub { owner = "Mindwerks"; repo = "wildmidi"; rev = "${pname}-${version}"; - sha256 = "sha256-5El8aDpAgjrW0/4lphZEF+Hfv9Xr7J4DMk1b/Tb+0TU="; + sha256 = "sha256-syjs8y75M2ul7whiZxnWMSskRJd0ixFqnep7qsTbiDE="; }; nativeBuildInputs = [ cmake ]; @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { buildInputs = lib.optionals stdenv.buildPlatform.isLinux [ alsa-lib stdenv.cc.libc/*couldn't find libm*/ ] ++ lib.optionals stdenv.buildPlatform.isDarwin [ - OpenAL + OpenAL CoreAudioKit ]; preConfigure = '' diff --git a/pkgs/development/libraries/xdg-desktop-portal-gnome/default.nix b/pkgs/development/libraries/xdg-desktop-portal-gnome/default.nix index 966109fa00864..e28ea0da6b0a7 100644 --- a/pkgs/development/libraries/xdg-desktop-portal-gnome/default.nix +++ b/pkgs/development/libraries/xdg-desktop-portal-gnome/default.nix @@ -21,11 +21,11 @@ stdenv.mkDerivation rec { pname = "xdg-desktop-portal-gnome"; - version = "45.1"; + version = "46.1"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz"; - sha256 = "PpyoIQRABfs3vWjr5K0Zb8PQcoNVgUZ6IqSHnax7X90="; + hash = "sha256-fo2WI+nZaonAiXYWgnzUQdzygykn048TXHIlUrEXKqE="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/xdg-desktop-portal-gtk/default.nix b/pkgs/development/libraries/xdg-desktop-portal-gtk/default.nix index e44ffe1ec1d29..e1a51284927a3 100644 --- a/pkgs/development/libraries/xdg-desktop-portal-gtk/default.nix +++ b/pkgs/development/libraries/xdg-desktop-portal-gtk/default.nix @@ -9,7 +9,7 @@ , gnome , gnome-desktop , glib -, wrapGAppsHook +, wrapGAppsHook3 , gsettings-desktop-schemas , buildPortalsInGnome ? true }: @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { meson ninja pkg-config - wrapGAppsHook + wrapGAppsHook3 ]; buildInputs = [ diff --git a/pkgs/development/libraries/xdg-desktop-portal-xapp/default.nix b/pkgs/development/libraries/xdg-desktop-portal-xapp/default.nix index e2d12c250171d..d614627a07493 100644 --- a/pkgs/development/libraries/xdg-desktop-portal-xapp/default.nix +++ b/pkgs/development/libraries/xdg-desktop-portal-xapp/default.nix @@ -4,7 +4,7 @@ , meson , ninja , pkg-config -, wrapGAppsHook +, wrapGAppsHook3 , cinnamon , glib , gsettings-desktop-schemas @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { meson ninja pkg-config - wrapGAppsHook + wrapGAppsHook3 ]; buildInputs = [ diff --git a/pkgs/development/libraries/xdg-desktop-portal/default.nix b/pkgs/development/libraries/xdg-desktop-portal/default.nix index 626c40f3bb336..53a0d3b617e8f 100644 --- a/pkgs/development/libraries/xdg-desktop-portal/default.nix +++ b/pkgs/development/libraries/xdg-desktop-portal/default.nix @@ -20,11 +20,12 @@ , pipewire , gdk-pixbuf , librsvg +, gobject-introspection , python3 , pkg-config , stdenv , runCommand -, wrapGAppsHook +, wrapGAppsHook3 , xmlto , enableGeoLocation ? true }: @@ -69,7 +70,7 @@ stdenv.mkDerivation (finalAttrs: { meson ninja pkg-config - wrapGAppsHook + wrapGAppsHook3 xmlto ]; @@ -97,6 +98,7 @@ stdenv.mkDerivation (finalAttrs: { ]; nativeCheckInputs = [ + gobject-introspection python3.pkgs.pytest python3.pkgs.python-dbusmock python3.pkgs.pygobject3 diff --git a/pkgs/development/lisp-modules/packages.nix b/pkgs/development/lisp-modules/packages.nix index 3866cc7dd2c77..fbee5e84d00f4 100644 --- a/pkgs/development/lisp-modules/packages.nix +++ b/pkgs/development/lisp-modules/packages.nix @@ -514,7 +514,7 @@ let (asdf:operate :program-op :nyxt/gi-gtk-application) ''; - # TODO(kasper): use wrapGAppsHook + # TODO(kasper): use wrapGAppsHook3 installPhase = '' mkdir -pv $out cp -r * $out diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index 2948a293645d6..8200381b5994c 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -1,5 +1,5 @@ /* pkgs/development/lua-modules/generated-packages.nix is an auto-generated file -- DO NOT EDIT! -Regenerate it with: nix run nixpkgs#update-luarocks-packages +Regenerate it with: nix run nixpkgs#luarocks-packages-updater You can customize the generated packages in pkgs/development/lua-modules/overrides.nix */ @@ -267,14 +267,14 @@ buildLuarocksPackage { compat53 = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, luaAtLeast, luaOlder }: buildLuarocksPackage { pname = "compat53"; - version = "0.12-1"; + version = "0.13-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/compat53-0.12-1.rockspec"; - sha256 = "0ijp8ch3927rnj872l6cq79fd53dyfc2qg82y9b0g6kqs7cdl348"; + url = "mirror://luarocks/compat53-0.13-1.rockspec"; + sha256 = "10gmhd526a5q0dl4dvjq7a5c7f3i7hcdla8hpygl79dhgbm649i3"; }).outPath; src = fetchzip { - url = "https://github.com/lunarmodules/lua-compat-5.3/archive/v0.12.zip"; - sha256 = "177zk7rww76wqxqsd2kxwfzb0nd7wfacm81vxwqsc84bfccsl3j4"; + url = "https://github.com/lunarmodules/lua-compat-5.3/archive/v0.13.zip"; + sha256 = "06kpx5qyk1zki2r2g6z3alwhvmays50670z7mbl55h7s0kff2cpz"; }; disabled = (luaOlder "5.1") || (luaAtLeast "5.5"); @@ -353,17 +353,17 @@ buildLuarocksPackage { cqueues = callPackage({ buildLuarocksPackage, fetchurl, lua }: buildLuarocksPackage { pname = "cqueues"; - version = "20200726.51-0"; + version = "20200726.52-0"; knownRockspec = (fetchurl { - url = "mirror://luarocks/cqueues-20200726.51-0.rockspec"; - sha256 = "1y7dqvw75cj9ifn7cyhd98znaga4lksnbddcqmh512crawlf5sxv"; + url = "mirror://luarocks/cqueues-20200726.52-0.rockspec"; + sha256 = "0w2kq9w0wda56k02rjmvmzccz6bc3mn70s9v7npjadh85i5zlhhp"; }).outPath; src = fetchurl { url = "https://github.com/wahern/cqueues/archive/rel-20200726.tar.gz"; sha256 = "0lhd02ag3r1sxr2hx847rdjkddm04l1vf5234v5cz9bd4kfjw4cy"; }; - disabled = (lua.luaversion != "5.1"); + disabled = (lua.luaversion != "5.2"); propagatedBuildInputs = [ lua ]; meta = { @@ -384,11 +384,11 @@ buildLuarocksPackage { }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/teal-language/cyan", - "rev": "57650a3a0314a5e894c6ead30a5a52f7825f009c", - "date": "2023-12-07T02:47:54-06:00", - "path": "/nix/store/g3rqlf5cj06y2qqjlhkms51y4l142waf-cyan", - "sha256": "0xww1p3l0rbm7xiyax37524zybgmbrsjkpvgg327w8yndqysidfd", - "hash": "sha256-zbWoPW7WI37EeG/fKXVe9S3/iShndOVjP3VlQMcNnHc=", + "rev": "51649e4a814c05deaf5dde929ba82803f5170bbc", + "date": "2024-02-18T03:16:47-06:00", + "path": "/nix/store/dg57a34dhah1gvlvj9y2crmngb5rrg5c-cyan", + "sha256": "0kjvgm2hpgdk2bb4fn426v8yy13gycyzmd4kjwwbh70pa227cwgk", + "hash": "sha256-83F2hFAXHLg4l5O0+j3zbwTv0TaCWEfWErO9C0V9W04=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -460,14 +460,14 @@ buildLuarocksPackage { fennel = callPackage({ buildLuarocksPackage, fetchurl, lua, luaOlder }: buildLuarocksPackage { pname = "fennel"; - version = "1.4.0-1"; + version = "1.4.2-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/fennel-1.4.0-1.rockspec"; - sha256 = "1ldbcrzap8ajgwmxf70g0nw7sjdpabba56y2lg3z4hpnxccpb80n"; + url = "mirror://luarocks/fennel-1.4.2-1.rockspec"; + sha256 = "17ygacyqdvplyz3046ay3xr4z83sdjrxkcl21mklpxx29j8p0bv1"; }).outPath; src = fetchurl { - url = "https://fennel-lang.org/downloads/fennel-1.4.0.tar.gz"; - sha256 = "0g1lzkpmzhvhkc08kmn48k3m02pkcwgslz29fb23apbhydkavlx2"; + url = "https://fennel-lang.org/downloads/fennel-1.4.2.tar.gz"; + sha256 = "1inhy8rrywx8svdzhy1yaaa0cfyrmi21ckj7h8xmd7yqaw66ma86"; }; disabled = (luaOlder "5.1"); @@ -587,14 +587,14 @@ buildLuarocksPackage { fzf-lua = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, luaOlder }: buildLuarocksPackage { pname = "fzf-lua"; - version = "0.0.1195-1"; + version = "0.0.1220-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/fzf-lua-0.0.1195-1.rockspec"; - sha256 = "1bcjis9mkbzq7178fkpqkafs6656bhvq1wh13vm1r3khbvi0jkp1"; + url = "mirror://luarocks/fzf-lua-0.0.1220-1.rockspec"; + sha256 = "1l9fhd3akahf6v1x7i9zn6z5gflkh7c3d79m23ijqs4m70kpbik0"; }).outPath; src = fetchzip { - url = "https://github.com/ibhagwan/fzf-lua/archive/0c884bb24ab0fef204f315f34e711b13ece0ea9f.zip"; - sha256 = "04gif5hyb6qzh649xzcwzx81rlrk2glking05q8wxp2cpa3nifpw"; + url = "https://github.com/ibhagwan/fzf-lua/archive/36df11e3bbb6453014ff4736f6805b5a91dda56d.zip"; + sha256 = "1nw3j1g3kqn36lqdslgb7nxcmm5knhwvfadip46milq0qc73yx1p"; }; disabled = (luaOlder "5.1"); @@ -608,34 +608,25 @@ buildLuarocksPackage { }; }) {}; -fzy = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaOlder }: +fzy = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, luaOlder }: buildLuarocksPackage { pname = "fzy"; - version = "1.0-1"; + version = "1.0.3-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/fzy-1.0-1.rockspec"; - sha256 = "1v050lm3rn1k5wwi2nimlbp1b7j6b8vkwvhc1npyqzj8jv7w9w9n"; + url = "mirror://luarocks/fzy-1.0.3-1.rockspec"; + sha256 = "07d07afjs73bl5krfbaqx4pw2wpfrkyw2iksamkfa8dlqn9ajn1a"; }).outPath; - src = fetchgit ( removeAttrs (builtins.fromJSON ''{ - "url": "https://github.com/swarn/fzy-lua", - "rev": "2d018a56e3a240bca4b3142a723b2f56392f3e4a", - "date": "2023-01-29T07:05:02-06:00", - "path": "/nix/store/nz19glmy52jbz46wl7xf0jd8m441klf0-fzy-lua", - "sha256": "0xknm5513a6nlariwxgqndf3wj8xals26swjsv06hx133ihna01x", - "hash": "sha256-PQBlYRwjdGjA1pJrIzRVHUk+XLP4dR6zotaoEUqpdnY=", - "fetchLFS": false, - "fetchSubmodules": true, - "deepClone": false, - "leaveDotGit": false -} - '') ["date" "path" "sha256"]) ; + src = fetchzip { + url = "https://github.com/swarn/fzy-lua/archive/v1.0.3.zip"; + sha256 = "0w3alddhn0jd19vmminbi1b79mzlagyl1lygmfpxhzzccdv4vapm"; + }; disabled = (luaOlder "5.1"); propagatedBuildInputs = [ lua ]; meta = { homepage = "https://github.com/swarn/fzy-lua"; - description = "A fuzzy string-matching algorithm"; + description = "A lua implementation of the fzy fuzzy matching algorithm"; maintainers = with lib.maintainers; [ mrcjkb ]; license.fullName = "MIT"; }; @@ -648,11 +639,11 @@ buildLuarocksPackage { src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/lewis6991/gitsigns.nvim", - "rev": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2", - "date": "2023-11-29T12:07:41+00:00", - "path": "/nix/store/2ihnjknz2xdwsijjimqk8i3pi9cbpvhf-gitsigns.nvim", - "sha256": "086jmhzgpavwjvp7ssd8ga0wxgnz480zzjiv84h4ivva2nv3lnvi", - "hash": "sha256-cVs6thVq70ggQTvK/wEi377OgXqoaX3ulnyr+z6s0iA=", + "rev": "d96ef3bbff0bdbc3916a220f5c74a04c4db033f2", + "date": "2024-04-12T16:53:20+01:00", + "path": "/nix/store/q2wga9cw7f4sgklgjygk6gkfd1zqnp5m-gitsigns.nvim", + "sha256": "1lngbagsnk8zmq034j6jq3nl25crvdjvb73y7da7m282cbm3547j", + "hash": "sha256-8pAy6mICiXpUO36ctWXbmRVB7cDSSDIArh9Nq59az9I=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -673,14 +664,14 @@ buildLuarocksPackage { haskell-tools-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, luaOlder }: buildLuarocksPackage { pname = "haskell-tools.nvim"; - version = "3.0.2-1"; + version = "3.1.8-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/haskell-tools.nvim-3.0.2-1.rockspec"; - sha256 = "1gls4dc4b8p0827jsvzf1n3gxfmqn1r7n8hi1rnfxwcragjxxn8x"; + url = "mirror://luarocks/haskell-tools.nvim-3.1.8-1.rockspec"; + sha256 = "1jhms5gpah8lk0mn1gx127afmihyaq1fj8qrd6a8yh3wy12k1qxc"; }).outPath; src = fetchzip { - url = "https://github.com/mrcjkb/haskell-tools.nvim/archive/3.0.2.zip"; - sha256 = "1rv1r0laizq866lj06akhy97zr9wdfczp1caql36k2xk4d8sbzx7"; + url = "https://github.com/mrcjkb/haskell-tools.nvim/archive/3.1.8.zip"; + sha256 = "14nk6jyq2y4q93ij56bdjy17h3jlmjwsspw3l6ahvjsl6yg1lv75"; }; disabled = (luaOlder "5.1"); @@ -717,8 +708,7 @@ buildLuarocksPackage { }; }) {}; -image-nvim = callPackage( -{ buildLuarocksPackage, fetchurl, fetchzip, lua, luaOlder, magick }: +image-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, luaOlder, magick }: buildLuarocksPackage { pname = "image.nvim"; version = "1.2.0-1"; @@ -737,6 +727,7 @@ buildLuarocksPackage { meta = { homepage = "https://github.com/3rd/image.nvim"; description = "🖼️ Bringing images to Neovim."; + maintainers = with lib.maintainers; [ teto ]; license.fullName = "MIT"; }; }) {}; @@ -767,18 +758,18 @@ buildLuarocksPackage { jsregexp = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaOlder }: buildLuarocksPackage { pname = "jsregexp"; - version = "0.0.6-1"; + version = "0.0.7-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/jsregexp-0.0.6-1.rockspec"; - sha256 = "1m3vqv1p44akk020c3l3n8pdxs30rl5509gbs3rr13hmqlvil4cs"; + url = "mirror://luarocks/jsregexp-0.0.7-1.rockspec"; + sha256 = "1yx0340h51xk23n0g8irj5c9bs35zy6p1zl5kp7vy2cwxazbipbl"; }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/kmarius/jsregexp.git", - "rev": "b5a81e21d0875667ba2458ac8ae903afd5568698", - "date": "2023-02-12T14:19:03+01:00", - "path": "/nix/store/aj42wy1yp53w406id33dyxpv1ws23g4b-jsregexp", - "sha256": "0l7hn5f2jl4n2bpikb72szfzgc192jy3ig5pxx9061j44amyq89m", - "hash": "sha256-NSHsqyJEBgNS77e8OLwUKbD33dfirBnvEpZQKVyx8FA=", + "rev": "d76a7d656a122de38789f4b4a345de6290ed83cc", + "date": "2024-01-11T15:13:03+01:00", + "path": "/nix/store/zxx7v0r88k4wz438509sbsw6h1hymqba-jsregexp", + "sha256": "1m0ndsivx98znbc7gh4kcg9c4q8lbflc108xjl53ivmhisd4cx39", + "hash": "sha256-aXRGmo6w7jgKlR2BwKhbFGHC0mOTwHfYsh+lvqNuFtQ=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -1380,18 +1371,18 @@ buildLuarocksPackage { lua-protobuf = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaOlder }: buildLuarocksPackage { pname = "lua-protobuf"; - version = "0.5.0-1"; + version = "0.5.1-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/lua-protobuf-0.5.0-1.rockspec"; - sha256 = "08z73rsqi7ysdyjcwfqyr8z6i5r43kx5fd8l32wlzv6cx6yvlqc9"; + url = "mirror://luarocks/lua-protobuf-0.5.1-1.rockspec"; + sha256 = "1ljn0xwrhcr49k4fzrh0g1q13j16sa6h3wd5q62995q4jlrmnhja"; }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/starwing/lua-protobuf.git", - "rev": "a256c34e12cad643d6ad189bddcbc314da9b0658", - "date": "2023-04-30T02:11:27+08:00", - "path": "/nix/store/n7ihjh36kp2f80016f9y8xydia2pclzq-lua-protobuf", - "sha256": "1kbanbgvmzcfnxq30f8hmirgc1d768lacpjihis9961pc7w96l9n", - "hash": "sha256-NlGT+GE3mJR0hFFepigypwX2cqwQOTBwt479ut+yas0=", + "rev": "5e998726522725138fb4066f03a5cc478c7f7b2c", + "date": "2024-04-01T17:44:38+08:00", + "path": "/nix/store/rdayi9dlv3r62pb1lrl7xg6s1wib3n4v-lua-protobuf", + "sha256": "0vzm2x7vlfby8xqiqa68bqjki3h5775jhfhkvg4mfk152rm1ybhf", + "hash": "sha256-Di4fahYlTFfJ2xM6KMs5BY44JV7IKBxxR345uk8X9W8=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -1413,18 +1404,18 @@ buildLuarocksPackage { lua-resty-http = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaOlder }: buildLuarocksPackage { pname = "lua-resty-http"; - version = "0.17.1-0"; + version = "0.17.2-0"; knownRockspec = (fetchurl { - url = "mirror://luarocks/lua-resty-http-0.17.1-0.rockspec"; - sha256 = "05gid7c5i459clw707z1jic42s52ap4z66dbr9ims5znaq5s3wdk"; + url = "mirror://luarocks/lua-resty-http-0.17.2-0.rockspec"; + sha256 = "10swbq779d1q794d17269v0ln26hblsk7kvxj9s60rx71skzql6s"; }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/ledgetech/lua-resty-http", - "rev": "4ab4269cf442ba52507aa2c718f606054452fcad", - "date": "2023-03-22T09:48:56+00:00", - "path": "/nix/store/ykd1d5fa56i1c286k58jm233lqvdv2mi-lua-resty-http", - "sha256": "0xdhygjqjpfkq1bq8b09fichww57q1z694lz16i3hcc3g4sr4hxg", - "hash": "sha256-r0OSNXmDMTiiCZ+SZH7Ap3AOWXQJLIRXwNNdieXzsHU=", + "rev": "183310324026120ab7eaf5dd82b9be90ae63aadf", + "date": "2024-02-29T19:43:47+00:00", + "path": "/nix/store/wv99dz7m98dps8qbg5bgvddbgwyw7v84-lua-resty-http", + "sha256": "0xllxaph4r5sk2xc6cpji9i537vr2cgc7n7q7qpq6a8q6jkwy79y", + "hash": "sha256-Ph3PpzQYKYMvPvjYwx4TeZ9RYoryMsO6mLpkAq/qlHY=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -1509,18 +1500,18 @@ buildLuarocksPackage { lua-resty-openssl = callPackage({ buildLuarocksPackage, fetchgit, fetchurl }: buildLuarocksPackage { pname = "lua-resty-openssl"; - version = "1.0.2-1"; + version = "1.2.1-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/lua-resty-openssl-1.0.2-1.rockspec"; - sha256 = "000ak4rfm56z7g2b7jr7k2m4hp6kcx970cnv29acjazrz6kr60r2"; + url = "mirror://luarocks/lua-resty-openssl-1.2.1-1.rockspec"; + sha256 = "1xd3z9kgns4p7v725kb781kg6v5fq8yibvarlqvz368l24js63ak"; }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/fffonion/lua-resty-openssl.git", - "rev": "5aba923e78ae0f213f3b4719effa879e3971821f", - "date": "2023-11-22T15:44:01+08:00", - "path": "/nix/store/fww02frnja73z8bhxqz5nyji5nam77ab-lua-resty-openssl", - "sha256": "10fxfjafl9wyv2jz7j25xkklx1c2ykvi0yqskyij45d0rzimil5z", - "hash": "sha256-v9BY48+gFSKjnxp7EPf0goVO5+xFyPOl2J4n6pR03YE=", + "rev": "58c6ce6885556ed7cb85dde83d673fad05ba73aa", + "date": "2024-02-28T12:55:27+08:00", + "path": "/nix/store/5827180ly4rwyb07d6gb6f5g713j3w2b-lua-resty-openssl", + "sha256": "1m7bvxplg47c5dy9faahjy620bc179kld77v4mysw489kqd7zkc0", + "hash": "sha256-gM1/Gp4JEa59JfucRmc6gS0gjJdQKZd8K+yQR2/f69Q=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -1631,14 +1622,14 @@ buildLuarocksPackage { lua-term = callPackage({ buildLuarocksPackage, fetchurl }: buildLuarocksPackage { pname = "lua-term"; - version = "0.7-1"; + version = "0.8-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/lua-term-0.7-1.rockspec"; - sha256 = "0r9g5jw7pqr1dyj6w58dqlr7y7l0jp077n8nnji4phf10biyrvg2"; + url = "mirror://luarocks/lua-term-0.8-1.rockspec"; + sha256 = "1728lj3x8shc5m1yczrl75szq15rnfpzk36n0m49181ly9wxn7s0"; }).outPath; src = fetchurl { - url = "https://github.com/hoelzro/lua-term/archive/0.07.tar.gz"; - sha256 = "0c3zc0cl3a5pbdn056vnlan16g0wimv0p9bq52h7w507f72x18f1"; + url = "https://github.com/hoelzro/lua-term/archive/0.08.tar.gz"; + sha256 = "1vfdg5dzqdi3gn6wpc9a3djhsl6fn2ikqdwr8rrqrnd91qwlzycg"; }; @@ -1681,6 +1672,30 @@ buildLuarocksPackage { }; }) {}; +lua-utils-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, luaOlder }: +buildLuarocksPackage { + pname = "lua-utils.nvim"; + version = "1.0.2-1"; + knownRockspec = (fetchurl { + url = "mirror://luarocks/lua-utils.nvim-1.0.2-1.rockspec"; + sha256 = "0s11j4vd26haz72rb0c5m5h953292rh8r62mvlxbss6i69v2dkr9"; + }).outPath; + src = fetchzip { + url = "https://github.com/nvim-neorg/lua-utils.nvim/archive/v1.0.2.zip"; + sha256 = "0bnl2kvxs55l8cjhfpa834bm010n8r4gmsmivjcp548c076msagn"; + }; + + disabled = (luaOlder "5.1"); + propagatedBuildInputs = [ lua ]; + + meta = { + homepage = "https://github.com/nvim-neorg/lua-utils.nvim"; + description = "A set of utility functions for Neovim plugins."; + maintainers = with lib.maintainers; [ mrcjkb ]; + license.fullName = "MIT"; + }; +}) {}; + lua-yajl = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaOlder }: buildLuarocksPackage { pname = "lua-yajl"; @@ -1747,26 +1762,35 @@ buildLuarocksPackage { }; }) {}; -lua_cliargs = callPackage({ buildLuarocksPackage, fetchurl, lua, luaOlder }: +lua_cliargs = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaOlder }: buildLuarocksPackage { pname = "lua_cliargs"; - version = "3.0-2"; + version = "3.0.2-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/lua_cliargs-3.0-2.rockspec"; - sha256 = "0vlmwrldwlxdfkak9kapydfs4ny4pwg3qpkv5agn6lw6gq0aq5za"; + url = "mirror://luarocks/lua_cliargs-3.0.2-1.rockspec"; + sha256 = "1gp3n9ipaqdk59ilqx1ci5faxmx4dh9sgg3279jb8yfa7wg5b8pf"; }).outPath; - src = fetchurl { - url = "https://github.com/amireh/lua_cliargs/archive/v3.0-2.tar.gz"; - sha256 = "0vhpgmy9a8wlxp8a15pnfqfk0aj7pyyb5m41nnfxynx580a6y7cp"; - }; + src = fetchgit ( removeAttrs (builtins.fromJSON ''{ + "url": "https://github.com/lunarmodules/lua_cliargs.git", + "rev": "5e77d9e2295abd3a67af509090ac7b430f4ad266", + "date": "2023-12-18T14:11:33+03:00", + "path": "/nix/store/0lzpybn6s27nhia20kcsa6n1bsm32ki4-lua_cliargs", + "sha256": "0a4920kyqf4qc12srg8yvwfwh33n6pm6k2md1jy7mfqb1w2ymgf0", + "hash": "sha256-wL3qBQ8Lu3q8DK2Kaeo1dgzIHd8evaxFYJg47CcQiSg=", + "fetchLFS": false, + "fetchSubmodules": true, + "deepClone": false, + "leaveDotGit": false +} + '') ["date" "path" "sha256"]) ; disabled = (luaOlder "5.1"); propagatedBuildInputs = [ lua ]; meta = { - homepage = "https://github.com/amireh/lua_cliargs"; - description = "A command-line argument parser."; - license.fullName = "MIT <http://opensource.org/licenses/MIT>"; + homepage = "https://github.com/lunarmodules/lua_cliargs.git"; + description = "A command-line argument parsing module for Lua"; + license.fullName = "MIT"; }; }) {}; @@ -1802,18 +1826,18 @@ buildLuarocksPackage { luacheck = callPackage({ argparse, buildLuarocksPackage, fetchgit, fetchurl, lua, luaOlder, luafilesystem }: buildLuarocksPackage { pname = "luacheck"; - version = "1.1.1-1"; + version = "1.1.2-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/luacheck-1.1.1-1.rockspec"; - sha256 = "11nrryqff2yis5s7jscbyv221p21i9sh924x7g9l3d6ijns8zmba"; + url = "mirror://luarocks/luacheck-1.1.2-1.rockspec"; + sha256 = "11p7kf7v1b5rhi3m57g2zqwzmnnp79v76gh13b0fg2c78ljkq1k9"; }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/lunarmodules/luacheck.git", - "rev": "ababb6d403d634eb74d2c541035e9ede966e710d", - "date": "2023-06-10T11:27:25+03:00", - "path": "/nix/store/wkrhda7nww45g1waxdv9ghm35mwbvlfq-luacheck", - "sha256": "0abd5rfxv667n8d8v3g9cnkyghiwzhj3yk498gr2agd3mfcni7d7", - "hash": "sha256-p51omaujPSXyQ4lMPyT8PMLnp2XpjY0asseY3V0ubSk=", + "rev": "418f48976c73be697fe64b0eba9ea9821ac9bca8", + "date": "2023-12-08T15:44:11+03:00", + "path": "/nix/store/yf6mjkl5vw6fx57p0f0b046q0yfsn0h0-luacheck", + "sha256": "12jlp2a9l3x9a52b6za6h3jfx31kwg3cv4b10nqpp5jxx530fh81", + "hash": "sha256-AUEHRuldlnuxBWGRzcbjM4zu5IBGfbNEUakPmpS4VIo=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -1866,18 +1890,18 @@ buildLuarocksPackage { luadbi = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaAtLeast, luaOlder }: buildLuarocksPackage { pname = "luadbi"; - version = "0.7.2-1"; + version = "0.7.3-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/luadbi-0.7.2-1.rockspec"; - sha256 = "0lj1qki20w6bl76cvlcazlmwh170b9wkv5nwlxbrr3cn6w7h370b"; + url = "mirror://luarocks/luadbi-0.7.3-1.rockspec"; + sha256 = "0lyiwyg6qnnj7d5rxim6b9p68nbszmwhg57xjlvalbcgwgipk1ns"; }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/mwild1/luadbi", - "rev": "73a234c4689e4f87b7520276b6159cc7f6cfd6e0", - "date": "2019-01-14T09:39:17+00:00", - "path": "/nix/store/a3qgawila4r4jc2lpdc4mwyzd1gvzazd-luadbi", - "sha256": "167ivwmczhp98bxzpz3wdxcfj6vi0a10gpi7rdfjs2rbfwkzqvjh", - "hash": "sha256-UG78J3crCy1dyyfeB4ICcRvpWG98/Pv7QunCzyrf8Zg=", + "rev": "eee6ef21c75cfb25c5166fd94c0c5a2ed2bf0f85", + "date": "2024-03-04T17:01:25-05:00", + "path": "/nix/store/ryvf83j6b2j4c40jlam6ccf75fn6rrfh-luadbi", + "sha256": "1wivk3z1vab4izfn3jnqj7rcw3797x0sby5131hz9g07irxvys1g", + "hash": "sha256-L2i/e44HvPRhGKH4pUE/6QzO8pHYymHdj2SpHf6YO/I=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -1885,7 +1909,7 @@ buildLuarocksPackage { } '') ["date" "path" "sha256"]) ; - disabled = (luaOlder "5.1") || (luaAtLeast "5.4"); + disabled = (luaOlder "5.1") || (luaAtLeast "5.5"); propagatedBuildInputs = [ lua ]; meta = { @@ -1898,18 +1922,18 @@ buildLuarocksPackage { luadbi-mysql = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaAtLeast, luaOlder, luadbi }: buildLuarocksPackage { pname = "luadbi-mysql"; - version = "0.7.2-1"; + version = "0.7.3-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/luadbi-mysql-0.7.2-1.rockspec"; - sha256 = "0gnyqnvcfif06rzzrdw6w6hchp4jrjiwm0rmfx2r8ljchj2bvml5"; + url = "mirror://luarocks/luadbi-mysql-0.7.3-1.rockspec"; + sha256 = "1x0pl6qpdi4vmhxs2076kkxmikbv0asndh8lp34r47lym37hcrr3"; }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/mwild1/luadbi", - "rev": "73a234c4689e4f87b7520276b6159cc7f6cfd6e0", - "date": "2019-01-14T09:39:17+00:00", - "path": "/nix/store/a3qgawila4r4jc2lpdc4mwyzd1gvzazd-luadbi", - "sha256": "167ivwmczhp98bxzpz3wdxcfj6vi0a10gpi7rdfjs2rbfwkzqvjh", - "hash": "sha256-UG78J3crCy1dyyfeB4ICcRvpWG98/Pv7QunCzyrf8Zg=", + "rev": "eee6ef21c75cfb25c5166fd94c0c5a2ed2bf0f85", + "date": "2024-03-04T17:01:25-05:00", + "path": "/nix/store/ryvf83j6b2j4c40jlam6ccf75fn6rrfh-luadbi", + "sha256": "1wivk3z1vab4izfn3jnqj7rcw3797x0sby5131hz9g07irxvys1g", + "hash": "sha256-L2i/e44HvPRhGKH4pUE/6QzO8pHYymHdj2SpHf6YO/I=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -1917,7 +1941,7 @@ buildLuarocksPackage { } '') ["date" "path" "sha256"]) ; - disabled = (luaOlder "5.1") || (luaAtLeast "5.4"); + disabled = (luaOlder "5.1") || (luaAtLeast "5.5"); propagatedBuildInputs = [ lua luadbi ]; meta = { @@ -1930,18 +1954,18 @@ buildLuarocksPackage { luadbi-postgresql = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaAtLeast, luaOlder, luadbi }: buildLuarocksPackage { pname = "luadbi-postgresql"; - version = "0.7.2-1"; + version = "0.7.3-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/luadbi-postgresql-0.7.2-1.rockspec"; - sha256 = "07rx4agw4hjyzf8157apdwfqh9s26nqndmkr3wm7v09ygjvdjiix"; + url = "mirror://luarocks/luadbi-postgresql-0.7.3-1.rockspec"; + sha256 = "1bnjsgk7cl6wmfhmn8b0av49yabf8flhdi1jhczksvvpf32p77bw"; }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/mwild1/luadbi", - "rev": "73a234c4689e4f87b7520276b6159cc7f6cfd6e0", - "date": "2019-01-14T09:39:17+00:00", - "path": "/nix/store/a3qgawila4r4jc2lpdc4mwyzd1gvzazd-luadbi", - "sha256": "167ivwmczhp98bxzpz3wdxcfj6vi0a10gpi7rdfjs2rbfwkzqvjh", - "hash": "sha256-UG78J3crCy1dyyfeB4ICcRvpWG98/Pv7QunCzyrf8Zg=", + "rev": "eee6ef21c75cfb25c5166fd94c0c5a2ed2bf0f85", + "date": "2024-03-04T17:01:25-05:00", + "path": "/nix/store/ryvf83j6b2j4c40jlam6ccf75fn6rrfh-luadbi", + "sha256": "1wivk3z1vab4izfn3jnqj7rcw3797x0sby5131hz9g07irxvys1g", + "hash": "sha256-L2i/e44HvPRhGKH4pUE/6QzO8pHYymHdj2SpHf6YO/I=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -1949,7 +1973,7 @@ buildLuarocksPackage { } '') ["date" "path" "sha256"]) ; - disabled = (luaOlder "5.1") || (luaAtLeast "5.4"); + disabled = (luaOlder "5.1") || (luaAtLeast "5.5"); propagatedBuildInputs = [ lua luadbi ]; meta = { @@ -1962,18 +1986,18 @@ buildLuarocksPackage { luadbi-sqlite3 = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaAtLeast, luaOlder, luadbi }: buildLuarocksPackage { pname = "luadbi-sqlite3"; - version = "0.7.2-1"; + version = "0.7.3-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/luadbi-sqlite3-0.7.2-1.rockspec"; - sha256 = "022iba0jbiafz8iv1h0iv95rhcivbfq5yg341nxk3dm87yf220vh"; + url = "mirror://luarocks/luadbi-sqlite3-0.7.3-1.rockspec"; + sha256 = "0ppkk1jkxw2fhc4x26h7h2bks51shl3am552phn7all5h3k7h3by"; }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/mwild1/luadbi", - "rev": "73a234c4689e4f87b7520276b6159cc7f6cfd6e0", - "date": "2019-01-14T09:39:17+00:00", - "path": "/nix/store/a3qgawila4r4jc2lpdc4mwyzd1gvzazd-luadbi", - "sha256": "167ivwmczhp98bxzpz3wdxcfj6vi0a10gpi7rdfjs2rbfwkzqvjh", - "hash": "sha256-UG78J3crCy1dyyfeB4ICcRvpWG98/Pv7QunCzyrf8Zg=", + "rev": "eee6ef21c75cfb25c5166fd94c0c5a2ed2bf0f85", + "date": "2024-03-04T17:01:25-05:00", + "path": "/nix/store/ryvf83j6b2j4c40jlam6ccf75fn6rrfh-luadbi", + "sha256": "1wivk3z1vab4izfn3jnqj7rcw3797x0sby5131hz9g07irxvys1g", + "hash": "sha256-L2i/e44HvPRhGKH4pUE/6QzO8pHYymHdj2SpHf6YO/I=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -1981,7 +2005,7 @@ buildLuarocksPackage { } '') ["date" "path" "sha256"]) ; - disabled = (luaOlder "5.1") || (luaAtLeast "5.4"); + disabled = (luaOlder "5.1") || (luaAtLeast "5.5"); propagatedBuildInputs = [ lua luadbi ]; meta = { @@ -2056,11 +2080,11 @@ buildLuarocksPackage { }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/lunarmodules/luaexpat.git", - "rev": "57f8966088abf8a00f8ab0bf88e1b6deea89c0bb", - "date": "2022-10-04T16:36:23+02:00", - "path": "/nix/store/dgrdkalikpqdap642qhppha1ajdnsvx0-luaexpat", - "sha256": "1b4ck23p01ks3hgayan9n33f2kb6jvv63v4ww2mqczc09rqi0q46", - "hash": "sha256-hmAQcU6AfYar4JzsYfaWZk3hxrDJKq8eHHoGcIeYjKw=", + "rev": "e0dd18e946f079a1308497cfde1f6ad482858e15", + "date": "2024-04-09T09:50:02+02:00", + "path": "/nix/store/3n2hssn7d5wzvi127hy0am64yv0i2q9a-luaexpat", + "sha256": "14x4wqjcjd6v6zirpkkm7d9vbv4y897v598jbwrql4w0hw7z5xqj", + "hash": "sha256-EvfyD4eAE4ozXxKlsk9Cnuy1Uzt1zpvjN9s0ySTmpJM=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -2280,18 +2304,18 @@ buildLuarocksPackage { luarocks-build-rust-mlua = callPackage({ buildLuarocksPackage, fetchgit, fetchurl }: buildLuarocksPackage { pname = "luarocks-build-rust-mlua"; - version = "0.1.2-1"; + version = "0.2.0-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/luarocks-build-rust-mlua-0.1.2-1.rockspec"; - sha256 = "1sx908fm2ihpxz2mm54xzkfmdzlqdvrqjkh1zz7rcjgmqba4mh1j"; + url = "mirror://luarocks/luarocks-build-rust-mlua-0.2.0-1.rockspec"; + sha256 = "0mpxj2wpzgqffic1j6agisaawbfhh16gis29x6y60kyjq446mv0z"; }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/khvzak/luarocks-build-rust-mlua", - "rev": "c8080aa0832563b7f8b2cb85a195c1598ce312e0", - "date": "2023-06-29T16:47:41+01:00", - "path": "/nix/store/n7id28r1m11xd550hayv99xhz96vpdjq-luarocks-build-rust-mlua", - "sha256": "1zh1p5k7xpczi5db3k0fw0ljw9w0xxk1qjjcfg5rcznqjf48i3x7", - "hash": "sha256-p4+IiJPYfpbLc0xKHGbvgCcuKeAOzLFaiZ/dfma5Af4=", + "rev": "461a9a3b717d4a34d29b6a324046ff8773ebe943", + "date": "2023-08-29T00:54:12+01:00", + "path": "/nix/store/qcls9aqaahfpykfphrnivg2wh7jdpcfv-luarocks-build-rust-mlua", + "sha256": "071lpnzn49fn8gvkcqkryl1h934yv5x1rw5mnki3d0xzzmg6pavz", + "hash": "sha256-f6trXv2/gzbitLXwHHrZnowEA/V5Yjb3Q9YlYr+9NBw=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -2344,14 +2368,14 @@ buildLuarocksPackage { luasnip = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, jsregexp, lua, luaOlder }: buildLuarocksPackage { pname = "luasnip"; - version = "2.1.1-1"; + version = "2.2.0-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/luasnip-2.1.1-1.rockspec"; - sha256 = "1jrdai8qsanr6x2vqp70hipsxrxh0abvwr2xwh9p4wr29k4wyycb"; + url = "mirror://luarocks/luasnip-2.2.0-1.rockspec"; + sha256 = "08q98dficqzrq0jd8iqbpij9ywv2q4bm2k8l3s3spfvwqhm93zrp"; }).outPath; src = fetchzip { - url = "https://github.com/L3MON4D3/LuaSnip/archive/v2.1.1.zip"; - sha256 = "0mbpwf3sxfrmrza13d9w0hlcmzlrj551g332syp1qhs94abfnnrd"; + url = "https://github.com/L3MON4D3/LuaSnip/archive/v2.2.0.zip"; + sha256 = "05d5ks3g6a9dl3bmap8m60hnx3hc4acvcp2jzkw85r4anaawl45b"; }; disabled = (luaOlder "5.1"); @@ -2399,18 +2423,18 @@ buildLuarocksPackage { luasql-sqlite3 = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaOlder }: buildLuarocksPackage { pname = "luasql-sqlite3"; - version = "2.6.0-2"; + version = "2.6.1-3"; knownRockspec = (fetchurl { - url = "mirror://luarocks/luasql-sqlite3-2.6.0-2.rockspec"; - sha256 = "1xpbcpl4qhnzpyyszhdsrxhx2qc1dmndh926lv91xwphw7inwdwg"; + url = "mirror://luarocks/luasql-sqlite3-2.6.1-3.rockspec"; + sha256 = "1qf8cx4cmsngwp65ksdsf5dsv6yhb4qwdrd2lkpyqaq6p55jfkyb"; }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ - "url": "https://github.com/keplerproject/luasql.git", - "rev": "25bf4ffce9323d28cb6f382f7ec9e8951e3084f9", - "date": "2023-07-19T14:20:27-03:00", - "path": "/nix/store/949886jxp7sx3yx910lc6d1yf3ym9mx5-luasql", - "sha256": "00q73j2nzqsm0vmxjkv83qh1dncmr5dgmkrkyxnb5ggygvcbh7w5", - "hash": "sha256-hR+42H7+vbJs9zPP+lrJldkWIB5oT9nrBlXjb4UcBwM=", + "url": "https://github.com/lunarmodules/luasql.git", + "rev": "930aeb330781b9d77daff9d87ba31314939ebc23", + "date": "2024-02-07T15:31:36-03:00", + "path": "/nix/store/6sljqfgnipf4l8czzgry0y408y5818f4-luasql", + "sha256": "1f911s111h613b8psmqwknmm13z644rfdl4n6crs3n1v63n4dsmc", + "hash": "sha256-rOpG7DA72KEzM5bQ5jIh5o9Qq50cV33RGsHAEIIOIbk=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -2422,7 +2446,7 @@ buildLuarocksPackage { propagatedBuildInputs = [ lua ]; meta = { - homepage = "http://www.keplerproject.org/luasql/"; + homepage = "https://lunarmodules.github.io/luasql/"; description = "Database connectivity for Lua (SQLite3 driver)"; maintainers = with lib.maintainers; [ vyp ]; license.fullName = "MIT/X11"; @@ -2461,24 +2485,33 @@ buildLuarocksPackage { }; }) {}; -luasystem = callPackage({ buildLuarocksPackage, fetchurl, lua, luaOlder }: +luasystem = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaOlder }: buildLuarocksPackage { pname = "luasystem"; - version = "0.2.1-0"; + version = "0.3.0-2"; knownRockspec = (fetchurl { - url = "mirror://luarocks/luasystem-0.2.1-0.rockspec"; - sha256 = "0xj5q7lzsbmlw5d3zbjqf3jpj78wcn348h2jcxn5ph4n4hx73z3n"; + url = "mirror://luarocks/luasystem-0.3.0-2.rockspec"; + sha256 = "02kwkcwf81v6ncxl1ng2pxlhalz78q2476snh5xxv3wnwqwbp10a"; }).outPath; - src = fetchurl { - url = "https://github.com/o-lim/luasystem/archive/v0.2.1.tar.gz"; - sha256 = "150bbklchh02gsvpngv56xrrlxxvwpqwrh0yy6z95fnvks7gd0qb"; - }; + src = fetchgit ( removeAttrs (builtins.fromJSON ''{ + "url": "https://github.com/lunarmodules/luasystem.git", + "rev": "c06963917ccc951a1058d7b7f412c52d3c4f443a", + "date": "2023-12-16T00:18:54+01:00", + "path": "/nix/store/kbal1mi8j60d3nm2mf7kdhz55dv23qk6-luasystem", + "sha256": "11d65rnf8y2jnr5nc5gij666p1bsw701ldd9n8sjm0bq3z9lfcd1", + "hash": "sha256-oTFH0x94gSo1sqk1GsDheoVrjJHxFWZLtlJ45GwupoU=", + "fetchLFS": false, + "fetchSubmodules": true, + "deepClone": false, + "leaveDotGit": false +} + '') ["date" "path" "sha256"]) ; disabled = (luaOlder "5.1"); propagatedBuildInputs = [ lua ]; meta = { - homepage = "http://olivinelabs.com/luasystem/"; + homepage = "https://github.com/lunarmodules/luasystem"; description = "Platform independent system calls for Lua."; license.fullName = "MIT <http://opensource.org/licenses/MIT>"; }; @@ -2555,30 +2588,6 @@ buildLuarocksPackage { }; }) {}; -lua-utils-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, luaOlder }: -buildLuarocksPackage { - pname = "lua-utils.nvim"; - version = "1.0.2-1"; - knownRockspec = (fetchurl { - url = "mirror://luarocks/lua-utils.nvim-1.0.2-1.rockspec"; - sha256 = "0s11j4vd26haz72rb0c5m5h953292rh8r62mvlxbss6i69v2dkr9"; - }).outPath; - src = fetchzip { - url = "https://github.com/nvim-neorg/lua-utils.nvim/archive/v1.0.2.zip"; - sha256 = "0bnl2kvxs55l8cjhfpa834bm010n8r4gmsmivjcp548c076msagn"; - }; - - disabled = (luaOlder "5.1"); - propagatedBuildInputs = [ lua ]; - - meta = { - homepage = "https://github.com/nvim-neorg/lua-utils.nvim"; - description = "A set of utility functions for Neovim plugins."; - maintainers = with lib.maintainers; [ mrcjkb ]; - license.fullName = "MIT"; - }; -}) {}; - luazip = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaAtLeast, luaOlder }: buildLuarocksPackage { pname = "luazip"; @@ -2618,11 +2627,11 @@ buildLuarocksPackage { src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/rktjmp/lush.nvim", - "rev": "f76741886b356586f9dfe8e312fbd1ab0fd1084f", - "date": "2023-12-06T09:56:43+11:00", - "path": "/nix/store/m0zsbahbzqxfzvbgw93qw78g7r4fjhdb-lush.nvim", - "sha256": "1jvfycqg5s72gmib8038kzyy8fyanl06mkz74rjy878zv8r6nf59", - "hash": "sha256-qThrMtofHeRlJufPagC1yjvk/Z9oALRifeLo8jDzbss=", + "rev": "bc12f010b34cfeefac35720656eb777753b165d9", + "date": "2024-03-17T14:18:46+11:00", + "path": "/nix/store/9i1sasxxkjc8gbmnhlm0hq5x19hpcyzx-lush.nvim", + "sha256": "06am05fcipfxz8nfr6yg8yhkcdir53asl9h3k40hl0sscx4a03s9", + "hash": "sha256-SQ+gSGdaAwoBmQMmqtUoOTY2oUfPm+ws+t3dyFwBVRk=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -2641,7 +2650,7 @@ buildLuarocksPackage { }; }) {}; -luuid = callPackage({ buildLuarocksPackage, fetchurl, lua, luaAtLeast, luaOlder}: +luuid = callPackage({ buildLuarocksPackage, fetchurl, lua, luaAtLeast, luaOlder }: buildLuarocksPackage { pname = "luuid"; version = "20120509-2"; @@ -2845,7 +2854,6 @@ buildLuarocksPackage { }; }) {}; - moonscript = callPackage({ argparse, buildLuarocksPackage, fetchgit, lpeg, lua, luaOlder, luafilesystem }: buildLuarocksPackage { pname = "moonscript"; @@ -2879,14 +2887,14 @@ buildLuarocksPackage { mpack = callPackage({ buildLuarocksPackage, fetchurl }: buildLuarocksPackage { pname = "mpack"; - version = "1.0.11-0"; + version = "1.0.12-0"; knownRockspec = (fetchurl { - url = "mirror://luarocks/mpack-1.0.11-0.rockspec"; - sha256 = "0alydkccamxldij7ki42imd37630d9qnqg22pndcgkawfclfqzqa"; + url = "mirror://luarocks/mpack-1.0.12-0.rockspec"; + sha256 = "01jr8vvkqdvadr5kpgsd17gjyz729hbd609qsm682ylggabgqsyy"; }).outPath; src = fetchurl { - url = "https://github.com/libmpack/libmpack-lua/releases/download/1.0.11/libmpack-lua-1.0.11.tar.gz"; - sha256 = "15np7603rijavycvrjgjp12y64zs36390lg2hsnr5av790cfrnd2"; + url = "https://github.com/libmpack/libmpack-lua/releases/download/1.0.12/libmpack-lua-1.0.12.tar.gz"; + sha256 = "1gzqks9cq3krd9rs3dq9jm1m23pjpqjv9ymkxj9gbyjcy6qn5dh6"; }; @@ -2940,6 +2948,7 @@ buildLuarocksPackage { meta = { homepage = "https://github.com/mfussenegger/nlua"; description = "Neovim as Lua interpreter"; + maintainers = with lib.maintainers; [ teto ]; license.fullName = "GPL-3.0"; }; }) {}; @@ -2947,18 +2956,18 @@ buildLuarocksPackage { nui-nvim = callPackage({ buildLuarocksPackage, fetchgit, fetchurl }: buildLuarocksPackage { pname = "nui.nvim"; - version = "0.2.0-1"; + version = "0.3.0-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/nui.nvim-0.2.0-1.rockspec"; - sha256 = "0v2z6lgl6hrzcjlzhis8nrkdkh9kvx8zg3q5svi5gyklg7vmcbc2"; + url = "mirror://luarocks/nui.nvim-0.3.0-1.rockspec"; + sha256 = "0ng75wzbc0bn4zgwqk7dx5hazybfqxpjfzp7k2syh7kajmsy8z8b"; }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/MunifTanjim/nui.nvim.git", - "rev": "9e3916e784660f55f47daa6f26053ad044db5d6a", - "date": "2023-07-20T10:45:09+06:00", - "path": "/nix/store/8zdhjgipjjhi9b1y40r2yk5np4lp39as-nui.nvim", - "sha256": "14a73dwl56kah9h36b40ir6iylvfs261ysz17qvi9vhp63vjq9cx", - "hash": "sha256-nSUs9zAX7hQ3PuFrH4zQblMfTY6ALDNggmqaQnkbR5E=", + "rev": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733", + "date": "2024-02-17T02:19:19+06:00", + "path": "/nix/store/llww4x7kg89998avrv3h15zhsajsr37h-nui.nvim", + "sha256": "0fjrnhfhq7sn3am7283adar0jlf6gcyq303kxkwqvxzvvdg9nirg", + "hash": "sha256-L0ebXtv794357HOAgT17xlEJsmpqIHGqGlYfDB20WTo=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -2982,11 +2991,11 @@ buildLuarocksPackage { src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/hrsh7th/nvim-cmp", - "rev": "0b751f6beef40fd47375eaf53d3057e0bfa317e4", - "date": "2023-11-06T17:58:22+09:00", - "path": "/nix/store/4z8lkalcj6sk2s5aw2xcalimh3rcgixj-nvim-cmp", - "sha256": "1qp7s2iam9zzdlw5sgkk6c623z7vjgga0rcg63ja0f836l90grba", - "hash": "sha256-auUHEjUDOaDkMI9loN6T+/whDDNzPl04bf+nqqLQ5+I=", + "rev": "ce16de5665c766f39c271705b17fff06f7bcb84f", + "date": "2024-04-02T16:05:54+09:00", + "path": "/nix/store/f9ax2s683i9q6gr4mwh85fil8lqz00ax-nvim-cmp", + "sha256": "10i720fidv41421as9i2xp4d4kr69zfyvkxjhgv6h41fdi75070c", + "hash": "sha256-DBxQTmwuEGj2g7LP7d1PJk/SyO0iJq2CIIHsFh0QJ4I=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -3007,14 +3016,14 @@ buildLuarocksPackage { nvim-nio = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, luaOlder }: buildLuarocksPackage { pname = "nvim-nio"; - version = "1.8.1-1"; + version = "1.9.0-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/nvim-nio-1.8.1-1.rockspec"; - sha256 = "0f9ccrli5jcvcyawkjd99nm6himnnnd6z54938rd0wjp21d8s4s9"; + url = "mirror://luarocks/nvim-nio-1.9.0-1.rockspec"; + sha256 = "0hwjkz0pjd8dfc4l7wk04ddm8qzrv5m15gskhz9gllb4frnk6hik"; }).outPath; src = fetchzip { - url = "https://github.com/nvim-neotest/nvim-nio/archive/v1.8.1.zip"; - sha256 = "0zax50chrh7qrgh56avd5ny0lb3i0y906wk13mhbkp9i5d9anw1h"; + url = "https://github.com/nvim-neotest/nvim-nio/archive/v1.9.0.zip"; + sha256 = "0y3afl42z41ymksk29al5knasmm9wmqzby860x8zj0i0mfb1q5k5"; }; disabled = (luaOlder "5.1"); @@ -3058,11 +3067,11 @@ buildLuarocksPackage { src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/lunarmodules/penlight.git", - "rev": "dc6d19c5c1e1b4ac55b14df17b7645af6b410140", - "date": "2023-09-21T10:51:09+02:00", - "path": "/nix/store/vbi0d32mbaqcra3jligv8ajq17m1wxa4-penlight", - "sha256": "12ppgby8ldh4zxwcr7cknacbdvk30fi92sgyzh1zbgvym4l44g0c", - "hash": "sha256-DDxCKKl+v/UD/P5pkaIDY+62mLKTncx4/wQ2ivx694o=", + "rev": "ba1c8e51e047e9f33fa45c6a5f3b93fe4a35727b", + "date": "2024-04-02T13:58:00+02:00", + "path": "/nix/store/ypgbcsi4n5pvjlzgq64qv0xvs7s01c4a-penlight", + "sha256": "0dw7ggnzwxaax1hvw6h4lb9ff0ap2wnaf3ma0fv1jqwaaav1gfd2", + "hash": "sha256-orkXtlKKYxm2A6oOpywXVwHn0qIEGr5h6Ep1/u17hzc=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -3088,11 +3097,11 @@ buildLuarocksPackage { src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/nvim-lua/plenary.nvim", - "rev": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0", - "date": "2023-11-30T12:17:20+01:00", - "path": "/nix/store/wf35h8i4s3fdskvcy376vvzp5gi6s6mx-plenary.nvim", - "sha256": "1f6vqqafk78njpl47xgsf8p199mmvw4h4b9axab9rl86fdlibikz", - "hash": "sha256-f8YVaXMG0ZyW6iotAgnftaYULnL69UPolRad6RTG27g=", + "rev": "8aad4396840be7fc42896e3011751b7609ca4119", + "date": "2024-03-25T13:22:05+01:00", + "path": "/nix/store/jni4wdb67id5s257ps8ld4is7m3cpqxr-plenary.nvim", + "sha256": "06ahw1mxjp5g1kbsdza29hyawr4blqzw3vb9d4rg2d5qmnwcbky0", + "hash": "sha256-wM/FuK24NPEyaWntwT+mi2SuPExC/abXDK9c2WvgUBk=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -3139,41 +3148,41 @@ buildLuarocksPackage { }; }) {}; -rest-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, luaOlder }: +rest-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, lua-curl, luaOlder, mimetypes, nvim-nio, xml2lua }: buildLuarocksPackage { pname = "rest.nvim"; - version = "0.2-1"; + version = "2.0.1-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/rest.nvim-0.2-1.rockspec"; - sha256 = "1yq8gx585c10j8kybp20swyv9q0i3lm5k0rrv4bgsbwz3ychn0k1"; + url = "mirror://luarocks/rest.nvim-2.0.1-1.rockspec"; + sha256 = "1ra76wnhi4nh56amyd8zqmg0mpsnhp3m41m3iyiq4hp1fah6nbqb"; }).outPath; src = fetchzip { - url = "https://github.com/rest-nvim/rest.nvim/archive/0.2.zip"; - sha256 = "0ycjrrl37z465p71bdkas3q2ky1jmgr2cjnirnskdc6wz14wl09g"; + url = "https://github.com/rest-nvim/rest.nvim/archive/v2.0.1.zip"; + sha256 = "09rs04d5h061zns1kdfycryx4ll8ix15q3ybpmqsdyp2gn8l77df"; }; disabled = (luaOlder "5.1"); - propagatedBuildInputs = [ lua ]; + propagatedBuildInputs = [ lua lua-curl mimetypes nvim-nio xml2lua ]; meta = { homepage = "https://github.com/rest-nvim/rest.nvim"; description = "A fast Neovim http client written in Lua"; maintainers = with lib.maintainers; [ teto ]; - license.fullName = "MIT"; + license.fullName = "GPL-3.0"; }; }) {}; rocks-config-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, luaOlder, rocks-nvim }: buildLuarocksPackage { pname = "rocks-config.nvim"; - version = "1.2.3-1"; + version = "1.4.0-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/rocks-config.nvim-1.2.3-1.rockspec"; - sha256 = "0lwy0fkmrxbnj46jh35i9l1hmfa88a879spmasmh7kw4vpd1bbpr"; + url = "mirror://luarocks/rocks-config.nvim-1.4.0-1.rockspec"; + sha256 = "0q630hxcxx05v6agddm4f9hhp433hipsyhqy0m7y8fcgxkh6qxiz"; }).outPath; src = fetchzip { - url = "https://github.com/nvim-neorocks/rocks-config.nvim/archive/v1.2.3.zip"; - sha256 = "0byf1q18ykgs3hsz8wyjimkcnq0pl26ikxjlv0ly0acxrg9x9kcp"; + url = "https://github.com/nvim-neorocks/rocks-config.nvim/archive/v1.4.0.zip"; + sha256 = "0yw7am97q3ybifqfnzy8b505cp8hwzlnycqvsjdwr16dl2ihn6v7"; }; disabled = (luaOlder "5.1"); @@ -3214,14 +3223,14 @@ buildLuarocksPackage { rocks-git-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, luaOlder, nvim-nio, rocks-nvim }: buildLuarocksPackage { pname = "rocks-git.nvim"; - version = "1.3.0-1"; + version = "1.4.0-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/rocks-git.nvim-1.3.0-1.rockspec"; - sha256 = "196wjjdkjgqdx1lj8cxcn1xh6dysn0a0w544yc62vg6h227c6igi"; + url = "mirror://luarocks/rocks-git.nvim-1.4.0-1.rockspec"; + sha256 = "04zx6yvp5pg306wqaw6fymqci5qnzpzg27xjrycflcyxxq4xmnmg"; }).outPath; src = fetchzip { - url = "https://github.com/nvim-neorocks/rocks-git.nvim/archive/v1.3.0.zip"; - sha256 = "024zvl91ixb25rkpikwcxb73qfd6wsc2a5qwkwfy6sibkff7jgaq"; + url = "https://github.com/nvim-neorocks/rocks-git.nvim/archive/v1.4.0.zip"; + sha256 = "0yjigf9pzy53yylznnnb68dwmylx9a3qv84kdc2whsf4cj23m2nj"; }; disabled = (luaOlder "5.1"); @@ -3235,26 +3244,26 @@ buildLuarocksPackage { }; }) {}; -rocks-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, fidget-nvim, fzy, lua, luaOlder, nvim-nio, toml, toml-edit }: +rocks-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, fidget-nvim, fzy, lua, luaOlder, nvim-nio, toml-edit }: buildLuarocksPackage { pname = "rocks.nvim"; - version = "2.19.1-1"; + version = "2.21.1-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/rocks.nvim-2.19.1-1.rockspec"; - sha256 = "1n712a8wqhli2hbq8s6isa9jaxxvqy20737njakqdkakqp2xsdbs"; + url = "mirror://luarocks/rocks.nvim-2.21.1-1.rockspec"; + sha256 = "0qf0hbknn87y6fp49r9810fbnwprv6rmwdqj96c8iibxg7qzda23"; }).outPath; src = fetchzip { - url = "https://github.com/nvim-neorocks/rocks.nvim/archive/v2.19.1.zip"; - sha256 = "1n3za055vdi6v1hx72sdrh9dpgs6g58b2haq0ad3q5ncsy951h0q"; + url = "https://github.com/nvim-neorocks/rocks.nvim/archive/v2.21.1.zip"; + sha256 = "1va06snki6m93hs62ypy94chcjvg09pilqiivvr401vp2jzsmydx"; }; disabled = (luaOlder "5.1"); - propagatedBuildInputs = [ fidget-nvim fzy lua nvim-nio toml toml-edit ]; + propagatedBuildInputs = [ fidget-nvim fzy lua nvim-nio toml-edit ]; meta = { homepage = "https://github.com/nvim-neorocks/rocks.nvim"; - description = "Neovim plugin management inspired by Cargo."; - maintainers = with lib.maintainers; [ mrcjkb ]; + description = "Neovim plugin management inspired by Cargo, powered by luarocks"; + maintainers = with lib.maintainers; [ teto mrcjkb ]; license.fullName = "GPL-3.0"; }; }) {}; @@ -3262,14 +3271,14 @@ buildLuarocksPackage { rustaceanvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, luaOlder }: buildLuarocksPackage { pname = "rustaceanvim"; - version = "3.9.6-1"; + version = "4.21.1-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/rustaceanvim-3.9.6-1.rockspec"; - sha256 = "1wlzqm8x2w9clskj2k9n9i4f0pn17dsp99a3gwwrypdlbvm9x77k"; + url = "mirror://luarocks/rustaceanvim-4.21.1-1.rockspec"; + sha256 = "11z9rwnnqsmdrmzah2lwfxl01zk3yr0dnf9c2xqbcpfvq08v8p2c"; }).outPath; src = fetchzip { - url = "https://github.com/mrcjkb/rustaceanvim/archive/3.9.6.zip"; - sha256 = "0qmifxb0xgyym0zbizqds5scy4qrnp0hr17rg0synp2fk5iv6s5b"; + url = "https://github.com/mrcjkb/rustaceanvim/archive/4.21.1.zip"; + sha256 = "0zb8h8m9ypdl9i8dvgm3lb9b7fgw746wq7y94b8dbqjmbwrdsspl"; }; disabled = (luaOlder "5.1"); @@ -3486,14 +3495,14 @@ buildLuarocksPackage { telescope-manix = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, luaOlder, telescope-nvim }: buildLuarocksPackage { pname = "telescope-manix"; - version = "1.0.0-1"; + version = "1.0.2-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/telescope-manix-1.0.0-1.rockspec"; - sha256 = "0fhcglrnsjyhg1g2ldlb24fck9b5fnzy7kc67yjgkw62d557vjgk"; + url = "mirror://luarocks/telescope-manix-1.0.2-1.rockspec"; + sha256 = "0a5cg3kx2pv8jsr0jdpxd1ahprh55n12ggzlqiailyyskzpx94bl"; }).outPath; src = fetchzip { - url = "https://github.com/mrcjkb/telescope-manix/archive/1.0.0.zip"; - sha256 = "1svw724jlhchsl191bmgr50zbjl9vghkaxk3j8g0nzvrn9677b22"; + url = "https://github.com/mrcjkb/telescope-manix/archive/1.0.2.zip"; + sha256 = "0y3n270zkii123r3987xzvp194dl0q1hy234v95w7l48cf4v495k"; }; disabled = (luaOlder "5.1"); @@ -3516,11 +3525,11 @@ buildLuarocksPackage { }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/nvim-telescope/telescope.nvim", - "rev": "6213322ab56eb27356fdc09a5078e41e3ea7f3bc", - "date": "2023-12-06T03:50:38+00:00", - "path": "/nix/store/h1v5377aylxb6vq8v7m7wrl585vb1dzi-telescope.nvim", - "sha256": "074bq8p1bkyr12z1wy31bipb97vmqia4lsmdp2aj1v1r5x5ph736", - "hash": "sha256-Zhx4Sy857CCVuK1qSlTEdZ+0blxheB6+CNnPFS7Cixw=", + "rev": "5a701e99906961218b55d7ad6c2a998f066c6fe0", + "date": "2024-04-10T01:26:51+00:00", + "path": "/nix/store/xipvnxyxi80swp58xvpfwh48pjbdxl0i-telescope.nvim", + "sha256": "02d877a6lp3fgh75m10n3scyk4sdran10pbsp0ghp7xids1fg985", + "hash": "sha256-BaXngm6xnwsfuHpdEKzKTZPpmR4WhFoOfG5catQ5qAk=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -3606,18 +3615,18 @@ buildLuarocksPackage { toml = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaOlder }: buildLuarocksPackage { pname = "toml"; - version = "0.3.0-0"; + version = "0.4.0-0"; knownRockspec = (fetchurl { - url = "mirror://luarocks/toml-0.3.0-0.rockspec"; - sha256 = "0y4qdzsvf4xwnr49xcpbqclrq9d6snv83cbdkrchl0cn4cx6zpxy"; + url = "mirror://luarocks/toml-0.4.0-0.rockspec"; + sha256 = "17yr5gj9yyax3wzn7cv3vvkjrg5qq4yfw8sc6v72ivg79fhvwnli"; }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/LebJe/toml.lua.git", - "rev": "319e9accf8c5cedf68795354ba81e54c817d1277", - "date": "2023-02-19T23:00:49-05:00", - "path": "/nix/store/p6a98sqp9a4jwsw6ghqcwpn9lxmhvkdg-toml.lua", - "sha256": "05p33bq0ajl41vbsw9bx73shpf0p11n5gb6yy8asvp93zh2m51hq", - "hash": "sha256-GIZSBfwj3a0V8t6sV2wIF7gL9Th9Ja7XDoRKBfAa4xY=", + "rev": "1a9b2a5726b9ba7b5d328e54ae36047ffe1730f2", + "date": "2024-01-02T12:05:36-05:00", + "path": "/nix/store/2d6rhs6wdya63q86ca2gi59n8c3dc57c-toml.lua", + "sha256": "12cy73cni3h1mkmjagh58fv112kxfg2z624ssh2banw53pvphmfd", + "hash": "sha256-zVV49x2FW7UE1JoI88VzfYoQtkMFPiXrrAGOaNk4nok=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -3636,7 +3645,7 @@ buildLuarocksPackage { }; }) {}; -toml-edit = callPackage({ buildLuarocksPackage, fetchzip, fetchurl, lua, luaOlder }: +toml-edit = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua, luaOlder }: buildLuarocksPackage { pname = "toml-edit"; version = "0.3.6-1"; @@ -3663,15 +3672,15 @@ buildLuarocksPackage { vstruct = callPackage({ buildLuarocksPackage, fetchgit, lua, luaOlder }: buildLuarocksPackage { pname = "vstruct"; - version = "2.1.1-1"; + version = "2.2.0-1"; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/ToxicFrog/vstruct.git", - "rev": "924d3dd63043189e4a7ef6b1b54b19208054cc0f", - "date": "2020-05-06T23:13:06-04:00", - "path": "/nix/store/a4i9k5hx9xiz38bij4hb505dg088jkss-vstruct", - "sha256": "0sl9v874mckhh6jbxsan48s5xajzx193k4qlphw69sdbf8kr3p57", - "hash": "sha256-p9yRJ3Kr6WQ4vBSTOVLoX6peNCJW6b6kgXCySg7aiWo=", + "rev": "227433d5d0ea69760c8ada1954e22d318aaafc30", + "date": "2024-02-26T20:52:23-05:00", + "path": "/nix/store/d6a7rz62m7s6k71v4cycq1yq9gpl9b04-vstruct", + "sha256": "1x8g9l28vqqyvhd9zr3a0ylh2fiihdf1x4jkh68cl6kqcnz3g7xk", + "hash": "sha256-s583vmV4GsqQgVOSHlyDMToBqQdq5J8a3B7jjQRND/U=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -3688,21 +3697,21 @@ buildLuarocksPackage { }; }) {}; -vusted = callPackage({ buildLuarocksPackage, busted, fetchgit, fetchurl }: +vusted = callPackage({ buildLuarocksPackage, busted, fetchgit, fetchurl, luasystem }: buildLuarocksPackage { pname = "vusted"; - version = "2.3.3-1"; + version = "2.3.4-1"; knownRockspec = (fetchurl { - url = "mirror://luarocks/vusted-2.3.3-1.rockspec"; - sha256 = "0h1v9p327yfqnbwi2rw3k47vwbpqx5rn679rfx5dszn3s6wp5g6p"; + url = "mirror://luarocks/vusted-2.3.4-1.rockspec"; + sha256 = "1yzdr0xgsjfr4a80a2zrj58ls0gmms407q4h1dx75sszppzvm1wc"; }).outPath; src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/notomo/vusted.git", - "rev": "69a5a5f453cf2fc2984e1ba4eea91384e59f9da1", - "date": "2023-11-06T21:06:04+09:00", - "path": "/nix/store/85m6md82nl3jj853s9mhsc4dy0isws8b-vusted", - "sha256": "012n09hy4q0im2bv0vprkanv6xqdppaz6f7gwp87nxsmk88q8mxv", - "hash": "sha256-u1eEEZpVd3vQ5e8489W9DXezrZr5brCXqBFg4mECVgQ=", + "rev": "e0c5e542945844fdb4551b4dc7881b9ee780f57a", + "date": "2024-01-03T15:52:14+09:00", + "path": "/nix/store/4nacg6j8z42nz1114hrpap0z3x7jpgzy-vusted", + "sha256": "05mzhvv55gpj0qbq8i7y8fhknmzrdxsv2cr8mgwm2v3bffc7h7k6", + "hash": "sha256-Zh54mHNrbFH5qygzsXVv+Vc7oUP+RIQXBvK+UvaGvxY=", "fetchLFS": false, "fetchSubmodules": true, "deepClone": false, @@ -3710,7 +3719,7 @@ buildLuarocksPackage { } '') ["date" "path" "sha256"]) ; - propagatedBuildInputs = [ busted ]; + propagatedBuildInputs = [ busted luasystem ]; meta = { homepage = "https://github.com/notomo/vusted"; @@ -3748,9 +3757,11 @@ buildLuarocksPackage { meta = { homepage = "http://manoelcampos.github.io/xml2lua/"; description = "An XML Parser written entirely in Lua that works for Lua 5.1+"; + maintainers = with lib.maintainers; [ teto ]; license.fullName = "MIT"; }; }) {}; + } /* GENERATED - do not edit this file */ diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index 45cd51b717538..b4b2bfe4af6af 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -91,7 +91,7 @@ in ]; postConfigure = '' substituteInPlace ''${rockspecFilename} \ - --replace "'lua_cliargs = 3.0-1'," "'lua_cliargs >= 3.0-1'," + --replace "'lua_cliargs = 3.0'," "'lua_cliargs >= 3.0'," ''; postInstall = '' installShellCompletion --cmd busted \ @@ -146,16 +146,6 @@ in ''; }); - # Until https://github.com/swarn/fzy-lua/pull/8 is merged, - # we have to invoke busted manually - fzy = prev.fzy.overrideAttrs(oa: { - doCheck = true; - nativeCheckInputs = [ prev.busted ]; - checkPhase = '' - busted test/test.lua - ''; - }); - http = prev.http.overrideAttrs (oa: { patches = [ (fetchpatch { @@ -387,6 +377,14 @@ in ]; }); + luasnip = prev.luasnip.overrideAttrs (_: { + # Until https://github.com/L3MON4D3/LuaSnip/issues/1139 is solved + postConfigure = '' + substituteInPlace ''${rockspecFilename} \ + --replace "'jsregexp >= 0.0.5, <= 0.0.6'" "'jsregexp >= 0.0.5'" + ''; + }); + luaossl = prev.luaossl.overrideAttrs (_: { externalDeps = [ { name = "CRYPTO"; dep = openssl; } @@ -427,6 +425,13 @@ in # meta.broken = true; # }); + lua-resty-openidc = prev.lua-resty-openidc.overrideAttrs (_: { + postConfigure = '' + substituteInPlace ''${rockspecFilename} \ + --replace '"lua-resty-session >= 2.8, <= 3.10",' '"lua-resty-session >= 2.8",' + ''; + }); + lua-yajl = prev.lua-yajl.overrideAttrs (oa: { buildInputs = oa.buildInputs ++ [ yajl @@ -691,12 +696,13 @@ in toml = prev.toml.overrideAttrs (oa: { patches = [ ./toml.patch ]; - propagatedBuildInputs = oa.propagatedBuildInputs ++ [ magic-enum sol2 ]; + nativeBuildInputs = oa.nativeBuildInputs ++ [ tomlplusplus ]; + propagatedBuildInputs = oa.propagatedBuildInputs ++ [ sol2 ]; postPatch = '' - substituteInPlace CMakeLists.txt --replace \ - "TOML_PLUS_PLUS_SRC" \ - "${tomlplusplus.src}" + substituteInPlace CMakeLists.txt \ + --replace "TOML_PLUS_PLUS_SRC" "${tomlplusplus.src}" \ + --replace "MAGIC_ENUM_SRC" "${magic-enum.src}" ''; }); @@ -724,6 +730,10 @@ in }); vusted = prev.vusted.overrideAttrs (_: { + postConfigure = '' + substituteInPlace ''${rockspecFilename} \ + --replace '"luasystem = 0.2.1",' '"luasystem",' + ''; # make sure vusted_entry.vim doesn't get wrapped postInstall = '' chmod -x $out/bin/vusted_entry.vim diff --git a/pkgs/development/lua-modules/toml.patch b/pkgs/development/lua-modules/toml.patch index 5f9f57a445db0..db09dd66db5eb 100644 --- a/pkgs/development/lua-modules/toml.patch +++ b/pkgs/development/lua-modules/toml.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index ab3884c..9432df7 100644 +index faae37a..6990d4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,26 +38,17 @@ include(FetchContent) @@ -9,8 +9,8 @@ index ab3884c..9432df7 100644 - GIT_REPOSITORY "https://github.com/marzer/tomlplusplus.git" - GIT_SHALLOW ON - GIT_SUBMODULES "" -- GIT_TAG "v3.3.0" -+ DOWNLOAD_COMMAND true +- GIT_TAG "v3.4.0" ++ DOWNLOAD_COMMAND true ) FetchContent_Declare( @@ -19,7 +19,7 @@ index ab3884c..9432df7 100644 - GIT_SHALLOW ON - GIT_SUBMODULES "" - GIT_TAG "v3.3.0" -+ DOWNLOAD_COMMAND true ++ DOWNLOAD_COMMAND true ) FetchContent_Declare( @@ -27,17 +27,26 @@ index ab3884c..9432df7 100644 - GIT_REPOSITORY "https://github.com/Neargye/magic_enum.git" - GIT_SHALLOW ON - GIT_SUBMODULES "" -- GIT_TAG "v0.8.2" -+ DOWNLOAD_COMMAND true +- GIT_TAG "v0.9.5" ++ DOWNLOAD_COMMAND true ) FetchContent_GetProperties(${TOML++}) -@@ -113,7 +104,7 @@ if(NOT LUA_INCLUDE_DIR OR (WIN32 AND NOT LUA_LIBRARIES)) +@@ -112,7 +103,7 @@ if(NOT LUA_INCLUDE_DIR OR (WIN32 AND NOT LUA_LIBRARIES)) find_package(Lua) endif() -include_directories(${LUA_INCLUDE_DIR} src src/include ${${TOML++}_SOURCE_DIR} ${${SOL2}_SOURCE_DIR}/include ${${MAGIC_ENUM}_SOURCE_DIR}/include) -+include_directories(${LUA_INCLUDE_DIR} src src/include TOML_PLUS_PLUS_SRC ${${SOL2}_SOURCE_DIR}/include ${${MAGIC_ENUM}_SOURCE_DIR}/include) ++include_directories(${LUA_INCLUDE_DIR} src src/include TOML_PLUS_PLUS_SRC ${${SOL2}_SOURCE_DIR}/include MAGIC_ENUM_SRC/include) set(SOURCES src/toml.cpp +@@ -129,7 +120,7 @@ source_group(src FILES ${SOURCES}) + if(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR MSVC) + target_link_options(toml.lua PUBLIC ${PROJECT_SOURCE_DIR}\\libs\\lua51.lib) + else() +- target_link_libraries(toml.lua ${LUA_LIBRARIES} tomlplusplus::tomlplusplus) ++ target_link_libraries(toml.lua ${LUA_LIBRARIES} tomlplusplus) + endif() + + if (LINK_FLAGS) diff --git a/pkgs/development/python-modules/accelerate/default.nix b/pkgs/development/python-modules/accelerate/default.nix index eecbd37a90634..d3bfb9cf1b0c1 100644 --- a/pkgs/development/python-modules/accelerate/default.nix +++ b/pkgs/development/python-modules/accelerate/default.nix @@ -2,6 +2,7 @@ , lib , buildPythonPackage , fetchFromGitHub +, pythonAtLeast , pythonOlder , pytest7CheckHook , setuptools @@ -20,7 +21,7 @@ buildPythonPackage rec { pname = "accelerate"; - version = "0.27.0"; + version = "0.29.3"; pyproject = true; disabled = pythonOlder "3.7"; @@ -29,7 +30,7 @@ buildPythonPackage rec { owner = "huggingface"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-7rnI8UXyAql8fLMKoSRrWzVw5CnyYVE2o6dJOzSgWxw="; + hash = "sha256-oQGb/hlMN8JfwEyWufBvMk2Z1FMSl1lsdIbgZ3ZMdF8="; }; nativeBuildInputs = [ setuptools ]; @@ -73,6 +74,10 @@ buildPythonPackage rec { # set the environment variable, CC, which conflicts with standard environment "test_patch_environment_key_exists" + ] ++ lib.optionals (pythonAtLeast "3.12") [ + # RuntimeError: Dynamo is not supported on Python 3.12+ + "test_convert_to_fp32" + "test_send_to_device_compiles" ] ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ # usual aarch64-linux RuntimeError: DataLoader worker (pid(s) <...>) exited unexpectedly "CheckpointTest" diff --git a/pkgs/development/python-modules/aioairzone-cloud/default.nix b/pkgs/development/python-modules/aioairzone-cloud/default.nix index c6c6e11e293fe..63815d39e47ad 100644 --- a/pkgs/development/python-modules/aioairzone-cloud/default.nix +++ b/pkgs/development/python-modules/aioairzone-cloud/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "aioairzone-cloud"; - version = "0.4.7"; + version = "0.5.1"; pyproject = true; disabled = pythonOlder "3.7"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "Noltari"; repo = "aioairzone-cloud"; rev = "refs/tags/${version}"; - hash = "sha256-DIWRYGDdK/wq1TrPSo9I1oZv5jX4rY4z+u7CTwJtyts="; + hash = "sha256-L5Gb+V0W+9duGV6lRc01jrAfh4U+MS77Y238EeXe0TU="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/aiobotocore/default.nix b/pkgs/development/python-modules/aiobotocore/default.nix index 525e482a42f72..5c421c99f6d02 100644 --- a/pkgs/development/python-modules/aiobotocore/default.nix +++ b/pkgs/development/python-modules/aiobotocore/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { pname = "aiobotocore"; - version = "2.12.1"; + version = "2.12.3"; pyproject = true; disabled = pythonOlder "3.8"; @@ -29,7 +29,7 @@ buildPythonPackage rec { owner = "aio-libs"; repo = "aiobotocore"; rev = "refs/tags/${version}"; - hash = "sha256-+CXKDk6crCPTVpVfcDWy+1UzS05oTu1RtIvDcVrEmFU="; + hash = "sha256-Us94kT7UhTTwMxF63iLLczXZhfr/Z8cJr12DKEphkog="; }; # Relax version constraints: aiobotocore works with newer botocore versions diff --git a/pkgs/development/python-modules/aiodns/default.nix b/pkgs/development/python-modules/aiodns/default.nix index 1da999978b58d..95b17ac6a25ac 100644 --- a/pkgs/development/python-modules/aiodns/default.nix +++ b/pkgs/development/python-modules/aiodns/default.nix @@ -1,40 +1,34 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, pycares -, pythonOlder -, setuptools - +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pycares, + pythonOlder, + setuptools, }: buildPythonPackage rec { pname = "aiodns"; - version = "3.1.1"; + version = "3.2.0"; pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "saghul"; repo = "aiodns"; rev = "refs/tags/v${version}"; - sha256 = "sha256-JZS53kICsrXDot3CKjG30AOjkYycKpMJvC9yS3c1v5Q="; + hash = "sha256-aXae9/x0HVp4KqydCf5/+p5PlSKUQ5cE3iVeD08rtf0="; }; - nativeBuildInputs = [ - setuptools - ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ - pycares - ]; + dependencies = [ pycares ]; # Could not contact DNS servers doCheck = false; - pythonImportsCheck = [ - "aiodns" - ]; + pythonImportsCheck = [ "aiodns" ]; meta = with lib; { description = "Simple DNS resolver for asyncio"; diff --git a/pkgs/development/python-modules/aiohttp/default.nix b/pkgs/development/python-modules/aiohttp/default.nix index e46b5989dd762..a84a54e2c6fa0 100644 --- a/pkgs/development/python-modules/aiohttp/default.nix +++ b/pkgs/development/python-modules/aiohttp/default.nix @@ -5,6 +5,7 @@ , fetchFromGitHub , substituteAll , llhttp +, python # build_requires , cython , setuptools @@ -29,7 +30,7 @@ buildPythonPackage rec { pname = "aiohttp"; - version = "3.9.3"; + version = "3.9.5"; pyproject = true; disabled = pythonOlder "3.8"; @@ -38,7 +39,7 @@ buildPythonPackage rec { owner = "aio-libs"; repo = "aiohttp"; rev = "refs/tags/v${version}"; - hash = "sha256-dEeMHruFJ1o0J6VUJcpUk7LhEC8sV8hUKXoKcd618lE="; + hash = "sha256-FRtirmwgU8v+ee3db7rOFsmy0rNW8A7+yRZC5d6uYNA="; }; patches = [ @@ -57,7 +58,7 @@ buildPythonPackage rec { touch .git # tools/gen.py uses .git to find the project root ''; - nativeBuildInputs = [ + build-system = [ cython setuptools ]; @@ -66,7 +67,7 @@ buildPythonPackage rec { make cythonize ''; - propagatedBuildInputs = [ + dependencies = [ attrs multidict async-timeout @@ -77,6 +78,11 @@ buildPythonPackage rec { brotli ]; + postInstall = '' + # remove source code file with reference to dev dependencies + rm $out/${python.sitePackages}/aiohttp/_cparser.pxd{,.orig} + ''; + # NOTE: pytest-xdist cannot be added because it is flaky. See https://github.com/NixOS/nixpkgs/issues/230597 for more info. nativeCheckInputs = [ freezegun @@ -96,14 +102,6 @@ buildPythonPackage rec { "test_client_session_timeout_zero" "test_mark_formdata_as_processed" "test_requote_redirect_url_default" - # Disable tests that trigger deprecation warnings in pytest - "test_async_with_session" - "test_session_close_awaitable" - "test_close_run_until_complete_not_deprecated" - # https://github.com/aio-libs/aiohttp/issues/7130 - "test_static_file_if_none_match" - "test_static_file_if_match" - "test_static_file_if_modified_since_past_date" # don't run benchmarks "test_import_time" ] ++ lib.optionals stdenv.is32bit [ diff --git a/pkgs/development/python-modules/aiorpcx/default.nix b/pkgs/development/python-modules/aiorpcx/default.nix index 09a2bfb8562d6..5686a7dafd126 100644 --- a/pkgs/development/python-modules/aiorpcx/default.nix +++ b/pkgs/development/python-modules/aiorpcx/default.nix @@ -7,13 +7,13 @@ buildPythonPackage rec { pname = "aiorpcx"; - version = "0.22.1"; + version = "0.23.1"; format = "setuptools"; src = fetchPypi { inherit version; pname = "aiorpcX"; - sha256 = "0lx54bcinp44fmr8q4bbffsqbkg8kdcwykf9i5jj0bj3sfzgf9k0"; + sha256 = "sha256-WyMALxpNXTCF4xVVoHUZxe+NTEAHHrSZVW/9qBFIYKI="; }; propagatedBuildInputs = [ attrs ]; diff --git a/pkgs/development/python-modules/aiosmtpd/default.nix b/pkgs/development/python-modules/aiosmtpd/default.nix index 2f3c5e3b836c0..39050153be2e5 100644 --- a/pkgs/development/python-modules/aiosmtpd/default.nix +++ b/pkgs/development/python-modules/aiosmtpd/default.nix @@ -6,23 +6,28 @@ , pytest-mock , pytestCheckHook , pythonOlder +, setuptools , typing-extensions }: buildPythonPackage rec { pname = "aiosmtpd"; version = "1.4.5"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "aio-libs"; - repo = pname; + repo = "aiosmtpd"; rev = "refs/tags/v${version}"; hash = "sha256-8nQ4BVSLYgZHRGkbujy/olV/+GABlkDhe5wef3hyQpQ="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ atpublic attrs @@ -53,6 +58,7 @@ buildPythonPackage rec { description = "Asyncio based SMTP server"; mainProgram = "aiosmtpd"; homepage = "https://aiosmtpd.readthedocs.io/"; + changelog = "https://github.com/aio-libs/aiosmtpd/releases/tag/v${version}"; longDescription = '' This is a server for SMTP and related protocols, similar in utility to the standard library's smtpd.py module. diff --git a/pkgs/development/python-modules/albumentations/default.nix b/pkgs/development/python-modules/albumentations/default.nix index 17e9c7fc7974e..1de36e510197b 100644 --- a/pkgs/development/python-modules/albumentations/default.nix +++ b/pkgs/development/python-modules/albumentations/default.nix @@ -18,14 +18,14 @@ buildPythonPackage rec { pname = "albumentations"; - version = "1.4.2"; + version = "1.4.4"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-lznWLJocXdfwnhAZ33V5ZdlFCAsNa0u/rjfkjmHBQOg="; + hash = "sha256-VNpClOBdoaQOqU92Mm/Z5Q7P+fZzR+m43SFA9pSi1M0="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/allure-behave/default.nix b/pkgs/development/python-modules/allure-behave/default.nix index 8f39c1fb628e2..ef9e8fc2bf208 100644 --- a/pkgs/development/python-modules/allure-behave/default.nix +++ b/pkgs/development/python-modules/allure-behave/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "allure-behave"; - version = "2.13.2"; + version = "2.13.5"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-mxXb7+1tvf5EmVbD6eOmGfza9lAjbEVoxWZBSeZmPxQ="; + hash = "sha256-M4yizHOV0e491y9dfZLYkg8a3g4H3evGN7OOYeBtyNw="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/allure-pytest/default.nix b/pkgs/development/python-modules/allure-pytest/default.nix index ba86e0723a5df..504f118bc3a76 100644 --- a/pkgs/development/python-modules/allure-pytest/default.nix +++ b/pkgs/development/python-modules/allure-pytest/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "allure-pytest"; - version = "2.13.2"; + version = "2.13.5"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-IiQxWejsgc4rUlS0ATgCGYghsbQvEY9p1KKJOWYHx7M="; + hash = "sha256-DvjheQxEqYjba4PE1PXpFFHixMjqEGAd+ohSjSOvz24="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/allure-python-commons-test/default.nix b/pkgs/development/python-modules/allure-python-commons-test/default.nix index 4a75e18835a42..da1d4a3dca4ca 100644 --- a/pkgs/development/python-modules/allure-python-commons-test/default.nix +++ b/pkgs/development/python-modules/allure-python-commons-test/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "allure-python-commons-test"; - version = "2.13.4"; + version = "2.13.5"; format = "setuptools"; disabled = pythonOlder "3.4"; src = fetchPypi { inherit pname version; - hash = "sha256-WPthxhyKlN6fGdKXJLrjh3nbQ8h6CacYToyadh/p49M="; + hash = "sha256-pWkLVfBrLEhdhuTE95K3aqrhEY2wEyo5uRzuJC3ngjE="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/allure-python-commons/default.nix b/pkgs/development/python-modules/allure-python-commons/default.nix index 2e6a38e51341c..c63466ce8e25c 100644 --- a/pkgs/development/python-modules/allure-python-commons/default.nix +++ b/pkgs/development/python-modules/allure-python-commons/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "allure-python-commons"; - version = "2.13.2"; + version = "2.13.5"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-igNoEzAjGx3q3Ya5f/aIQcZZEyARSuY4Vw8e1g16IDM="; + hash = "sha256-ojLnlVgR+Yjkmkwd1sFszn6bgdDqBCKx5WVNMlTiyvM="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/argcomplete/default.nix b/pkgs/development/python-modules/argcomplete/default.nix index 4427e75089fad..363b07758a2a2 100644 --- a/pkgs/development/python-modules/argcomplete/default.nix +++ b/pkgs/development/python-modules/argcomplete/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "argcomplete"; - version = "3.2.3"; + version = "3.3.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "kislyuk"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-sGXHRHmzapJM/c4D4j3QWhkTNzPNZPLO7JOptnTXuR8="; + hash = "sha256-ekTmT6jYkC36X2e0ukwHfDGwdPg3jK8jML2naBCgNI8="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/astropy-healpix/default.nix b/pkgs/development/python-modules/astropy-healpix/default.nix index 23db660f951bb..fa04d6595e8bf 100644 --- a/pkgs/development/python-modules/astropy-healpix/default.nix +++ b/pkgs/development/python-modules/astropy-healpix/default.nix @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "astropy-healpix"; - version = "1.0.2"; + version = "1.0.3"; pyproject = true; src = fetchPypi { inherit version; pname = lib.replaceStrings ["-"] ["_"] pname; - hash = "sha256-BW+m7ZOWvtx3HTdNh3zeg9lGCj9ip4/gXb+boDlAMjo="; + hash = "sha256-3l0qfsl7FnBFBmlx8loVDR5AYfBxWb4jZJY02zbnl0Y="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/astroquery/default.nix b/pkgs/development/python-modules/astroquery/default.nix index 610238559a2ce..070238d8b2c49 100644 --- a/pkgs/development/python-modules/astroquery/default.nix +++ b/pkgs/development/python-modules/astroquery/default.nix @@ -19,12 +19,12 @@ buildPythonPackage rec { pname = "astroquery"; - version = "0.4.6"; + version = "0.4.7"; format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-MHylVMtzSgypoi+G9e/+fkE6+ROuZeFXiXLYR7H+E+4="; + hash = "sha256-BH+6ywpPrsTNtiZ16RnCRMHDXmYQRPy7bJqTMzF0fsk="; }; disabled = !isPy3k; diff --git a/pkgs/development/python-modules/atpublic/default.nix b/pkgs/development/python-modules/atpublic/default.nix index 41cbe28b8a268..616581ffc6f5e 100644 --- a/pkgs/development/python-modules/atpublic/default.nix +++ b/pkgs/development/python-modules/atpublic/default.nix @@ -3,25 +3,25 @@ , fetchPypi , pytestCheckHook , pythonOlder -, pdm-backend +, hatchling , sybil , typing-extensions }: buildPythonPackage rec { pname = "atpublic"; - version = "4.0"; + version = "4.1.0"; format = "pyproject"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-D0BDMhnhJO3xFcbDY4CMpvDhz6fRYNhrL7lHkwhtEpQ="; + hash = "sha256-0cjNkxr3Rh9tGLxgYzg+hlTZ6e8Z1Y7m3AHoUVu/Vd8="; }; nativeBuildInputs = [ - pdm-backend + hatchling ]; propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ diff --git a/pkgs/development/python-modules/avro/default.nix b/pkgs/development/python-modules/avro/default.nix index 21246fae47433..4b1f85e7d2037 100644 --- a/pkgs/development/python-modules/avro/default.nix +++ b/pkgs/development/python-modules/avro/default.nix @@ -12,6 +12,7 @@ buildPythonPackage rec { version = "1.11.3"; pyproject = true; + # distutils usage: https://github.com/search?q=repo%3Aapache%2Favro%20distutils&type=code disabled = pythonOlder "3.6"; src = fetchPypi { diff --git a/pkgs/development/python-modules/azure-identity/default.nix b/pkgs/development/python-modules/azure-identity/default.nix index add836eee03f4..18e21134a8dbb 100644 --- a/pkgs/development/python-modules/azure-identity/default.nix +++ b/pkgs/development/python-modules/azure-identity/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "azure-identity"; - version = "1.15.0"; + version = "1.16.0"; format = "setuptools"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-TCj8JGt/kmVhDrUmHWWTEYPQGaI9Sw6ZNX+ssubCJ8g="; + hash = "sha256-b/HWZ83Ngdoc6rQvgKC+Y8qEZin1GKki9zF6fjyEThs="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-mgmt-cdn/default.nix b/pkgs/development/python-modules/azure-mgmt-cdn/default.nix index 3b6c5fd88b7bf..7c53f86ca6c4c 100644 --- a/pkgs/development/python-modules/azure-mgmt-cdn/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-cdn/default.nix @@ -9,14 +9,15 @@ buildPythonPackage rec { pname = "azure-mgmt-cdn"; - version = "13.0.0"; + version = "13.1.0"; format = "setuptools"; disabled = pythonOlder "3.8"; src = fetchPypi { - inherit pname version; - hash = "sha256-yJ8jTeT4Gu23YSHl5GZ0+zdlC3s+GIxS4ir8z/HBkA4="; + pname = "azure_mgmt_cdn"; + inherit version; + hash = "sha256-Igpr2snnXkwAyEGlnY3j7JAQ4LnhQS3snmwka2GeO/I="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/bdffont/default.nix b/pkgs/development/python-modules/bdffont/default.nix index baa20facc81fb..f5cd8f9431211 100644 --- a/pkgs/development/python-modules/bdffont/default.nix +++ b/pkgs/development/python-modules/bdffont/default.nix @@ -12,13 +12,13 @@ buildPythonPackage rec { pname = "bdffont"; - version = "0.0.17"; + version = "0.0.20"; disabled = pythonOlder "3.11"; src = fetchPypi { inherit pname version; - hash = "sha256-JBPo5tmwnXRzPpZbBrcW2wEC/XNd8M+mi58CRIpOVL0="; + hash = "sha256-T0gTtudsZmL0VZ3a3+C/v+dWAwbXUgf0PEdNtkxWROw="; }; format = "pyproject"; diff --git a/pkgs/development/python-modules/bids-validator/default.nix b/pkgs/development/python-modules/bids-validator/default.nix index 7512515c706de..6779e42c580dc 100644 --- a/pkgs/development/python-modules/bids-validator/default.nix +++ b/pkgs/development/python-modules/bids-validator/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "bids-validator"; - version = "1.14.4"; + version = "1.14.5"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-Q0pghEFmK5qJ3sWgrxs4jWUm+Ox7LO5sDR8GUJWBr/o="; + hash = "sha256-TXIb1ff7D6aM+8L5F47O5Dvupp1Sn4Rnl+GQaUdEgno="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/black/default.nix b/pkgs/development/python-modules/black/default.nix index ec11de747c1e5..48f1c3305558b 100644 --- a/pkgs/development/python-modules/black/default.nix +++ b/pkgs/development/python-modules/black/default.nix @@ -24,14 +24,14 @@ buildPythonPackage rec { pname = "black"; - version = "24.3.0"; + version = "24.4.0"; format = "pyproject"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-oMnEoHca/GkZV4zscc6Co+MeBUkE5xl96svJOCZxxB8="; + hash = "sha256-8Htp/aIFeDZ+rrvWcP+PxlOrGB4f+V2ESX+fog59BkE="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/bokeh/default.nix b/pkgs/development/python-modules/bokeh/default.nix index 63fa524f9fa30..8f052c4b5b179 100644 --- a/pkgs/development/python-modules/bokeh/default.nix +++ b/pkgs/development/python-modules/bokeh/default.nix @@ -1,5 +1,4 @@ { lib -, stdenv , buildPythonPackage , fetchPypi , fetchFromGitHub @@ -8,7 +7,6 @@ , colorama , contourpy , jinja2 -, mock , numpy , nodejs , packaging @@ -48,14 +46,14 @@ buildPythonPackage rec { pname = "bokeh"; # update together with panel which is not straightforward - version = "3.3.4"; + version = "3.4.1"; format = "pyproject"; disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; - hash = "sha256-c7eYLcK43xW/Zgzd3I04JegpGVxDgBWl0Jgk8acCg2g="; + hash = "sha256-2CSWHkJlNnsHUM5YsH5WStC4PKZLM1UhzTQh6bnxDYk="; }; src_test = fetchFromGitHub { diff --git a/pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch b/pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch index 4ebfc7e3f2d63..6dcec9ae51777 100644 --- a/pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch +++ b/pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch @@ -1,14 +1,15 @@ -diff -ru a/src/bokeh/util/compiler.py b/src/bokeh/util/compiler.py +diff --git a/src/bokeh/util/compiler.py b/src/bokeh/util/compiler.py +index 4f4314ac8..726610f4c 100644 --- a/src/bokeh/util/compiler.py +++ b/src/bokeh/util/compiler.py -@@ -411,8 +411,8 @@ +@@ -411,8 +411,8 @@ def _detect_nodejs() -> Path: raise RuntimeError(f'node.js v{version_repr} or higher is needed to allow compilation of custom models ' + '("conda install nodejs" or follow https://nodejs.org/en/download/)') --_nodejs = None --_npmjs = None +-_nodejs: Path | None = None +-_npmjs: Path | None = None +_nodejs = "@node_bin@" +_npmjs = "@npm_bin@" - def _nodejs_path() -> str: + def _nodejs_path() -> Path: global _nodejs diff --git a/pkgs/development/python-modules/botocore/default.nix b/pkgs/development/python-modules/botocore/default.nix index f956687016ef6..0c9dfaa7920a5 100644 --- a/pkgs/development/python-modules/botocore/default.nix +++ b/pkgs/development/python-modules/botocore/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "botocore"; - version = "1.34.58"; # N.B: if you change this, change boto3 and awscli to a matching version + version = "1.34.87"; # N.B: if you change this, change boto3 and awscli to a matching version pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-11IWlSiG3FE+obXil5pq8I/u0vU34/wQLkoKLq1WOjU="; + hash = "sha256-o6TYV/CUHZih5c6M1kw5BiJx/qC+TZ89DWr/bLWBI7k="; }; pythonRelaxDeps = [ diff --git a/pkgs/development/python-modules/boxx/default.nix b/pkgs/development/python-modules/boxx/default.nix index a42cc2c0ee55e..67d862941c8ed 100644 --- a/pkgs/development/python-modules/boxx/default.nix +++ b/pkgs/development/python-modules/boxx/default.nix @@ -19,14 +19,14 @@ buildPythonPackage rec { pname = "boxx"; - version = "0.10.13"; + version = "0.10.14"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-Z1mmNTGjK77GNdlYAXQzp+9Z7TeiKZGvio4SXGwgOPk="; + hash = "sha256-unGnmPksEuqFXHTWJkj9Gv2G/qPDgT6AZXYiG2gtkEA="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/breathe/default.nix b/pkgs/development/python-modules/breathe/default.nix index ca6c66261660c..35bc0b6986750 100644 --- a/pkgs/development/python-modules/breathe/default.nix +++ b/pkgs/development/python-modules/breathe/default.nix @@ -1,5 +1,6 @@ { lib , buildPythonPackage +, defusedxml , docutils , fetchFromGitHub , fetchpatch @@ -40,6 +41,10 @@ buildPythonPackage rec { pytestCheckHook ]; + checkInputs = [ + defusedxml + ]; + pythonImportsCheck = [ "breathe" ]; diff --git a/pkgs/development/python-modules/build/default.nix b/pkgs/development/python-modules/build/default.nix index 7d56257a377de..4f30c8f186293 100644 --- a/pkgs/development/python-modules/build/default.nix +++ b/pkgs/development/python-modules/build/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { pname = "build"; - version = "1.1.1"; + version = "1.2.1"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -28,7 +28,7 @@ buildPythonPackage rec { owner = "pypa"; repo = "build"; rev = "refs/tags/${version}"; - hash = "sha256-SGWpm+AGIfqKMpDfmz2aMYmcs+XVREbHIXSuU4R7U/k="; + hash = "sha256-G0g+1v19sQMUuQlZKGELZOwwX07i7TIdEdaYzr8bKtI="; }; postPatch = '' diff --git a/pkgs/development/python-modules/cartopy/default.nix b/pkgs/development/python-modules/cartopy/default.nix index 05529a9c00da4..17d6b014caef0 100644 --- a/pkgs/development/python-modules/cartopy/default.nix +++ b/pkgs/development/python-modules/cartopy/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { pname = "cartopy"; - version = "0.22.0"; + version = "0.23.0"; disabled = pythonOlder "3.8"; @@ -32,7 +32,7 @@ buildPythonPackage rec { src = fetchPypi { inherit version; pname = "Cartopy"; - hash = "sha256-swD5ASCTHUPxHvh8Bk6h2s7BtZpJQKp26/gs8JVIu0k="; + hash = "sha256-Ix83s1cB8rox2UlZzKdebaBMLuo6fxTOHHXuOw6udnY="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/casa-formats-io/default.nix b/pkgs/development/python-modules/casa-formats-io/default.nix index 4e4d10bd2731f..2537c9e8e5f6c 100644 --- a/pkgs/development/python-modules/casa-formats-io/default.nix +++ b/pkgs/development/python-modules/casa-formats-io/default.nix @@ -11,12 +11,12 @@ buildPythonPackage rec { pname = "casa-formats-io"; - version = "0.2.2"; + version = "0.3.0"; format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-EOX+tal9nrON2K7mHVYSTTxja6mu2k3Bag8bhL3JHJs="; + hash = "sha256-FpQj0XeZ7vvOzUM/+5qG6FRwNXl3gzoUBItYdQ1M4m4="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/cbor2/default.nix b/pkgs/development/python-modules/cbor2/default.nix index 73f994cce5a8f..c9d2ecbaca4fb 100644 --- a/pkgs/development/python-modules/cbor2/default.nix +++ b/pkgs/development/python-modules/cbor2/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "cbor2"; - version = "5.6.2"; + version = "5.6.3"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-t1E8LeqIaJkfrX74iZiQ68+LGZubRGHDwR160670gg0="; + hash = "sha256-5vCuJ1HC0zOpYOCAfAYRSU6xJFYxoWeWWsvBAFCUVdM="; }; postPatch = '' diff --git a/pkgs/development/python-modules/celery/default.nix b/pkgs/development/python-modules/celery/default.nix index a787e1fce4ea9..f628404909086 100644 --- a/pkgs/development/python-modules/celery/default.nix +++ b/pkgs/development/python-modules/celery/default.nix @@ -1,45 +1,57 @@ { stdenv , lib -, backports-zoneinfo -, billiard -, boto3 , buildPythonPackage -, case +, fetchPypi +, pythonOlder + +# build-system +, setuptools + +# dependencies +, billiard +, kombu +, vine , click , click-didyoumean -, click-plugins , click-repl -, dnspython -, fetchPypi -, kombu +, click-plugins +, tzdata +, python-dateutil + +# optional-dependencies +, google-cloud-storage , moto +, msgpack , pymongo +, pyyaml + +# tests , pytest-celery , pytest-click , pytest-subtests , pytest-timeout , pytest-xdist , pytestCheckHook -, python-dateutil -, pythonOlder -, tzdata -, vine , nixosTests }: buildPythonPackage rec { pname = "celery"; - version = "5.3.6"; - format = "setuptools"; + version = "5.4.0"; + pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-hwzHHXN8AgDDlykNcwNEzJkdE6BXU0NT0STJOAJnqrk="; + hash = "sha256-UEoZFA6NMCnVrK2IMwxUHUw/ZMeJ2F+UdWdi2Lyn5wY="; }; - propagatedBuildInputs = [ + build-system = [ + setuptools + ]; + + dependencies = [ billiard click click-didyoumean @@ -49,24 +61,29 @@ buildPythonPackage rec { python-dateutil tzdata vine - ] - ++ lib.optionals (pythonOlder "3.9") [ - backports-zoneinfo ]; + optional-dependencies = { + gcs = [ google-cloud-storage ]; + mongodb = [ pymongo ]; + msgpack = [ msgpack ]; + yaml = [ pyyaml ]; + }; + nativeCheckInputs = [ - boto3 - case - dnspython moto - pymongo pytest-celery pytest-click pytest-subtests pytest-timeout pytest-xdist pytestCheckHook - ]; + ] + # based on https://github.com/celery/celery/blob/main/requirements/test.txt + ++ optional-dependencies.yaml + ++ optional-dependencies.msgpack + ++ optional-dependencies.mongodb + ++ optional-dependencies.gcs; disabledTestPaths = [ # test_eventlet touches network diff --git a/pkgs/development/python-modules/click-didyoumean/default.nix b/pkgs/development/python-modules/click-didyoumean/default.nix index 8c1bf6f26e94f..110855c60a422 100644 --- a/pkgs/development/python-modules/click-didyoumean/default.nix +++ b/pkgs/development/python-modules/click-didyoumean/default.nix @@ -1,18 +1,29 @@ -{ lib, buildPythonPackage, fetchPypi, - click +{ + lib, + buildPythonPackage, + fetchFromGitHub, + poetry-core, + click, + pytestCheckHook }: buildPythonPackage rec { pname = "click-didyoumean"; - version = "0.3.0"; - format = "setuptools"; + version = "0.3.1"; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "f184f0d851d96b6d29297354ed981b7dd71df7ff500d82fa6d11f0856bee8035"; + src = fetchFromGitHub { + owner = "click-contrib"; + repo = "click-didyoumean"; + rev = "refs/tags/v${version}"; + hash = "sha256-C8OrJUfBFiDM/Jnf1iJo8pGEd0tUhar1vu4fVIfGzq8="; }; - propagatedBuildInputs = [ click ]; + build-system = [ poetry-core ]; + + dependencies = [ click ]; + + nativeCheckInputs = [ pytestCheckHook ]; meta = with lib; { description = "Enable git-like did-you-mean feature in click"; diff --git a/pkgs/development/python-modules/controku/default.nix b/pkgs/development/python-modules/controku/default.nix index e2dd1d32b76a3..80c4505175f25 100644 --- a/pkgs/development/python-modules/controku/default.nix +++ b/pkgs/development/python-modules/controku/default.nix @@ -8,7 +8,7 @@ , pygobject3 , gobject-introspection , gtk3 -, wrapGAppsHook +, wrapGAppsHook3 , buildApplication ? false }: @@ -28,7 +28,7 @@ python3Packages.buildPythonPackage rec { setuptools ] ++ lib.optionals buildApplication [ gobject-introspection - wrapGAppsHook + wrapGAppsHook3 ]; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/coverage/default.nix b/pkgs/development/python-modules/coverage/default.nix index 4e4c86ae10634..43919f97fc2f5 100644 --- a/pkgs/development/python-modules/coverage/default.nix +++ b/pkgs/development/python-modules/coverage/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "coverage"; - version = "7.4.3"; + version = "7.4.4"; pyproject = true; # uses f strings @@ -16,7 +16,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - hash = "sha256-J29gd6XGFEekjRM+0T51nAnmKv8NyEJ0po3BhmAQTVI="; + hash = "sha256-yQHfg9CXZJ4lfoA74iWSrt/VGC8Hs8yH1kC7ua/VD0k="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/css-inline/Cargo.lock b/pkgs/development/python-modules/css-inline/Cargo.lock index 429622a63cb85..de6ff84ce6a47 100644 --- a/pkgs/development/python-modules/css-inline/Cargo.lock +++ b/pkgs/development/python-modules/css-inline/Cargo.lock @@ -18,6 +18,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] name = "android-tzdata" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -34,15 +52,15 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -55,9 +73,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.7" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" [[package]] name = "bitflags" @@ -67,15 +85,15 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "built" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d17f4d6e4dc36d1a02fbedc2753a096848e7c1b0772f7654eab8e2c927dd53" +checksum = "41bfbdb21256b87a8b5e80fab81a8eed158178e812fd7ba451907518b2742f16" dependencies = [ "cargo-lock", "chrono", @@ -83,9 +101,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byteorder" @@ -95,9 +113,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cargo-lock" @@ -113,12 +131,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" [[package]] name = "cfg-if" @@ -128,24 +143,14 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "windows-targets 0.52.0", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", + "windows-targets 0.52.5", ] [[package]] @@ -181,11 +186,12 @@ checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "css-inline" -version = "0.13.0" +version = "0.14.0" dependencies = [ "cssparser", "html5ever", "indexmap", + "lru", "reqwest", "rustc-hash", "selectors", @@ -195,7 +201,7 @@ dependencies = [ [[package]] name = "css-inline-python" -version = "0.13.0" +version = "0.14.0" dependencies = [ "built", "css-inline", @@ -225,7 +231,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.49", + "syn 2.0.60", ] [[package]] @@ -256,18 +262,9 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" - -[[package]] -name = "encoding_rs" -version = "0.8.33" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "equivalent" @@ -307,6 +304,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", + "futures-sink", ] [[package]] @@ -341,6 +339,7 @@ checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-io", + "futures-sink", "futures-task", "memchr", "pin-project-lite", @@ -359,9 +358,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "libc", @@ -375,29 +374,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] -name = "h2" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash", + "allocator-api2", +] [[package]] name = "heck" @@ -407,29 +391,29 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.6" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "html5ever" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7" +checksum = "c13771afe0e6e846f1e67d038d4cb29998a6779f93c809212e4e9c32efd244d4" dependencies = [ "log", "mac", "markup5ever", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "http" -version = "0.2.11" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -438,12 +422,24 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ "bytes", "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", "pin-project-lite", ] @@ -454,47 +450,59 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] name = "hyper" -version = "0.14.28" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", - "h2", "http", "http-body", "httparse", - "httpdate", "itoa", "pin-project-lite", - "socket2", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] [[package]] name = "hyper-rustls" -version = "0.24.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" dependencies = [ "futures-util", "http", "hyper", + "hyper-util", "rustls", + "rustls-pki-types", "tokio", "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", ] [[package]] @@ -532,9 +540,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.3" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", @@ -542,9 +550,9 @@ dependencies = [ [[package]] name = "indoc" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "ipnet" @@ -554,15 +562,15 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -585,9 +593,18 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "lru" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +dependencies = [ + "hashbrown", +] [[package]] name = "mac" @@ -597,13 +614,13 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" [[package]] name = "markup5ever" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016" +checksum = "c7940b09815a02810a42b9e1bc41c069880a87de68e9b1dcbe754a3ba3b47c20" dependencies = [ "log", - "phf 0.10.1", - "phf_codegen", + "phf 0.11.2", + "phf_codegen 0.11.2", "string_cache", "string_cache_codegen", "tendril", @@ -611,15 +628,15 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memoffset" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ "autocfg", ] @@ -641,20 +658,20 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "new_debug_unreachable" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "num-traits" @@ -749,6 +766,16 @@ dependencies = [ ] [[package]] +name = "phf_codegen" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" +dependencies = [ + "phf_generator 0.11.2", + "phf_shared 0.11.2", +] + +[[package]] name = "phf_generator" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -778,7 +805,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.60", ] [[package]] @@ -800,10 +827,30 @@ dependencies = [ ] [[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -812,6 +859,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] name = "ppv-lite86" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -825,24 +878,25 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] [[package]] name = "pyo3" -version = "0.20.2" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a89dc7a5850d0e983be1ec2a463a171d20990487c3cfcd68b5363f1ee3d6fe0" +checksum = "a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8" dependencies = [ "cfg-if", "indoc", "libc", "memoffset", "parking_lot", + "portable-atomic", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", @@ -851,9 +905,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.20.2" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07426f0d8fe5a601f26293f300afd1a7b1ed5e78b2a705870c5f30893c5163be" +checksum = "7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50" dependencies = [ "once_cell", "target-lexicon", @@ -867,9 +921,9 @@ checksum = "be6d574e0f8cab2cdd1eeeb640cbf845c974519fa9e9b62fa9c08ecece0ca5de" [[package]] name = "pyo3-ffi" -version = "0.20.2" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb7dec17e17766b46bca4f1a4215a85006b4c2ecde122076c562dd058da6cf1" +checksum = "01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403" dependencies = [ "libc", "pyo3-build-config", @@ -877,33 +931,34 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.20.2" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f738b4e40d50b5711957f142878cfa0f28e054aa0ebdfc3fd137a843f74ed3" +checksum = "77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c" dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.49", + "syn 2.0.60", ] [[package]] name = "pyo3-macros-backend" -version = "0.20.2" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc910d4851847827daf9d6cdd4a823fbdaab5b8818325c5e97a86da79e8881f" +checksum = "08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c" dependencies = [ "heck", "proc-macro2", + "pyo3-build-config", "quote", - "syn 2.0.49", + "syn 2.0.60", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -940,9 +995,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -969,20 +1024,21 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.24" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "3e6cc1e89e689536eb5aeede61520e874df5a4707df811cd5da4aa5fbb2aae19" dependencies = [ "base64", "bytes", - "encoding_rs", + "futures-channel", "futures-core", "futures-util", - "h2", "http", "http-body", + "http-body-util", "hyper", "hyper-rustls", + "hyper-util", "ipnet", "js-sys", "log", @@ -992,11 +1048,11 @@ dependencies = [ "pin-project-lite", "rustls", "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", - "system-configuration", "tokio", "tokio-rustls", "tower-service", @@ -1010,16 +1066,17 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom", "libc", "spin", "untrusted", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -1036,40 +1093,50 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustls" -version = "0.21.10" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "99008d7ad0bbbea527ec27bddbc0e432c5b87d8175178cee68d2eec9c4a1813c" dependencies = [ "log", "ring", + "rustls-pki-types", "rustls-webpki", - "sct", + "subtle", + "zeroize", ] [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" dependencies = [ "base64", + "rustls-pki-types", ] [[package]] +name = "rustls-pki-types" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" + +[[package]] name = "rustls-webpki" -version = "0.101.7" +version = "0.102.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" dependencies = [ "ring", + "rustls-pki-types", "untrusted", ] [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "scopeguard" @@ -1078,29 +1145,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] name = "selectors" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4eb30575f3638fc8f6815f448d50cb1a2e255b0897985c8c59f4d37b72a07b06" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cssparser", "derive_more", "fxhash", "log", "new_debug_unreachable", "phf 0.10.1", - "phf_codegen", + "phf_codegen 0.10.0", "precomputed-hash", "servo_arc", "smallvec", @@ -1108,38 +1165,38 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.196" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.60", ] [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ "itoa", "ryu", @@ -1193,18 +1250,18 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -1246,6 +1303,12 @@ dependencies = [ ] [[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] name = "syn" version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1258,9 +1321,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.49" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", @@ -1274,31 +1337,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] name = "target-lexicon" -version = "0.12.13" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tendril" @@ -1328,9 +1370,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", @@ -1339,34 +1381,21 @@ dependencies = [ "num_cpus", "pin-project-lite", "socket2", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ "rustls", + "rustls-pki-types", "tokio", ] [[package]] -name = "tokio-util" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] name = "toml" version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1401,6 +1430,28 @@ dependencies = [ ] [[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] name = "tower-service" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1412,6 +1463,7 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ + "log", "pin-project-lite", "tracing-core", ] @@ -1445,9 +1497,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] @@ -1482,6 +1534,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] name = "want" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1498,9 +1556,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1508,24 +1566,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.60", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -1535,9 +1593,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1545,28 +1603,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.60", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -1574,9 +1632,12 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.4" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +dependencies = [ + "rustls-pki-types", +] [[package]] name = "windows-core" @@ -1584,7 +1645,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.5", ] [[package]] @@ -1597,6 +1658,15 @@ dependencies = [ ] [[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] name = "windows-targets" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1613,17 +1683,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -1634,9 +1705,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -1646,9 +1717,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -1658,9 +1729,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -1670,9 +1747,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -1682,9 +1759,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -1694,9 +1771,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -1706,9 +1783,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" @@ -1721,10 +1798,36 @@ dependencies = [ [[package]] name = "winreg" -version = "0.50.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ "cfg-if", - "windows-sys", + "windows-sys 0.48.0", ] + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/pkgs/development/python-modules/css-inline/default.nix b/pkgs/development/python-modules/css-inline/default.nix index 41caa34dedacf..e3a35ec65f722 100644 --- a/pkgs/development/python-modules/css-inline/default.nix +++ b/pkgs/development/python-modules/css-inline/default.nix @@ -18,14 +18,14 @@ buildPythonPackage rec { pname = "css-inline"; - version = "0.13.0"; + version = "0.14.0"; pyproject = true; src = fetchFromGitHub { owner = "Stranger6667"; repo = "css-inline"; rev = "python-v${version}"; - hash = "sha256-hhjeOr7EJc4Tmn/eQ1vF0xChSIlgfSmtqi6s7WCUq00="; + hash = "sha256-CdR90GGPWOerXWfVeHrFLAelL+MJ9bfoB4TjKBdRSL0="; }; postPatch = '' @@ -42,7 +42,7 @@ buildPythonPackage rec { ln -s ${./Cargo.lock} Cargo.lock ''; name = "${pname}-${version}"; - hash = "sha256-noYBSwCfdpuwb55toyx4K/16Z4A0NWjnMuzwTi5g8AU="; + hash = "sha256-/GO7OcUl0iFgEhr8ZWZQOTNqHn7bt38PpFs0HktmAhE="; }; nativeBuildInputs = [ @@ -67,6 +67,7 @@ buildPythonPackage rec { disabledTests = [ # fails to connect to local server + "test_cache" "test_remote_stylesheet" ] ++ lib.optionals (stdenv.isDarwin) [ # pyo3_runtime.PanicException: event loop thread panicked diff --git a/pkgs/development/python-modules/cvxpy/default.nix b/pkgs/development/python-modules/cvxpy/default.nix index 16a5adbf15948..0d612e3d95a58 100644 --- a/pkgs/development/python-modules/cvxpy/default.nix +++ b/pkgs/development/python-modules/cvxpy/default.nix @@ -20,14 +20,14 @@ buildPythonPackage rec { pname = "cvxpy"; - version = "1.4.2"; + version = "1.4.3"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-CjhqV4jb14t7IN0HFSTsY2yPpys2KOafGrxxTI+YEeU="; + hash = "sha256-sbB4yMBZI60Sjn2BSwvhwzesBSYqeLdXqOb5V2SK2VM="; }; patches = [ diff --git a/pkgs/development/python-modules/cython/default.nix b/pkgs/development/python-modules/cython/default.nix index 2062ae03863ba..e73c09f40b019 100644 --- a/pkgs/development/python-modules/cython/default.nix +++ b/pkgs/development/python-modules/cython/default.nix @@ -24,13 +24,13 @@ let in buildPythonPackage rec { pname = "cython"; - version = "3.0.9"; + version = "3.0.10"; pyproject = true; src = fetchPypi { pname = "Cython"; inherit version; - hash = "sha256-otNU8FnR8FXTTPqmLFtovHisLOq2QHFI1H+1CM87pPM="; + hash = "sha256-3MlnOTMfuFTc9QP5RgdXbP6EiAZsYcpQ39VYNvEy3pk="; }; build-system = [ diff --git a/pkgs/development/python-modules/databricks-connect/default.nix b/pkgs/development/python-modules/databricks-connect/default.nix index 2e3132fb5b50f..85e64fea78231 100644 --- a/pkgs/development/python-modules/databricks-connect/default.nix +++ b/pkgs/development/python-modules/databricks-connect/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "databricks-connect"; - version = "11.3.26"; + version = "11.3.33"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-YjUY4i8PtXc+fWcGjvnRbZkiINprKcS1K9HT5+86E8c="; + hash = "sha256-KcqJ2B2df85H/VIx4ToX0pJ7rYbjDRp3eR7jAFW67do="; }; sourceRoot = "."; diff --git a/pkgs/development/python-modules/dbt-core/default.nix b/pkgs/development/python-modules/dbt-core/default.nix index e440fb6919b11..db61698ebfaa0 100644 --- a/pkgs/development/python-modules/dbt-core/default.nix +++ b/pkgs/development/python-modules/dbt-core/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { pname = "dbt-core"; - version = "1.7.12"; + version = "1.7.13"; pyproject = true; disabled = pythonOlder "3.8"; @@ -42,7 +42,7 @@ buildPythonPackage rec { owner = "dbt-labs"; repo = "dbt-core"; rev = "refs/tags/v${version}"; - hash = "sha256-mkqtlItr6oRsF5S+CPw4fAP/INJ2yw3vcKxEYeB3ItI="; + hash = "sha256-uai1ihdmJpFkQqpx7edWiwwy0ek4dbclR/2OuiNbaXM="; }; sourceRoot = "${src.name}/core"; diff --git a/pkgs/development/python-modules/dbus-python/default.nix b/pkgs/development/python-modules/dbus-python/default.nix index be7504e5dc372..4e6f67f0a8ec9 100644 --- a/pkgs/development/python-modules/dbus-python/default.nix +++ b/pkgs/development/python-modules/dbus-python/default.nix @@ -1,47 +1,99 @@ -{ lib, stdenv, fetchPypi, buildPythonPackage, python, pkg-config, dbus, dbus-glib, isPyPy -, ncurses, pygobject3, isPy3k, pythonAtLeast }: +{ lib +, fetchPypi +, buildPythonPackage +, fetchpatch +, isPyPy +, python + +# build-system +, meson +, meson-python +, pkg-config + +# native dependencies +, dbus +, dbus-glib +}: buildPythonPackage rec { pname = "dbus-python"; - version = "1.2.18"; + version = "1.3.2"; + pyproject = true; - # ModuleNotFoundError: No module named 'distutils' - disabled = isPyPy || pythonAtLeast "3.12"; - format = "other"; - outputs = [ "out" "dev" ]; + disabled = isPyPy; + + outputs = [ + "out" + "dev" + ]; src = fetchPypi { inherit pname version; - sha256 = "0q3jrw515z98mqdk9x822nd95rky455zz9876f1nqna5igkd3gcj"; + hash = "sha256-rWeBkwhhi1BpU3viN/jmjKHH/Mle5KEh/mhFsUGCSPg="; }; patches = [ - ./fix-includedir.patch + # reduce required dependencies + # https://gitlab.freedesktop.org/dbus/dbus-python/-/merge_requests/23 + (fetchpatch { + url = "https://gitlab.freedesktop.org/dbus/dbus-python/-/commit/d5e19698a8d6e1485f05b67a5b2daa2392819aaf.patch"; + hash = "sha256-Rmj/ByRLiLnIF3JsMBElJugxsG8IARcBdixLhoWgIYU="; + }) ]; - preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) '' - MACOSX_DEPLOYMENT_TARGET=10.16 + postPatch = '' + # we provide patchelf natively, not through the python package + sed -i '/patchelf/d' pyproject.toml + + # dont run autotols configure phase + rm configure.ac configure + + patchShebangs test/*.sh ''; - configureFlags = [ - "PYTHON=${python.pythonOnBuildForHost.interpreter}" + nativeBuildInputs = [ + meson + meson-python + pkg-config ]; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ dbus dbus-glib ] - # My guess why it's sometimes trying to -lncurses. - # It seems not to retain the dependency anyway. - ++ lib.optional (! python ? modules) ncurses; + buildInputs = [ + dbus + dbus-glib + ]; - doCheck = isPy3k; - nativeCheckInputs = [ dbus.out pygobject3 ]; + pypaBuildFlags = [ + # Don't discard meson build directory, still needed for tests! + "-Cbuild-dir=_meson-build" + ]; + # workaround bug in meson-python + # https://github.com/mesonbuild/meson-python/issues/240 postInstall = '' - cp -r dbus_python.egg-info $out/${python.sitePackages}/ + mkdir -p $dev/lib + mv $out/${python.sitePackages}/.dbus_python.mesonpy.libs/pkgconfig/ $dev/lib + ''; + + # make sure the Cflags in the pkgconfig file are correct and make the structure backwards compatible + postFixup = '' + ln -s $dev/include/*/dbus_python/dbus-1.0/ $dev/include/dbus-1.0 + ''; + + nativeCheckInputs = [ + dbus.out + ]; + + checkPhase = '' + runHook preCheck + + meson test -C _meson-build --no-rebuild --print-errorlogs + + runHook postCheck ''; meta = with lib; { description = "Python DBus bindings"; + homepage = "https://gitlab.freedesktop.org/dbus/dbus-python"; license = licenses.mit; platforms = dbus.meta.platforms; maintainers = with maintainers; [ ]; diff --git a/pkgs/development/python-modules/dbus-python/fix-includedir.patch b/pkgs/development/python-modules/dbus-python/fix-includedir.patch deleted file mode 100644 index e3bb0682b5c44..0000000000000 --- a/pkgs/development/python-modules/dbus-python/fix-includedir.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- a/dbus-python.pc.in -+++ b/dbus-python.pc.in -@@ -9,4 +9,4 @@ - Description: Python bindings for D-Bus - Requires: dbus-1 >= 1.0 - Version: @VERSION@ --Cflags: -I${includedir} -+Cflags: -I${includedir}/dbus-1.0 diff --git a/pkgs/development/python-modules/dbutils/default.nix b/pkgs/development/python-modules/dbutils/default.nix index 570f770e7777b..6ad3438704700 100644 --- a/pkgs/development/python-modules/dbutils/default.nix +++ b/pkgs/development/python-modules/dbutils/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "dbutils"; - version = "3.0.3"; + version = "3.1.0"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { inherit version; pname = "DBUtils"; - hash = "sha256-jkhWWxKtK0sfIU3gKU3utLKFePWyq7QNaMKSS2TX4Ac="; + hash = "sha256-6lKLoRBjJA7qgjRevG98yTJMBuQulCCwC80kWpW/zCQ="; }; nativeCheckInputs = [ diff --git a/pkgs/development/python-modules/django-auth-ldap/default.nix b/pkgs/development/python-modules/django-auth-ldap/default.nix index 3983cf3f3661a..b2f5fa74b41c5 100644 --- a/pkgs/development/python-modules/django-auth-ldap/default.nix +++ b/pkgs/development/python-modules/django-auth-ldap/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "django-auth-ldap"; - version = "4.7.0"; + version = "4.8.0"; format = "pyproject"; disabled = isPy27; src = fetchPypi { inherit pname version; - hash = "sha256-jeplN2uLL6G+7lI0h2DjCC5kKTmlA4y+iBpeY4G2W4o="; + hash = "sha256-YEJQk43cn9phnyR8elmwsvBuU6fT9GoVbyiqMN1xpzg="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/django-bootstrap3/default.nix b/pkgs/development/python-modules/django-bootstrap3/default.nix index 6a29fc7630aa1..4ac4695bd16c3 100644 --- a/pkgs/development/python-modules/django-bootstrap3/default.nix +++ b/pkgs/development/python-modules/django-bootstrap3/default.nix @@ -16,14 +16,14 @@ buildPythonPackage rec { pname = "django-bootstrap3"; - version = "23.6"; + version = "24.2"; format = "pyproject"; src = fetchFromGitHub { owner = "zostera"; repo = "django-bootstrap3"; rev = "refs/tags/v${version}"; - hash = "sha256-qqG9w0bQYoQgWXCks/WwwQVoh2DhIMLaFXDQ4z6D84g="; + hash = "sha256-5nBJ5vfsoGoaG1s3K1hCHcSnGf51ZirYYg+uJGsBmG8="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/django-bootstrap4/default.nix b/pkgs/development/python-modules/django-bootstrap4/default.nix index b0a11d9044d37..d148162b9ab09 100644 --- a/pkgs/development/python-modules/django-bootstrap4/default.nix +++ b/pkgs/development/python-modules/django-bootstrap4/default.nix @@ -18,14 +18,14 @@ buildPythonPackage rec { pname = "django-bootstrap4"; - version = "24.1"; + version = "24.3"; format = "pyproject"; src = fetchFromGitHub { owner = "zostera"; repo = "django-bootstrap4"; rev = "refs/tags/v${version}"; - hash = "sha256-TCHie5h/VRJ9NSg7wKnWotFHm328kxIp+xFXEa8wL1c="; + hash = "sha256-sZY/0f1PbYQu9fN65H6H7xLvsdE9AXK0cMt9TyAKuUw="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/django-bootstrap5/default.nix b/pkgs/development/python-modules/django-bootstrap5/default.nix index 76405e9e5cd61..ac983c5ac5e4d 100644 --- a/pkgs/development/python-modules/django-bootstrap5/default.nix +++ b/pkgs/development/python-modules/django-bootstrap5/default.nix @@ -4,35 +4,53 @@ , pythonOlder # build-system -, hatchling +, setuptools +, setuptools-scm # dependencies +, django + +# tests , beautifulsoup4 , pillow -, django +, pytest-django +, pytestCheckHook }: buildPythonPackage rec { pname = "django-bootstrap5"; - version = "23.3"; - format = "pyproject"; + version = "24.1"; + pyproject = true; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "zostera"; repo = "django-bootstrap5"; rev = "v${version}"; - hash = "sha256-FIwDyZ5I/FSaEiQKRfanzAGij86u8y85Wal0B4TrI7c="; + hash = "sha256-JbmwEPkj34tsK3tUtb56FPjU0emwERVXEc4fzlepdXY="; }; - nativeBuildInputs = [ - hatchling + build-system = [ + setuptools + setuptools-scm ]; - propagatedBuildInputs = [ - django + nativeCheckInputs = [ beautifulsoup4 + (django.override { withGdal = true; }) pillow + pytest-django + pytestCheckHook + ]; + + preCheck = '' + export DJANGO_SETTINGS_MODULE=tests.app.settings + ''; + + disabledTests = [ + # urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution> + "test_get_bootstrap_setting" ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/django-configurations/default.nix b/pkgs/development/python-modules/django-configurations/default.nix index 087ffab301391..53d75bed9bfa1 100644 --- a/pkgs/development/python-modules/django-configurations/default.nix +++ b/pkgs/development/python-modules/django-configurations/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "django-configurations"; - version = "2.5"; + version = "2.5.1"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-Y/olLEDciOoXuLkPX0oxonJuWGrLH/Dtx0wijGHxnl0="; + hash = "sha256-blCDdX4rvfm7eFBWdTa5apNRX2sXUD10ko/2KNsuDpQ="; }; buildInputs = [ diff --git a/pkgs/development/python-modules/django-mailman3/default.nix b/pkgs/development/python-modules/django-mailman3/default.nix index 026788caf646e..094ca8a6d91da 100644 --- a/pkgs/development/python-modules/django-mailman3/default.nix +++ b/pkgs/development/python-modules/django-mailman3/default.nix @@ -2,7 +2,10 @@ , buildPythonPackage , fetchPypi -# propagates +# build-system +, pdm-backend + +# dependencies , django-gravatar2 , django-allauth , mailmanclient @@ -17,20 +20,20 @@ buildPythonPackage rec { pname = "django-mailman3"; - version = "1.3.11"; - format = "setuptools"; + version = "1.3.12"; + pyproject = true; src = fetchPypi { - inherit pname version; - hash = "sha256-uIjJaZHWL2evj+oISLprvKWT5Sm5f2EKgUD1twL1VbQ="; + pname = "django_mailman3"; + inherit version; + hash = "sha256-MnQlT5ElNnStLUKyOXnI7ZDDaBwfp+h9tbOC+cwB0es="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace 'django>=3.2,<4.2' 'django>=3.2,<4.3' - ''; + build-system = [ + pdm-backend + ]; - propagatedBuildInputs = [ + dependencies = [ django-allauth django-gravatar2 mailmanclient @@ -43,6 +46,10 @@ buildPythonPackage rec { pytestCheckHook ]; + preCheck = '' + export DJANGO_SETTINGS_MODULE=django_mailman3.tests.settings_test + ''; + pythonImportsCheck = [ "django_mailman3" ]; diff --git a/pkgs/development/python-modules/dkimpy/default.nix b/pkgs/development/python-modules/dkimpy/default.nix index 6b639f8cc8c3e..541c3bef56e92 100644 --- a/pkgs/development/python-modules/dkimpy/default.nix +++ b/pkgs/development/python-modules/dkimpy/default.nix @@ -3,12 +3,12 @@ buildPythonPackage rec { pname = "dkimpy"; - version = "1.1.5"; + version = "1.1.6"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-mmZ/hmS3Lrn4qhJQsHV8w5gqto9wxIrzkxe1jPYvLXU="; + hash = "sha256-DOctlh9EPo+fBWlLNUVC3uU04I4rjFtgxi1drKfB2g8="; }; nativeCheckInputs = [ pytest ]; diff --git a/pkgs/development/python-modules/docplex/default.nix b/pkgs/development/python-modules/docplex/default.nix index 2f5c485cf631d..29395e91a5f1d 100644 --- a/pkgs/development/python-modules/docplex/default.nix +++ b/pkgs/development/python-modules/docplex/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "docplex"; - version = "2.25.236"; + version = "2.27.239"; format = "setuptools"; # No source available from official repo src = fetchPypi { inherit pname version; - hash = "sha256-JWkUtMAROk4cePMuogx9dtyO/ihv6JAnDnXPrVD+UQ8="; + hash = "sha256-Ug5+jDBBbamqd0JebzHvjLZoTRRPYWQiJl6g8BK0aMQ="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/docutils/default.nix b/pkgs/development/python-modules/docutils/default.nix index 136f679fcf6e2..161e5361c1c14 100644 --- a/pkgs/development/python-modules/docutils/default.nix +++ b/pkgs/development/python-modules/docutils/default.nix @@ -1,24 +1,36 @@ { stdenv , lib -, fetchPypi +, fetchgit , buildPythonPackage +, flit-core +, pillow , python , pythonOlder }: -buildPythonPackage rec { +let self = buildPythonPackage rec { pname = "docutils"; - version = "0.20.1"; + version = "0.21.1"; + pyproject = true; disabled = pythonOlder "3.7"; - format = "setuptools"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-8IpOJ2w6FYOobc4+NKuj/gTQK7ot1R7RYQYkToqSPjs="; + src = fetchgit { + url = "git://repo.or.cz/docutils.git"; + rev = "docutils-${version}"; + hash = "sha256-ahnj6iKjyUCDxhgxJdwEb8huFIGpbuuLQBHDzKj6O9E="; }; + build-system = [ flit-core ]; + + # infinite recursion via sphinx and pillow + doCheck = false; + passthru.tests.pytest = self.overridePythonAttrs { doCheck = true; }; + + nativeCheckInputs = [ + pillow + ]; + # Only Darwin needs LANG, but we could set it in general. # It's done here conditionally to prevent mass-rebuilds. checkPhase = lib.optionalString stdenv.isDarwin ''LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" '' + '' @@ -38,4 +50,5 @@ buildPythonPackage rec { license = with licenses; [ publicDomain bsd2 psfl gpl3Plus ]; maintainers = with maintainers; [ AndersonTorres ]; }; -} +}; +in self diff --git a/pkgs/development/python-modules/dogtail/default.nix b/pkgs/development/python-modules/dogtail/default.nix index d0b7e983a0994..5186d95670584 100644 --- a/pkgs/development/python-modules/dogtail/default.nix +++ b/pkgs/development/python-modules/dogtail/default.nix @@ -11,7 +11,7 @@ , fetchurl , dbus , xvfb-run -, wrapGAppsHook +, wrapGAppsHook3 # , fetchPypi }: @@ -36,7 +36,7 @@ buildPythonPackage { ./nix-support.patch ]; - nativeBuildInputs = [ gobject-introspection dbus xvfb-run wrapGAppsHook ]; # for setup hooks + nativeBuildInputs = [ gobject-introspection dbus xvfb-run wrapGAppsHook3 ]; # for setup hooks propagatedBuildInputs = [ at-spi2-core gtk3 pygobject3 pyatspi pycairo ]; checkPhase = '' diff --git a/pkgs/development/python-modules/dulwich/default.nix b/pkgs/development/python-modules/dulwich/default.nix index 49789421af346..65a4eb19d88d9 100644 --- a/pkgs/development/python-modules/dulwich/default.nix +++ b/pkgs/development/python-modules/dulwich/default.nix @@ -76,6 +76,8 @@ buildPythonPackage rec { "test_cyrillic" # OSError: [Errno 84] Invalid or incomplete multibyte or wide character: b'/build/tmpfseetobk/test/\xc0' "test_commit_no_encode_decode" + # https://github.com/jelmer/dulwich/issues/1279 + "test_init_connector" ]; disabledTestPaths = [ diff --git a/pkgs/development/python-modules/dwdwfsapi/default.nix b/pkgs/development/python-modules/dwdwfsapi/default.nix index 58b62032e33bc..824d23cbe23ea 100644 --- a/pkgs/development/python-modules/dwdwfsapi/default.nix +++ b/pkgs/development/python-modules/dwdwfsapi/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, hatchling , requests , ciso8601 , pythonOlder @@ -8,17 +9,21 @@ buildPythonPackage rec { pname = "dwdwfsapi"; - version = "1.0.7"; - format = "setuptools"; + version = "1.1.0"; + pyproject = true; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-7le1F+581JwrBX/C1aaqsDaSpIt0yNsNKiGnJtHUg5s="; + hash = "sha256-7dIVD+4MiYtsjAM5j67MlbiUN2Q5DpK6bUU0ZuHN2rk="; }; - propagatedBuildInputs = [ + build-system = [ + hatchling + ]; + + dependencies = [ requests ciso8601 ]; diff --git a/pkgs/development/python-modules/ecdsa/default.nix b/pkgs/development/python-modules/ecdsa/default.nix index 2ce07e5b6b2b8..3380d0f096167 100644 --- a/pkgs/development/python-modules/ecdsa/default.nix +++ b/pkgs/development/python-modules/ecdsa/default.nix @@ -7,12 +7,12 @@ buildPythonPackage rec { pname = "ecdsa"; - version = "0.18.0"; + version = "0.19.0"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-GQNIBBVZ4hsiodZc7khSgsoRpvgdUD/duE1QF+ntHkk="; + hash = "sha256-YOqtEZllmQDdCvUh7UYreTu9+GdDKzlI6HQWrkyva/g="; }; propagatedBuildInputs = [ six ]; diff --git a/pkgs/development/python-modules/elastic-transport/default.nix b/pkgs/development/python-modules/elastic-transport/default.nix index ac2acebc6f7f1..c4f6b0435e84e 100644 --- a/pkgs/development/python-modules/elastic-transport/default.nix +++ b/pkgs/development/python-modules/elastic-transport/default.nix @@ -4,19 +4,24 @@ , certifi , fetchFromGitHub , mock +, opentelemetry-api +, opentelemetry-sdk +, orjson , pytest-asyncio , pytest-httpserver , pytestCheckHook , pythonOlder , requests +, respx +, setuptools , trustme , urllib3 }: buildPythonPackage rec { pname = "elastic-transport"; - version = "8.12.0"; - format = "setuptools"; + version = "8.13.0"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -24,7 +29,7 @@ buildPythonPackage rec { owner = "elastic"; repo = "elastic-transport-python"; rev = "refs/tags/v${version}"; - hash = "sha256-ZLzaCiopdkhpqjzZzv/NT1+f5bHZYuqQvSgM5jeMaqg="; + hash = "sha256-KmZCaAbzbfqbPwFuF43ckwgVhZVbPvwjF7uqPKHml9Q="; }; postPatch = '' @@ -32,6 +37,10 @@ buildPythonPackage rec { --replace " --cov-report=term-missing --cov=elastic_transport" "" ''; + build-system = [ + setuptools + ]; + propagatedBuildInputs = [ urllib3 certifi @@ -40,10 +49,14 @@ buildPythonPackage rec { nativeCheckInputs = [ aiohttp mock + opentelemetry-api + opentelemetry-sdk + orjson pytest-asyncio pytest-httpserver pytestCheckHook requests + respx trustme ]; diff --git a/pkgs/development/python-modules/elasticsearch/default.nix b/pkgs/development/python-modules/elasticsearch/default.nix index a89cb3f0a4c5e..12aac19267e8c 100644 --- a/pkgs/development/python-modules/elasticsearch/default.nix +++ b/pkgs/development/python-modules/elasticsearch/default.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "elasticsearch"; - version = "8.12.1"; + version = "8.13.0"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-AMmXcg+9Dyr+VBfIGTz2XRFoF6AlDeBSHjDD6B8AuKw="; + sha256 = "sha256-5Ovrsi0J8O+DnCa2qpjhnM1ja8t38IwStWKwLKzV50Q="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/elasticsearch8/default.nix b/pkgs/development/python-modules/elasticsearch8/default.nix index c83de92d03bf4..c1fa2c91372cc 100644 --- a/pkgs/development/python-modules/elasticsearch8/default.nix +++ b/pkgs/development/python-modules/elasticsearch8/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "elasticsearch8"; - version = "8.12.1"; + version = "8.13.0"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-RuL1zYmEZEaaXb2LEW+BUmo7TcdGHH/5fjgesxXtbls="; + hash = "sha256-NWg+/dr8jXCCLeXBAXY1yL6/2CB0xCO5tswY4y/5erw="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/execnet/default.nix b/pkgs/development/python-modules/execnet/default.nix index eb184c180d5b9..76f9b9b4df651 100644 --- a/pkgs/development/python-modules/execnet/default.nix +++ b/pkgs/development/python-modules/execnet/default.nix @@ -10,12 +10,12 @@ buildPythonPackage rec { pname = "execnet"; - version = "2.0.2"; + version = "2.1.1"; format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-zFm8RCN0L9ca0icSLrDdRNtR77PcQJW0WsmgjHcAlq8="; + hash = "sha256-UYm1LGEhwk/q4ogWarQbMlScfiNIZSc2VAuebn1OcuM="; }; postPatch = '' diff --git a/pkgs/development/python-modules/faker/default.nix b/pkgs/development/python-modules/faker/default.nix index ec667330a62bc..c0944e473fe7a 100644 --- a/pkgs/development/python-modules/faker/default.nix +++ b/pkgs/development/python-modules/faker/default.nix @@ -13,13 +13,13 @@ buildPythonPackage rec { pname = "faker"; - version = "24.0.0"; + version = "24.11.0"; pyproject = true; src = fetchPypi { pname = "Faker"; inherit version; - hash = "sha256-6m94TEBzDeD3cGfknnjN1ZDvsAvsPTP1d0kiYiBsF/w="; + hash = "sha256-NLlHWBwrztNAw5s1+J2/rE81aTLP/4/ok73oVJA/Dm4="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/fastapi/default.nix b/pkgs/development/python-modules/fastapi/default.nix index 67193638dd5a6..92850c336bba7 100644 --- a/pkgs/development/python-modules/fastapi/default.nix +++ b/pkgs/development/python-modules/fastapi/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { pname = "fastapi"; - version = "0.110.0"; + version = "0.110.2"; pyproject = true; disabled = pythonOlder "3.7"; @@ -47,7 +47,7 @@ buildPythonPackage rec { owner = "tiangolo"; repo = "fastapi"; rev = "refs/tags/${version}"; - hash = "sha256-OXWJ1PKJSJGzYNT8HHXvxMxjUtI4K6edpI+Z5B3TvhI="; + hash = "sha256-qUh5exkXVRcKIO0t4KIOZhhpsftj3BrWaL2asf8RqUI="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/filelock/default.nix b/pkgs/development/python-modules/filelock/default.nix index b32335bb24754..5b739bcc8fda4 100644 --- a/pkgs/development/python-modules/filelock/default.nix +++ b/pkgs/development/python-modules/filelock/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "filelock"; - version = "3.13.1"; + version = "3.13.4"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-Uh9fVsUPhCb14DrTsoG0kKh+8VvGxSbxaCkPDHFI1E4="; + hash = "sha256-0T9GZhi/3nK9LBglXiafclQsbnDnusg6AjLWscxcjPQ="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/flask/default.nix b/pkgs/development/python-modules/flask/default.nix index 8c60066b1975d..77d26dc24b824 100644 --- a/pkgs/development/python-modules/flask/default.nix +++ b/pkgs/development/python-modules/flask/default.nix @@ -31,12 +31,12 @@ buildPythonPackage rec { pname = "flask"; - version = "3.0.2"; + version = "3.0.3"; format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-giwD9LeZIEJQp+6Ese3cQGZTlTM5c9+53uv+Ql/vy30="; + hash = "sha256-zrJ7CvOCPqJzeSik2Z0SWgYXW4USxEXL2anOIA73aEI="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/flexmock/default.nix b/pkgs/development/python-modules/flexmock/default.nix index 45b2981ba9596..7ec46f29da6f5 100644 --- a/pkgs/development/python-modules/flexmock/default.nix +++ b/pkgs/development/python-modules/flexmock/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "flexmock"; - version = "0.12.0"; + version = "0.12.1"; pyproject = true; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-YdBvPRRCuBW3qoWh9HvoONBW9fXRTO/teuv7A0c9FKs="; + hash = "sha256-ILaQr6T/jG8xVI2JbW1BzKH8kFCkz2KLll6kNOxUjuM="; }; build-system = [ diff --git a/pkgs/development/python-modules/fontbakery/default.nix b/pkgs/development/python-modules/fontbakery/default.nix index 3076e6a4c469c..7ac5f86b1ee2a 100644 --- a/pkgs/development/python-modules/fontbakery/default.nix +++ b/pkgs/development/python-modules/fontbakery/default.nix @@ -47,11 +47,11 @@ buildPythonPackage rec { pname = "fontbakery"; - version = "0.11.2"; + version = "0.12.2"; src = fetchPypi { inherit pname version; - hash = "sha256-61EXlf+d5kJeUF41OEnGNLaOcSvFWUDFgarVvHQZYmw="; + hash = "sha256-sHkTxu8TdPXbUZvpJH46SF8U4JNIzfFb5HJEXCqomOI="; }; pyproject = true; diff --git a/pkgs/development/python-modules/fontmake/default.nix b/pkgs/development/python-modules/fontmake/default.nix index 7911750bbeeb5..d46083361e80a 100644 --- a/pkgs/development/python-modules/fontmake/default.nix +++ b/pkgs/development/python-modules/fontmake/default.nix @@ -12,12 +12,12 @@ buildPythonPackage rec { pname = "fontmake"; - version = "3.8.1"; + version = "3.9.0"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-m0cRLm9Jbqlsf9NwR7Lma2NZYUjy5IDJYOorVbdLDuw="; + hash = "sha256-KrfT0fvE1fhaM2RH4LqRUda7yMHg2T59UdGi3SSZP7s="; extension = "zip"; }; diff --git a/pkgs/development/python-modules/gamble/default.nix b/pkgs/development/python-modules/gamble/default.nix index 6cdfc4410b34e..c4bb320271023 100644 --- a/pkgs/development/python-modules/gamble/default.nix +++ b/pkgs/development/python-modules/gamble/default.nix @@ -7,14 +7,14 @@ buildPythonPackage rec { pname = "gamble"; - version = "0.11"; + version = "0.13"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-zsEBqhKidgO1e0lpKhw+LY75I2Df+IefNLaSkBBFKFU="; + hash = "sha256-P0w1Q1Kus742Yu/MpqheEbp1+Pt21f163JWZfKJj3SA="; }; nativeCheckInputs = [ diff --git a/pkgs/development/python-modules/geventhttpclient/default.nix b/pkgs/development/python-modules/geventhttpclient/default.nix index 1943888df752b..d61e390135c3d 100644 --- a/pkgs/development/python-modules/geventhttpclient/default.nix +++ b/pkgs/development/python-modules/geventhttpclient/default.nix @@ -3,10 +3,12 @@ , buildPythonPackage , certifi , dpkt -, fetchPypi +, fetchFromGitHub , gevent +, llhttp , pytestCheckHook , pythonOlder +, setuptools , six , stdenv , urllib3 @@ -14,27 +16,34 @@ buildPythonPackage rec { pname = "geventhttpclient"; - version = "2.0.12"; - format = "setuptools"; + version = "2.3.1"; + pyproject = true; disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - hash = "sha256-6+oI55wap9A7Q5NrNHwPhzVub7HGhFc1oR8jyUnGVfc="; + src = fetchFromGitHub { + owner = "geventhttpclient"; + repo = "geventhttpclient"; + rev = "refs/tags/${version}"; + # TODO: unvendor llhttp + fetchSubmodules = true; + hash = "sha256-uOGnwPbvTam14SFTUT0UrwxHfP4a5cn3a7EhLoGBUrA="; }; - propagatedBuildInputs = [ + build-system = [ + setuptools + ]; + + dependencies = [ brotli certifi gevent - six + urllib3 ]; nativeCheckInputs = [ dpkt pytestCheckHook - urllib3 ]; # lots of: [Errno 48] Address already in use: ('127.0.0.1', 54323) @@ -42,15 +51,12 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; - disabledTests = [ - # socket.gaierror: [Errno -3] Temporary failure in name resolution - "test_client_simple" - "test_client_without_leading_slas" - "test_request_with_headers" - "test_response_context_manager" - "test_client_ssl" - "test_ssl_fail_invalid_certificate" - "test_multi_queries_greenlet_safe" + preCheck = '' + rm -rf geventhttpclient + ''; + + pytestFlagsArray = [ + "-m 'not network'" ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/glyphsets/default.nix b/pkgs/development/python-modules/glyphsets/default.nix index f59e7f09607d7..5decc00464a32 100644 --- a/pkgs/development/python-modules/glyphsets/default.nix +++ b/pkgs/development/python-modules/glyphsets/default.nix @@ -14,12 +14,12 @@ buildPythonPackage rec { pname = "glyphsets"; - version = "0.6.14"; + version = "0.6.19"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-lMRgchadgKyfFLw6ZF1sJAKBAK75zmw77L34MW9p7TI="; + hash = "sha256-vO9gzMCXPlkkM9MtRhlulAnQi6uZMtJU1NqcP8w6tCo="; }; dependencies = [ diff --git a/pkgs/development/python-modules/google-auth/default.nix b/pkgs/development/python-modules/google-auth/default.nix index efe5dcd33541d..b8ff0805b01e8 100644 --- a/pkgs/development/python-modules/google-auth/default.nix +++ b/pkgs/development/python-modules/google-auth/default.nix @@ -26,14 +26,14 @@ buildPythonPackage rec { pname = "google-auth"; - version = "2.28.1"; + version = "2.29.0"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-NPwwRsJXztzxYi/Esx/Cvnkj2bTUSXPUgRJezFDYOIU="; + hash = "sha256-Zy3/My0HMidVD/x0V4aKxCGNbFALFV/mzBfSsTYCw2A="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/google-cloud-iam/default.nix b/pkgs/development/python-modules/google-cloud-iam/default.nix index 93c85687dd4cc..c5b192169bef4 100644 --- a/pkgs/development/python-modules/google-cloud-iam/default.nix +++ b/pkgs/development/python-modules/google-cloud-iam/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "google-cloud-iam"; - version = "2.14.3"; + version = "2.15.0"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-yC6ZP4qSGcW6H84TnDSu1vAZ3V+bRc6VbVQwWD0q8m4="; + hash = "sha256-6TgaGCPlFi9owoBI/xowe6Og5Tja9getfUHP47dWpvA="; }; propagatedBuildInputs = [ @@ -34,6 +34,11 @@ buildPythonPackage rec { pytestCheckHook ]; + disabledTestPaths =[ + # unmaintained, reference wrong import path for google.cloud.iam.v1 + "tests/unit/gapic/iam_admin_v1/test_iam.py" + ]; + pythonImportsCheck = [ "google.cloud.iam_credentials" "google.cloud.iam_credentials_v1" diff --git a/pkgs/development/python-modules/google-cloud-kms/default.nix b/pkgs/development/python-modules/google-cloud-kms/default.nix index 45fd8082d3d05..2dec1cea50a31 100644 --- a/pkgs/development/python-modules/google-cloud-kms/default.nix +++ b/pkgs/development/python-modules/google-cloud-kms/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "google-cloud-kms"; - version = "2.21.3"; + version = "2.21.4"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-XofVp7fY9bXJ8PZI81KniGlRqLTHJwPrnOe6gHb8JTM="; + hash = "sha256-AQW8FKOYt/05GUO766/VkY8+NAaCepiXObLcOInMEhg="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/gradio/default.nix b/pkgs/development/python-modules/gradio/default.nix index 6c735123aca18..0d4838e372de6 100644 --- a/pkgs/development/python-modules/gradio/default.nix +++ b/pkgs/development/python-modules/gradio/default.nix @@ -62,7 +62,7 @@ buildPythonPackage rec { pname = "gradio"; - version = "4.22.0"; + version = "4.27.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -71,7 +71,7 @@ buildPythonPackage rec { # and upstream has stopped tagging releases since 3.41.0 src = fetchPypi { inherit pname version; - hash = "sha256-nhrT509xB3+R+HF6TF5AQGnfufT6iNmzjxZgcVL7fBo="; + hash = "sha256-617zutFhS8NGO4+fcALH8aKbk+reGC65DNWKVVKiWEw="; }; # fix packaging.ParserSyntaxError, which can't handle comments diff --git a/pkgs/development/python-modules/grpcio-channelz/default.nix b/pkgs/development/python-modules/grpcio-channelz/default.nix index ba66ffe4e3440..d4af468320185 100644 --- a/pkgs/development/python-modules/grpcio-channelz/default.nix +++ b/pkgs/development/python-modules/grpcio-channelz/default.nix @@ -8,12 +8,12 @@ buildPythonPackage rec { pname = "grpcio-channelz"; - version = "1.62.1"; + version = "1.62.2"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-e+8XBt/tt4lNbgNGemBjrBCxUAR7aWXi+0gU1MKmQkU="; + hash = "sha256-bkrCxD12skXF9m2Y9SPbCHhrGGEoplXubyCjCn5o5Pk="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/grpcio-status/default.nix b/pkgs/development/python-modules/grpcio-status/default.nix index 4fd21a8bf1597..033e8ae58ae4d 100644 --- a/pkgs/development/python-modules/grpcio-status/default.nix +++ b/pkgs/development/python-modules/grpcio-status/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "grpcio-status"; - version = "1.62.1"; + version = "1.62.2"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-NDHIq7qwBUkSxB31xy8D3fO3pnvoooe7PBijRW+W/3c="; + hash = "sha256-YuG/ywICWhzXNzKi0zZy0+nQ300hwSxR4LvK8JurdCo="; }; postPatch = '' diff --git a/pkgs/development/python-modules/grpcio-testing/default.nix b/pkgs/development/python-modules/grpcio-testing/default.nix index c5cdf76a5ef67..54022a0433cec 100644 --- a/pkgs/development/python-modules/grpcio-testing/default.nix +++ b/pkgs/development/python-modules/grpcio-testing/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "grpcio-testing"; - version = "1.62.1"; + version = "1.62.2"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-yyaVEAqykAtRz9vbVv4SEA1JWA8QrgZ6LKsRfo/HRu0="; + hash = "sha256-dNGeGQnpQbGmvvf71fnvMwWZ9nb7BrsGB8hFDtVVnfI="; }; postPatch = '' diff --git a/pkgs/development/python-modules/grpcio-tools/default.nix b/pkgs/development/python-modules/grpcio-tools/default.nix index 4aef9f5fbd0f4..6b5c5cdda99fe 100644 --- a/pkgs/development/python-modules/grpcio-tools/default.nix +++ b/pkgs/development/python-modules/grpcio-tools/default.nix @@ -2,12 +2,12 @@ buildPythonPackage rec { pname = "grpcio-tools"; - version = "1.62.1"; + version = "1.62.2"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-pJkeXuipereRKW079+hwCxRFY1zBgozJjflFyhgC1/I="; + hash = "sha256-X9XhWCtnjmuUHuX1gJNAvl4HJGkd9SmaroImZA+U4Y8="; }; postPatch = '' diff --git a/pkgs/development/python-modules/grpcio/default.nix b/pkgs/development/python-modules/grpcio/default.nix index e890280c676c5..582314bf10736 100644 --- a/pkgs/development/python-modules/grpcio/default.nix +++ b/pkgs/development/python-modules/grpcio/default.nix @@ -18,11 +18,11 @@ buildPythonPackage rec { pname = "grpcio"; format = "setuptools"; - version = "1.62.1"; + version = "1.62.2"; src = fetchPypi { inherit pname version; - hash = "sha256-bEVeAI+obZ6anYW7dtpCd8DX2WaKO/pw2+hunzx1mUc="; + hash = "sha256-x3YYBx2Wt6i+LBBwGphTeCO5xluiVsC5Bn4FlM29lU0="; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/python-modules/gst-python/default.nix b/pkgs/development/python-modules/gst-python/default.nix index 7b557a605a5b7..8a6ee21ede7df 100644 --- a/pkgs/development/python-modules/gst-python/default.nix +++ b/pkgs/development/python-modules/gst-python/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "gst-python"; - version = "1.22.9"; + version = "1.24.2"; format = "other"; @@ -22,7 +22,7 @@ buildPythonPackage rec { src = fetchurl { url = "https://gstreamer.freedesktop.org/src/gst-python/${pname}-${version}.tar.xz"; - hash = "sha256-P51cb/79omhwN0S1kqazmDqmcjJzsSIOy8tiwqWAAAk="; + hash = "sha256-vZDzvIrxfc478mtmU377SVGGn/zmQD9ZhGG5heKy144="; }; # Python 2.x is not supported. diff --git a/pkgs/development/python-modules/h5py/default.nix b/pkgs/development/python-modules/h5py/default.nix index 4afd562e033dc..bc23ce61c1765 100644 --- a/pkgs/development/python-modules/h5py/default.nix +++ b/pkgs/development/python-modules/h5py/default.nix @@ -2,7 +2,6 @@ , fetchPypi , buildPythonPackage , pythonOlder -, oldest-supported-numpy , setuptools , wheel , numpy @@ -21,21 +20,21 @@ let mpi = hdf5.mpi; mpiSupport = hdf5.mpiSupport; in buildPythonPackage rec { - version = "3.10.0"; + version = "3.11.0"; pname = "h5py"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-2TrcSM7rMzR+skpjT7eH78euRkTm6kunM9CZYFBFwEk="; + hash = "sha256-e36PeAcqLt7IfJg28l80ID/UkqRHVwmhi0F6M8+yH6k="; }; # avoid strict pinning of numpy postPatch = '' - substituteInPlace setup.py \ - --replace "mpi4py ==" "mpi4py >=" + substituteInPlace pyproject.toml \ + --replace-fail "numpy >=2.0.0rc1" "numpy" ''; HDF5_DIR = "${hdf5}"; @@ -51,7 +50,7 @@ in buildPythonPackage rec { nativeBuildInputs = [ cython_0 - oldest-supported-numpy + numpy pkgconfig setuptools wheel diff --git a/pkgs/development/python-modules/hatchling/default.nix b/pkgs/development/python-modules/hatchling/default.nix index 4d5d345d625dd..9f8ca78a96aee 100644 --- a/pkgs/development/python-modules/hatchling/default.nix +++ b/pkgs/development/python-modules/hatchling/default.nix @@ -20,13 +20,13 @@ buildPythonPackage rec { pname = "hatchling"; - version = "1.22.4"; + version = "1.24.1"; format = "pyproject"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-ii3OyW1/uEg4LvWEjlrEP9rmQfNaCKP6tRFr1JXzQW4="; + hash = "sha256-UfhhiR6YxAROtFUWOnN+XSMo16p0iQsYLbLYD+4ipJc="; }; # listed in backend/pyproject.toml diff --git a/pkgs/development/python-modules/httpcore/default.nix b/pkgs/development/python-modules/httpcore/default.nix index 212db973e9e0a..df9ec754352ef 100644 --- a/pkgs/development/python-modules/httpcore/default.nix +++ b/pkgs/development/python-modules/httpcore/default.nix @@ -18,11 +18,12 @@ # for passthru.tests , httpx , httpx-socks +, respx }: buildPythonPackage rec { pname = "httpcore"; - version = "1.0.4"; + version = "1.0.5"; pyproject = true; disabled = pythonOlder "3.8"; @@ -31,7 +32,7 @@ buildPythonPackage rec { owner = "encode"; repo = "httpcore"; rev = "refs/tags/${version}"; - hash = "sha256-DK5avYEtQcTFogpdEjw0NB4qkzDm5cZKPjAE8MC6Sng="; + hash = "sha256-05jYLrBiPRg1qQEz8mRvYJKHFsfneh7z9yHIXuYYa5o="; }; nativeBuildInputs = [ @@ -74,7 +75,7 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; passthru.tests = { - inherit httpx httpx-socks; + inherit httpx httpx-socks respx; }; meta = with lib; { diff --git a/pkgs/development/python-modules/hypercorn/default.nix b/pkgs/development/python-modules/hypercorn/default.nix index 57d56fa417cac..b7add0e1a9979 100644 --- a/pkgs/development/python-modules/hypercorn/default.nix +++ b/pkgs/development/python-modules/hypercorn/default.nix @@ -2,12 +2,11 @@ , buildPythonPackage , fetchFromGitHub , pythonOlder -, typing-extensions -, wsproto -, toml +, exceptiongroup +, h11 , h2 , priority -, mock +, wsproto , poetry-core , pytest-asyncio , pytest-trio @@ -16,33 +15,44 @@ buildPythonPackage rec { pname = "hypercorn"; - version = "0.14.3"; - disabled = pythonOlder "3.7"; + version = "0.16.0"; format = "pyproject"; + disabled = pythonOlder "3.11"; # missing taskgroup dependency + src = fetchFromGitHub { owner = "pgjones"; repo = "Hypercorn"; rev = version; - hash = "sha256-ECREs8UwqTWUweUrwnUwpVotCII2v4Bz7ZCk3DSAd8I="; + hash = "sha256-pIUZCQmC3c6FiV0iMMwJGs9TMi6B/YM+vaSx//sAmKE="; }; postPatch = '' sed -i "/^addopts/d" pyproject.toml ''; - nativeBuildInputs = [ + build-system = [ poetry-core ]; - propagatedBuildInputs = [ wsproto toml h2 priority ] - ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ]; + dependencies = [ + exceptiongroup + h11 + h2 + priority + wsproto + ]; nativeCheckInputs = [ pytest-asyncio pytest-trio pytestCheckHook - ] ++ lib.optionals (pythonOlder "3.8") [ mock ]; + ]; + + disabledTests = [ + # https://github.com/pgjones/hypercorn/issues/217 + "test_startup_failure" + ]; pythonImportsCheck = [ "hypercorn" ]; diff --git a/pkgs/development/python-modules/hypothesis/default.nix b/pkgs/development/python-modules/hypothesis/default.nix index 5cf3408c89b73..09de31843bba6 100644 --- a/pkgs/development/python-modules/hypothesis/default.nix +++ b/pkgs/development/python-modules/hypothesis/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { pname = "hypothesis"; - version = "6.99.12"; + version = "6.100.1"; pyproject = true; disabled = pythonOlder "3.7"; @@ -31,7 +31,7 @@ buildPythonPackage rec { owner = "HypothesisWorks"; repo = "hypothesis"; rev = "hypothesis-python-${version}"; - hash = "sha256-0nzjRDv4L3bxxnC0lBY5S7FP9CFhyzHzNchWXoX91Zg="; + hash = "sha256-3Mwa1nS6rvFBcU5QXLH4/wa38qCvDX9sRina1aJS1Rs="; }; # I tried to package sphinx-selective-exclude, but it throws diff --git a/pkgs/development/python-modules/ibm-cloud-sdk-core/default.nix b/pkgs/development/python-modules/ibm-cloud-sdk-core/default.nix index 46a5eb3e36912..65ddf3d5c0714 100644 --- a/pkgs/development/python-modules/ibm-cloud-sdk-core/default.nix +++ b/pkgs/development/python-modules/ibm-cloud-sdk-core/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "ibm-cloud-sdk-core"; - version = "3.19.2"; + version = "3.20.0"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-qodN9ALyAfzsrCAiPT3t02JJRCBqFCNVWlsQP+4d3do="; + hash = "sha256-CqbZcEP1ianvRRpx527KBjQTjvGBzlSmoKY1Pe5MXRA="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/idna/default.nix b/pkgs/development/python-modules/idna/default.nix index 77aeb4483dc3d..ec47eb6751120 100644 --- a/pkgs/development/python-modules/idna/default.nix +++ b/pkgs/development/python-modules/idna/default.nix @@ -7,15 +7,15 @@ buildPythonPackage rec { pname = "idna"; - version = "3.6"; - format = "pyproject"; + version = "3.7"; + pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-ns270IOwZ5iuHoaty/6KsUec+GTk7jD+TkagA9Ekkco="; + hash = "sha256-Ao/zqt8GCcH9J42OowiSmUEqeoub0AXdCLn4KFvLXPw="; }; - nativeBuildInputs = [ + build-system = [ flit-core ]; @@ -25,6 +25,7 @@ buildPythonPackage rec { meta = { homepage = "https://github.com/kjd/idna/"; + changelog = "https://github.com/kjd/idna/releases/tag/v${version}"; description = "Internationalized Domain Names in Applications (IDNA)"; license = lib.licenses.bsd3; }; diff --git a/pkgs/development/python-modules/importlib-metadata/default.nix b/pkgs/development/python-modules/importlib-metadata/default.nix index 995d625f56048..511424fb19834 100644 --- a/pkgs/development/python-modules/importlib-metadata/default.nix +++ b/pkgs/development/python-modules/importlib-metadata/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "importlib-metadata"; - version = "7.0.2"; + version = "7.1.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -19,7 +19,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "importlib_metadata"; inherit version; - hash = "sha256-GY9WjzIwh4yxtE+9eXX4eQbCIzbbouSn8FJ4woH715I="; + hash = "sha256-t4k4uSbujV8CD8R3LUhwRYBaVd260uzyHG1gk43H/NI="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/importlib-resources/default.nix b/pkgs/development/python-modules/importlib-resources/default.nix index 79012fa9677a1..a8407239cc402 100644 --- a/pkgs/development/python-modules/importlib-resources/default.nix +++ b/pkgs/development/python-modules/importlib-resources/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "importlib-resources"; - version = "6.1.3"; + version = "6.3.2"; pyproject = true; disabled = pythonOlder "3.6"; @@ -25,7 +25,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "importlib_resources"; inherit version; - hash = "sha256-VvtFJRl7eFRKM1TqJ3k5UquT+TW7S/dGuEa7EBUCDys="; + hash = "sha256-lj63lkklKwFgwa/P5aHT/jrWbt0KixFL6s/7cMBnQiM="; }; build-system = [ diff --git a/pkgs/development/python-modules/inflect/default.nix b/pkgs/development/python-modules/inflect/default.nix index d6317d00841ba..35760249f7420 100644 --- a/pkgs/development/python-modules/inflect/default.nix +++ b/pkgs/development/python-modules/inflect/default.nix @@ -2,25 +2,31 @@ , buildPythonPackage , fetchPypi , isPy27 +, more-itertools , setuptools-scm , pydantic , pytestCheckHook +, typeguard }: buildPythonPackage rec { pname = "inflect"; - version = "7.0.0"; + version = "7.2.0"; disabled = isPy27; format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-Y9qTJa0p2oHsI+BVtBIleVq3k7TstIO+XcH6Nj/UcX4="; + hash = "sha256-Mv6s+s/K4vIub8zeoQ8N3yamOPrENNDd2q+8oANPN4Q="; }; nativeBuildInputs = [ setuptools-scm ]; - propagatedBuildInputs = [ pydantic ]; + propagatedBuildInputs = [ + more-itertools + pydantic + typeguard + ]; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/ipympl/default.nix b/pkgs/development/python-modules/ipympl/default.nix index f461659c6500b..b25f5fd58ae36 100644 --- a/pkgs/development/python-modules/ipympl/default.nix +++ b/pkgs/development/python-modules/ipympl/default.nix @@ -13,14 +13,16 @@ buildPythonPackage rec { pname = "ipympl"; - version = "0.9.3"; + version = "0.9.4"; format = "wheel"; disabled = pythonOlder "3.5"; src = fetchPypi { inherit pname version format; - hash = "sha256-0RPNVYkbr+myfvmbbdERqHvra7KuVQxAQpInIQO+gBM="; + hash = "sha256-WwwIxvT26mVbpYI5NjRXwQ+5IVV/UDjBpG20RX1taw4="; + dist = "py3"; + python = "py3"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/itsdangerous/default.nix b/pkgs/development/python-modules/itsdangerous/default.nix index cfc364a4a3997..edd1b149905ff 100644 --- a/pkgs/development/python-modules/itsdangerous/default.nix +++ b/pkgs/development/python-modules/itsdangerous/default.nix @@ -2,31 +2,32 @@ , buildPythonPackage , pythonOlder , fetchPypi +, flit-core , freezegun , pytestCheckHook }: buildPythonPackage rec { pname = "itsdangerous"; - version = "2.1.2"; - format = "setuptools"; + version = "2.2.0"; + pyproject = true; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-XbvGizF+XkLzJ/kCF2NUXcP8O/4i5t65aq8fw4h0FWo="; + hash = "sha256-4AUMC32h7qU/+vFJwM+7XG4uK2nEvvIsgfputz5fYXM="; }; + build-system = [ flit-core ]; + nativeCheckInputs = [ freezegun pytestCheckHook ]; - pytestFlagsArray = [ - "-W" "ignore::DeprecationWarning" - ]; - meta = with lib; { + changelog = "https://github.com/pallets/itsdangerous/blob/${version}/CHANGES.rst"; description = "Safely pass data to untrusted environments and back"; homepage = "https://itsdangerous.palletsprojects.com"; license = licenses.bsd3; diff --git a/pkgs/development/python-modules/jaraco-collections/default.nix b/pkgs/development/python-modules/jaraco-collections/default.nix index bab89a3f7a60e..ecef3939c9c5c 100644 --- a/pkgs/development/python-modules/jaraco-collections/default.nix +++ b/pkgs/development/python-modules/jaraco-collections/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "jaraco-collections"; - version = "5.0.0"; + version = "5.0.1"; format = "pyproject"; src = fetchPypi { pname = "jaraco.collections"; inherit version; - hash = "sha256-FoDo0J8pX2Jce6kmiAF1om/b5wkrTHbRmOMEdrIc/mg="; + hash = "sha256-gIYxsXS4Sk4qWSSQ1i9i38FdgEeg9xVyYJjcQ7gabPo="; }; postPatch = '' diff --git a/pkgs/development/python-modules/jaraco-functools/default.nix b/pkgs/development/python-modules/jaraco-functools/default.nix index 28a7d64e11f96..d3b899281887d 100644 --- a/pkgs/development/python-modules/jaraco-functools/default.nix +++ b/pkgs/development/python-modules/jaraco-functools/default.nix @@ -2,21 +2,25 @@ , buildPythonPackage , fetchPypi , more-itertools +, setuptools , setuptools-scm }: buildPythonPackage rec { pname = "jaraco-functools"; - version = "4.0.0"; - format = "pyproject"; + version = "4.0.1"; + pyproject = true; src = fetchPypi { - pname = "jaraco.functools"; + pname = "jaraco_functools"; inherit version; - hash = "sha256-wnnLJMk9aU73Jw+XDUmcq004E/TggnP5U5hlGmNPCSU="; + hash = "sha256-0z+nZTdMBhG1L4s6eV+JAIaaqIyEdp1NF0bNaPsow+g="; }; - nativeBuildInputs = [ setuptools-scm ]; + nativeBuildInputs = [ + setuptools + setuptools-scm + ]; propagatedBuildInputs = [ more-itertools diff --git a/pkgs/development/python-modules/joblib/default.nix b/pkgs/development/python-modules/joblib/default.nix index 298a2ce83adfb..e592c8089f724 100644 --- a/pkgs/development/python-modules/joblib/default.nix +++ b/pkgs/development/python-modules/joblib/default.nix @@ -2,7 +2,6 @@ , buildPythonPackage , pythonOlder , fetchPypi -, fetchpatch , pythonAtLeast , stdenv @@ -22,24 +21,16 @@ buildPythonPackage rec { pname = "joblib"; - version = "1.3.2"; + version = "1.4.0"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-kvhl5iHhd4TnlVCAttBCSJ47jilJScxExurDBPWXcrE="; + hash = "sha256-HrDcCRkZzThEkN6JDLXf1ThBCm1LO1Tu8J+4xQtAmxw="; }; - patches = [ - (fetchpatch { - name = "suppress-deprecation-warnings-with-python312.patch"; - url = "https://github.com/joblib/joblib/commit/05caf0772d605799e5d2337018fd32ac829b37aa.patch"; - hash = "sha256-bfqxCLFkCnuWMIkIbcjh+nCTv38A8jxvyCHeJPxoZwg="; - }) - ]; - nativeBuildInputs = [ setuptools ]; diff --git a/pkgs/development/python-modules/jpylyzer/default.nix b/pkgs/development/python-modules/jpylyzer/default.nix index 64b6163825188..0fc6f7cc125ea 100644 --- a/pkgs/development/python-modules/jpylyzer/default.nix +++ b/pkgs/development/python-modules/jpylyzer/default.nix @@ -17,20 +17,20 @@ let testFiles = fetchFromGitHub { owner = "openpreserve"; repo = "jpylyzer-test-files"; - rev = "146cb0029b5ea9d8ef22dc6683cec8afae1cc63a"; - hash = "sha256-uKUau7mYXqGs4dSnXGPnPsH9k81ZCK0aPj5F9HWBMZ8="; + rev = "0290e98bae9c5480c995954d3f14b4cf0a0395ff"; + hash = "sha256-dr3hC6dGd3HNSE4nRj1xrfFSW9cepQ1mdVH8S3YQdtw="; }; in buildPythonPackage rec { pname = "jpylyzer"; - version = "2.2.0"; + version = "2.2.1"; format = "setuptools"; src = fetchFromGitHub { owner = "openpreserve"; repo = pname; rev = version; - hash = "sha256-SK6Z+JkFBD9V99reRZf+jM8Z2SiDNSG72gusp2FPfmI="; + hash = "sha256-P42qAks8suI/Xknwd8WAkymbGE7RApRa/a11J/V4LA0="; }; propagatedBuildInputs = [ six ]; @@ -40,14 +40,9 @@ in buildPythonPackage rec { # don't depend on testFiles unless doFullCheck as it may not be extractable # on some filesystems due to weird filenames preCheck = lib.optionalString doFullCheck '' - sed -i '/^testFilesDir = /ctestFilesDir = "${testFiles}"' tests/unit/test_testfiles.py + sed -i '/^testFilesDir = /ctestFilesDir = "${testFiles}/files"' tests/unit/test_testfiles.py ''; - disabledTests = [ - # missing file, but newer test files breaks other tests - "test_groundtruth_complete" - ]; - disabledTestPaths = lib.optionals (!doFullCheck) [ "tests/unit/test_testfiles.py" ]; diff --git a/pkgs/development/python-modules/jsonpickle/default.nix b/pkgs/development/python-modules/jsonpickle/default.nix index 4e3fd813144b0..fbe0efd86bb3e 100644 --- a/pkgs/development/python-modules/jsonpickle/default.nix +++ b/pkgs/development/python-modules/jsonpickle/default.nix @@ -13,12 +13,12 @@ buildPythonPackage rec { pname = "jsonpickle"; - version = "3.0.3"; + version = "3.0.4"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-VpH0RJUyeFirOpW5xECnm0HjVCG+Gm4JpHtsm5Qh/QY="; + hash = "sha256-obFMjWIhzY85TyqX5zXqHX7ckn+9E1sm8vhwBlfIxis="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/kazoo/default.nix b/pkgs/development/python-modules/kazoo/default.nix index eedbd7da41f14..73f041f49f23d 100644 --- a/pkgs/development/python-modules/kazoo/default.nix +++ b/pkgs/development/python-modules/kazoo/default.nix @@ -4,7 +4,7 @@ , six , eventlet , gevent -, nose +, pynose , mock , coverage , pkgs @@ -21,7 +21,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ six ]; - buildInputs = [ eventlet gevent nose mock coverage pkgs.openjdk8 ]; + buildInputs = [ eventlet gevent pynose mock coverage pkgs.openjdk8 ]; # not really needed preBuild = '' diff --git a/pkgs/development/python-modules/keras/default.nix b/pkgs/development/python-modules/keras/default.nix index c745792962236..55deee586c8da 100644 --- a/pkgs/development/python-modules/keras/default.nix +++ b/pkgs/development/python-modules/keras/default.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "keras"; - version = "3.0.5"; + version = "3.2.1"; format = "wheel"; src = fetchPypi { inherit format pname version; - hash = "sha256-SgIvLpfqWj2xLtgJ/8t84e+NNP6urFIxXshVPe0tz5c="; + hash = "sha256-C+HomwQeaXvlYthCLsuVjuVIGs/AiZEyAJJsVh0ligM="; python = "py3"; dist = "py3"; }; diff --git a/pkgs/development/python-modules/keyrings-alt/default.nix b/pkgs/development/python-modules/keyrings-alt/default.nix index f463b18950dd4..2ad45c6e717f6 100644 --- a/pkgs/development/python-modules/keyrings-alt/default.nix +++ b/pkgs/development/python-modules/keyrings-alt/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , fetchPypi , jaraco-classes +, jaraco-context , keyring , pytestCheckHook , pythonOlder @@ -10,7 +11,7 @@ buildPythonPackage rec { pname = "keyrings-alt"; - version = "5.0.0"; + version = "5.0.1"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -18,7 +19,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "keyrings.alt"; inherit version; - hash = "sha256-nURstHu86pD/ouzD6AA6z0FXP8IBv0S0vxO9DhFISCg="; + hash = "sha256-zTcqHsRGobxakGJKUsiOg7kzAhjjkEemyaSK430RZ0U="; }; nativeBuildInputs = [ @@ -27,6 +28,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ jaraco-classes + jaraco-context ]; nativeCheckInputs = [ diff --git a/pkgs/development/python-modules/kombu/default.nix b/pkgs/development/python-modules/kombu/default.nix index a6867075d9b5e..c4aad1fab20fb 100644 --- a/pkgs/development/python-modules/kombu/default.nix +++ b/pkgs/development/python-modules/kombu/default.nix @@ -27,14 +27,14 @@ buildPythonPackage rec { pname = "kombu"; - version = "5.3.5"; + version = "5.3.7"; format = "setuptools"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-MORw8aa0nHDcb20Tw+TMTheKpsRpzra81VZFOF/IS5M="; + hash = "sha256-ARxM2aNVwUod6NNdJXMUodJFbVK3FAOIVhrKw88al78="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/ledgerblue/default.nix b/pkgs/development/python-modules/ledgerblue/default.nix index 9342f8d3b5da8..f78d9ad5e554d 100644 --- a/pkgs/development/python-modules/ledgerblue/default.nix +++ b/pkgs/development/python-modules/ledgerblue/default.nix @@ -12,24 +12,38 @@ , pycrypto , pycryptodomex , pyelftools +, python-gnupg , python-u2flib-host , pythonOlder +, pythonRelaxDepsHook +, setuptools +, setuptools-scm , websocket-client }: buildPythonPackage rec { pname = "ledgerblue"; - version = "0.1.48"; - format = "setuptools"; + version = "0.1.50"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-LVRNcsTmJOR3zTBhbKV4V0zCQk0sk/Uf6kSmfbAhgfY="; + hash = "sha256-0SzUy0mPEbgeoOKEa9UtrjAQafrauKl1wvsONyosJNk="; }; - propagatedBuildInputs = [ + build-system = [ + setuptools + setuptools-scm + pythonRelaxDepsHook + ]; + + pythonRelaxDeps = [ + "protobuf" + ]; + + dependencies = [ ecpy future hidapi @@ -39,6 +53,7 @@ buildPythonPackage rec { pycrypto pycryptodomex pyelftools + python-gnupg python-u2flib-host websocket-client ] diff --git a/pkgs/development/python-modules/lmfit/default.nix b/pkgs/development/python-modules/lmfit/default.nix index d96eb4d4c9adc..30ccb1cb5c5d4 100644 --- a/pkgs/development/python-modules/lmfit/default.nix +++ b/pkgs/development/python-modules/lmfit/default.nix @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "lmfit"; - version = "1.2.2"; + version = "1.3.0"; format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-BEoFKhGmHaBXYnRQTBfrfigDtBEo4lgh6WYyIH8jyIw="; + hash = "sha256-foI668BSN8qA0z0mDO27peJhkMzsn69ZXmgUOQneDJM="; }; postPatch = '' diff --git a/pkgs/development/python-modules/magic-wormhole/default.nix b/pkgs/development/python-modules/magic-wormhole/default.nix index 353e2c0e053b0..7b89f29b76e21 100644 --- a/pkgs/development/python-modules/magic-wormhole/default.nix +++ b/pkgs/development/python-modules/magic-wormhole/default.nix @@ -33,12 +33,12 @@ buildPythonPackage rec { pname = "magic-wormhole"; - version = "0.13.0"; + version = "0.14.0"; format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-rDvWgoYnDn8UnAYUmo5Anl+jTX/rDoiESibSnu0tFRY="; + hash = "sha256-AG0jn4i/98N7wu/2CgBOJj+vklj3J5GS0Gugyc7WsIA="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/magika/default.nix b/pkgs/development/python-modules/magika/default.nix index 6e4099004317a..f2a7cbd85a117 100644 --- a/pkgs/development/python-modules/magika/default.nix +++ b/pkgs/development/python-modules/magika/default.nix @@ -16,13 +16,13 @@ buildPythonPackage rec { pname = "magika"; - version = "0.5.0"; + version = "0.5.1"; pyproject = true; disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; - hash = "sha256-r6C7iDCG/o3JEvweQGb4upr+LuHvmNtkwtduZGehCsc="; + hash = "sha256-Q9wRU6FjcyciWmJqFVDAo5Wh1F6jPsH11GubCAI4vuA="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/mako/default.nix b/pkgs/development/python-modules/mako/default.nix index 0f512f8ec3a7d..a1629b4cf3668 100644 --- a/pkgs/development/python-modules/mako/default.nix +++ b/pkgs/development/python-modules/mako/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { pname = "mako"; - version = "1.3.2"; + version = "1.3.3"; pyproject = true; disabled = pythonOlder "3.7"; @@ -30,7 +30,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "Mako"; inherit version; - hash = "sha256-KgyK1/YnQnGzu3Rn3TfPnMbatLwZy2mk7xBmlALeaY4="; + hash = "sha256-4WwB2aucEfcpDu8c/vwJP7WkXuSj2gni/sLk0brlTnM="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/markdown/default.nix b/pkgs/development/python-modules/markdown/default.nix index f31af525f1e6e..70bff8d2c8548 100644 --- a/pkgs/development/python-modules/markdown/default.nix +++ b/pkgs/development/python-modules/markdown/default.nix @@ -10,28 +10,30 @@ buildPythonPackage rec { pname = "markdown"; - version = "3.5.2"; + version = "3.6"; + pyproject = true; disabled = pythonOlder "3.8"; - pyproject = true; - src = fetchFromGitHub { owner = "Python-Markdown"; repo = "markdown"; rev = "refs/tags/${version}"; - hash = "sha256-YLOLDiS93zpjJWzkWXcutjZw9iB/FfbjxQXjau2B+JQ="; + hash = "sha256-jGo9/ZS2EhMDl/o1ref7Owqckuc7am578Ojmcz2aWIE="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [ + dependencies = lib.optionals (pythonOlder "3.10") [ importlib-metadata ]; - nativeCheckInputs = [ unittestCheckHook pyyaml ]; + nativeCheckInputs = [ + unittestCheckHook + pyyaml + ]; pythonImportsCheck = [ "markdown" ]; diff --git a/pkgs/development/python-modules/mat2/default.nix b/pkgs/development/python-modules/mat2/default.nix index 1646d3ac72460..fe627c8b99d5f 100644 --- a/pkgs/development/python-modules/mat2/default.nix +++ b/pkgs/development/python-modules/mat2/default.nix @@ -9,7 +9,7 @@ , exiftool , ffmpeg , mailcap -, wrapGAppsHook +, wrapGAppsHook3 , gdk-pixbuf , gobject-introspection , librsvg @@ -66,7 +66,7 @@ buildPythonPackage rec { nativeBuildInputs = [ gobject-introspection - wrapGAppsHook + wrapGAppsHook3 ]; buildInputs = [ diff --git a/pkgs/development/python-modules/matplotlib-inline/default.nix b/pkgs/development/python-modules/matplotlib-inline/default.nix index 90cbd00dc4d14..e35111fd191ce 100644 --- a/pkgs/development/python-modules/matplotlib-inline/default.nix +++ b/pkgs/development/python-modules/matplotlib-inline/default.nix @@ -1,4 +1,8 @@ -{ lib, buildPythonPackage, fetchPypi +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, setuptools , traitlets # tests @@ -7,15 +11,23 @@ buildPythonPackage rec { pname = "matplotlib-inline"; - version = "0.1.6"; - format = "setuptools"; + version = "0.1.7"; + pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-+Ifl8Qupjo0rFQ3c9HAsHl+LOiAAXrD3S/29Ng7m8wQ="; + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "ipython"; + repo = "matplotlib-inline"; + rev = "refs/tags/${version}"; + hash = "sha256-y7T8BshNa8NVWzH8oLS4dTAyhG+YmkkYQJFAyMXsJFA="; }; - propagatedBuildInputs = [ + build-system = [ + setuptools + ]; + + dependencies = [ traitlets ]; diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix index 788df3d9458eb..bf1e7a86323e3 100644 --- a/pkgs/development/python-modules/matplotlib/default.nix +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -12,7 +12,6 @@ , pybind11 , setuptools , setuptools-scm -, wheel # native libraries , ffmpeg-headless @@ -77,15 +76,15 @@ let in buildPythonPackage rec { - version = "3.8.3"; + version = "3.8.4"; pname = "matplotlib"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-e0FiOemuOL5UsCirv5BIr/UFSpq6VBa+8L0X+RYs4WE="; + hash = "sha256-iqw5fV6ewViWDjHDgcX/xS3dUr2aR3F+KmlAOBZ9/+o="; }; env.XDG_RUNTIME_DIR = "/tmp"; @@ -100,7 +99,10 @@ buildPythonPackage rec { let tcl_tk_cache = ''"${tk}/lib", "${tcl}/lib", "${lib.strings.substring 0 3 tk.version}"''; in - lib.optionalString enableTk '' + '' + substituteInPlace pyproject.toml \ + --replace-fail '"numpy>=2.0.0rc1,<2.3",' "" + '' + lib.optionalString enableTk '' sed -i '/self.tcl_tk_cache = None/s|None|${tcl_tk_cache}|' setupext.py '' + lib.optionalString (stdenv.isLinux && interactive) '' # fix paths to libraries in dlopen calls (headless detection) @@ -110,13 +112,7 @@ buildPythonPackage rec { ''; nativeBuildInputs = [ - certifi - numpy pkg-config - pybind11 - setuptools - setuptools-scm - wheel ] ++ lib.optionals enableGtk3 [ gobject-introspection ]; @@ -143,7 +139,15 @@ buildPythonPackage rec { "strictoverflow" ]; - propagatedBuildInputs = [ + build-system = [ + certifi + numpy + pybind11 + setuptools + setuptools-scm + ]; + + dependencies = [ # explicit contourpy cycler diff --git a/pkgs/development/python-modules/maxminddb/default.nix b/pkgs/development/python-modules/maxminddb/default.nix index 3f95408364db0..100191643be8d 100644 --- a/pkgs/development/python-modules/maxminddb/default.nix +++ b/pkgs/development/python-modules/maxminddb/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "maxminddb"; - version = "2.5.2"; + version = "2.6.1"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-s8M+T8eCHubJ9Ag3EW4Wq2F1hj1KZO7gJMW+xoZpCoc="; + hash = "sha256-bF1ZH2JeA7CjTfDH/4FYBnY5e4M14T7OEwxuOeSjr7k="; }; buildInputs = [ diff --git a/pkgs/development/python-modules/mecab-python3/default.nix b/pkgs/development/python-modules/mecab-python3/default.nix index e347aa107d7c7..f661fad488467 100644 --- a/pkgs/development/python-modules/mecab-python3/default.nix +++ b/pkgs/development/python-modules/mecab-python3/default.nix @@ -9,14 +9,15 @@ buildPythonPackage rec { pname = "mecab-python3"; - version = "1.0.8"; + version = "1.0.9"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { - inherit pname version; - hash = "sha256-cJiLqyY2lkVvddPYkQx1rqR3qdCAVK1++FvlRw3T9ls="; + pname = "mecab_python3"; + inherit version; + hash = "sha256-LYkfSgEZ+3Zvp5bijYgaVXk6DDVE5EbP9k3JRq1yJ8w="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/meson-python/default.nix b/pkgs/development/python-modules/meson-python/default.nix index 01912c9060945..c92c0705aaaea 100644 --- a/pkgs/development/python-modules/meson-python/default.nix +++ b/pkgs/development/python-modules/meson-python/default.nix @@ -13,13 +13,13 @@ buildPythonPackage rec { pname = "meson-python"; - version = "0.15.0"; + version = "0.16.0"; format = "pyproject"; src = fetchPypi { inherit version; pname = "meson_python"; - hash = "sha256-/dtz7s1J6JwcQch5N82JwtC2WhxjuigjhoHUvZSE0m8="; + hash = "sha256-kGjBfjbInWx/9wn/+yqKmSXozQsCYpco5c6vLsUFy18="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/mocket/default.nix b/pkgs/development/python-modules/mocket/default.nix index 2a44707bff1b3..116e85ce2c343 100644 --- a/pkgs/development/python-modules/mocket/default.nix +++ b/pkgs/development/python-modules/mocket/default.nix @@ -35,12 +35,12 @@ buildPythonPackage rec { pname = "mocket"; - version = "3.12.4"; + version = "3.12.5"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-O+IRX59Z4D188XEmiSCT8H3sg1jhtaboHS3QINEnE0s="; + hash = "sha256-6yWo7SBlVldK+AxUBnQOXjQBxz9HbIC+Ch977xiZxek="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/mypy-protobuf/default.nix b/pkgs/development/python-modules/mypy-protobuf/default.nix index 0010e40800ec0..32560c7baeef1 100644 --- a/pkgs/development/python-modules/mypy-protobuf/default.nix +++ b/pkgs/development/python-modules/mypy-protobuf/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "mypy-protobuf"; - version = "3.5.0"; + version = "3.6.0"; format = "pyproject"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-IfJw2gqXkqnax2sN9GPAJ+VhZkq2lzxZvk5NBk3+Z9w="; + hash = "sha256-AvJC6zQJ9miJ8rGjqlg1bsTZCc3Q+TEVYi6ecDZuyjw="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/myst-parser/default.nix b/pkgs/development/python-modules/myst-parser/default.nix index e485b768a7507..12ddb2ec769ec 100644 --- a/pkgs/development/python-modules/myst-parser/default.nix +++ b/pkgs/development/python-modules/myst-parser/default.nix @@ -4,6 +4,7 @@ , fetchpatch , flit-core , pythonOlder +, defusedxml , docutils , jinja2 , markdown-it-py @@ -16,6 +17,7 @@ , pytest-regressions , sphinx-pytest , pytestCheckHook +, pythonRelaxDepsHook }: buildPythonPackage rec { @@ -40,7 +42,10 @@ buildPythonPackage rec { }) ]; - nativeBuildInputs = [ flit-core ]; + nativeBuildInputs = [ + flit-core + pythonRelaxDepsHook + ]; propagatedBuildInputs = [ docutils @@ -54,6 +59,7 @@ buildPythonPackage rec { nativeCheckInputs = [ beautifulsoup4 + defusedxml pytest-param-files pytest-regressions sphinx-pytest @@ -64,6 +70,10 @@ buildPythonPackage rec { "myst_parser" ]; + pythonRelaxDeps = [ + "docutils" + ]; + disabledTests = [ # AssertionError due to different files "test_basic" @@ -72,6 +82,9 @@ buildPythonPackage rec { "test_fieldlist_extension" # docutils 0.19 expectation mismatches "test_docutils_roles" + # sphinx 7.0 expectation mismatches + "test_heading_slug_func" + "test_references_singlehtml" # sphinx 6.0 expectation mismatches "test_sphinx_directives" # sphinx 5.3 expectation mismatches diff --git a/pkgs/development/python-modules/netcdf4/default.nix b/pkgs/development/python-modules/netcdf4/default.nix index 39994519db17b..72b03ef5d7f65 100644 --- a/pkgs/development/python-modules/netcdf4/default.nix +++ b/pkgs/development/python-modules/netcdf4/default.nix @@ -7,6 +7,7 @@ , oldest-supported-numpy , setuptools , wheel +, certifi , numpy , zlib , netcdf @@ -19,7 +20,7 @@ buildPythonPackage rec { pname = "netcdf4"; - version = "1.6.2"; + version = "1.6.5"; format = "pyproject"; disabled = isPyPy; @@ -27,7 +28,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "netCDF4"; inherit version; - hash = "sha256-A4KwL/aiiEGfb/7IXexA9FH0G4dVVHFUxXXd2fD0rlM="; + hash = "sha256-gkiB0KrP3lvZgtat7dhXQlnIVVN4HnuD4M6CuJC/oO8="; }; nativeBuildInputs = [ @@ -38,6 +39,7 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ + certifi cftime numpy zlib diff --git a/pkgs/development/python-modules/networkx/default.nix b/pkgs/development/python-modules/networkx/default.nix index 0c4993cdd6943..40a6cdcf4b2ed 100644 --- a/pkgs/development/python-modules/networkx/default.nix +++ b/pkgs/development/python-modules/networkx/default.nix @@ -24,14 +24,14 @@ buildPythonPackage rec { pname = "networkx"; # upgrade may break sage, please test the sage build or ping @timokau on upgrade - version = "3.2.1"; + version = "3.3"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-nxu1zzQJvzJOCnIsIL20wg7jm/HDDOiuSZyFArC14MY="; + hash = "sha256-DBJ9iy9IZfWa6cuKr81gtccPMkHr1m997618SrkBJsk="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/nilearn/default.nix b/pkgs/development/python-modules/nilearn/default.nix index ce7cdee635b3e..c4088ca7e42d9 100644 --- a/pkgs/development/python-modules/nilearn/default.nix +++ b/pkgs/development/python-modules/nilearn/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "nilearn"; - version = "0.10.3"; + version = "0.10.4"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-d4GTMTFMTKXBXAdjT2n4Vfr9+a3QUbGILjpgCtUnV9g="; + hash = "sha256-lFC9Vqd22ZezJPRd0Yv5bom9jYAWCXT8x1kzP7rqNcI="; }; nativeBuildInputs = [ hatch-vcs ]; diff --git a/pkgs/development/python-modules/numexpr/default.nix b/pkgs/development/python-modules/numexpr/default.nix index 4de1e4a7de05a..ca8e329771fe2 100644 --- a/pkgs/development/python-modules/numexpr/default.nix +++ b/pkgs/development/python-modules/numexpr/default.nix @@ -2,30 +2,38 @@ , buildPythonPackage , fetchPypi , numpy -, packaging -, python -, pythonOlder +, pytestCheckHook +, setuptools +, wheel }: buildPythonPackage rec { pname = "numexpr"; - version = "2.9.0"; - format = "setuptools"; - - disabled = pythonOlder "3.6"; + version = "2.10.0"; + pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-8h0S9sQyzjSQieuVNCur9mKa67P93xh6RJLTqtqtqvA="; + hash = "sha256-yJ6TB1JjnfBAU5FgMm2PmahBWbvqQZQ6uOlgWR7arvA="; }; - nativeBuildInputs = [ + # patch for compatibility with numpy < 2.0 + # see more details, https://numpy.org/devdocs/numpy_2_0_migration_guide.html#c-api-changes + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "numpy>=2.0.0rc1" "numpy" + sed -i "1i#define PyDataType_SET_ELSIZE(descr, elsize)" numexpr/interpreter.cpp + sed -i "1i#define PyDataType_ELSIZE(descr) ((descr)->elsize)" numexpr/interpreter.cpp + ''; + + build-system = [ + setuptools + wheel numpy ]; - propagatedBuildInputs = [ + dependencies = [ numpy - packaging ]; preBuild = '' @@ -33,13 +41,25 @@ buildPythonPackage rec { ln -s ${numpy.cfg} site.cfg ''; - checkPhase = '' - runtest="$(pwd)/numexpr/tests/test_numexpr.py" - pushd "$out" - ${python.interpreter} "$runtest" + nativeCheckInputs = [ + pytestCheckHook + ]; + + preCheck = '' + pushd $out + ''; + + postCheck = '' popd ''; + disabledTests = [ + # fails on computers with more than 8 threads + # https://github.com/pydata/numexpr/issues/479 + "test_numexpr_max_threads_empty_string" + "test_omp_num_threads_empty_string" + ]; + pythonImportsCheck = [ "numexpr" ]; diff --git a/pkgs/development/python-modules/numpy/default.nix b/pkgs/development/python-modules/numpy/default.nix index 4299c6d4dc63e..c2d38cc31b248 100644 --- a/pkgs/development/python-modules/numpy/default.nix +++ b/pkgs/development/python-modules/numpy/default.nix @@ -88,6 +88,9 @@ in buildPythonPackage rec { # remove needless reference to full Python path stored in built wheel substituteInPlace numpy/meson.build \ --replace 'py.full_path()' "'python'" + + substituteInPlace pyproject.toml \ + --replace-fail "meson-python>=0.15.0,<0.16.0" "meson-python" ''; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/openrazer/daemon.nix b/pkgs/development/python-modules/openrazer/daemon.nix index 317d36b305760..aa6055c19c70f 100644 --- a/pkgs/development/python-modules/openrazer/daemon.nix +++ b/pkgs/development/python-modules/openrazer/daemon.nix @@ -10,7 +10,7 @@ , pyudev , setproctitle , setuptools -, wrapGAppsHook +, wrapGAppsHook3 , notify2 }: diff --git a/pkgs/development/python-modules/orjson/default.nix b/pkgs/development/python-modules/orjson/default.nix index ede3b10fc718c..bd1d06e5c266c 100644 --- a/pkgs/development/python-modules/orjson/default.nix +++ b/pkgs/development/python-modules/orjson/default.nix @@ -30,22 +30,22 @@ buildPythonPackage rec { pname = "orjson"; - version = "3.9.15"; + version = "3.10.1"; pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "ijl"; repo = "orjson"; rev = "refs/tags/${version}"; - hash = "sha256-6fcj64d/uFCxaez+xxOdHd+NqILKOPqK+YlxYX7D0DI="; + hash = "sha256-vEJriLd7f+zlYcMIyhDTkq2kmNc5MaNLHo0qMLS5hro="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - hash = "sha256-/Aa3saUP4QjSBIS9T8Vd0yggiJn2SIk7dYMA5icb1yA="; + hash = "sha256-yQkpjedHwgsZiiZEzYV66aa9RepCFW0PBqtD29tfoMI="; }; maturinBuildFlags = [ "--interpreter ${python.executable}" ]; diff --git a/pkgs/development/python-modules/paddle2onnx/default.nix b/pkgs/development/python-modules/paddle2onnx/default.nix index e358c2ec49861..0ba25c3046c41 100644 --- a/pkgs/development/python-modules/paddle2onnx/default.nix +++ b/pkgs/development/python-modules/paddle2onnx/default.nix @@ -9,7 +9,7 @@ }: let pname = "paddle2onnx"; - version = "1.1.0"; + version = "1.2.0"; format = "wheel"; pyShortVersion = "cp${builtins.replaceStrings ["."] [""] python.pythonVersion}"; src = fetchPypi { @@ -18,7 +18,7 @@ let python = pyShortVersion; abi = pyShortVersion; platform = "manylinux_2_12_x86_64.manylinux2010_x86_64"; - hash = "sha256-HI/lIj9ezdCry5fYDi5Pia6hvOjN6/Slm9BMfLeq8AU="; + hash = "sha256-18eStagm7V4D87fiPoigAyXxVGoo//8UENutSqNfUBI="; }; in buildPythonPackage { diff --git a/pkgs/development/python-modules/panel/default.nix b/pkgs/development/python-modules/panel/default.nix index 4a4b93035d735..d8e0e071df4dc 100644 --- a/pkgs/development/python-modules/panel/default.nix +++ b/pkgs/development/python-modules/panel/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "panel"; - version = "1.3.8"; + version = "1.4.1"; format = "wheel"; @@ -25,7 +25,9 @@ buildPythonPackage rec { # tries to fetch even more artifacts src = fetchPypi { inherit pname version format; - hash = "sha256-Sb85MZhqDd8/e0vaPGXGoxHVJ3UkrNtOC/9py6a/V3U="; + hash = "sha256-x7ywbO2uY1r06bDXV/+X/7cs9f6jFawyDHeo8pLWZVE="; + dist = "py3"; + python = "py3"; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/parsedmarc/default.nix b/pkgs/development/python-modules/parsedmarc/default.nix index b9d4df1d58ee5..3a2dbe638dbb6 100644 --- a/pkgs/development/python-modules/parsedmarc/default.nix +++ b/pkgs/development/python-modules/parsedmarc/default.nix @@ -41,14 +41,14 @@ let in buildPythonPackage rec { pname = "parsedmarc"; - version = "8.8.0"; + version = "8.11.0"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-tK/cxOw50awcDAGRDTQ+Nxb9aJl2+zLZHuJq88xNmXM="; + hash = "sha256-OBxiaXB8NKNMviRI19rYYJxpnfnaEL3zSPmYB4urIug="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/parsel/default.nix b/pkgs/development/python-modules/parsel/default.nix index ee817f70665a4..639f973e77541 100644 --- a/pkgs/development/python-modules/parsel/default.nix +++ b/pkgs/development/python-modules/parsel/default.nix @@ -13,14 +13,14 @@ buildPythonPackage rec { pname = "parsel"; - version = "1.9.0"; + version = "1.9.1"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-paa8sMX8dBVAujB1Y2/1y5aIUqeMwWroIlDl1Ib6fUg="; + hash = "sha256-FOANwHcxyQMNtiDBlfyuiEtbSEjp+cUjxhGfcIzPqaw="; }; postPatch = '' diff --git a/pkgs/development/python-modules/parso/default.nix b/pkgs/development/python-modules/parso/default.nix index 7d76ef5d80aa3..03b052a46dd76 100644 --- a/pkgs/development/python-modules/parso/default.nix +++ b/pkgs/development/python-modules/parso/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "parso"; - version = "0.8.3"; + version = "0.8.4"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-jAe+KQu1nwNYiRWSHinopQACrK8s3F+g4BFPkXCfr6A="; + hash = "sha256-6zp7WCQPuZCZo0VXHe7MD5VA6l9N0v4UwqmdaygauS0="; }; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/path/default.nix b/pkgs/development/python-modules/path/default.nix index e88a7efd60f5c..3629d8b11db56 100644 --- a/pkgs/development/python-modules/path/default.nix +++ b/pkgs/development/python-modules/path/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "path"; - version = "16.10.0"; + version = "16.14.0"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-sysit2/oEKje1tE2JozItmmK58R8KblKnqEmI/MFHkY="; + hash = "sha256-26qn79RgL9a6jYKJDceCPWnl3nQKboQtmRmw+q8rao4="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/pathlib-abc/default.nix b/pkgs/development/python-modules/pathlib-abc/default.nix index 891b6d348561e..b048fc3748c1a 100644 --- a/pkgs/development/python-modules/pathlib-abc/default.nix +++ b/pkgs/development/python-modules/pathlib-abc/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "pathlib-abc"; - version = "0.1.1"; + version = "0.2.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -16,7 +16,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "pathlib_abc"; inherit version; - hash = "sha256-CE573ZGbD3d0kUqeZM2GobOYYPgfeB3XJCWGMfKRWr4="; + hash = "sha256-ua9rOf1RMhSFZ47DgD0KEeAqIuhp6AUsrLbo9l3nuGI="; }; build-system = [ diff --git a/pkgs/development/python-modules/pdm-backend/default.nix b/pkgs/development/python-modules/pdm-backend/default.nix index 0e1cc04f920b3..8c199ffd8e8b5 100644 --- a/pkgs/development/python-modules/pdm-backend/default.nix +++ b/pkgs/development/python-modules/pdm-backend/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "pdm-backend"; - version = "2.1.8"; + version = "2.2.1"; format = "pyproject"; src = fetchFromGitHub { owner = "pdm-project"; repo = "pdm-backend"; rev = "refs/tags/${version}"; - hash = "sha256-d8i+FvxNFPM18W7NmOwh9bqZnMUenF7eCPdcCw4BT7s="; + hash = "sha256-WvRpZD486yGP9qqxZyiErfEuIyrULDbzKAoFwroV1KE="; }; env.PDM_BUILD_SCM_VERSION = version; diff --git a/pkgs/development/python-modules/pg8000/default.nix b/pkgs/development/python-modules/pg8000/default.nix index 3bd937c6d492f..05e5201375813 100644 --- a/pkgs/development/python-modules/pg8000/default.nix +++ b/pkgs/development/python-modules/pg8000/default.nix @@ -6,28 +6,28 @@ , python-dateutil , pythonOlder , scramp -, setuptools +, hatchling , versioningit }: buildPythonPackage rec { pname = "pg8000"; - version = "1.30.5"; - format = "pyproject"; + version = "1.31.1"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-By960AzXI2lcsun8AsHfuEx4FFXpe43m9MQoHuoIB4w="; + hash = "sha256-sREw1MYV3TBi6o/tgUMGSnl4t/5tRPFLciYdQ8jicIc="; }; - nativeBuildInputs = [ - setuptools + build-system = [ + hatchling versioningit ]; - propagatedBuildInputs = [ + dependencies = [ passlib python-dateutil scramp diff --git a/pkgs/development/python-modules/phonenumbers/default.nix b/pkgs/development/python-modules/phonenumbers/default.nix index b2bb4cbfd01d6..85153b6fa9052 100644 --- a/pkgs/development/python-modules/phonenumbers/default.nix +++ b/pkgs/development/python-modules/phonenumbers/default.nix @@ -7,14 +7,14 @@ buildPythonPackage rec { pname = "phonenumbers"; - version = "8.13.31"; + version = "8.13.34"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-J0IHHJ0K8JJ0yKWyom2aNqy/LqXLYpQ8ws6ttcDIdkE="; + hash = "sha256-fCZ2vge30PdEEeJ14GYDgKDsPuDTWfBw1xlCS9LF9i4="; }; nativeCheckInputs = [ diff --git a/pkgs/development/python-modules/pikepdf/default.nix b/pkgs/development/python-modules/pikepdf/default.nix index bfcd4c0589c29..ba0ce17b0c3a0 100644 --- a/pkgs/development/python-modules/pikepdf/default.nix +++ b/pkgs/development/python-modules/pikepdf/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { pname = "pikepdf"; - version = "8.13.0"; + version = "8.14.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -39,7 +39,7 @@ buildPythonPackage rec { postFetch = '' rm "$out/.git_archival.txt" ''; - hash = "sha256-6HCFPHIQ6+SHt4Zu6CZ0R2Ah+jFnztGOCMhQfvR6FxY="; + hash = "sha256-3ORvbhO3eLu/NIE0Lwdf93QtUHUmyMf7LmdMBJpkYIg="; }; patches = [ diff --git a/pkgs/development/python-modules/pikepdf/paths.patch b/pkgs/development/python-modules/pikepdf/paths.patch index 1bd030c186c23..83cebed5cc234 100644 --- a/pkgs/development/python-modules/pikepdf/paths.patch +++ b/pkgs/development/python-modules/pikepdf/paths.patch @@ -12,10 +12,10 @@ index da40043f..4f566f01 100644 check=True, ) diff --git a/src/pikepdf/jbig2.py b/src/pikepdf/jbig2.py -index f89b4f90..f187ebdf 100644 +index 901f3b6f..45551820 100644 --- a/src/pikepdf/jbig2.py +++ b/src/pikepdf/jbig2.py -@@ -63,7 +63,7 @@ class JBIG2Decoder(JBIG2DecoderInterface): +@@ -72,7 +72,7 @@ class JBIG2Decoder(JBIG2DecoderInterface): output_path = Path(tmpdir) / "outfile" args = [ @@ -24,12 +24,12 @@ index f89b4f90..f187ebdf 100644 "--embedded", "--format", "png", -@@ -90,7 +90,7 @@ class JBIG2Decoder(JBIG2DecoderInterface): +@@ -101,7 +101,7 @@ class JBIG2Decoder(JBIG2DecoderInterface): def _version(self) -> Version: try: proc = self._run( -- ['jbig2dec', '--version'], stdout=PIPE, check=True, encoding='ascii' -+ ['@jbig2dec@', '--version'], stdout=PIPE, check=True, encoding='ascii' - ) - except (CalledProcessError, FileNotFoundError) as e: - raise DependencyError("jbig2dec - not installed or not found") from e +- ['jbig2dec', '--version'], ++ ['@jbig2dec@', '--version'], + stdout=PIPE, + check=True, + encoding='ascii', diff --git a/pkgs/development/python-modules/pillow/default.nix b/pkgs/development/python-modules/pillow/default.nix index f101d6b361ec1..a576b47bda19e 100644 --- a/pkgs/development/python-modules/pillow/default.nix +++ b/pkgs/development/python-modules/pillow/default.nix @@ -12,7 +12,7 @@ import ./generic.nix (rec { pname = "pillow"; - version = "10.2.0"; + version = "10.3.0"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -20,7 +20,7 @@ import ./generic.nix (rec { src = fetchPypi { pname = "pillow"; inherit version; - hash = "sha256-6H8LLHgVfhLXaGsn1jwHD9ZdmU6N2ubzKODc9KDNAH4="; + hash = "sha256-nSRV+/RMkUhAx5PomqgtDhdjoUJToAB0NxmuWUaBSy0="; }; passthru.tests = { diff --git a/pkgs/development/python-modules/pixel-font-builder/default.nix b/pkgs/development/python-modules/pixel-font-builder/default.nix index bd67a88905f7d..0ef77bd5521c9 100644 --- a/pkgs/development/python-modules/pixel-font-builder/default.nix +++ b/pkgs/development/python-modules/pixel-font-builder/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "pixel-font-builder"; - version = "0.0.15"; + version = "0.0.19"; disabled = pythonOlder "3.11"; src = fetchPypi { pname = "pixel_font_builder"; inherit version; - hash = "sha256-2QnbnJk3onwxmjZ6aUgXFGsx6GtqJDV9Bgs3p5Czvns="; + hash = "sha256-f38DyM5hojHfv8k/W6kcHxbOjz43hHW6i4Scm6NbHiQ="; }; format = "pyproject"; diff --git a/pkgs/development/python-modules/plotly/default.nix b/pkgs/development/python-modules/plotly/default.nix index 0bec07c3bad2c..a0e26e354ed9a 100644 --- a/pkgs/development/python-modules/plotly/default.nix +++ b/pkgs/development/python-modules/plotly/default.nix @@ -9,12 +9,12 @@ buildPythonPackage rec { pname = "plotly"; - version = "5.20.0"; + version = "5.21.0"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-v5AcgF0iAyz6U0sv98WqawZZ4DfxnsHgzKf1hZGLXIk="; + hash = "sha256-aSQ/jBZdS+JsDfHG8LeyWOLf7v4DJ2NAStfn+318IHM="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pyasn1/default.nix b/pkgs/development/python-modules/pyasn1/default.nix index d4fb73d509986..c9e542a6e1ba8 100644 --- a/pkgs/development/python-modules/pyasn1/default.nix +++ b/pkgs/development/python-modules/pyasn1/default.nix @@ -7,14 +7,14 @@ buildPythonPackage rec { pname = "pyasn1"; - version = "0.5.1"; + version = "0.6.0"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-bTkaluWbIxMKXPp01v1/OI274mzI8e3zn93fCNnWZ2w="; + hash = "sha256-OjWrLEte+Y4X397IqwdARvvaduKBxacGzNgjKM/I9kw="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/pycparser/default.nix b/pkgs/development/python-modules/pycparser/default.nix index fa0622df9ff91..89771e7df8f7a 100644 --- a/pkgs/development/python-modules/pycparser/default.nix +++ b/pkgs/development/python-modules/pycparser/default.nix @@ -2,12 +2,12 @@ buildPythonPackage rec { pname = "pycparser"; - version = "2.21"; + version = "2.22"; format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"; + sha256 = "sha256-SRyL6cBA9TkPW/RKWwd1K9B/Vu35kjgbBccBQ57sEPY="; }; nativeCheckInputs = [ unittestCheckHook ]; diff --git a/pkgs/development/python-modules/pycups/default.nix b/pkgs/development/python-modules/pycups/default.nix index 9b4a1a2d0ee7f..12adc1f669afc 100644 --- a/pkgs/development/python-modules/pycups/default.nix +++ b/pkgs/development/python-modules/pycups/default.nix @@ -2,12 +2,12 @@ buildPythonPackage rec { pname = "pycups"; - version = "2.0.1"; + version = "2.0.4"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-V0NM5fYlSOsSlJyoIX8Gb07rIaXWq4sTRx3ONQ44DJA="; + hash = "sha256-hD44XB2/aUmWyoTvAqfzDCg3YDVYj1++rNa64AXPfI0="; }; buildInputs = [ cups ] ++ lib.optional stdenv.isDarwin libiconv; diff --git a/pkgs/development/python-modules/pyelftools/default.nix b/pkgs/development/python-modules/pyelftools/default.nix index 84cdda65f1f95..063215f5bc6e1 100644 --- a/pkgs/development/python-modules/pyelftools/default.nix +++ b/pkgs/development/python-modules/pyelftools/default.nix @@ -4,22 +4,27 @@ , fetchFromGitHub , python , pythonOlder +, setuptools }: buildPythonPackage rec { pname = "pyelftools"; - version = "0.30"; - format = "setuptools"; + version = "0.31"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "eliben"; - repo = pname; - rev = "v${version}"; - hash = "sha256-A9etnN7G24/Gu8YlV/YDpxZV+TG2eVXGx2ZjVnA9ZD4="; + repo = "pyelftools"; + rev = "refs/tags/v${version}"; + hash = "sha256-kX89fMXqrEvhMAAjqKHzHmrYizKBt1uCWMOJtFNNhy4="; }; + build-system = [ + setuptools + ]; + doCheck = stdenv.hostPlatform.system == "x86_64-linux" && stdenv.hostPlatform.isGnu; checkPhase = '' @@ -35,10 +40,10 @@ buildPythonPackage rec { meta = with lib; { description = "Python library for analyzing ELF files and DWARF debugging information"; - mainProgram = "readelf.py"; homepage = "https://github.com/eliben/pyelftools"; changelog = "https://github.com/eliben/pyelftools/blob/v${version}/CHANGES"; license = licenses.publicDomain; maintainers = with maintainers; [ igsha pamplemousse ]; + mainProgram = "readelf.py"; }; } diff --git a/pkgs/development/python-modules/pyerfa/default.nix b/pkgs/development/python-modules/pyerfa/default.nix index 8561738f8428c..fd7348f3ca59a 100644 --- a/pkgs/development/python-modules/pyerfa/default.nix +++ b/pkgs/development/python-modules/pyerfa/default.nix @@ -2,9 +2,8 @@ , buildPythonPackage , fetchPypi , jinja2 -, oldest-supported-numpy +, setuptools , setuptools-scm -, wheel , liberfa , packaging , numpy @@ -14,23 +13,27 @@ buildPythonPackage rec { pname = "pyerfa"; - format = "pyproject"; - version = "2.0.1.1"; + version = "2.0.1.4"; + pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-26x07409Ow8i7wrTu72zCyqeEFcLH6Wpi+NMe+Nsmms="; + hash = "sha256-rLimcTIy6jXAS8bkCsTkYd/MgX05XvKjyAUcGjMkndM="; }; - nativeBuildInputs = [ + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "numpy>=2.0.0rc1" "numpy" + ''; + + build-system = [ jinja2 - oldest-supported-numpy packaging + setuptools setuptools-scm - wheel ]; - propagatedBuildInputs = [ + dependencies = [ numpy ]; buildInputs = [ diff --git a/pkgs/development/python-modules/pyfakefs/default.nix b/pkgs/development/python-modules/pyfakefs/default.nix index c588607f5c126..6e31c1e2e2364 100644 --- a/pkgs/development/python-modules/pyfakefs/default.nix +++ b/pkgs/development/python-modules/pyfakefs/default.nix @@ -8,20 +8,21 @@ , setuptools # tests +, pandas , pytestCheckHook , undefined }: buildPythonPackage rec { pname = "pyfakefs"; - version = "5.3.5"; + version = "5.4.1"; pyproject = true; disabled = pythonOlder "3.5"; src = fetchPypi { inherit pname version; - hash = "sha256-fNxQCzWiFMt6YU4ZQFQ6zGZQ5pqUrHbjDzPJNzvZz5A="; + hash = "sha256-IMtR6GDC8/+DhZFirVE0u4sKHnqB3woYz8zEhi0Nncw="; }; postPatch = '' @@ -46,6 +47,7 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ + pandas pytestCheckHook undefined ]; diff --git a/pkgs/development/python-modules/pygobject/3.nix b/pkgs/development/python-modules/pygobject/3.nix index cc2d41147bca7..f1dff5b24e31c 100644 --- a/pkgs/development/python-modules/pygobject/3.nix +++ b/pkgs/development/python-modules/pygobject/3.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "pygobject"; - version = "3.46.0"; + version = "3.48.2"; outputs = [ "out" "dev" ]; @@ -27,7 +27,7 @@ buildPythonPackage rec { src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "QmAIstrVSMmvHHsDtZ3wRA/eXDPzj7VAaxA6Q9ZTyvw="; + hash = "sha256-B5SutKm+MaCSrCBiG19U7CgPkYWUPTKLEFza5imK0ac="; }; depsBuildBuild = [ @@ -50,6 +50,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ pycairo + gobject-introspection # e.g. try building: python3Packages.urwid python3Packages.pydbus ]; mesonFlags = [ diff --git a/pkgs/development/python-modules/pykalman/default.nix b/pkgs/development/python-modules/pykalman/default.nix index 7073e9382d3de..401ff4fc6fe7a 100644 --- a/pkgs/development/python-modules/pykalman/default.nix +++ b/pkgs/development/python-modules/pykalman/default.nix @@ -9,12 +9,12 @@ buildPythonPackage rec { pname = "pykalman"; - version = "0.9.5"; + version = "0.9.7"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-gWr0dyDZJKTGAW+nS54sjCEWWgjZFpPDIqF0Ho4H+zg="; + hash = "sha256-E1d5IAOTxrNwIhmQ9zFnQEcvVBNG6SEdEWMOLC2PuKA="; }; patches = [ diff --git a/pkgs/development/python-modules/pykdtree/default.nix b/pkgs/development/python-modules/pykdtree/default.nix index b720f5b838b3a..84372802ecaf2 100644 --- a/pkgs/development/python-modules/pykdtree/default.nix +++ b/pkgs/development/python-modules/pykdtree/default.nix @@ -16,12 +16,12 @@ buildPythonPackage rec { pname = "pykdtree"; - version = "1.3.11"; + version = "1.3.12"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-bBI8e65SE68iPFKai0FhwH64VKb+QDizaVK62iEx68s="; + hash = "sha256-zCCypnxkBWSFoxTSwrbbo1SvfuHI+42uG+byk2o3Q0E="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/pymdown-extensions/default.nix b/pkgs/development/python-modules/pymdown-extensions/default.nix index d760b9cd0dd47..733f124d36553 100644 --- a/pkgs/development/python-modules/pymdown-extensions/default.nix +++ b/pkgs/development/python-modules/pymdown-extensions/default.nix @@ -63,6 +63,11 @@ buildPythonPackage rec { pyyaml ]; + disabledTests = [ + # test artifact mismatch + "test_toc_tokens" + ]; + pythonImportsCheck = map (ext: "pymdownx.${ext}") extensions; passthru.tests = { diff --git a/pkgs/development/python-modules/pymongo/default.nix b/pkgs/development/python-modules/pymongo/default.nix index 3d17ea66f1e71..1ca7ca08ad501 100644 --- a/pkgs/development/python-modules/pymongo/default.nix +++ b/pkgs/development/python-modules/pymongo/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "pymongo"; - version = "4.6.2"; + version = "4.6.3"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-q30BrIMqFmPa1ZLMvZK7Dwd1vI+YoZI8Xhp9f+rUla8="; + hash = "sha256-QAB0CQuaYx8SC0LGGyIv10NJDBM6XS+ZwCCM78zMlk4="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pymysql/default.nix b/pkgs/development/python-modules/pymysql/default.nix index e7711f5902b94..1b5a00c27ac13 100644 --- a/pkgs/development/python-modules/pymysql/default.nix +++ b/pkgs/development/python-modules/pymysql/default.nix @@ -1,19 +1,25 @@ { lib , buildPythonPackage , fetchPypi +, setuptools , cryptography }: buildPythonPackage rec { pname = "pymysql"; - version = "1.0.2"; + version = "1.1.0"; + pyproject = true; src = fetchPypi { pname = "PyMySQL"; inherit version; - sha256 = "816927a350f38d56072aeca5dfb10221fe1dc653745853d30a216637f5d7ad36"; + hash = "sha256-TxOn34vzalHoHdnzYF/t5FpIeP4C+SNjSf2Co/BhL5Y="; }; + build-system = [ + setuptools + ]; + propagatedBuildInputs = [ cryptography ]; # Wants to connect to MySQL diff --git a/pkgs/development/python-modules/pyopenssl/default.nix b/pkgs/development/python-modules/pyopenssl/default.nix index 31e9e810c9edd..e59a9a4b43f72 100644 --- a/pkgs/development/python-modules/pyopenssl/default.nix +++ b/pkgs/development/python-modules/pyopenssl/default.nix @@ -9,18 +9,18 @@ , pretend , sphinxHook , sphinx-rtd-theme -, flaky +, pytest-rerunfailures }: buildPythonPackage rec { pname = "pyopenssl"; - version = "24.0.0"; + version = "24.1.0"; pyproject = true; src = fetchPypi { pname = "pyOpenSSL"; inherit version; - hash = "sha256-aqMwOak//6RWPmVbYdETZNASZL6My0mQYQHgKjNFML8="; + hash = "sha256-yr7Uv6pd+fGhbA72Sgy2Uxi1zQd6ftp9aXATHKL0Gm8="; }; outputs = [ @@ -46,8 +46,8 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ - flaky pretend + pytest-rerunfailures pytestCheckHook ]; diff --git a/pkgs/development/python-modules/pyproject-metadata/default.nix b/pkgs/development/python-modules/pyproject-metadata/default.nix index e5f5e157a52dd..f0bdb9379ec8e 100644 --- a/pkgs/development/python-modules/pyproject-metadata/default.nix +++ b/pkgs/development/python-modules/pyproject-metadata/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, flit-core , packaging , pytestCheckHook , pythonOlder @@ -11,22 +12,22 @@ buildPythonPackage rec { pname = "pyproject-metadata"; - version = "0.7.1"; + version = "0.8.0"; format = "pyproject"; disabled = pythonOlder "3.7"; - src = fetchPypi rec { - inherit pname version; - hash = "sha256-CpTxixCLmyHzomo9VB8FbDTtyxfchyoUShVhj+1672c="; + src = fetchPypi { + pname = "pyproject_metadata"; + inherit version; + hash = "sha256-N21aAHZKwpRApUV5+I5mt9nLfmKdNcNaHHJIv+vJtFU="; }; - nativeBuildInputs = [ - setuptools - wheel + build-system = [ + flit-core ]; - propagatedBuildInputs = [ + dependencies = [ packaging ]; diff --git a/pkgs/development/python-modules/pyqt-builder/default.nix b/pkgs/development/python-modules/pyqt-builder/default.nix index 1bf96713a4fe5..5bd7cca6189e3 100644 --- a/pkgs/development/python-modules/pyqt-builder/default.nix +++ b/pkgs/development/python-modules/pyqt-builder/default.nix @@ -3,23 +3,25 @@ , fetchPypi , packaging , setuptools +, setuptools-scm , sip , wheel }: buildPythonPackage rec { pname = "pyqt-builder"; - version = "1.15.4"; + version = "1.16.0"; format = "pyproject"; src = fetchPypi { pname = "PyQt-builder"; inherit version; - hash = "sha256-OfjHXbF9nOF8trvz3xZQtc68HqTlvXOEPSHMlmErKuE="; + hash = "sha256-R7vSz6VDACAQj59AMB4WbL6pi27z5TlTNQvdTGsxqxg="; }; nativeBuildInputs = [ setuptools + setuptools-scm wheel ]; diff --git a/pkgs/development/python-modules/pyramid-beaker/default.nix b/pkgs/development/python-modules/pyramid-beaker/default.nix index aad88af5f16a4..a49e01a378f10 100644 --- a/pkgs/development/python-modules/pyramid-beaker/default.nix +++ b/pkgs/development/python-modules/pyramid-beaker/default.nix @@ -2,13 +2,13 @@ buildPythonPackage rec { pname = "pyramid-beaker"; - version = "0.8"; + version = "0.9"; format = "setuptools"; src = fetchPypi { pname = "pyramid_beaker"; inherit version; - sha256 = "0hflx3qkcdml1mwpq53sz46s7jickpfn0zy0ns2c7j445j66bp3p"; + sha256 = "sha256-zMUT60z7W0Flfym25rKMor17O/n9qRMGoQKa7pLRz6U="; }; checkPhase = '' diff --git a/pkgs/development/python-modules/pysimplegui/default.nix b/pkgs/development/python-modules/pysimplegui/default.nix index 58deefb4f3d33..71234522f9fb0 100644 --- a/pkgs/development/python-modules/pysimplegui/default.nix +++ b/pkgs/development/python-modules/pysimplegui/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "pysimplegui"; - version = "5.0.3"; + version = "5.0.4"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "PySimpleGUI"; inherit version; - hash = "sha256-bnjPVGMVfma/tn8oCg6FLMI1W+9rtHMKNdarbNg61GM="; + hash = "sha256-pThG6BBWxy98REUae91yBZDKK8Q1Zc1PHpoW7nhdmAw="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pytest-mock/default.nix b/pkgs/development/python-modules/pytest-mock/default.nix index f956a62e1a5a0..966304cdc83d0 100644 --- a/pkgs/development/python-modules/pytest-mock/default.nix +++ b/pkgs/development/python-modules/pytest-mock/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "pytest-mock"; - version = "3.12.0"; + version = "3.14.0"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-MaQPA4wiytMih7tDkyBURR/1WD/wlLym9nXfL4vBpuk="; + hash = "sha256-JxklWh7+zq28BW1r8989HFAVUw+0DPNHwPmvrIhBC9A="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/pytest-order/default.nix b/pkgs/development/python-modules/pytest-order/default.nix index 389ce90eddceb..ebb7bbe09d438 100644 --- a/pkgs/development/python-modules/pytest-order/default.nix +++ b/pkgs/development/python-modules/pytest-order/default.nix @@ -10,12 +10,12 @@ buildPythonPackage rec { pname = "pytest-order"; - version = "1.2.0"; + version = "1.2.1"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-lE+GttRBqnsdqA+AHGq2W4S766Ry0KehLrQ7omZQEBo="; + hash = "sha256-RFG9iCG6T6IQlFWi/MiCr2DvjlPgnSRNZ2dL4I9W6sM="; }; buildInputs = [ pytest ]; @@ -27,10 +27,12 @@ buildPythonPackage rec { pytest-mock ]; - meta = { + strictDeps = true; + + meta = with lib; { description = "Pytest plugin that allows you to customize the order in which your tests are run"; homepage = "https://github.com/pytest-dev/pytest-order"; - license = lib.licenses.mit; - maintainers = [ lib.maintainers.jacg ]; + license = licenses.mit; + maintainers = with maintainers; [ jacg Luflosi ]; }; } diff --git a/pkgs/development/python-modules/python-dbusmock/default.nix b/pkgs/development/python-modules/python-dbusmock/default.nix index 2a676f72832e2..cec0275dfdbe4 100644 --- a/pkgs/development/python-modules/python-dbusmock/default.nix +++ b/pkgs/development/python-modules/python-dbusmock/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , nose , dbus +, gobject-introspection , dbus-python , pygobject3 , bluez @@ -40,6 +41,7 @@ in buildPythonPackage rec { nativeCheckInputs = [ dbus + gobject-introspection pygobject3 bluez pbap-client diff --git a/pkgs/development/python-modules/python-jose/default.nix b/pkgs/development/python-modules/python-jose/default.nix index 6e3f406fe5a30..9739e5bf7f65e 100644 --- a/pkgs/development/python-modules/python-jose/default.nix +++ b/pkgs/development/python-modules/python-jose/default.nix @@ -64,7 +64,12 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); + ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies); + + disabledTests = [ + # https://github.com/mpdavis/python-jose/issues/348 + "TestBackendEcdsaCompatibility" + ]; meta = with lib; { changelog = "https://github.com/mpdavis/python-jose/releases/tag/${version}"; diff --git a/pkgs/development/python-modules/python-musicpd/default.nix b/pkgs/development/python-modules/python-musicpd/default.nix index cc4ab6b722f0a..c105dcea14da7 100644 --- a/pkgs/development/python-modules/python-musicpd/default.nix +++ b/pkgs/development/python-modules/python-musicpd/default.nix @@ -5,12 +5,12 @@ buildPythonPackage rec { pname = "python-musicpd"; - version = "0.8.0"; + version = "0.9.0"; src = fetchPypi { inherit pname; inherit version; - sha256 = "sha256-5Br4rZO1c/pPmAZ/UecYjuVLttR8R+xeReKsc/xnaeI="; + sha256 = "sha256-/FdM0UolVqhJNpS60Q/nra1hSHKL/LiSMX7/Hcipwco="; }; format = "setuptools"; diff --git a/pkgs/development/python-modules/pywavelets/default.nix b/pkgs/development/python-modules/pywavelets/default.nix index a4d8117fc3720..af598a1439caf 100644 --- a/pkgs/development/python-modules/pywavelets/default.nix +++ b/pkgs/development/python-modules/pywavelets/default.nix @@ -1,34 +1,44 @@ { lib , buildPythonPackage -, fetchPypi -, isPy27 +, fetchFromGitHub +, pythonOlder +, meson-python , cython -, nose -, pytest +, pytestCheckHook , numpy }: buildPythonPackage rec { pname = "pywavelets"; - version = "1.4.1"; - disabled = isPy27; + version = "1.6.0"; + pyproject = true; - src = fetchPypi { - pname = "PyWavelets"; - inherit version; - hash = "sha256-ZDevPd8IMRjCbY+Xq0OwckuVbJ+Vjp6niGWfaig0upM="; + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "PyWavelets"; + repo = "pywt"; + rev = "refs/tags/v${version}"; + hash = "sha256-Dr6LWGVlYGDD21l1RQ7elScovcen5uuFdJJXe3deB5o="; }; - nativeCheckInputs = [ nose pytest ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail '"numpy>=2.0.0rc1,<2.3",' "" + ''; + + build-system = [ + meson-python + cython + numpy + ]; - buildInputs = [ cython ]; + dependencies = [ numpy ]; - propagatedBuildInputs = [ numpy ]; + nativeCheckInputs = [ pytestCheckHook ]; - # Somehow nosetests doesn't run the tests, so let's use pytest instead - doCheck = false; # tests use relative paths, which fail to resolve - checkPhase = '' - py.test pywt/tests + preCheck = '' + cd $out ''; # ensure compiled modules are present @@ -43,6 +53,7 @@ buildPythonPackage rec { meta = with lib; { description = "Wavelet transform module"; homepage = "https://github.com/PyWavelets/pywt"; + changelog = "https://github.com/PyWavelets/pywt/releases/tag/v${version}"; license = licenses.mit; }; diff --git a/pkgs/development/python-modules/pywbem/default.nix b/pkgs/development/python-modules/pywbem/default.nix index bba152dd43671..c298c1e51209e 100644 --- a/pkgs/development/python-modules/pywbem/default.nix +++ b/pkgs/development/python-modules/pywbem/default.nix @@ -24,14 +24,14 @@ buildPythonPackage rec { pname = "pywbem"; - version = "1.6.3"; + version = "1.7.1"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-eN8w3umMUIYgtZm4lR8yKoHGwKnXt4/+XgF7lBfNl7k="; + hash = "sha256-6jx5H4FtM93JToXQwq9ihiPfMw7nX4KwFFQzHkAgnP4="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/qdldl/default.nix b/pkgs/development/python-modules/qdldl/default.nix index a5af403d4d7a6..10d05be786960 100644 --- a/pkgs/development/python-modules/qdldl/default.nix +++ b/pkgs/development/python-modules/qdldl/default.nix @@ -10,12 +10,12 @@ buildPythonPackage rec { pname = "qdldl"; - version = "0.1.7.post1"; + version = "0.1.7.post2"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-eY2IwW4CU2rmXHHwa2Tj+/MbdNfke8EP+YFnaGMrOmQ="; + hash = "sha256-SxU5pewQzHV6/XFW1960AGAHythtd0yfD9w+NEFVV9M="; }; dontUseCmakeConfigure = true; diff --git a/pkgs/development/python-modules/qrcode/default.nix b/pkgs/development/python-modules/qrcode/default.nix index b5c3d2aec6b34..3d7ad90dbaaf5 100644 --- a/pkgs/development/python-modules/qrcode/default.nix +++ b/pkgs/development/python-modules/qrcode/default.nix @@ -51,6 +51,9 @@ buildPythonPackage rec { disabledTests = lib.optionals (pythonAtLeast "3.12") [ "test_change" + ] ++ [ + # Attempts to open a file which doesn't exist in sandbox + "test_piped" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/readme-renderer/default.nix b/pkgs/development/python-modules/readme-renderer/default.nix index 13a8074a56907..bcc961bc18ffc 100644 --- a/pkgs/development/python-modules/readme-renderer/default.nix +++ b/pkgs/development/python-modules/readme-renderer/default.nix @@ -44,17 +44,8 @@ buildPythonPackage rec { ++ optional-dependencies.md; disabledTests = [ - # https://github.com/pypa/readme_renderer/issues/221 - "test_GFM_" - # https://github.com/pypa/readme_renderer/issues/274 - "test_CommonMark_008.md" + "test_rst_fixtures" "test_rst_008.rst" - # Relies on old distutils behaviour removed by setuptools (TypeError: dist must be a Distribution instance) - "test_valid_rst" - "test_invalid_rst" - "test_malicious_rst" - "test_invalid_missing" - "test_invalid_empty" ]; pythonImportsCheck = [ @@ -64,6 +55,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python library for rendering readme descriptions"; homepage = "https://github.com/pypa/readme_renderer"; + changelog = "https://github.com/pypa/readme_renderer/releases/tag/${version}"; license = with licenses; [ asl20 ]; maintainers = with maintainers; [ fab ]; }; diff --git a/pkgs/development/python-modules/redis/default.nix b/pkgs/development/python-modules/redis/default.nix index d987092e48f02..9e583447e1017 100644 --- a/pkgs/development/python-modules/redis/default.nix +++ b/pkgs/development/python-modules/redis/default.nix @@ -21,14 +21,14 @@ buildPythonPackage rec { pname = "redis"; - version = "5.0.1"; + version = "5.0.3"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-DatJXNV1MGnTvGUKDd6Kj57d4W/FaRtomlZu2lgQDQ8="; + hash = "sha256-SXO650RMD77WSga4dEb3k2HLfk7BU4wCLWlu16UBVYA="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/referencing/default.nix b/pkgs/development/python-modules/referencing/default.nix index 0113f23e47420..3e7063e42ecc6 100644 --- a/pkgs/development/python-modules/referencing/default.nix +++ b/pkgs/development/python-modules/referencing/default.nix @@ -1,39 +1,39 @@ -{ lib -, attrs -, buildPythonPackage -, fetchFromGitHub -, hatch-vcs -, hatchling -, jsonschema -, pytest-subtests -, pytestCheckHook -, pythonOlder -, rpds-py +{ + lib, + attrs, + buildPythonPackage, + fetchFromGitHub, + hatch-vcs, + hatchling, + jsonschema, + pytest-subtests, + pytestCheckHook, + pythonOlder, + rpds-py, }: - let self = buildPythonPackage rec { pname = "referencing"; - version = "0.33.0"; - format = "pyproject"; + version = "0.34.0"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "python-jsonschema"; repo = "referencing"; rev = "refs/tags/v${version}"; fetchSubmodules = true; - hash = "sha256-QP/F6UNiKHGNMhGphDJgEFZnpGU5izExcI/A9WJjA5Q="; + hash = "sha256-Vx+WVgt09I04Z/sIYsLLtPCwuo5wW0Z2o2OTH2V17UY="; }; - nativeBuildInputs = [ + build-system = [ hatch-vcs hatchling ]; - propagatedBuildInputs = [ + dependencies = [ attrs rpds-py ]; @@ -44,22 +44,20 @@ let pytestCheckHook ]; - # avoid infinite recursion with jsonschema + # Avoid infinite recursion with jsonschema doCheck = false; passthru.tests.referencing = self.overridePythonAttrs { doCheck = true; }; - pythonImportsCheck = [ - "referencing" - ]; + pythonImportsCheck = [ "referencing" ]; meta = with lib; { description = "Cross-specification JSON referencing"; homepage = "https://github.com/python-jsonschema/referencing"; - changelog = "https://github.com/python-jsonschema/referencing/blob/${version}/CHANGELOG.rst"; + changelog = "https://github.com/python-jsonschema/referencing/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ fab ]; }; }; in - self +self diff --git a/pkgs/development/python-modules/reportlab/default.nix b/pkgs/development/python-modules/reportlab/default.nix index ef0a575789e75..2024b2835a753 100644 --- a/pkgs/development/python-modules/reportlab/default.nix +++ b/pkgs/development/python-modules/reportlab/default.nix @@ -14,7 +14,7 @@ let ft = freetype.overrideAttrs (oldArgs: { dontDisableStatic = true; }); in buildPythonPackage rec { pname = "reportlab"; - version = "4.1.0"; + version = "4.2.0"; pyproject = true; # See https://bitbucket.org/pypy/compatibility/wiki/reportlab%20toolkit @@ -22,7 +22,7 @@ in buildPythonPackage rec { src = fetchPypi { inherit pname version; - hash = "sha256-Opn69BJpEVnAaLP/AcFTB84v0s9rhgGZQ0h04AIECoQ="; + hash = "sha256-R0+yjWNDGl1H11yQ1YA5MFDffUkaCceHffMpGi6fbQo="; }; postPatch = '' diff --git a/pkgs/development/python-modules/reproject/default.nix b/pkgs/development/python-modules/reproject/default.nix index ff6e3070cf7e0..c5ee962365430 100644 --- a/pkgs/development/python-modules/reproject/default.nix +++ b/pkgs/development/python-modules/reproject/default.nix @@ -20,14 +20,14 @@ buildPythonPackage rec { pname = "reproject"; - version = "0.13.0"; + version = "0.13.1"; pyproject = true; disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; - hash = "sha256-lL6MkKVSWmV6KPkG/9fjc2c2dFQ14i9fiJAr3VFfcuI="; + hash = "sha256-Y+Ne7ZUgCieWcC4zqfrqPzmr/kGUdFroGfIPKWACaPY="; }; postPatch = '' diff --git a/pkgs/development/python-modules/requests-mock/default.nix b/pkgs/development/python-modules/requests-mock/default.nix index 4e72ce67364ac..9273875ab688f 100644 --- a/pkgs/development/python-modules/requests-mock/default.nix +++ b/pkgs/development/python-modules/requests-mock/default.nix @@ -4,24 +4,31 @@ , fixtures , purl , pytestCheckHook -, python , requests , requests-futures -, six +, setuptools +, setuptools-scm , testtools }: buildPythonPackage rec { pname = "requests-mock"; - version = "1.11.0"; - format = "setuptools"; + version = "1.12.1"; + pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-7xC1crSJpfKOCbcIaXIIxKOyuJ74Cp8BWENA6jV+w8Q="; + hash = "sha256-6eEuMztSUVboKjyFLyIBa5FYIg0vR0VN6crop303FAE="; }; - propagatedBuildInputs = [ requests six ]; + build-system = [ + setuptools + setuptools-scm + ]; + + dependencies = [ + requests + ]; nativeCheckInputs = [ fixtures diff --git a/pkgs/development/python-modules/rpy2/default.nix b/pkgs/development/python-modules/rpy2/default.nix index c10b23414b425..2f3e66b76ba19 100644 --- a/pkgs/development/python-modules/rpy2/default.nix +++ b/pkgs/development/python-modules/rpy2/default.nix @@ -25,26 +25,20 @@ }: buildPythonPackage rec { - version = "3.5.15"; + version = "3.5.16"; format = "setuptools"; pname = "rpy2"; disabled = isPyPy; src = fetchPypi { inherit version pname; - hash = "sha256-RE+uSoTcfyM7cOqrCqgTmO4BR8ThrjjdRSTXedbyWys="; + hash = "sha256-g34vdFg2WKXEwzl2GnP5Q08z75ztPjDGTadWIWXCgBs="; }; patches = [ # R_LIBS_SITE is used by the nix r package to point to the installed R libraries. # This patch sets R_LIBS_SITE when rpy2 is imported. ./rpy2-3.x-r-libs-site.patch - - # https://github.com/rpy2/rpy2/pull/1094 - (fetchpatch { - url = "https://github.com/rpy2/rpy2/commit/026d069a008163a62d12567bcb938410d0f9bf7a.diff"; - hash = "sha256-x778upSY3zab5EiRyOcsbDpPj7vN/7XzefEs+wvkNg0="; - }) ]; postPatch = '' diff --git a/pkgs/development/python-modules/rq/default.nix b/pkgs/development/python-modules/rq/default.nix index 45c8627be5df1..7eb455a6dc82c 100644 --- a/pkgs/development/python-modules/rq/default.nix +++ b/pkgs/development/python-modules/rq/default.nix @@ -57,15 +57,15 @@ buildPythonPackage rec { kill $REDIS_PID ''; - pythonImportsCheck = [ - "rq" - ]; - disabledTests = [ - # AttributeError + # https://github.com/rq/rq/commit/fd261d5d8fc0fe604fa396ee6b9c9b7a7bb4142f "test_clean_large_registry" ]; + pythonImportsCheck = [ + "rq" + ]; + meta = with lib; { description = "Library for creating background jobs and processing them"; homepage = "https://github.com/nvie/rq/"; diff --git a/pkgs/development/python-modules/s3transfer/default.nix b/pkgs/development/python-modules/s3transfer/default.nix index 124b44f097cc5..52bf82fc502db 100644 --- a/pkgs/development/python-modules/s3transfer/default.nix +++ b/pkgs/development/python-modules/s3transfer/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "s3transfer"; - version = "0.10.0"; + version = "0.10.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "boto"; repo = "s3transfer"; rev = "refs/tags/${version}"; - hash = "sha256-21xycx1+84uY4gFr7N+ra98dpsEwxy9zeSl4QA66nUc="; + hash = "sha256-EHNkYviafnuU8AADp9oyaDuAnoPOdOVNSLCcoONnHPY="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/safety/default.nix b/pkgs/development/python-modules/safety/default.nix index 529ed4d8d4c27..1a5e1ab8f461e 100644 --- a/pkgs/development/python-modules/safety/default.nix +++ b/pkgs/development/python-modules/safety/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { pname = "safety"; - version = "3.0.1"; + version = "3.1.0"; disabled = pythonOlder "3.7"; @@ -32,7 +32,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - hash = "sha256-HyAA8DZS86C/xn+P0emLxXI8y3bhXLG91oVFw9gD3wE="; + hash = "sha256-cfR7guzhU+wvJA4nf3y/pw1douDRQxYsZ/Y7L3RZoao="; }; postPatch = '' diff --git a/pkgs/development/python-modules/scalene/default.nix b/pkgs/development/python-modules/scalene/default.nix index 29a51e38b631b..18eebe07cc198 100644 --- a/pkgs/development/python-modules/scalene/default.nix +++ b/pkgs/development/python-modules/scalene/default.nix @@ -18,13 +18,13 @@ buildPythonPackage rec { pname = "scalene"; - version = "1.5.38"; + version = "1.5.39"; pyproject = true; disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; - hash = "sha256-LR1evkn2m6FNBmJnUUJubesxIPeHG6RDgLFBHDuxe38="; + hash = "sha256-B4pDLP3+56toQZyvh6+6NimCKv0cpcO0ydcqV1tJZkg="; }; patches = [ diff --git a/pkgs/development/python-modules/schwifty/default.nix b/pkgs/development/python-modules/schwifty/default.nix index 1a33c71f7ff5f..1498dd1bfdb1c 100644 --- a/pkgs/development/python-modules/schwifty/default.nix +++ b/pkgs/development/python-modules/schwifty/default.nix @@ -21,14 +21,14 @@ buildPythonPackage rec { pname = "schwifty"; - version = "2024.1.1.post0"; + version = "2024.4.0"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-ZFDu+stuKdsVc8bTuSZ4LZX8BuQhORjyEMosnrk1rX0="; + hash = "sha256-1EV2oi2LBcjw2U7nKqdVUVDlFCzR8RqX5tVIciw1trg="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/scikit-bio/default.nix b/pkgs/development/python-modules/scikit-bio/default.nix index c08f992f2293b..2f49063ae06cb 100644 --- a/pkgs/development/python-modules/scikit-bio/default.nix +++ b/pkgs/development/python-modules/scikit-bio/default.nix @@ -20,14 +20,14 @@ }: buildPythonPackage rec { - version = "0.5.9"; + version = "0.6.0"; format = "setuptools"; pname = "scikit-bio"; disabled = !isPy3k; src = fetchPypi { inherit pname version; - hash = "sha256-euBE3IvuIxkAJIrcOoZZB352FA1WrJ9CvQH7eYEBSRA="; + hash = "sha256-EBBafDwVrlkQJEkn8punqjUjSxnr5lE7hIRUc0OywQ8="; }; nativeBuildInputs = [ cython ]; diff --git a/pkgs/development/python-modules/scikit-build/default.nix b/pkgs/development/python-modules/scikit-build/default.nix index acaf74e10953e..0d35ccf4a8ed5 100644 --- a/pkgs/development/python-modules/scikit-build/default.nix +++ b/pkgs/development/python-modules/scikit-build/default.nix @@ -92,6 +92,8 @@ buildPythonPackage rec { "test_dual_pep518" # pip exits with code 1 "test_isolated_env_trigger_reconfigure" # Regex pattern 'exit skbuild saving cmake spec' does not match 'exit skbuild running make'. "test_hello_wheel" # [Errno 2] No such file or directory: '_skbuild/linux-x86_64-3.9/setuptools/bdist.linux-x86_64/wheel/helloModule.py' + "test_hello_cython_sdist" # [Errno 2] No such file or directory: 'dist/hello-cython-1.2.3.tar.gz' + "test_hello_pure_sdist" # [Errno 2] No such file or directory: 'dist/hello-pure-1.2.3.tar.gz' # sdist contents differ, contains additional setup.py "test_hello_sdist" "test_manifest_in_sdist" diff --git a/pkgs/development/python-modules/scikit-learn/default.nix b/pkgs/development/python-modules/scikit-learn/default.nix index bbcb44de2c02a..88927aa4f20be 100644 --- a/pkgs/development/python-modules/scikit-learn/default.nix +++ b/pkgs/development/python-modules/scikit-learn/default.nix @@ -2,7 +2,6 @@ , lib , buildPythonPackage , fetchPypi -, fetchpatch # build-system , cython @@ -16,6 +15,7 @@ , glibcLocales , llvmPackages , pytestCheckHook +, pythonRelaxDepsHook , pytest-xdist , pillow , joblib @@ -25,23 +25,21 @@ buildPythonPackage rec { pname = "scikit-learn"; - version = "1.4.1.post1"; + version = "1.4.2"; pyproject = true; disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; - hash = "sha256-k9PUlv8ZZUcPmXfQXl7DN2+x5jsQ5P2l450jwtiWmjA="; + hash = "sha256-2qHEcdlbrQgMbkS0lGyTkKSEKtwwglcsIOT4iE456Vk="; }; - patches = [ - (fetchpatch { # included in >= 1.4.2 - name = "test_standard_scaler_dtype.patch"; - url = "https://github.com/jeremiedbb/scikit-learn/commit/87c32d35eeb8f6f7fec63dc3d97d9c416545f053.diff"; - hash = "sha256-iOBOoWHuWChCTnZ5go7MobPcHRGMChROpCI7V/5ik1Y="; - }) - ]; + # Avoid build-system requirements causing failure + prePatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "numpy==2.0.0rc1" "numpy" + ''; buildInputs = [ pillow @@ -52,6 +50,7 @@ buildPythonPackage rec { nativeBuildInputs = [ gfortran + pythonRelaxDepsHook ]; build-system = [ diff --git a/pkgs/development/python-modules/setuptools/default.nix b/pkgs/development/python-modules/setuptools/default.nix index 46a2597ed1419..c7cfd09dc49d8 100644 --- a/pkgs/development/python-modules/setuptools/default.nix +++ b/pkgs/development/python-modules/setuptools/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "setuptools"; - version = "69.2.0"; + version = "69.5.1"; format = "pyproject"; src = fetchFromGitHub { owner = "pypa"; repo = "setuptools"; rev = "refs/tags/v${version}"; - hash = "sha256-kll4zYFQn4g/8Fq0Y5vLvDXtotxYMbiNAgGa0sClFQk="; + hash = "sha256-X0ntFlDIhUjxtWzz0LxybQSuxhRpHlMeBYtOGwqDl4A="; }; patches = [ diff --git a/pkgs/development/python-modules/setuptools/setuptools-distutils-C++.patch b/pkgs/development/python-modules/setuptools/setuptools-distutils-C++.patch index 399e1682357de..16dfd34c2def2 100644 --- a/pkgs/development/python-modules/setuptools/setuptools-distutils-C++.patch +++ b/pkgs/development/python-modules/setuptools/setuptools-distutils-C++.patch @@ -1,8 +1,8 @@ diff --git a/setuptools/_distutils/cygwinccompiler.py b/setuptools/_distutils/cygwinccompiler.py -index 47efa377..5cdbbe10 100644 +index 539f09d8f..a3d3020cb 100644 --- a/setuptools/_distutils/cygwinccompiler.py +++ b/setuptools/_distutils/cygwinccompiler.py -@@ -101,14 +101,19 @@ class CygwinCCompiler(UnixCCompiler): +@@ -99,14 +99,19 @@ class CygwinCCompiler(UnixCCompiler): self.cxx = os.environ.get('CXX', 'g++') self.linker_dll = self.cc @@ -12,17 +12,17 @@ index 47efa377..5cdbbe10 100644 self.set_executables( compiler='%s -mcygwin -O -Wall' % self.cc, compiler_so='%s -mcygwin -mdll -O -Wall' % self.cc, - compiler_cxx='%s -mcygwin -O -Wall' % self.cxx, + compiler_so_cxx='%s -mcygwin -mdll -O -Wall' % self.cxx, + compiler_cxx='%s -mcygwin -O -Wall' % self.cxx, linker_exe='%s -mcygwin' % self.cc, - linker_so=('{} -mcygwin {}'.format(self.linker_dll, shared_option)), + linker_so=(f'{self.linker_dll} -mcygwin {shared_option}'), + linker_exe_cxx='%s -mcygwin' % self.cxx, + linker_so_cxx=('%s -mcygwin %s' % + (self.linker_dll_cxx, shared_option)), ) # Include the appropriate MSVC runtime library if Python was built -@@ -140,9 +145,12 @@ class CygwinCCompiler(UnixCCompiler): +@@ -138,9 +143,12 @@ class CygwinCCompiler(UnixCCompiler): raise CompileError(msg) else: # for other files use the C-compiler try: @@ -38,24 +38,24 @@ index 47efa377..5cdbbe10 100644 except DistutilsExecError as msg: raise CompileError(msg) -@@ -278,9 +286,12 @@ class Mingw32CCompiler(CygwinCCompiler): +@@ -276,9 +284,12 @@ class Mingw32CCompiler(CygwinCCompiler): self.set_executables( compiler='%s -O -Wall' % self.cc, compiler_so='%s -mdll -O -Wall' % self.cc, + compiler_so_cxx='%s -mdll -O -Wall' % self.cxx, compiler_cxx='%s -O -Wall' % self.cxx, linker_exe='%s' % self.cc, - linker_so='{} {}'.format(self.linker_dll, shared_option), + linker_so=f'{self.linker_dll} {shared_option}', + linker_exe_cxx='%s' % self.cxx, + linker_so_cxx='%s %s' % (self.linker_dll_cxx, shared_option) ) def runtime_library_dir_option(self, dir): diff --git a/setuptools/_distutils/sysconfig.py b/setuptools/_distutils/sysconfig.py -index a40a7231..e5aad4f4 100644 +index 1a38e9fa7..034ed6566 100644 --- a/setuptools/_distutils/sysconfig.py +++ b/setuptools/_distutils/sysconfig.py -@@ -297,6 +297,7 @@ def customize_compiler(compiler): # noqa: C901 +@@ -300,6 +300,7 @@ def customize_compiler(compiler): # noqa: C901 cflags, ccshared, ldshared, @@ -63,7 +63,7 @@ index a40a7231..e5aad4f4 100644 shlib_suffix, ar, ar_flags, -@@ -306,11 +307,14 @@ def customize_compiler(compiler): # noqa: C901 +@@ -309,11 +310,14 @@ def customize_compiler(compiler): # noqa: C901 'CFLAGS', 'CCSHARED', 'LDSHARED', @@ -78,7 +78,7 @@ index a40a7231..e5aad4f4 100644 if 'CC' in os.environ: newcc = os.environ['CC'] if 'LDSHARED' not in os.environ and ldshared.startswith(cc): -@@ -322,19 +326,27 @@ def customize_compiler(compiler): # noqa: C901 +@@ -325,19 +329,27 @@ def customize_compiler(compiler): # noqa: C901 cxx = os.environ['CXX'] if 'LDSHARED' in os.environ: ldshared = os.environ['LDSHARED'] @@ -107,7 +107,7 @@ index a40a7231..e5aad4f4 100644 if 'AR' in os.environ: ar = os.environ['AR'] if 'ARFLAGS' in os.environ: -@@ -343,13 +355,17 @@ def customize_compiler(compiler): # noqa: C901 +@@ -346,13 +358,17 @@ def customize_compiler(compiler): # noqa: C901 archiver = ar + ' ' + ar_flags cc_cmd = cc + ' ' + cflags @@ -127,10 +127,10 @@ index a40a7231..e5aad4f4 100644 ) diff --git a/setuptools/_distutils/unixccompiler.py b/setuptools/_distutils/unixccompiler.py -index 6ca2332a..5ac64128 100644 +index 0248bde87..9508e6cff 100644 --- a/setuptools/_distutils/unixccompiler.py +++ b/setuptools/_distutils/unixccompiler.py -@@ -115,9 +115,12 @@ class UnixCCompiler(CCompiler): +@@ -118,9 +118,12 @@ class UnixCCompiler(CCompiler): 'preprocessor': None, 'compiler': ["cc"], 'compiler_so': ["cc"], @@ -144,7 +144,7 @@ index 6ca2332a..5ac64128 100644 'archiver': ["ar", "-cr"], 'ranlib': None, } -@@ -181,8 +184,13 @@ class UnixCCompiler(CCompiler): +@@ -184,8 +187,13 @@ class UnixCCompiler(CCompiler): def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) @@ -159,7 +159,7 @@ index 6ca2332a..5ac64128 100644 except DistutilsExecError as msg: raise CompileError(msg) -@@ -250,7 +258,8 @@ class UnixCCompiler(CCompiler): +@@ -253,7 +261,8 @@ class UnixCCompiler(CCompiler): # building an executable or linker_so (with shared options) # when building a shared library. building_exe = target_desc == CCompiler.EXECUTABLE diff --git a/pkgs/development/python-modules/sigstore-protobuf-specs/default.nix b/pkgs/development/python-modules/sigstore-protobuf-specs/default.nix index 5e89670edef68..56da9cd5f4033 100644 --- a/pkgs/development/python-modules/sigstore-protobuf-specs/default.nix +++ b/pkgs/development/python-modules/sigstore-protobuf-specs/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "sigstore-protobuf-specs"; - version = "0.3.0"; + version = "0.3.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -16,7 +16,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "sigstore_protobuf_specs"; inherit version; - hash = "sha256-MyKttzmSvKDz3G1MLDi6wpCGoR0mMamDrbJ5jljjKlQ="; + hash = "sha256-xAthl1uVeukG6ymlvHBA7AFbaLa0YAXMWAXmKUk+jew="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/skytemple-ssb-debugger/default.nix b/pkgs/development/python-modules/skytemple-ssb-debugger/default.nix index 324f34f33524d..7b50a7ae6c197 100644 --- a/pkgs/development/python-modules/skytemple-ssb-debugger/default.nix +++ b/pkgs/development/python-modules/skytemple-ssb-debugger/default.nix @@ -17,7 +17,7 @@ , skytemple-files , skytemple-icons , skytemple-ssb-emulator -, wrapGAppsHook +, wrapGAppsHook3 }: buildPythonPackage rec { @@ -33,7 +33,7 @@ buildPythonPackage rec { }; buildInputs = [ gtk3 gtksourceview4 ]; - nativeBuildInputs = [ gobject-introspection wrapGAppsHook ]; + nativeBuildInputs = [ gobject-introspection wrapGAppsHook3 ]; propagatedBuildInputs = [ explorerscript ndspy diff --git a/pkgs/development/python-modules/slicer/default.nix b/pkgs/development/python-modules/slicer/default.nix index f678dfb2eaa20..f6900cb634927 100644 --- a/pkgs/development/python-modules/slicer/default.nix +++ b/pkgs/development/python-modules/slicer/default.nix @@ -12,13 +12,13 @@ buildPythonPackage rec { pname = "slicer"; - version = "0.0.7"; + version = "0.0.8"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-9dX3tF+Y0VW5wLplVPqXcMaybVeTo+d6EDD7VpEOvuw="; + hash = "sha256-LnVTr3PwwMLTVfSvzD7Pl8byFW/PRZOVXD9Wz2xNbrc="; }; prePatch = '' diff --git a/pkgs/development/python-modules/snowflake-sqlalchemy/default.nix b/pkgs/development/python-modules/snowflake-sqlalchemy/default.nix index d8857b971a31a..66824e6ccd0f9 100644 --- a/pkgs/development/python-modules/snowflake-sqlalchemy/default.nix +++ b/pkgs/development/python-modules/snowflake-sqlalchemy/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "snowflake-sqlalchemy"; - version = "1.5.1"; + version = "1.5.3"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-TxODQC/8iTEZdL2BDe4iADrvSvDzEqD9tVd4MzrRq/c="; + hash = "sha256-eRkew/6/syvP/s1m8qfdVhvVcTRepLzL9BzB+1wGgv8="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/spglib/default.nix b/pkgs/development/python-modules/spglib/default.nix index 2939ab51989c7..5255fedd044bb 100644 --- a/pkgs/development/python-modules/spglib/default.nix +++ b/pkgs/development/python-modules/spglib/default.nix @@ -20,12 +20,12 @@ buildPythonPackage rec { pname = "spglib"; - version = "2.3.1"; + version = "2.4.0"; format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-c24l7GfCIMsg+rcBfE/mOC7t7iIwdtV/QEc0KxvGjOM="; + hash = "sha256-bmP57mG3DxU6ItO1ULGD2lMfiQR1kX/OIDutRZeqwkM="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/sphinx-autoapi/default.nix b/pkgs/development/python-modules/sphinx-autoapi/default.nix index ca80a717ba545..f10e8be83da6c 100644 --- a/pkgs/development/python-modules/sphinx-autoapi/default.nix +++ b/pkgs/development/python-modules/sphinx-autoapi/default.nix @@ -53,6 +53,8 @@ buildPythonPackage rec { # failing typing assertions "test_integration" "test_annotations" + # sphinx.errors.SphinxWarning: cannot cache unpickable configuration value: 'autoapi_prepare_jinja_env' (because it contains a function, class, or module object) + "test_custom_jinja_filters" ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/sphinx-autobuild/default.nix b/pkgs/development/python-modules/sphinx-autobuild/default.nix index d4ad4cedab8cf..50189474d4c15 100644 --- a/pkgs/development/python-modules/sphinx-autobuild/default.nix +++ b/pkgs/development/python-modules/sphinx-autobuild/default.nix @@ -1,21 +1,32 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub + +# build-system , flit-core + +# dependencies , colorama , sphinx -, livereload +, starlette +, uvicorn +, watchfiles +, websockets + +# tests +, pytestCheckHook }: buildPythonPackage rec { pname = "sphinx-autobuild"; - version = "2024.2.4"; + version = "2024.04.16"; pyproject = true; - src = fetchPypi { - pname = "sphinx_autobuild"; - inherit version; - hash = "sha256-y50hIaF21i1FRxYkhyr8X613Va1mJzir5ADs9KeVQwM="; + src = fetchFromGitHub { + owner = "sphinx-doc"; + repo = "sphinx-autobuild"; + rev = "refs/tags/${version}"; + hash = "sha256-5HgRqt2ZTGcQ6X2sZN0gRfahmwlqpDbae5gOnGa02L0="; }; build-system = [ @@ -25,11 +36,15 @@ buildPythonPackage rec { dependencies = [ colorama sphinx - livereload + starlette + uvicorn + watchfiles + websockets ]; - # No tests included. - doCheck = false; + nativeCheckInputs = [ + pytestCheckHook + ]; pythonImportsCheck = [ "sphinx_autobuild" ]; diff --git a/pkgs/development/python-modules/sphinx-autodoc-typehints/default.nix b/pkgs/development/python-modules/sphinx-autodoc-typehints/default.nix index e5bba673e4ce1..45ef02367fbe0 100644 --- a/pkgs/development/python-modules/sphinx-autodoc-typehints/default.nix +++ b/pkgs/development/python-modules/sphinx-autodoc-typehints/default.nix @@ -10,7 +10,7 @@ let pname = "sphinx-autodoc-typehints"; - version = "2.0.0"; + version = "2.1.0"; in buildPythonPackage { @@ -22,7 +22,7 @@ buildPythonPackage { src = fetchPypi { pname = "sphinx_autodoc_typehints"; inherit version; - hash = "sha256-fyzawucP2Xh5Jrbp5UHNTe0eg40rRv2iobsKdexbfzo="; + hash = "sha256-Ub+Nx3xPunR+MvBzUAKpFQB0fQVTyuYWhjhI6PXkn+g="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/sphinx-pytest/default.nix b/pkgs/development/python-modules/sphinx-pytest/default.nix index 7bc41418fe46a..e89183641e40a 100644 --- a/pkgs/development/python-modules/sphinx-pytest/default.nix +++ b/pkgs/development/python-modules/sphinx-pytest/default.nix @@ -4,6 +4,7 @@ , flit-core , pytest , sphinx +, defusedxml , pytestCheckHook }: @@ -36,6 +37,7 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ + defusedxml pytestCheckHook ]; diff --git a/pkgs/development/python-modules/sphinx-rtd-theme/default.nix b/pkgs/development/python-modules/sphinx-rtd-theme/default.nix index 1e8e0cd4b1e71..61e443333b3ea 100644 --- a/pkgs/development/python-modules/sphinx-rtd-theme/default.nix +++ b/pkgs/development/python-modules/sphinx-rtd-theme/default.nix @@ -40,6 +40,11 @@ buildPythonPackage rec { readthedocs-sphinx-ext ]; + disabledTests = [ + # docutils 0.21 compat + "test_basic" + ]; + pythonRelaxDeps = [ "docutils" "sphinxcontrib-jquery" diff --git a/pkgs/development/python-modules/sphinx/default.nix b/pkgs/development/python-modules/sphinx/default.nix index 43b7ebcd99ee9..c9f83af0aee68 100644 --- a/pkgs/development/python-modules/sphinx/default.nix +++ b/pkgs/development/python-modules/sphinx/default.nix @@ -1,6 +1,5 @@ { lib , buildPythonPackage -, pythonAtLeast , pythonOlder , fetchFromGitHub , isPyPy @@ -28,6 +27,7 @@ , sphinxcontrib-websupport # check phase +, defusedxml , filelock , html5lib , pytestCheckHook @@ -36,7 +36,7 @@ buildPythonPackage rec { pname = "sphinx"; - version = "7.2.6"; + version = "7.3.7"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -51,7 +51,7 @@ buildPythonPackage rec { mv tests/roots/test-images/{testimäge,testimæge}.png sed -i 's/testimäge/testimæge/g' tests/{test_build*.py,roots/test-images/index.rst} ''; - hash = "sha256-IjpRGeGpGfzrEvwIKtuu2l1S74w8W+AbqDOGnWwtRck="; + hash = "sha256-XGGRWEvd1SbQsK8W5yxDzBd5hlvXcDzr8t5Qa6skH/M="; }; nativeBuildInputs = [ @@ -83,6 +83,7 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; nativeCheckInputs = [ + defusedxml filelock html5lib pytestCheckHook @@ -110,6 +111,8 @@ buildPythonPackage rec { "test_decorators" # requires cython_0, but fails miserably on 3.11 "test_cython" + # Could not fetch remote image: http://localhost:7777/sphinx.png + "test_copy_images" ] ++ lib.optionals isPyPy [ # PyPy has not __builtins__ which get asserted # https://doc.pypy.org/en/latest/cpython_differences.html#miscellaneous @@ -122,9 +125,6 @@ buildPythonPackage rec { "test_isattributedescriptor" "test_methoddescriptor" "test_partialfunction" - ] ++ lib.optionals (pythonAtLeast "3.12") [ - # https://github.com/sphinx-doc/sphinx/issues/12202 (Fixed in 7.3) - "test_enum_class" ]; meta = { diff --git a/pkgs/development/python-modules/sphinxcontrib-jquery/default.nix b/pkgs/development/python-modules/sphinxcontrib-jquery/default.nix index fef662c85daef..0ca9fad7b7319 100644 --- a/pkgs/development/python-modules/sphinxcontrib-jquery/default.nix +++ b/pkgs/development/python-modules/sphinxcontrib-jquery/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , fetchpatch , flit-core +, defusedxml , pytestCheckHook , sphinx }: @@ -42,6 +43,7 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ + defusedxml pytestCheckHook sphinx ]; diff --git a/pkgs/development/python-modules/sphinxcontrib-tikz/default.nix b/pkgs/development/python-modules/sphinxcontrib-tikz/default.nix index fb44f8ce343a5..a52ebdd83d6f5 100644 --- a/pkgs/development/python-modules/sphinxcontrib-tikz/default.nix +++ b/pkgs/development/python-modules/sphinxcontrib-tikz/default.nix @@ -8,12 +8,12 @@ buildPythonPackage rec { pname = "sphinxcontrib-tikz"; - version = "0.4.18"; + version = "0.4.19"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-+IQV2uoKqAGQzq0te6z7vi+NnvQGZ0Sb7XjhdT05Tzo="; + hash = "sha256-gen+bH4NvEbxnxr5HStisB1BqyKIS4n1VoHyAK4mXUk="; }; postPatch = '' diff --git a/pkgs/development/python-modules/sqlalchemy-utils/default.nix b/pkgs/development/python-modules/sqlalchemy-utils/default.nix index 1ace2eab95900..8b0a1a374754b 100644 --- a/pkgs/development/python-modules/sqlalchemy-utils/default.nix +++ b/pkgs/development/python-modules/sqlalchemy-utils/default.nix @@ -38,23 +38,17 @@ buildPythonPackage rec { pname = "sqlalchemy-utils"; - version = "0.41.1"; + version = "0.41.2"; format = "setuptools"; src = fetchPypi { inherit version; pname = "SQLAlchemy-Utils"; - hash = "sha256-ohgb/wHuuER544Vx0sBxjrUgQvmv2MGU0NAod+hLfXQ="; + hash = "sha256-vFmcjDszGeU85sXDxHESC9Ml0AcftvOKEOkk49B7mZA="; }; patches = [ ./skip-database-tests.patch - - (fetchpatch { - # sqlalchemy 2.0.22+ compat; https://github.com/kvesteri/sqlalchemy-utils/pull/725 - url = "https://github.com/kvesteri/sqlalchemy-utils/commit/712aabaefc5c8ca3680751c705cf5a5984c74af1.patch"; - hash = "sha256-xBdiUtFWjlUhBzHgGFbaKBt3at6NDo+mv9sd8WwiPOA="; - }) ]; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/sqlparse/default.nix b/pkgs/development/python-modules/sqlparse/default.nix index c0afa5eeb7c1c..2e63191e033c5 100644 --- a/pkgs/development/python-modules/sqlparse/default.nix +++ b/pkgs/development/python-modules/sqlparse/default.nix @@ -1,10 +1,10 @@ { lib , buildPythonPackage , fetchPypi -, flit-core +, hatchling , installShellFiles , pytestCheckHook -, isPy3k +, pythonOlder # for passthru.tests , django @@ -15,18 +15,19 @@ buildPythonPackage rec { pname = "sqlparse"; - version = "0.4.4"; + version = "0.5.0"; + pyproject = true; - disabled = !isPy3k; + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-1EYYPoS4NJ+jBh8P5/BsqUumW0JpRv/r5uPoKVMyQgw="; + hash = "sha256-cU0KSTLAWdFhifWO9UEewih6Q2DxfN0O3S0J1MUIfJM="; }; - format = "pyproject"; + build-system = [ hatchling ]; - nativeBuildInputs = [ flit-core installShellFiles ]; + nativeBuildInputs = [ installShellFiles ]; nativeCheckInputs = [ pytestCheckHook ]; @@ -40,11 +41,12 @@ buildPythonPackage rec { meta = with lib; { description = "Non-validating SQL parser for Python"; - mainProgram = "sqlformat"; longDescription = '' Provides support for parsing, splitting and formatting SQL statements. ''; homepage = "https://github.com/andialbrecht/sqlparse"; + changelog = "https://github.com/andialbrecht/sqlparse/blob/${version}/CHANGELOG"; license = licenses.bsd3; + mainProgram = "sqlformat"; }; } diff --git a/pkgs/development/python-modules/stack-data/default.nix b/pkgs/development/python-modules/stack-data/default.nix index d6cbacf3abd08..a3fe6964f755e 100644 --- a/pkgs/development/python-modules/stack-data/default.nix +++ b/pkgs/development/python-modules/stack-data/default.nix @@ -3,39 +3,33 @@ , cython , executing , fetchFromGitHub -, git , lib , littleutils , pure-eval , pygments , pytestCheckHook , setuptools-scm -, toml , typeguard +, setuptools +, wheel }: buildPythonPackage rec { pname = "stack-data"; - version = "0.2.0"; - format = "setuptools"; + version = "0.6.3"; + pyproject = true; src = fetchFromGitHub { owner = "alexmojaki"; repo = "stack_data"; - rev = "v${version}"; - hash = "sha256-brXFrk1UU5hxCVeRvGK7wzRA0Hoj9fgqoxTIwInPrEc="; + rev = "refs/tags/v${version}"; + hash = "sha256-dmBhfCg60KX3gWp3k1CGRxW14z3BLlair0PjLW9HFYo="; }; - nativeBuildInputs = [ - git + build-system = [ + setuptools setuptools-scm - toml - ]; - - propagatedBuildInputs = [ - asttokens - executing - pure-eval + wheel ]; nativeCheckInputs = [ @@ -46,9 +40,11 @@ buildPythonPackage rec { typeguard ]; - # https://github.com/alexmojaki/stack_data/issues/50 - # incompatible with typeguard>=3 - doCheck = false; + dependencies = [ + asttokens + executing + pure-eval + ]; disabledTests = [ # AssertionError @@ -63,7 +59,9 @@ buildPythonPackage rec { meta = with lib; { description = "Extract data from stack frames and tracebacks"; homepage = "https://github.com/alexmojaki/stack_data/"; + changelog = "https://github.com/alexmojaki/stack_data/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ jluttine ]; + mainProgram = "stack-data"; }; } diff --git a/pkgs/development/python-modules/statsmodels/default.nix b/pkgs/development/python-modules/statsmodels/default.nix index d92e618c99be3..e3f40a5cff31f 100644 --- a/pkgs/development/python-modules/statsmodels/default.nix +++ b/pkgs/development/python-modules/statsmodels/default.nix @@ -3,11 +3,9 @@ , cython , fetchPypi , numpy -, oldest-supported-numpy , packaging , pandas , patsy -, pythonAtLeast , pythonOlder , scipy , setuptools @@ -16,24 +14,27 @@ buildPythonPackage rec { pname = "statsmodels"; - version = "0.14.1"; + version = "0.14.2"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-ImDv3B74nznGcKC9gVGx0IQ1Z3gbyv7GzaBTTrR6lPY="; + hash = "sha256-iQVQFHrTqBzaJPC6GlxAIa3BYBCAvQDhka581v7s1q0="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "numpy>=2.0.0rc1,<3" "numpy" + ''; + build-system = [ cython - oldest-supported-numpy + numpy scipy setuptools setuptools-scm - ] ++ lib.optionals (pythonAtLeast "3.12") [ - numpy ]; dependencies = [ diff --git a/pkgs/development/python-modules/sunpy/default.nix b/pkgs/development/python-modules/sunpy/default.nix index 17aa79c34020d..88a803fa46fbd 100644 --- a/pkgs/development/python-modules/sunpy/default.nix +++ b/pkgs/development/python-modules/sunpy/default.nix @@ -31,14 +31,14 @@ buildPythonPackage rec { pname = "sunpy"; - version = "5.1.1"; + version = "5.1.2"; format = "setuptools"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-k2fsmvKjl/zVljiyAHII1O6vntJOPo3CWWwmsYlsLh8="; + hash = "sha256-1/oz2Ir1K7nR6B2TPZzSjbyiADyQyRlzE9KqTg7EwkA="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/tablib/default.nix b/pkgs/development/python-modules/tablib/default.nix index 679f8df11559a..66388b285686b 100644 --- a/pkgs/development/python-modules/tablib/default.nix +++ b/pkgs/development/python-modules/tablib/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "tablib"; - version = "3.5.0"; + version = "3.6.1"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-9mYd/EXh1PUfqKYjn5yDSTgIWaW/qnMoBkXwRtbJbjM="; + hash = "sha256-BAaF/eEekjdnX0Pphe25S2MlCl6SNvidVhzm+xRluDk="; }; postPatch = '' diff --git a/pkgs/development/python-modules/tidalapi/default.nix b/pkgs/development/python-modules/tidalapi/default.nix index 8c3c2429dc72e..edbe6ee398116 100644 --- a/pkgs/development/python-modules/tidalapi/default.nix +++ b/pkgs/development/python-modules/tidalapi/default.nix @@ -9,12 +9,12 @@ buildPythonPackage rec { pname = "tidalapi"; - version = "0.7.5"; + version = "0.7.6"; format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-QzrIWQ7cWpPAu3+/zqAqX9eDWOF8F3Xj8Rt5D8I6h9M="; + hash = "sha256-X6U34T1sM4P+JFpOfcI7CmULcGZ4SCXwP2fFHKi1cWE="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/tifffile/default.nix b/pkgs/development/python-modules/tifffile/default.nix index 30d99043f04c9..21931254d202e 100644 --- a/pkgs/development/python-modules/tifffile/default.nix +++ b/pkgs/development/python-modules/tifffile/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "tifffile"; - version = "2024.2.12"; + version = "2024.4.18"; format = "setuptools"; disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; - hash = "sha256-SSCj7I6OAD5nPTxlMYY8me7dVw0bi34UHAcu14/4Aw0="; + hash = "sha256-X/zXe513w6raEnhjGvXIrHiEOEUv2i6xubYNVVPpXII="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/traitlets/default.nix b/pkgs/development/python-modules/traitlets/default.nix index 5394e7f4091ab..51336a0f9195a 100644 --- a/pkgs/development/python-modules/traitlets/default.nix +++ b/pkgs/development/python-modules/traitlets/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "traitlets"; - version = "5.14.1"; + version = "5.14.2"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-hYUQWzcaBLgxakPVzinAmFdcLkd4ULYrhIuWTxREUn4="; + hash = "sha256-jN2DwEDat9He6CJnjl9dEAtRT3tysBYVsm/FcYkW/fk="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/trio-asyncio/default.nix b/pkgs/development/python-modules/trio-asyncio/default.nix index a74b3889facda..258bb61b66e85 100644 --- a/pkgs/development/python-modules/trio-asyncio/default.nix +++ b/pkgs/development/python-modules/trio-asyncio/default.nix @@ -1,6 +1,6 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , setuptools , greenlet , trio @@ -14,27 +14,28 @@ buildPythonPackage rec { pname = "trio-asyncio"; - version = "0.14.0"; + version = "0.14.1"; pyproject = true; disabled = pythonOlder "3.8"; - src = fetchPypi { - pname = "trio_asyncio"; - inherit version; - hash = "sha256-msSKQ8vhZxtBIh7HNq4M2qc0yKOErGNiCWLBXXse3WQ="; + src = fetchFromGitHub { + owner = "python-trio"; + repo = "trio-asyncio"; + rev = "refs/tags/v${version}"; + hash = "sha256-634fcYAn5J1WW71J/USAMkJaZI8JmKoQneQEhz2gYFc="; }; postPatch = '' substituteInPlace setup.py \ - --replace '"pytest-runner"' "" + --replace-fail '"pytest-runner"' "" ''; - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ greenlet trio outcome @@ -43,18 +44,16 @@ buildPythonPackage rec { exceptiongroup ]; - # RuntimeWarning: Can't run the Python asyncio tests because they're not installed. On a Debian/Ubuntu system, you might need to install the libpython3.11-testsuite package. - doCheck = false; + pytestFlagsArray = [ + # RuntimeWarning: Can't run the Python asyncio tests because they're not installed + "-W" "ignore::RuntimeWarning" + ]; nativeCheckInputs = [ pytest-trio pytestCheckHook ]; - disabledTestPaths = [ - "tests/python" # tries to import internal API test.test_asyncio - ]; - pythonImportsCheck = [ "trio_asyncio" ]; diff --git a/pkgs/development/python-modules/trio-websocket/default.nix b/pkgs/development/python-modules/trio-websocket/default.nix index 98fdcfae0c160..8ffa3de60fc3c 100644 --- a/pkgs/development/python-modules/trio-websocket/default.nix +++ b/pkgs/development/python-modules/trio-websocket/default.nix @@ -2,6 +2,8 @@ , stdenv , buildPythonPackage , fetchFromGitHub +, pythonOlder +, setuptools , exceptiongroup , pytest-trio , pytestCheckHook @@ -12,20 +14,25 @@ buildPythonPackage rec { pname = "trio-websocket"; - version = "0.10.2"; - format = "setuptools"; + version = "0.11.1"; + pyproject = true; src = fetchFromGitHub { owner = "HyperionGray"; repo = "trio-websocket"; rev = version; - hash = "sha256-djoTxkIKY52l+WnxL1FwlqrU/zvsLVkPUAHn9BxJ45k="; + hash = "sha256-ddLbYkb1m9zRjv3Lb7YwUzj26gYbK4nYN6jN+FAuiOs="; }; - propagatedBuildInputs = [ - exceptiongroup + build-system = [ + setuptools + ]; + + dependencies = [ trio wsproto + ] ++ lib.optionals (pythonOlder "3.11") [ + exceptiongroup ]; nativeCheckInputs = [ @@ -34,7 +41,16 @@ buildPythonPackage rec { trustme ]; - disabledTests = lib.optionals stdenv.isDarwin [ + disabledTests = [ + # https://github.com/python-trio/trio-websocket/issues/187 + "test_handshake_exception_before_accept" + "test_reject_handshake" + "test_reject_handshake_invalid_info_status" + "test_client_open_timeout" + "test_client_close_timeout" + "test_client_connect_networking_error" + "test_finalization_dropped_exception" + ] ++ lib.optionals stdenv.isDarwin [ # Failed: DID NOT RAISE <class 'ValueError'> "test_finalization_dropped_exception" # Timing related diff --git a/pkgs/development/python-modules/trio/default.nix b/pkgs/development/python-modules/trio/default.nix index cc276fef5c525..84215b5122a64 100644 --- a/pkgs/development/python-modules/trio/default.nix +++ b/pkgs/development/python-modules/trio/default.nix @@ -1,6 +1,6 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , pythonOlder , stdenv @@ -37,26 +37,23 @@ let in buildPythonPackage rec { pname = "trio"; - version = "0.24.0"; + version = "0.25.0"; pyproject = true; disabled = pythonOlder "3.8"; - src = fetchPypi { - inherit pname version; - hash = "sha256-/6CadKa/gbhPhhOQn7C+ruhHV0UBg6ei4LR7RVwMrF0="; + src = fetchFromGitHub { + owner = "python-trio"; + repo = "trio"; + rev = "refs/tags/v${version}"; + hash = "sha256-JQ493U4WINOG6ob4IzfNQt5Lgs3DmEM2BDwbae7Bvsw="; }; - postPatch = '' - substituteInPlace src/trio/_tests/test_subprocess.py \ - --replace "/bin/sleep" "${coreutils}/bin/sleep" - ''; - - nativeBuildInputs = [ + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ attrs idna outcome @@ -103,11 +100,8 @@ buildPythonPackage rec { "src/trio/_tests/tools/test_gen_exports.py" ]; - pytestFlagsArray = [ - "-W" "ignore::DeprecationWarning" - ]; - meta = { + changelog = "https://github.com/python-trio/trio/blob/v${version}/docs/source/history.rst"; description = "An async/await-native I/O library for humans and snake people"; homepage = "https://github.com/python-trio/trio"; license = with lib.licenses; [ mit asl20 ]; diff --git a/pkgs/development/python-modules/trove-classifiers/default.nix b/pkgs/development/python-modules/trove-classifiers/default.nix index 64829175c1989..61ef9858d2dd2 100644 --- a/pkgs/development/python-modules/trove-classifiers/default.nix +++ b/pkgs/development/python-modules/trove-classifiers/default.nix @@ -10,14 +10,14 @@ let self = buildPythonPackage rec { pname = "trove-classifiers"; - version = "2024.3.3"; + version = "2024.4.10"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-337f+cZ/+GtzNiiZgzCxgOgdElseCWU22DrA/XlnP9w="; + hash = "sha256-SfQLtqdGtyocuk+NVe6CUhac2g9wgC4/0k8Et/slpJI="; }; postPatch = '' diff --git a/pkgs/development/python-modules/trytond/default.nix b/pkgs/development/python-modules/trytond/default.nix index 5e89da7f35049..8660e95508ff6 100644 --- a/pkgs/development/python-modules/trytond/default.nix +++ b/pkgs/development/python-modules/trytond/default.nix @@ -25,14 +25,14 @@ buildPythonPackage rec { pname = "trytond"; - version = "7.0.9"; + version = "7.0.10"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-DlPuIaGTpJu4FyLOTNAy2CAEJHoe7+8e34wacz8C7d8="; + hash = "sha256-N/O27qQBD18lncW0hCfJkUlmCuej8HtV2x/MnRUDGcc="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/type-infer/default.nix b/pkgs/development/python-modules/type-infer/default.nix index 55af22a1c94b5..1e10215031006 100644 --- a/pkgs/development/python-modules/type-infer/default.nix +++ b/pkgs/development/python-modules/type-infer/default.nix @@ -24,7 +24,7 @@ let in buildPythonPackage rec { pname = "type-infer"; - version = "0.0.18"; + version = "0.0.19"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -33,7 +33,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "type_infer"; inherit version; - hash = "sha256-nA5TlyHpCueFWqUggS7T/eKSLlffp0pIyGCouwXPZ28="; + hash = "sha256-7fWRM776lAyOncp6WZDLH9ouVBhVvV23105xvhw8V24="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/typer/default.nix b/pkgs/development/python-modules/typer/default.nix index b072f3a6d8ca9..a1f0a9033e109 100644 --- a/pkgs/development/python-modules/typer/default.nix +++ b/pkgs/development/python-modules/typer/default.nix @@ -4,9 +4,8 @@ , click , colorama , coverage -, fetchpatch , fetchPypi -, flit-core +, pdm-backend , pytest-sugar , pytest-xdist , pytestCheckHook @@ -18,27 +17,18 @@ buildPythonPackage rec { pname = "typer"; - version = "0.9.0"; + version = "0.12.3"; format = "pyproject"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-UJIv15rqL0dRqOBAj/ENJmK9DIu/qEdVppnzutopeLI="; + hash = "sha256-SecxMUgdgEKI72JZjZehzu8wWJBapTahE0+QiRujVII="; }; - patches = [ - # https://github.com/tiangolo/typer/pull/651 - (fetchpatch { - name = "unpin-flit-core-dependency.patch"; - url = "https://github.com/tiangolo/typer/commit/78a0ee2eec9f54ad496420e177fdaad84984def1.patch"; - hash = "sha256-VVUzFvF2KCXXkCfCU5xu9acT6OLr+PlQQPeVGONtU4A="; - }) - ]; - nativeBuildInputs = [ - flit-core + pdm-backend ]; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/types-pillow/default.nix b/pkgs/development/python-modules/types-pillow/default.nix index adb92251b8f10..db173d39e74b5 100644 --- a/pkgs/development/python-modules/types-pillow/default.nix +++ b/pkgs/development/python-modules/types-pillow/default.nix @@ -5,13 +5,13 @@ buildPythonPackage rec { pname = "types-pillow"; - version = "10.2.0.20240331"; + version = "10.2.0.20240415"; format = "setuptools"; src = fetchPypi { inherit version; pname = "types-Pillow"; - hash = "sha256-xgTjmutwcZ5GPTWRV6Iji/wOgb+cZYN1cD97mM/WB9o="; + hash = "sha256-3WBYAnY5vNxmuniyKMwl/a5CUkwhUMeMgE2kJ+fnbnA="; }; # Modules doesn't have tests diff --git a/pkgs/development/python-modules/types-protobuf/default.nix b/pkgs/development/python-modules/types-protobuf/default.nix index c09cb206cf040..6482d4e30ba15 100644 --- a/pkgs/development/python-modules/types-protobuf/default.nix +++ b/pkgs/development/python-modules/types-protobuf/default.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "types-protobuf"; - version = "4.24.0.20240311"; + version = "4.25.0.20240417"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-yAQm+fubIa7lFGkelqsypc1pSoLirAeWSzUsPn4Bgrw="; + hash = "sha256-w07/F7mzoK22gwYi8PMCSE5MCJ9TOkbj8UdWgxNUQ1I="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/types-pyopenssl/default.nix b/pkgs/development/python-modules/types-pyopenssl/default.nix index d7cf53e4ff68c..a00f14c89395e 100644 --- a/pkgs/development/python-modules/types-pyopenssl/default.nix +++ b/pkgs/development/python-modules/types-pyopenssl/default.nix @@ -6,13 +6,13 @@ buildPythonPackage rec { pname = "types-pyopenssl"; - version = "24.0.0.20240311"; + version = "24.0.0.20240417"; format = "setuptools"; src = fetchPypi { pname = "types-pyOpenSSL"; inherit version; - hash = "sha256-e8oAz8Tn75xdJmPGocBow1eY5ZZwWVQ59ilue6PVgIM="; + hash = "sha256-OOdfuCjScXvhc3cLuujCKBH97GjivD9YM5VBE+uEI30="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/types-python-dateutil/default.nix b/pkgs/development/python-modules/types-python-dateutil/default.nix index 04f146e40e54d..0bee1e8ddca2c 100644 --- a/pkgs/development/python-modules/types-python-dateutil/default.nix +++ b/pkgs/development/python-modules/types-python-dateutil/default.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "types-python-dateutil"; - version = "2.8.19.20240106"; + version = "2.9.0.20240316"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-H42yIcO5jmygLqg6WDcbIsN09Crlu98YbbnJp2WBRZ8="; + hash = "sha256-XS8uJAuGkF5AlE3Xh9ttqSY/Deq+8Qdt2u15c1HsAgI="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/types-pytz/default.nix b/pkgs/development/python-modules/types-pytz/default.nix index bf1b49ccc918f..8f86e7be43d87 100644 --- a/pkgs/development/python-modules/types-pytz/default.nix +++ b/pkgs/development/python-modules/types-pytz/default.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "types-pytz"; - version = "2024.1.0.20240203"; + version = "2024.1.0.20240417"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-yTdR7iDfxuBUoBSPj1InuaALeckKTTyfRkcRpzF5yJ4="; + hash = "sha256-aBDIofaPIf3w9PN0pDJIfHdkWgrAsx3kv0aQzyGtOYE="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/types-pyyaml/default.nix b/pkgs/development/python-modules/types-pyyaml/default.nix index c8735dbfe6de4..35f02941b6d5d 100644 --- a/pkgs/development/python-modules/types-pyyaml/default.nix +++ b/pkgs/development/python-modules/types-pyyaml/default.nix @@ -5,13 +5,13 @@ buildPythonPackage rec { pname = "types-pyyaml"; - version = "6.0.12.12"; + version = "6.0.12.20240311"; format = "setuptools"; src = fetchPypi { pname = "types-PyYAML"; inherit version; - hash = "sha256-M0Nz05L94P35WvXD8WYYhfoQxSFnsUWT64ViieGFUGI="; + hash = "sha256-qeDw+I3INXObDBylHukNBMoqiXpxr3nemuxfOMsKU0I="; }; # Module doesn't have tests diff --git a/pkgs/development/python-modules/types-s3transfer/default.nix b/pkgs/development/python-modules/types-s3transfer/default.nix index eb90a554174e9..30533010fbe04 100644 --- a/pkgs/development/python-modules/types-s3transfer/default.nix +++ b/pkgs/development/python-modules/types-s3transfer/default.nix @@ -6,13 +6,13 @@ buildPythonPackage rec { pname = "types-s3transfer"; - version = "0.10.0"; + version = "0.10.1"; pyproject = true; src = fetchPypi { pname = "types_s3transfer"; inherit version; - hash = "sha256-NeSZjCXff4mFrWne3I5IYOivO0O3YV6UDVPADUE73Gk="; + hash = "sha256-AhVMzkZSgoetdq0aAVOEDgSSI5oIh+iDNGbsz4S5jaA="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/types-setuptools/default.nix b/pkgs/development/python-modules/types-setuptools/default.nix index a2a0a9f125bde..557a065c68e9d 100644 --- a/pkgs/development/python-modules/types-setuptools/default.nix +++ b/pkgs/development/python-modules/types-setuptools/default.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "types-setuptools"; - version = "69.2.0.20240317"; + version = "69.5.0.20240415"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-tgfExIhC7z7kncDH/pwbrXVwCwceEBi7TX46xJLUcEg="; + hash = "sha256-6mSvCpamdPjEC6NMCcJU88cLw/IYxr/6HQkSvZFYSi8="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/types-toml/default.nix b/pkgs/development/python-modules/types-toml/default.nix index 140664989f3b2..db58fbc181b5c 100644 --- a/pkgs/development/python-modules/types-toml/default.nix +++ b/pkgs/development/python-modules/types-toml/default.nix @@ -5,12 +5,12 @@ buildPythonPackage rec { pname = "types-toml"; - version = "0.10.8.7"; + version = "0.10.8.20240310"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-WLB4HGgeZx/wtcAxkwmRBon0q0DookMeIF1wyUu277E="; + hash = "sha256-PUFQEwKXJDamuLI5yFCyZollfiUoG0j/DsBjRbiDAzE="; }; # Module doesn't have tests diff --git a/pkgs/development/python-modules/typing-extensions/default.nix b/pkgs/development/python-modules/typing-extensions/default.nix index eb1c9c58d690f..b20fe1a051069 100644 --- a/pkgs/development/python-modules/typing-extensions/default.nix +++ b/pkgs/development/python-modules/typing-extensions/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "typing-extensions"; - version = "4.10.0"; + version = "4.11.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "typing_extensions"; inherit version; - hash = "sha256-sKvXyJ6PuW+Y2xjYYQb/HZCraSAE63Rs9u2iaC+Rs8s="; + hash = "sha256-g/CFvVylnIApX8KoKrXaxnnL4CufM/fYOvaOJBvqUbA="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/uqbar/default.nix b/pkgs/development/python-modules/uqbar/default.nix index c7c6e8e2eea6a..83ccc7fe11fd8 100644 --- a/pkgs/development/python-modules/uqbar/default.nix +++ b/pkgs/development/python-modules/uqbar/default.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "uqbar"; - version = "0.7.3"; + version = "0.7.4"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-9KQmLCsIiHcdiAu4GeEu+wa3lGwEZOO+oHWuhFNosR0="; + hash = "sha256-q4p+ki5wA/gYGWnt2tzCiEakk4fBl9P96ONz2ZxlCCg="; }; postPatch = '' diff --git a/pkgs/development/python-modules/uvicorn/default.nix b/pkgs/development/python-modules/uvicorn/default.nix index 6201bb6157266..2694880594b0e 100644 --- a/pkgs/development/python-modules/uvicorn/default.nix +++ b/pkgs/development/python-modules/uvicorn/default.nix @@ -17,16 +17,16 @@ buildPythonPackage rec { pname = "uvicorn"; - version = "0.27.1"; + version = "0.29.0"; disabled = pythonOlder "3.8"; pyproject = true; src = fetchFromGitHub { owner = "encode"; - repo = pname; + repo = "uvicorn"; rev = "refs/tags/${version}"; - hash = "sha256-p0iPQE66RJfd811x6cnv7m3yvD/L9v7evBXlaIQSE0M="; + hash = "sha256-D0FdZxaDB+9N/7p73GF8qw0UwbXTQrKc1WOgy9UltxA="; }; outputs = [ @@ -34,9 +34,9 @@ buildPythonPackage rec { "testsout" ]; - nativeBuildInputs = [ hatchling ]; + build-system = [ hatchling ]; - propagatedBuildInputs = [ + dependencies = [ click h11 ] ++ lib.optionals (pythonOlder "3.11") [ diff --git a/pkgs/development/python-modules/validators/default.nix b/pkgs/development/python-modules/validators/default.nix index 8e29effda9a24..4a5e2f7df1cfe 100644 --- a/pkgs/development/python-modules/validators/default.nix +++ b/pkgs/development/python-modules/validators/default.nix @@ -1,15 +1,16 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, pytestCheckHook -, pythonOlder -, setuptools +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + pythonOlder, + setuptools, }: buildPythonPackage rec { pname = "validators"; - version = "0.22.0"; - format = "pyproject"; + version = "0.28.0"; + pyproject = true; disabled = pythonOlder "3.8"; @@ -17,26 +18,20 @@ buildPythonPackage rec { owner = "python-validators"; repo = "validators"; rev = "refs/tags/${version}"; - hash = "sha256-Qu6Tu9uIluT1KBJYkFjDFt9AWN2Kez3uCYDQknXqYrU="; + hash = "sha256-r3SQvt96y8e9odWxz0GjVKH3+Pa0Lqs+tbhryeGaZUU="; }; - nativeBuildInputs = [ - setuptools - ]; + build-system = [ setuptools ]; - nativeCheckInputs = [ - pytestCheckHook - ]; + nativeCheckInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ - "validators" - ]; + pythonImportsCheck = [ "validators" ]; meta = with lib; { description = "Python Data Validation for Humans"; homepage = "https://github.com/python-validators/validators"; changelog = "https://github.com/python-validators/validators/blob/${version}/CHANGES.md"; license = licenses.mit; - maintainers = [ ]; + maintainers = with maintainers; [ fab ]; }; } diff --git a/pkgs/development/python-modules/versioningit/default.nix b/pkgs/development/python-modules/versioningit/default.nix index a58f2d6133aa1..f5c6180b2344c 100644 --- a/pkgs/development/python-modules/versioningit/default.nix +++ b/pkgs/development/python-modules/versioningit/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "versioningit"; - version = "3.0.0"; + version = "3.1.0"; format = "pyproject"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-TjzkemQk2FCunlXhsTSgIOn8vLiVM48QfytcUdNMnBs="; + hash = "sha256-eqxxPDGlPrNnprvC6LPejMK4bRDUXFEBr9ZRRGyxD9c="; }; postPatch = '' diff --git a/pkgs/development/python-modules/virt-firmware/default.nix b/pkgs/development/python-modules/virt-firmware/default.nix index 8f2f0c0736098..d5da9d57c40f2 100644 --- a/pkgs/development/python-modules/virt-firmware/default.nix +++ b/pkgs/development/python-modules/virt-firmware/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "virt-firmware"; - version = "24.2"; + version = "24.4"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-bvk3MIgPY6DJ+y0eKQHLffClNjPAEP7AJ15rFObiMig="; + hash = "sha256-rqhaKDOQEOj6bcRz3qZJ+a4yG1qTC9SUjuxMhZlnmwU="; }; pythonImportsCheck = [ "virt.firmware.efi" ]; diff --git a/pkgs/development/python-modules/virtualenv/default.nix b/pkgs/development/python-modules/virtualenv/default.nix index 44ca0ff4f4f35..d2b60338121bf 100644 --- a/pkgs/development/python-modules/virtualenv/default.nix +++ b/pkgs/development/python-modules/virtualenv/default.nix @@ -21,14 +21,14 @@ buildPythonPackage rec { pname = "virtualenv"; - version = "20.25.1"; + version = "20.25.3"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-4I4T7NynoL1TeY81bVgxQ0r6Wwe5Pwq98Hl7egb/4Zc="; + hash = "sha256-e7VUu9/qrMM0n6YU6lv/asMA/HwzXp+s86O8/HA/Rb4="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/werkzeug/default.nix b/pkgs/development/python-modules/werkzeug/default.nix index 51e380ece2a16..80ed4c53539a9 100644 --- a/pkgs/development/python-modules/werkzeug/default.nix +++ b/pkgs/development/python-modules/werkzeug/default.nix @@ -3,7 +3,6 @@ , buildPythonPackage , pythonOlder , fetchPypi -, fetchpatch2 # build-system , flit-core @@ -29,24 +28,16 @@ buildPythonPackage rec { pname = "werkzeug"; - version = "3.0.1"; + version = "3.0.2"; format = "pyproject"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-UH6BHs6nKxikBJR63tSzOQ4duPgmtJTXZVDvRbs7Hcw="; + hash = "sha256-45tkWmrJKCJYjns5ppLngockzq4LDXAu+WcB+Q5wEo0="; }; - patches = [ - (fetchpatch2 { - name = "werkzeug-pytest8-compat.patch"; - url = "https://github.com/pallets/werkzeug/commit/4e5bdca7f8227d10cae828f8064fb98190ace4aa.patch"; - hash = "sha256-lVknzvC+HIM6TagpyIOhnb+7tx0UXuGw0tINjsujISI="; - }) - ]; - nativeBuildInputs = [ flit-core ]; diff --git a/pkgs/development/python-modules/wheezy-template/default.nix b/pkgs/development/python-modules/wheezy-template/default.nix index 0baba9c564e50..53a0bf2867d09 100644 --- a/pkgs/development/python-modules/wheezy-template/default.nix +++ b/pkgs/development/python-modules/wheezy-template/default.nix @@ -5,11 +5,11 @@ buildPythonPackage rec { pname = "wheezy.template"; - version = "3.1.0"; + version = "3.2.2"; src = fetchPypi { inherit pname version; - hash = "sha256-4RAHysczaNzhKZjjS2bEdgFrtGFHH/weTVboQALslg8="; + hash = "sha256-hknPXHGPPNjRAr0TYVosPaTntsjwQjOKZBCU+qFlIHw="; }; pythonImportsCheck = [ "wheezy.template" ]; diff --git a/pkgs/development/python-modules/xdot/default.nix b/pkgs/development/python-modules/xdot/default.nix index f0bfe71fcbb02..3cf0564c70a3f 100644 --- a/pkgs/development/python-modules/xdot/default.nix +++ b/pkgs/development/python-modules/xdot/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , python , xvfb-run -, wrapGAppsHook +, wrapGAppsHook3 , gobject-introspection , pygobject3 , graphviz @@ -25,7 +25,7 @@ buildPythonPackage rec { nativeBuildInputs = [ gobject-introspection - wrapGAppsHook + wrapGAppsHook3 ]; propagatedBuildInputs = [ pygobject3 diff --git a/pkgs/development/python-modules/xmlsec/default.nix b/pkgs/development/python-modules/xmlsec/default.nix index 94af405e8f640..28dfd80dcd9d3 100644 --- a/pkgs/development/python-modules/xmlsec/default.nix +++ b/pkgs/development/python-modules/xmlsec/default.nix @@ -15,12 +15,12 @@ buildPythonPackage rec { pname = "xmlsec"; - version = "1.3.13"; + version = "1.3.14"; format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-kW9deOgEH2zZORq7plnajJSk/vcZbRJtQK8f9Bfyz4Y="; + hash = "sha256-k0+ATy+JW824bx6u4ja2YQE1YO5p7BCNKc3W5fKSotk="; }; nativeBuildInputs = [ pkg-config pkgconfig setuptools-scm ]; diff --git a/pkgs/development/python-modules/ydiff/default.nix b/pkgs/development/python-modules/ydiff/default.nix index 04f9be193aac1..ffa1f3cefad87 100644 --- a/pkgs/development/python-modules/ydiff/default.nix +++ b/pkgs/development/python-modules/ydiff/default.nix @@ -4,12 +4,12 @@ buildPythonPackage rec { pname = "ydiff"; - version = "1.2"; + version = "1.3"; format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "f5430577ecd30974d766ee9b8333e06dc76a947b4aae36d39612a0787865a121"; + sha256 = "sha256-ii6EWI7zHT5SVwD6lksfmqth8MnEYoHgU0GlbgHc17g="; }; patchPhase = '' diff --git a/pkgs/development/python-modules/zarr/default.nix b/pkgs/development/python-modules/zarr/default.nix index fcb57b3731ddc..826a496445f67 100644 --- a/pkgs/development/python-modules/zarr/default.nix +++ b/pkgs/development/python-modules/zarr/default.nix @@ -13,14 +13,14 @@ buildPythonPackage rec { pname = "zarr"; - version = "2.17.1"; + version = "2.17.2"; format = "pyproject"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-Vks6oHISJUb+aaD6IXNvRmsg+tQXVDNLYmGfCIzkYmE="; + hash = "sha256-LLqmy040LUUVLUp6SyATwzf806jnvJglNWAYDeYFUs4="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/zephyr-python-api/default.nix b/pkgs/development/python-modules/zephyr-python-api/default.nix index 8ff111b605faf..d4bd2642317c4 100644 --- a/pkgs/development/python-modules/zephyr-python-api/default.nix +++ b/pkgs/development/python-modules/zephyr-python-api/default.nix @@ -7,12 +7,13 @@ buildPythonPackage rec { pname = "zephyr-python-api"; - version = "0.0.4"; + version = "0.0.5"; format = "pyproject"; src = fetchPypi { - inherit pname version; - hash = "sha256-GIXxpItbRH31PJ7dX48w92LrYY0axbZQoAFXrRGeLas="; + pname = "zephyr_python_api"; + inherit version; + hash = "sha256-tzuLFM2Oav5rKH1GEZcP/Kfw4NXRTObMf1gcn862UBw="; }; nativeBuildInputs = [ setuptools ]; diff --git a/pkgs/development/python-modules/zipp/default.nix b/pkgs/development/python-modules/zipp/default.nix index 6555d172ce2e1..9ddbd4b43313d 100644 --- a/pkgs/development/python-modules/zipp/default.nix +++ b/pkgs/development/python-modules/zipp/default.nix @@ -9,14 +9,14 @@ let zipp = buildPythonPackage rec { pname = "zipp"; - version = "3.17.0"; + version = "3.18.1"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-hOZKHCjPfpHtIHi7jMjCWcsZt2lCCWyNe4SUdpDKuvA="; + hash = "sha256-KITtIufYlh3hyaBRQutpokfxICkbwCBqAKdkLwm1txU="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/zlib-ng/default.nix b/pkgs/development/python-modules/zlib-ng/default.nix index 7cb498bbb12f9..71f2c0b768ae6 100644 --- a/pkgs/development/python-modules/zlib-ng/default.nix +++ b/pkgs/development/python-modules/zlib-ng/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "zlib-ng"; - version = "0.4.1"; + version = "0.4.3"; pyproject = true; src = fetchFromGitHub { owner = "pycompression"; repo = "python-zlib-ng"; rev = "v${version}"; - hash = "sha256-uK6Md8ZOVUNwXCjzM4zTVr3WBwzLdnvT9n8yBvf968k="; + hash = "sha256-M0R39vUX3JMDEDJfsRzg1ipxbWJ/kl0FzW6ZUMXvGDs="; }; nativeBuildInputs = [ diff --git a/pkgs/development/ruby-modules/bundler/default.nix b/pkgs/development/ruby-modules/bundler/default.nix index e59941e805382..b9389603670d7 100644 --- a/pkgs/development/ruby-modules/bundler/default.nix +++ b/pkgs/development/ruby-modules/bundler/default.nix @@ -4,8 +4,8 @@ buildRubyGem rec { inherit ruby; name = "${gemName}-${version}"; gemName = "bundler"; - version = "2.5.7"; - source.sha256 = "sha256-Df4EofDsE828V59yTND3+hdDfbB7iaQfWZfiC/SoNA4="; + version = "2.5.9"; + source.sha256 = "sha256-4rYTJb41m85U6w/tiEBO/mfl4fgAPTSiIYQeO3Za7AY="; dontPatchShebangs = true; postFixup = '' diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 45de779fcdaf9..e6018b06fa992 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -24,7 +24,7 @@ , libsodium, snappy, libossp_uuid, lxc, libpcap, xorg, gtk2, gtk3, buildRubyGem , cairo, expat, re2, rake, gobject-introspection, gdk-pixbuf, zeromq, czmq, graphicsmagick, libcxx , file, libvirt, glib, vips, taglib, libopus, linux-pam, libidn, protobuf, fribidi, harfbuzz -, bison, flex, pango, python3, patchelf, binutils, freetds, wrapGAppsHook, atk +, bison, flex, pango, python3, patchelf, binutils, freetds, wrapGAppsHook3, atk , bundler, libsass, dart-sass, libexif, libselinux, libsepol, shared-mime-info, libthai, libdatrie , CoreServices, DarwinTools, cctools, libtool, discount, exiv2, libepoxy, libxkbcommon, libmaxminddb, libyaml , cargo, rustc, rustPlatform @@ -50,7 +50,7 @@ in dependencies = attrs.dependencies ++ [ "gobject-introspection" ]; nativeBuildInputs = [ rake bundler pkg-config ] ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; - propagatedBuildInputs = [ gobject-introspection wrapGAppsHook atk ]; + propagatedBuildInputs = [ gobject-introspection wrapGAppsHook3 atk ]; }; bundler = attrs: @@ -230,13 +230,13 @@ in gdk_pixbuf2 = attrs: { nativeBuildInputs = [ pkg-config bundler rake ] ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; - propagatedBuildInputs = [ gobject-introspection wrapGAppsHook gdk-pixbuf ]; + propagatedBuildInputs = [ gobject-introspection wrapGAppsHook3 gdk-pixbuf ]; }; gdk3 = attrs: { nativeBuildInputs = [ pkg-config bundler rake ] ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; - propagatedBuildInputs = [ gobject-introspection wrapGAppsHook gdk-pixbuf cairo ]; + propagatedBuildInputs = [ gobject-introspection wrapGAppsHook3 gdk-pixbuf cairo ]; }; gpgme = attrs: { @@ -395,7 +395,7 @@ in gobject-introspection = attrs: { nativeBuildInputs = [ pkg-config pcre2 ] ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; - propagatedBuildInputs = [ gobject-introspection wrapGAppsHook glib ]; + propagatedBuildInputs = [ gobject-introspection wrapGAppsHook3 glib ]; }; gollum = attrs: { @@ -633,7 +633,7 @@ in ] ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; buildInputs = [ libdatrie libthai ] ++ lib.optionals stdenv.isLinux [ libselinux libsepol util-linux ]; - propagatedBuildInputs = [ gobject-introspection wrapGAppsHook gtk2 ]; + propagatedBuildInputs = [ gobject-introspection wrapGAppsHook3 gtk2 ]; }; patron = attrs: { diff --git a/pkgs/development/tools/analysis/frama-c/default.nix b/pkgs/development/tools/analysis/frama-c/default.nix index 37b44e1f80447..26cd487d9ebed 100644 --- a/pkgs/development/tools/analysis/frama-c/default.nix +++ b/pkgs/development/tools/analysis/frama-c/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, fetchpatch, makeWrapper, writeText , graphviz, doxygen , ocamlPackages, ltl2ba, coq, why3 -, gdk-pixbuf, wrapGAppsHook +, gdk-pixbuf, wrapGAppsHook3 }: let @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { strictDeps = true; - nativeBuildInputs = [ wrapGAppsHook ] ++ (with ocamlPackages; [ ocaml findlib dune_3 menhir ]); + nativeBuildInputs = [ wrapGAppsHook3 ] ++ (with ocamlPackages; [ ocaml findlib dune_3 menhir ]); buildInputs = with ocamlPackages; [ dune-site dune-configurator diff --git a/pkgs/development/tools/cambalache/default.nix b/pkgs/development/tools/cambalache/default.nix index 757ab10583a77..66ee1edbd1d5e 100644 --- a/pkgs/development/tools/cambalache/default.nix +++ b/pkgs/development/tools/cambalache/default.nix @@ -8,11 +8,11 @@ , gobject-introspection , desktop-file-utils , shared-mime-info -, wrapGAppsHook +, wrapGAppsHook4 , glib , gtk3 , gtk4 -, gtksourceview4 +, gtksourceview5 , libadwaita , libhandy , webkitgtk_4_1 @@ -22,7 +22,7 @@ python3.pkgs.buildPythonApplication rec { pname = "cambalache"; - version = "0.16.0"; + version = "0.90.2"; format = "other"; @@ -30,9 +30,9 @@ python3.pkgs.buildPythonApplication rec { src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "jpu"; - repo = pname; + repo = "cambalache"; rev = version; - sha256 = "sha256-Ha94Ca5a7EUBYuSJvMrLc5895Q2/01/tbKpwlHLmTDc="; + hash = "sha256-m3rearoCFQUzdZMXY2xyKf4dgdq7G4QlUbetrIqW83U="; }; nativeBuildInputs = [ @@ -42,7 +42,7 @@ python3.pkgs.buildPythonApplication rec { gobject-introspection # for setup hook desktop-file-utils # for update-desktop-database shared-mime-info # for update-mime-database - wrapGAppsHook + wrapGAppsHook4 ]; pythonPath = with python3.pkgs; [ @@ -54,7 +54,7 @@ python3.pkgs.buildPythonApplication rec { glib gtk3 gtk4 - gtksourceview4 + gtksourceview5 webkitgtk_4_1 webkitgtk_6_0 # For extra widgets support. @@ -70,8 +70,8 @@ python3.pkgs.buildPythonApplication rec { # those programs are used at runtime not build time # https://gitlab.gnome.org/jpu/cambalache/-/blob/0.12.1/meson.build#L79-80 substituteInPlace ./meson.build \ - --replace "find_program('broadwayd', required: true)" "" \ - --replace "find_program('gtk4-broadwayd', required: true)" "" + --replace-fail "find_program('broadwayd', required: true)" "" \ + --replace-fail "find_program('gtk4-broadwayd', required: true)" "" ''; preFixup = '' diff --git a/pkgs/development/tools/click/default.nix b/pkgs/development/tools/click/default.nix index f8d73eec2580f..da05368a2ce4b 100644 --- a/pkgs/development/tools/click/default.nix +++ b/pkgs/development/tools/click/default.nix @@ -13,7 +13,7 @@ , getopt , setuptools , pygobject3 -, wrapGAppsHook +, wrapGAppsHook3 }: buildPythonApplication { @@ -57,7 +57,7 @@ buildPythonApplication { gobject-introspection vala getopt - wrapGAppsHook + wrapGAppsHook3 ]; # Tests were omitted for time constraint reasons diff --git a/pkgs/development/tools/database/sqlitebrowser/default.nix b/pkgs/development/tools/database/sqlitebrowser/default.nix index a622d3481ce2e..b13255f57a725 100644 --- a/pkgs/development/tools/database/sqlitebrowser/default.nix +++ b/pkgs/development/tools/database/sqlitebrowser/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, mkDerivation, fetchFromGitHub, cmake -, qtbase, qttools, sqlcipher, wrapGAppsHook, qtmacextras +, qtbase, qttools, sqlcipher, wrapGAppsHook3, qtmacextras }: mkDerivation rec { @@ -19,7 +19,7 @@ mkDerivation rec { # We *really* should get that cleaned up. buildInputs = [ qtbase sqlcipher ] ++ lib.optionals stdenv.isDarwin [ qtmacextras ]; - nativeBuildInputs = [ cmake qttools wrapGAppsHook ]; + nativeBuildInputs = [ cmake qttools wrapGAppsHook3 ]; cmakeFlags = [ "-Dsqlcipher=1" diff --git a/pkgs/development/tools/documentation/gtk-doc/default.nix b/pkgs/development/tools/documentation/gtk-doc/default.nix index 18d53e51da439..b21bdfc500daa 100644 --- a/pkgs/development/tools/documentation/gtk-doc/default.nix +++ b/pkgs/development/tools/documentation/gtk-doc/default.nix @@ -14,7 +14,7 @@ python3.pkgs.buildPythonApplication rec { pname = "gtk-doc"; - version = "1.33.2"; + version = "1.34.0"; outputDevdoc = "out"; @@ -25,7 +25,7 @@ python3.pkgs.buildPythonApplication rec { owner = "GNOME"; repo = pname; rev = version; - sha256 = "A6OXpazrJ05SUIO1ZPVN0xHTXOSov8UnPvUolZAv/Iw="; + hash = "sha256-Jt6d5wbhAoSQ2sWyYWW68Y81duc3+QOJK/5JR/lCmnQ="; }; patches = [ diff --git a/pkgs/development/tools/electron/binary/generic.nix b/pkgs/development/tools/electron/binary/generic.nix index fb2fcdd6cb1f2..f9e493e6b7cbd 100644 --- a/pkgs/development/tools/electron/binary/generic.nix +++ b/pkgs/development/tools/electron/binary/generic.nix @@ -3,7 +3,7 @@ , libXScrnSaver , makeWrapper , fetchurl -, wrapGAppsHook +, wrapGAppsHook3 , glib , gtk3 , unzip @@ -112,7 +112,7 @@ let nativeBuildInputs = [ unzip makeWrapper - wrapGAppsHook + wrapGAppsHook3 ]; dontUnpack = true; diff --git a/pkgs/development/tools/electron/wrapper.nix b/pkgs/development/tools/electron/wrapper.nix index 5ecb0387b6a88..c912c059e2558 100644 --- a/pkgs/development/tools/electron/wrapper.nix +++ b/pkgs/development/tools/electron/wrapper.nix @@ -1,6 +1,6 @@ { stdenv , electron-unwrapped -, wrapGAppsHook +, wrapGAppsHook3 , makeWrapper , gsettings-desktop-schemas , glib @@ -12,7 +12,7 @@ stdenv.mkDerivation { pname = "electron"; inherit (electron-unwrapped) version; - nativeBuildInputs = [ wrapGAppsHook makeWrapper ]; + nativeBuildInputs = [ wrapGAppsHook3 makeWrapper ]; buildInputs = [ # needed for GSETTINGS_SCHEMAS_PATH gsettings-desktop-schemas glib gtk3 gtk4 diff --git a/pkgs/development/tools/glade/default.nix b/pkgs/development/tools/glade/default.nix index da3dee87d2212..84885d912129f 100644 --- a/pkgs/development/tools/glade/default.nix +++ b/pkgs/development/tools/glade/default.nix @@ -12,7 +12,7 @@ , enableWebkit2gtk ? stdenv.isLinux , webkitgtk_4_1 , gobject-introspection -, wrapGAppsHook +, wrapGAppsHook3 , itstool , libxml2 , docbook-xsl-nons @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { pkg-config gettext itstool - wrapGAppsHook + wrapGAppsHook3 docbook-xsl-nons docbook_xml_dtd_42 libxslt diff --git a/pkgs/development/tools/glamoroustoolkit/default.nix b/pkgs/development/tools/glamoroustoolkit/default.nix index 3a32bfdaddaa2..fed9323566de4 100644 --- a/pkgs/development/tools/glamoroustoolkit/default.nix +++ b/pkgs/development/tools/glamoroustoolkit/default.nix @@ -1,7 +1,7 @@ { lib , stdenv , fetchzip -, wrapGAppsHook +, wrapGAppsHook3 , cairo , dbus , fontconfig @@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-GQeYR232zoHLIt1AzznD7rp6u4zMiAdj1+0OfXfT6AQ="; }; - nativeBuildInputs = [ wrapGAppsHook ]; + nativeBuildInputs = [ wrapGAppsHook3 ]; sourceRoot = "."; diff --git a/pkgs/development/tools/misc/awf/default.nix b/pkgs/development/tools/misc/awf/default.nix index b73f1dc04502f..79d630d5688b5 100644 --- a/pkgs/development/tools/misc/awf/default.nix +++ b/pkgs/development/tools/misc/awf/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, autoreconfHook, gtk2, gtk3, pkg-config -, wrapGAppsHook }: +, wrapGAppsHook3 }: stdenv.mkDerivation rec { pname = "awf"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "0jl2kxwpvf2n8974zzyp69mqhsbjnjcqm39y0jvijvjb1iy8iman"; }; - nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook ]; + nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook3 ]; buildInputs = [ gtk2 gtk3 ]; diff --git a/pkgs/development/tools/misc/d-spy/default.nix b/pkgs/development/tools/misc/d-spy/default.nix index e48a51f4870fe..c2812c2e1209d 100644 --- a/pkgs/development/tools/misc/d-spy/default.nix +++ b/pkgs/development/tools/misc/d-spy/default.nix @@ -15,13 +15,13 @@ stdenv.mkDerivation rec { pname = "d-spy"; - version = "1.8.0"; + version = "1.10.0"; outputs = [ "out" "lib" "dev" ]; src = fetchurl { url = "mirror://gnome/sources/d-spy/${lib.versions.majorMinor version}/d-spy-${version}.tar.xz"; - sha256 = "+J15XQaG2C2h3OsjYUj3zlTVynjwuY4PEzayY6WvzqE="; + hash = "sha256-VVgSucZUBVHaWZ7oFHiArTkVuTyH4XV7bRz9kKDgXlM="; }; nativeBuildInputs = [ diff --git a/pkgs/development/tools/misc/gpuvis/default.nix b/pkgs/development/tools/misc/gpuvis/default.nix index d553f29db06e4..ad2d36e250214 100644 --- a/pkgs/development/tools/misc/gpuvis/default.nix +++ b/pkgs/development/tools/misc/gpuvis/default.nix @@ -7,7 +7,7 @@ , pkg-config , SDL2 , stdenv -, wrapGAppsHook +, wrapGAppsHook3 }: stdenv.mkDerivation rec { @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { --replace "libgtk-3.so" "${lib.getLib gtk3}/lib/libgtk-3.so" ''; - nativeBuildInputs = [ pkg-config meson ninja wrapGAppsHook ]; + nativeBuildInputs = [ pkg-config meson ninja wrapGAppsHook3 ]; buildInputs = [ SDL2 gtk3 freetype ]; diff --git a/pkgs/development/tools/misc/lttng-ust/default.nix b/pkgs/development/tools/misc/lttng-ust/default.nix index b1fb9c83e8d0e..7a0a918db74d7 100644 --- a/pkgs/development/tools/misc/lttng-ust/default.nix +++ b/pkgs/development/tools/misc/lttng-ust/default.nix @@ -1,4 +1,4 @@ import ./generic.nix { - version = "2.13.7"; - sha256 = "sha256-X7TxfDB8jBt5xoVh6JvpVi0H50Jb9A5yjE1mdVNCpes="; + version = "2.13.8"; + sha256 = "sha256-1O+Y2rmjetT1JMyv39UK9PJmA5tSjdWvq8545JAk2Tc="; } diff --git a/pkgs/development/tools/misc/stlink/default.nix b/pkgs/development/tools/misc/stlink/default.nix index 2255fbfd8dcbf..16785e4d4b891 100644 --- a/pkgs/development/tools/misc/stlink/default.nix +++ b/pkgs/development/tools/misc/stlink/default.nix @@ -5,7 +5,7 @@ , libusb1 , gtk3 , pkg-config -, wrapGAppsHook +, wrapGAppsHook3 , withGUI ? false }: @@ -36,7 +36,7 @@ in stdenv.mkDerivation rec { cmake ] ++ lib.optionals withGUI [ pkg-config - wrapGAppsHook + wrapGAppsHook3 ]; cmakeFlags = [ diff --git a/pkgs/development/tools/nemiver/default.nix b/pkgs/development/tools/nemiver/default.nix index db25b9f5f4e5f..c63761f23a0b9 100644 --- a/pkgs/development/tools/nemiver/default.nix +++ b/pkgs/development/tools/nemiver/default.nix @@ -17,7 +17,7 @@ , gtksourceview , gsettings-desktop-schemas , gtksourceviewmm -, wrapGAppsHook +, wrapGAppsHook3 }: stdenv.mkDerivation rec { @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { intltool itstool pkg-config - wrapGAppsHook + wrapGAppsHook3 ]; buildInputs = [ diff --git a/pkgs/development/tools/nwjs/default.nix b/pkgs/development/tools/nwjs/default.nix index 7ada7365ebb55..fd03766560ff8 100644 --- a/pkgs/development/tools/nwjs/default.nix +++ b/pkgs/development/tools/nwjs/default.nix @@ -31,7 +31,7 @@ , stdenv , systemd , udev -, wrapGAppsHook +, wrapGAppsHook3 , xorg }: @@ -105,7 +105,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ autoPatchelfHook - (wrapGAppsHook.override { inherit makeWrapper; }) + (wrapGAppsHook3.override { inherit makeWrapper; }) ]; buildInputs = [ nwEnv ]; diff --git a/pkgs/development/tools/parsing/tree-sitter/default.nix b/pkgs/development/tools/parsing/tree-sitter/default.nix index 97554e53de206..14f5e32b505cc 100644 --- a/pkgs/development/tools/parsing/tree-sitter/default.nix +++ b/pkgs/development/tools/parsing/tree-sitter/default.nix @@ -2,6 +2,7 @@ , stdenv , fetchgit , fetchFromGitHub +, nix-update-script , runCommand , which , rustPlatform @@ -26,8 +27,8 @@ let # 2) nix-build -A tree-sitter.updater.update-all-grammars # 3) Set GITHUB_TOKEN env variable to avoid api rate limit (Use a Personal Access Token from https://github.com/settings/tokens It does not need any permissions) # 4) run the ./result script that is output by that (it updates ./grammars) - version = "0.22.2"; - hash = "sha256-RhM3SgsCb8eLs56cm8/Yo1ptNnFrR21FriHAlMdvdrU="; + version = "0.22.5"; + hash = "sha256-f8bdpiPNo5M8aefTmrQ2MQVg7lS0Yq7j312K1slortA="; src = fetchFromGitHub { owner = "tree-sitter"; @@ -62,6 +63,7 @@ let }; grammars' = import ./grammars { inherit lib; } // extraGrammars; grammars = grammars' // + { tree-sitter-latex = grammars'.tree-sitter-latex // { generate = true; }; } // { tree-sitter-ocaml = grammars'.tree-sitter-ocaml // { location = "grammars/ocaml"; }; } // { tree-sitter-ocaml-interface = grammars'.tree-sitter-ocaml // { location = "grammars/interface"; }; } // { tree-sitter-org-nvim = grammars'.tree-sitter-org-nvim // { language = "org"; }; } // @@ -110,7 +112,7 @@ rustPlatform.buildRustPackage { pname = "tree-sitter"; inherit src version; - cargoHash = "sha256-QWqg84naOIPhkHj2yLchZVb2gvjL9+AEK2rRK7K8uQY="; + cargoHash = "sha256-Fk6V/kPKc/GL/q6QsaCUrq+ZG0R+N5FLOpIm77Y+n2A="; buildInputs = lib.optionals stdenv.isDarwin [ Security CoreServices ]; @@ -158,6 +160,8 @@ rustPlatform.buildRustPackage { }; inherit grammars buildGrammar builtGrammars withPlugins allGrammars; + updateScript = nix-update-script { }; + tests = { # make sure all grammars build builtGrammars = lib.recurseIntoAttrs builtGrammars; diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-commonlisp.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-commonlisp.json index 190dda2ee3e9b..b17e5ca895277 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-commonlisp.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-commonlisp.json @@ -1,10 +1,10 @@ { "url": "https://github.com/thehamsta/tree-sitter-commonlisp", - "rev": "cf10fc38bc24faf0549d59217ff37c789973dfdc", - "date": "2023-11-19T14:17:12+01:00", - "path": "/nix/store/91kc23ng7axqzd4xjiwrgij1mpriq459-tree-sitter-commonlisp", - "sha256": "1nq5cvf557w3vwr7rjzdgqcpcs3ikp1x5cs00f8z5n9hgdk1lvry", - "hash": "sha256-Pm8aZnsw2fKRA0Cz0sOdcWh2GX7ty3wy34OfUtxmBds=", + "rev": "25856774aaab983c573bb2f9cc1ebbc97941f7b9", + "date": "2024-04-06T22:22:41+02:00", + "path": "/nix/store/mlji0h6k2x17jni9q3y571dmk5k4xi85-tree-sitter-commonlisp", + "sha256": "12fh2sinasnfp6rfq5d9qq24nfg55bclc5rp8mnw3a2ccyc5icis", + "hash": "sha256-OrJYmGdMqMFtRTcXRtkq5TlLBMapFeyyuc5qZaMW0Ik=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cpp.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cpp.json index 4ba7b97a57d8d..53a829c4a941f 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cpp.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cpp.json @@ -1,10 +1,10 @@ { "url": "https://github.com/tree-sitter/tree-sitter-cpp", - "rev": "e0c1678a78731e78655b7d953efb4daecf58be46", - "date": "2024-02-18T08:20:42-05:00", - "path": "/nix/store/dw86n9mqgfn9ymlbr7s7h05dvf8q867i-tree-sitter-cpp", - "sha256": "0fjxjm3gjqvcjqgjyq6lg6sgyy0ly69dinq33rmy56806da45lq9", - "hash": "sha256-CdNCVDMAmeJrHgPb2JLxFHj/tHnUYC8flmxj+UaVXTo=", + "rev": "72fd00128f1c38319670cbf4bcedbba0dc849d96", + "date": "2024-04-14T21:38:58-04:00", + "path": "/nix/store/sy0ln7q947bv9k313q4z6kkibl2zgdi1-tree-sitter-cpp", + "sha256": "0qaa48gq4n3300apwx1mdcwqnfg59q8bdj88c3ssd45pr1n47s88", + "hash": "sha256-COlDbMi3kKb1YAjJthBO5TmLOWs1dH4VAGNYgh8iSmE=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cuda.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cuda.json index 376d5f83bf469..54bbe3214f4b5 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cuda.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cuda.json @@ -1,10 +1,10 @@ { "url": "https://github.com/thehamsta/tree-sitter-cuda", - "rev": "221179d4287a2c24c08e4c67ff383ef67dc32156", - "date": "2024-02-20T23:55:20+01:00", - "path": "/nix/store/x8sqw6njbai4x9jlx6zn0mamvfjpcxy9-tree-sitter-cuda", - "sha256": "0n4c79iq5izdjrb50f5af02jkzfn6mp3kvr0iajfhxlj3x64ykbv", - "hash": "sha256-e01PTB+SduikiiDvOW411v0pBXCqOFBWlu3HgmM6jFg=", + "rev": "4ec5afdf98041d137c25b555958a1f825c7c1272", + "date": "2024-04-02T22:40:43+02:00", + "path": "/nix/store/2n6dkgdvhfd34qa48b5824qbw1pc7899-tree-sitter-cuda", + "sha256": "1n840xzsx56w3hys263f216ih901jh456yxdmm0i274ijwngn38h", + "hash": "sha256-EA37LJeRHBFBra17UwiUASQYTRBuGKE9HNyUrn8HBNk=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-dart.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-dart.json index 0cf8d54a9f4c4..f492de75ad545 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-dart.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-dart.json @@ -1,10 +1,10 @@ { "url": "https://github.com/usernobody14/tree-sitter-dart", - "rev": "1a31399a08aefc93bc4cdbfadc0cb619136f86c1", - "date": "2024-02-10T18:16:57-07:00", - "path": "/nix/store/4pdnic3kb0856ajy2xfbxdn84lflvbw1-tree-sitter-dart", - "sha256": "0nx4hvvx239prxckddbcgadvk894lxl4ycmxxg7m30j2sp6a6049", - "hash": "sha256-iQCjzNVCglHP670yT2inJKG5m3pstTZZzzcN0feGpFs=", + "rev": "6da46473ab8accb13da48113f4634e729a71d335", + "date": "2024-04-07T18:27:24-06:00", + "path": "/nix/store/v04h2p45ngm7llrckpkkbnvj9m5763vm-tree-sitter-dart", + "sha256": "1jxz4s0j8pmjxl7cz7s9blzqhr1w5jannxihidqrd6dqxawc6gh1", + "hash": "sha256-AT7DuOq4mZZxizB2a5UsPGSIP11Jn88O7bJeJIEmv8s=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-elixir.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-elixir.json index 70e129ea41bd2..405fd174824e8 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-elixir.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-elixir.json @@ -1,10 +1,10 @@ { "url": "https://github.com/elixir-lang/tree-sitter-elixir", - "rev": "11426c5fd20eef360d5ecaf10729191f6bc5d715", - "date": "2023-12-04T13:06:21+07:00", - "path": "/nix/store/l3868ga8dvvq06k7px3k9i3kpynfjmis-tree-sitter-elixir", - "sha256": "1fqsvqdjscmjj7vaq3mgs6j49m3412g5i9jrm1r61n1d8yrg3mzy", - "hash": "sha256-/tfxskct2GByqFmmWJ4IZNREpNGvDqz2kbIyLRveGrs=", + "rev": "de690fa8a028f122af46d9d2685679fe5f2d7d60", + "date": "2024-04-08T19:02:42+02:00", + "path": "/nix/store/q46fy2kd4gvab4bpfv3zacg4qgkfc6dz-tree-sitter-elixir", + "sha256": "03fg2qj0i3n1dx8abkngg4nxqwpz86m5nr7q70hp5jw5bxccxxkf", + "hash": "sha256-bvbOWF+Fy3IhOPhkW6pB/3LcLXnPzqVQb8GOCCQWzw0=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-fish.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-fish.json index a1047117557c1..f1e8bc7ccaf1c 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-fish.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-fish.json @@ -1,10 +1,10 @@ { "url": "https://github.com/ram02z/tree-sitter-fish", - "rev": "f9176908c9eb2e11eb684d79e1d00f3b29bd65c9", - "date": "2023-02-12T14:42:20+00:00", - "path": "/nix/store/hg229jskwvgmfgi9awznvp9cj5riacay-tree-sitter-fish", - "sha256": "1yxvibmmpkwswwrg1mzvcnfj6y0rpccrwyg27k4wpr2630ma9xcw", - "hash": "sha256-nPWkKhhG5MvJPOJ5nhm7GXgjnWX71/Ay55rPW+uKu/s=", + "rev": "a78aef9abc395c600c38a037ac779afc7e3cc9e0", + "date": "2024-04-02T18:45:18+01:00", + "path": "/nix/store/v0bvl4iadrl1fzr617s72rlk2d214ak9-tree-sitter-fish", + "sha256": "0nmdwxw8wbqc9nm1p30s91p6mh8qp7w5wnw7lpz6fy6hq5k3gfqg", + "hash": "sha256-D7s3ZsHQeGf+pYdbXvi5GMFqbkgajBuqTQwvjnjnrVo=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-glsl.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-glsl.json index 0cf5f37e53666..eb12bf0a26a19 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-glsl.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-glsl.json @@ -1,10 +1,10 @@ { "url": "https://github.com/thehamsta/tree-sitter-glsl", - "rev": "284bed0e2f1d9f700756b96512baf33483642ff0", - "date": "2024-02-15T22:49:15+01:00", - "path": "/nix/store/vqnsavpda33cbzvfwk28cqz24m5lwrl7-tree-sitter-glsl", - "sha256": "1vcllf58mk1c1fiwh2amcjkgmq5m9dyhawvm744fx9phf0qlqb57", - "hash": "sha256-pyxMMXDwpu4IOXVzBX1LteD6pmRVCcijCyzMioqjlO0=", + "rev": "e7817c982e0e921c5ee89a1e0283121bb5cc5e01", + "date": "2024-04-14T19:48:45+02:00", + "path": "/nix/store/fs5zdqn1lilbd6f0g6kgjjl35dli61fv-tree-sitter-glsl", + "sha256": "1gxg9d3i7iyzxv0sijllbl57dl7ai7z48f1639xd8ljhwl7yyim6", + "hash": "sha256-pkbvD+VQUtR6GiY4RP6J6tB2Cl2UyqjB7t/HE0dLr78=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-haskell.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-haskell.json index a41c8bc056c47..f0bb17721691c 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-haskell.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-haskell.json @@ -1,10 +1,10 @@ { "url": "https://github.com/tree-sitter/tree-sitter-haskell", - "rev": "6b5ec205c9d4f23eb36a163f1edc4f2db8c98e4a", - "date": "2024-02-26T15:02:24+01:00", - "path": "/nix/store/ia666bffpywmack992f64jid4321fvdq-tree-sitter-haskell", - "sha256": "1d3klbflb1xl234s6pw874j1d5r82bkx5jdi7il1irfvhgdkjljc", - "hash": "sha256-TFI524Pb5RhoPLHJ0ucSKJcWJDmIX6PJELSHRd2ic7Q=", + "rev": "95a4f0023741b3bee0cc500f3dab9c5bab2dc2be", + "date": "2024-03-24T15:47:21+01:00", + "path": "/nix/store/ay1m5h51pp7p84hh5mlmxir8fsr68bs5-tree-sitter-haskell", + "sha256": "0kwbknxk8f6824bijqqkmlfg04074v31ava8qsf97bqsgs6039vf", + "hash": "sha256-bqcBjH4ar5OcxkhtFcYmBxDwHK0TYxkXEcg4NLudi08=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-javascript.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-javascript.json index 7b03a81327734..67e30dd121eaf 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-javascript.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-javascript.json @@ -1,10 +1,10 @@ { "url": "https://github.com/tree-sitter/tree-sitter-javascript", - "rev": "de1e682289a417354df5b4437a3e4f92e0722a0f", - "date": "2024-03-10T11:12:05-04:00", - "path": "/nix/store/8p9li6jcc247jzpy0x3cr4iskfyhqwmi-tree-sitter-javascript", - "sha256": "1mvvc6cv46zyhxhdjycmj7746hbss7lxcxks61bzrh229nlrh6hy", - "hash": "sha256-HhqYqU1CwPxXMHp21unRekFDzpGVedlgh/4bsplhe9c=", + "rev": "ac10a11e0c8db512f70e6b798260d2516d22454c", + "date": "2024-04-07T02:36:56-04:00", + "path": "/nix/store/b5fahwmcx0riy3bfaarlggncfgfkhx38-tree-sitter-javascript", + "sha256": "1f0k7mk785ijppw1swcrilr5bl2nddi7hifml431y4lsqm7y6kmg", + "hash": "sha256-r07jT8WaEh8GodVFeGJrVtBVMo2ZcR34vTIWdGY9E7g=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-json.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-json.json index 00991afc31368..3a43b67184e24 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-json.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-json.json @@ -1,10 +1,10 @@ { "url": "https://github.com/tree-sitter/tree-sitter-json", - "rev": "3b129203f4b72d532f58e72c5310c0a7db3b8e6d", - "date": "2024-02-23T13:05:26-08:00", - "path": "/nix/store/03dv24dlqkds0k1vjchzq6n8v6wys3ix-tree-sitter-json", - "sha256": "0rnfhmhr76fjlc6zzbxzrxrxa1xxpkg1jgq7vdw4630l1cg2nlbm", - "hash": "sha256-dVErHgsUDEN42wc/Gd68vQfVc8+/r/8No9KZk2GFzmY=", + "rev": "80e623c2165887f9829357acfa9c0a0bab34a3cd", + "date": "2024-04-07T15:21:58-04:00", + "path": "/nix/store/9cixfhx0x72pvn0ak349cbbzvhzlvhll-tree-sitter-json", + "sha256": "0mjphf34k5d0h28wwafwljk486h5mzx30dqdxz23lcmvnh0s79y1", + "hash": "sha256-waejAbS7MjrE7w03MPqvBRpEpqTcKc6RgKCVSYaDV1Y=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-julia.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-julia.json index b94837ef46d06..d55e2ca470eea 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-julia.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-julia.json @@ -1,10 +1,10 @@ { "url": "https://github.com/tree-sitter/tree-sitter-julia", - "rev": "e84f10db8eeb8b9807786bfc658808edaa1b4fa2", - "date": "2024-02-14T19:03:11-05:00", - "path": "/nix/store/wv5r1xw2f3bfk4rqg660m6pqkwfdin68-tree-sitter-julia", - "sha256": "1fqirr8yjwmjy5dnfxk0djafq0hnl18mf28i7zg2gsfvy9a27d4f", - "hash": "sha256-jrQjVPLb6SfePxEJV1GgFgLslGxgdmdb8bJy6VHOEbs=", + "rev": "0a80d33aca49dd257625ab25ef3a506e2b99a554", + "date": "2024-04-14T10:47:45-07:00", + "path": "/nix/store/zi4q89960k33nkic7wm19fiq05bhx2bq-tree-sitter-julia", + "sha256": "057hg3v4rzzq19swb2mv2zlxp8zd746zxklxc0vw1i1fkr2x34yi", + "hash": "sha256-0ZPRRZ4uxMA3YJ3O/g057aPb6Re7isV1Cvj/TPZ48BQ=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-just.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-just.json index e1b2ed4e16228..8e480f72a4063 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-just.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-just.json @@ -1,10 +1,10 @@ { "url": "https://github.com/IndianBoy42/tree-sitter-just", - "rev": "442538ab5ae0913b05e0269a988b4d452dfa5361", - "date": "2024-03-19T12:21:46-05:00", - "path": "/nix/store/ibqsrr59gr2ww1z5f9vr4q2fdvz9gmmy-tree-sitter-just", - "sha256": "1zcc7qsapcq8rs0myknx8bd8svcb18gwgpcqzh5jw1cf1c45yryr", - "hash": "sha256-2WdfCAuOBS4L/Jjdxx8Ki22N2kLdTl+BzgizqzQ+jP0=", + "rev": "6c2f018ab1d90946c0ce029bb2f7d57f56895dff", + "date": "2024-03-22T16:21:21-05:00", + "path": "/nix/store/8p22m5p2clrcc563v2z6pmhnhh03yyvg-tree-sitter-just", + "sha256": "0752hfkkqk92g0s68b01wf5d5q2y7aw87wsj8kz2vxkbj0i38x8j", + "hash": "sha256-EnU0IpBr9i3+RFLzg7g6XuDSiuMBLGQ0eCJNPKeDohw=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-latex.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-latex.json index 1ae0d28cde670..9e6eb0167e0b9 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-latex.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-latex.json @@ -1,10 +1,10 @@ { "url": "https://github.com/latex-lsp/tree-sitter-latex", - "rev": "8c75e93cd08ccb7ce1ccab22c1fbd6360e3bcea6", - "date": "2022-10-26T10:55:26+02:00", - "path": "/nix/store/zhx1vnr3xdrb0ry6kfjsfrzs6c3nf8i9-tree-sitter-latex", - "sha256": "0lc42x604f04x3kkp88vyqa5dx90wqyisiwl7nn861lyxl6phjnf", - "hash": "sha256-zkp4De2eBoOsPZRHHT3mIPVWFPYboTvn6AQ4AkwXhFE=", + "rev": "a834712c5e04029a451a262456bf6290b8ef6f37", + "date": "2024-04-01T14:31:04+02:00", + "path": "/nix/store/kn3vkfnysm170wc1dbjmb5y69hdlmyb4-tree-sitter-latex", + "sha256": "18dyda7299imb6i2jnjpr7z2jdrjn804c3958nkkpxzzfhbq39h7", + "hash": "sha256-B6aBF3T/9zunRSUNRgCyMjcp/slXWimiWTWmJI5qvqE=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-markdown.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-markdown.json index 68a671d810daa..6f9a1b44406d9 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-markdown.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-markdown.json @@ -1,10 +1,10 @@ { "url": "https://github.com/MDeiml/tree-sitter-markdown", - "rev": "b2f01981a76e3251f5b660378136c248ed106b81", - "date": "2024-03-13T23:51:05+02:00", - "path": "/nix/store/z986603ky7a41d48i0rxkd23y5k1bxc7-tree-sitter-markdown", - "sha256": "183ig6p39wzlmb8vz5hyjr4787s03b8gsw5p210qxkl3xs46s37a", - "hash": "sha256-6gxtiO6Dzo5BELdw/dAaQB90SJYelr/RqvTzNK55caA=", + "rev": "62516e8c78380e3b51d5b55727995d2c511436d8", + "date": "2024-03-22T11:52:05+02:00", + "path": "/nix/store/4hi3bz1ny9dz3yq7mr6d74gsfmcnh9rw-tree-sitter-markdown", + "sha256": "08wl8y8xgrr10m1p6xpmv0jbmnif30wgd2q5m28ghh1v37q2ixfp", + "hash": "sha256-1/Uo8Bk7QPiQqAWL9jgYLtq6JNj1dnNDBSHn15FHlCM=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-nix.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-nix.json index 9e3a8be40c227..91c713dae026e 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-nix.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-nix.json @@ -1,10 +1,10 @@ { "url": "https://github.com/cstrahan/tree-sitter-nix", - "rev": "763168fa916a333a459434f1424b5d30645f015d", - "date": "2023-12-26T15:36:50+13:00", - "path": "/nix/store/wvnrjnrb3dgc5pg5n8nkwxm43478nk2k-tree-sitter-nix", - "sha256": "0nn3ij8k6wkbf3kcvkyyp0vhfjcksi31wyyfwmsbx66maf2xgaii", - "hash": "sha256-MarXhVPVmL505c57HkbUk0kHN7jez83mcGtyM5GMw1o=", + "rev": "b3cda619248e7dd0f216088bd152f59ce0bbe488", + "date": "2024-04-03T09:38:13+02:00", + "path": "/nix/store/5rz41r1yycp0w3s947cjs3m9d9v1082r-tree-sitter-nix", + "sha256": "1xh75z11d1b514qm997br8vmxalir2ah1pk7v3k1ppm28043ggr1", + "hash": "sha256-Ib83CECi3hvm2GfeAJXIkapeN8rrpFQxCWWFFsIvB/Y=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-norg-meta.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-norg-meta.json index 93f8737bb7d9d..968e703cc3528 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-norg-meta.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-norg-meta.json @@ -1,10 +1,10 @@ { "url": "https://github.com/nvim-neorg/tree-sitter-norg-meta", - "rev": "a479d1ca05848d0b51dd25bc9f71a17e0108b240", - "date": "2023-05-28T19:01:42+02:00", - "path": "/nix/store/7yp5rzpmdvyhhl38brhz0vl3gd9qv03y-tree-sitter-norg-meta", - "sha256": "1vvl39m41wgsq7xkfi523zx6nza03dkzgk6izc39igmwx5hsdl7f", - "hash": "sha256-7tCmYem8vpgG+9HM92cbQH1r+h+iRDf7wfrxQGoadO8=", + "rev": "6f0510cc516a3af3396a682fbd6655486c2c9d2d", + "date": "2024-04-13T19:12:46+02:00", + "path": "/nix/store/val14j7fz39yyqzp3xh2r7cbvfd1am4m-tree-sitter-norg-meta", + "sha256": "1vz74wc5yy5fykl9c3b16k6fsvskxp93acsy81p337jzg709v97j", + "hash": "sha256-8qSdwHlfnjFuQF4zNdLtU2/tzDRhDZbo9K54Xxgn5+8=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-norg.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-norg.json index 2fa6470e2a358..f9be1d8935888 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-norg.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-norg.json @@ -1,10 +1,10 @@ { "url": "https://github.com/nvim-neorg/tree-sitter-norg", - "rev": "014073fe8016d1ac440c51d22c77e3765d8f6855", - "date": "2023-10-02T20:20:59+02:00", - "path": "/nix/store/xi96cyvgn1443wf54ykc90y80fqdmgzv-tree-sitter-norg", - "sha256": "05zrcglnpvyqx0gczzkx05qc95y5n3slbhjig7dqjyxvphyzf0nk", - "hash": "sha256-0wL3Pby7e4nbeVHCRfWwxZfEcAF9/s8e6Njva+lj+Rc=", + "rev": "ceb44e4cdb58fbeea52301835bdd461817ddb57e", + "date": "2024-04-14T13:26:39+02:00", + "path": "/nix/store/gmzacfd1sbdbgvc26bnv3cpyl5l3csq9-tree-sitter-norg", + "sha256": "1jzk1wxqah5ajgpxmmbhrjk43hhk9vpg1f7v9wnj1xgp7zv4w6mv", + "hash": "sha256-uxpO9j/39SAtT/u48O5OE8JBpsxw1drvk6pAhTsP88s=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-nu.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-nu.json index 7bb3fd3c6f1ae..8a5f286af0c66 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-nu.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-nu.json @@ -1,10 +1,10 @@ { "url": "https://github.com/nushell/tree-sitter-nu", - "rev": "c5b7816043992b1cdc1462a889bc74dc08576fa6", - "date": "2024-03-09T11:27:22-06:00", - "path": "/nix/store/gcmmkjxfhf4y1qc3fvbaww5pfcdbjlhv-tree-sitter-nu", - "sha256": "0g9b7d6306z96x90w9v687nyws5jrh5jy2cm8yxhaz3xgq9v3s1z", - "hash": "sha256-P+ixE359fAW7R5UJLwvMsmju7UFmJw5SN+kbMEw7Kz0=", + "rev": "b090676f0205f52debb93745b9ad788385583276", + "date": "2024-04-14T14:09:50-05:00", + "path": "/nix/store/f8pjwwdy175mayqncxicn47lj7gw4vks-tree-sitter-nu", + "sha256": "10rmw80xzhpqhjhysfx13pkqzfm4a31wvvmq57wvrcrrrlqb982k", + "hash": "sha256-U6C0MM05s7z5KbjuzcNQpLqP5x2hO+2hhPjC3wHiNYM=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ocaml.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ocaml.json index 95e3bed434e43..d769f351e21df 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ocaml.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ocaml.json @@ -1,10 +1,10 @@ { "url": "https://github.com/tree-sitter/tree-sitter-ocaml", - "rev": "dabe60a96553fbbda0a58b6ccda12b7d44047cb5", - "date": "2024-03-17T14:43:34+01:00", - "path": "/nix/store/sv3zz52xfyda4iwjwxfkyadg0bj1d2kj-tree-sitter-ocaml", - "sha256": "0pkw9bclbndcakaywdwj0ffvak78h68fjlbckdainfz99xgvg732", - "hash": "sha256-Ypy3X0/pOxtVm2xR6ZCB6Ey1nQOSN+7VVKzZRdlKfF4=", + "rev": "f7e63111ed1bc1908eacafe6af1ee8d01bfcf7ae", + "date": "2024-03-23T14:49:30+01:00", + "path": "/nix/store/p4awlsbz7b3xlbr9l785l7vi1rnxgxlr-tree-sitter-ocaml", + "sha256": "04vscg6lkhdnzs15r1yqwwmc2lj73x4h3nf4mfpkwq6g870i04wj", + "hash": "sha256-khMQwUHPYD6vq8TZAUkfR1LBKufYh1yC/rbBSc1jehM=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-perl.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-perl.json index 025f5005b9ddd..385e00ceb5522 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-perl.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-perl.json @@ -1,10 +1,10 @@ { "url": "https://github.com/ganezdragon/tree-sitter-perl", - "rev": "a882a928d4930716896039d1c10e91b6d7444c48", - "date": "2024-03-03T23:09:15+05:30", - "path": "/nix/store/6v3jxaiad68k4rak3ihqn1vxqah1pi85-tree-sitter-perl", - "sha256": "0ss26x37ldj4v6pwbijrz0hbnvj8xrm8cj3y1n1f2xanzvcalz15", - "hash": "sha256-JXyq2P5WdeGCDX5IhmruSG67IPhZxsWv2UQ2ekY3Qms=", + "rev": "93bd92a6af01113140f1a0b4c1845d22adae7ab6", + "date": "2024-03-29T09:45:26+05:30", + "path": "/nix/store/v4fhidwmxfihmkkq32a2xj75zs9fs9cd-tree-sitter-perl", + "sha256": "1ldbqjiyc4apls5gfc96lw6l4y53k5adk8knf1pp3ar2x2dl8v6y", + "hash": "sha256-3mxEm+giq3FvcHai2VSZo3hCDacmMfeKplcR5qPEq9E=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-python.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-python.json index 257b3e4053464..059ce3aed9a64 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-python.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-python.json @@ -1,10 +1,10 @@ { "url": "https://github.com/tree-sitter/tree-sitter-python", - "rev": "b8a4c64121ba66b460cb878e934e3157ecbfb124", - "date": "2024-03-12T19:59:41-04:00", - "path": "/nix/store/qyvpyxlyxxmc1rwqvy14j9z1pjnpxbw9-tree-sitter-python", - "sha256": "12bgdbhkxl7lrca4257wnjks1m4z3mv5mzw5cfbyr91ypv59cfk5", - "hash": "sha256-ZTqWyr4+pOyXY4X/WnYdn9Sgp7T8FEEUy/TQPuFqb4k=", + "rev": "a22761025cdac6c314b7e3aa48fb44fa9e594d6a", + "date": "2024-04-05T08:52:41-04:00", + "path": "/nix/store/4zxxl74gpdm4y3dcaxxy831c5zay31bw-tree-sitter-python", + "sha256": "1kr3rj4wszpb1bz7xjn8v5cmkp6817d1iyficpdafglv7rx89a1g", + "hash": "sha256-L6iEej6bPqfaZdH5GNoJyNxZWdnIyn7+Cut+zYnMI88=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-query.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-query.json index 80676906d8dd1..b5ce91ba4c02a 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-query.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-query.json @@ -1,10 +1,10 @@ { "url": "https://github.com/nvim-treesitter/tree-sitter-query", - "rev": "176a380df78800167565118bb0dadfc961abbd43", - "date": "2024-03-07T12:57:53+02:00", - "path": "/nix/store/wa9dwqw4z7gcsnizch00sssjfl35arpf-tree-sitter-query", - "sha256": "0w0f3zymch27s923j4wkxjn2rfgf2qrhsrcrxf56nxmsgbbkdlvg", - "hash": "sha256-b9M213q6dmuK65llDTMW7rksrOyTEzlE0kdAVv0fDnA=", + "rev": "2e31ca2771f6042b0e4e0c41a6290014a9e1face", + "date": "2024-03-26T11:42:51+02:00", + "path": "/nix/store/d80f3x65zd87i9zpi7z2rh28a5f03n1k-tree-sitter-query", + "sha256": "0g8234yicidpjqc1rc7dvpx5ja49g938w451796nnn02chxa204i", + "hash": "sha256-kQChOmQCWGtNOqEQjkZ6iShZ+t3tsBwYlrdFFj0ZAj0=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json index 20b895d5d97a0..3861a460d1825 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json @@ -1,10 +1,10 @@ { "url": "https://github.com/tree-sitter/tree-sitter-rust", - "rev": "3a56481f8d13b6874a28752502a58520b9139dc7", - "date": "2024-03-10T12:55:02-04:00", - "path": "/nix/store/91xc2kv7dql3waccf2ih7k55bjw03n4z-tree-sitter-rust", - "sha256": "12806974pngxqv1brj4r15yqzp2fdvid926n7941nylgmdw9f4z9", - "hash": "sha256-6ROXeKuPehtIOtaI1OJuTtyPfQmZyLzCxv3ZS04yAIk=", + "rev": "b77c0d8ac28a7c143224e6ed9b4f9e4bd044ff5b", + "date": "2024-04-08T18:09:37-04:00", + "path": "/nix/store/mzkmi2d933cn0imzhvfvm43rwzgv624n-tree-sitter-rust", + "sha256": "1i1and7lkrcpxkkm3y8p8v1d6wpb6z3b3vrxk9dlw84mwa03y97d", + "hash": "sha256-7SQ/gOKVIE5bmj3vscY363LTwkYX+VHn7JflSU+zKsQ=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-scheme.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-scheme.json index bdb762ed83cc5..7e08f324213e0 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-scheme.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-scheme.json @@ -1,10 +1,10 @@ { "url": "https://github.com/6cdh/tree-sitter-scheme", - "rev": "184e7596ee0cbaef79230cae1b4ee5bb4fbad314", - "date": "2024-03-15T19:06:15+08:00", - "path": "/nix/store/wdhalppgf16xgcrm3llj0al5dimya5pc-tree-sitter-scheme", - "sha256": "0sqccw5az31di8jhb88v3afryiz7a4136g9a9xq8qni4znifw7y3", - "hash": "sha256-wx/uov0kWoxwTyo9MwJR50efnRoboQUlii2MrwpnDGs=", + "rev": "8f9dff3d038f09934db5ea113cebc59c74447743", + "date": "2024-04-12T09:33:55+08:00", + "path": "/nix/store/myg0q8bjsdzgq712skhxk1vf2gqqr7b0-tree-sitter-scheme", + "sha256": "1n9f9zala2mv7bllwjb2nsh2xsr56zjh7j09vxzd77jnb10rjh20", + "hash": "sha256-QECZQVhWntN+3wnIA+U3JesuoLZiSU7pOrsKRdVPLtk=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-solidity.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-solidity.json index f777d50e6d5ec..bc24e7aa108bd 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-solidity.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-solidity.json @@ -1,10 +1,10 @@ { "url": "https://github.com/JoranHonig/tree-sitter-solidity", - "rev": "b239a95f94cfcc6e7b3e961bc73a28d55e214f02", - "date": "2024-03-12T10:13:22+00:00", - "path": "/nix/store/8bi3z4l3g890xgb7karzpqfinrcadk26-tree-sitter-solidity", - "sha256": "0kb8d6j81pv5bas7nfvq5wv12paicrv833d7iin5z0zy4y2fvqkg", - "hash": "sha256-b+LthCf+g19sjKeNgXZmUV0RNi94O3u0WmXfgKRpaE0=", + "rev": "c3da7d989747679305ec1c84b68082f01089d49f", + "date": "2024-04-13T15:44:09+02:00", + "path": "/nix/store/a9spnmq129v18p2mwh52ksnq8aj5ag0s-tree-sitter-solidity", + "sha256": "0ha57nxqina9jl2i1b0r38m971wk0lhxrivgb88yii0r07zdmp84", + "hash": "sha256-BN3a/gEZxOgRWm/H3CEFk4eTKhoZrBAFlUnZiLs9RUE=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-templ.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-templ.json index 256888ebf3fea..9173e9300fb94 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-templ.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-templ.json @@ -1,10 +1,10 @@ { "url": "https://github.com/vrischmann/tree-sitter-templ", - "rev": "592faa3186ef857c92e4bd1c31d73c07a4a334db", - "date": "2024-02-06T21:43:24+01:00", - "path": "/nix/store/nqchnmjz07500x1s9fqrvkzrzvzjls5d-tree-sitter-templ", - "sha256": "1i26q3ci8w14c8z5lsibpbza0xwn7cp6hl46c52c98wvr0zpwzax", - "hash": "sha256-XX1+P8ibo8REYYZQaC47lneg/roralo+YiRwFNnARsQ=", + "rev": "1f9dae9c273136551684cb41461d00e565150e23", + "date": "2024-04-14T01:39:30+02:00", + "path": "/nix/store/swrbx6wrw3k022j2g7vq625zvjbmaxnr-tree-sitter-templ", + "sha256": "0w9kr1awc9f30mvidz4aysqs5wk3v93yam6ybb2d2jmmnv9kx5zj", + "hash": "sha256-8pc+07a1StHEWt5U5UfaY/KisfaK/BZ3BcMlxlXIM3E=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-tlaplus.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-tlaplus.json index e42a0ec6fc17d..eda4e2a9669c2 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-tlaplus.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-tlaplus.json @@ -1,10 +1,10 @@ { "url": "https://github.com/tlaplus-community/tree-sitter-tlaplus", - "rev": "3896a5be761f04ffb22a841b2a0672f7a8a43ef9", - "date": "2024-03-11T11:12:33-04:00", - "path": "/nix/store/7dq157m7v3mq9iscmjbywm3sy1p9hgyh-tree-sitter-tlaplus", - "sha256": "0bjyf470anxialbmphn19r7pdnni181r45zyyfrl9db2fsgz3q0h", - "hash": "sha256-EODxn3ZitUSz8/4XkgMK0dp2T07BwlsXVbFbBQ5xXi4=", + "rev": "3c8ce503563ea04ba1cc07c468ed064b1974c3ba", + "date": "2024-04-12T21:02:56-04:00", + "path": "/nix/store/p9q0v9h09nf49ji1fnl3s87xsda7skmj-tree-sitter-tlaplus", + "sha256": "0vh0kdab362n1cm1nl1klqixshdzjnx5cxynadrmz021x2dx3xl7", + "hash": "sha256-h/bRm+hBgF9zU9Z3VrqVv0HdI6YzUBsqC1aYsVSbAG4=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-typst.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-typst.json index 4333285d9e515..1a10518cbfd3f 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-typst.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-typst.json @@ -1,10 +1,10 @@ { "url": "https://github.com/uben0/tree-sitter-typst", - "rev": "77e23188c3a4287f6ff37f545722ac872a260ee8", - "date": "2023-12-30T18:08:13+01:00", - "path": "/nix/store/0zb749g1r03b3wnzfb3p98y33vyd8ybn-tree-sitter-typst", - "sha256": "02k5y63wh1gsfpfczrc86gkjr9ip4zqn21wbf6mxmm6qhmr5vkvz", - "hash": "sha256-f89dcoXY1NqrcYsHYfEnN6Ys5zOI5c/cdfoFyIfxZQo=", + "rev": "13863ddcbaa7b68ee6221cea2e3143415e64aea4", + "date": "2024-04-09T11:57:57+02:00", + "path": "/nix/store/y02g3bdn5nwqiykfki4fhsxmkp7y9kjm-tree-sitter-typst", + "sha256": "198rn8wdcqq51nz6hj1zxk7mplplr2z8vc36z6h1zpjjq925794z", + "hash": "sha256-n6RTRMJS3h+g+Wawjb7I9NJbz+w/SGi+DQVj1jiyGaU=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-wing.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-wing.json index 83c5a7ad66576..bb79674690e37 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-wing.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-wing.json @@ -1,10 +1,10 @@ { "url": "https://github.com/winglang/wing", - "rev": "a43b5524b0adbb553d874a6ea8d08a2d791f56c5", - "date": "2024-03-21T08:10:44+00:00", - "path": "/nix/store/v4qvjygfjjx04c5jn0p96hx5zd3skvsx-wing", - "sha256": "1wqj0ilb9mqbghsby5ls0qm7jf5vi2zsihnwjnksj9lnrng368xh", - "hash": "sha256-sCMzns2WJqmnldzCqL+Iuzh5KgaaFr80fAvXtGgEEvM=", + "rev": "f0b6b11709eb2ed56e5ef76a9b6fcc98615683b8", + "date": "2024-04-15T06:16:09+00:00", + "path": "/nix/store/iz1a2mwxdx9zqgdds0rfy8apq9l36xpb-wing", + "sha256": "105q2w5a3mx8pd0k0jhr6p3fprd85jr7fz3ndkj48yb2m8x2r1is", + "hash": "sha256-OoYsOqpieUTkbHZ8d7IsqOXrxjUZSjBBu6jXoQoXuIA=", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/profiling/sysprof/default.nix b/pkgs/development/tools/profiling/sysprof/default.nix index a3637a0188f86..7359fbb136fb1 100644 --- a/pkgs/development/tools/profiling/sysprof/default.nix +++ b/pkgs/development/tools/profiling/sysprof/default.nix @@ -24,13 +24,13 @@ stdenv.mkDerivation rec { pname = "sysprof"; - version = "45.1"; + version = "46.0"; outputs = [ "out" "lib" "dev" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz"; - sha256 = "Mju51YVhPWDEOUYDMUUAEfK5Cz1ScmJb2FjaTBnfLPk="; + hash = "sha256-c6p+deurPk4JRqBacj335u5CSeO56ITbo1UAq6Kh0XY="; }; nativeBuildInputs = [ diff --git a/pkgs/development/tools/rust/cargo-c/default.nix b/pkgs/development/tools/rust/cargo-c/default.nix index 3356eee034bc5..b370f1299277e 100644 --- a/pkgs/development/tools/rust/cargo-c/default.nix +++ b/pkgs/development/tools/rust/cargo-c/default.nix @@ -13,16 +13,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-c"; - version = "0.9.29"; + version = "0.9.31"; src = fetchCrate { inherit pname; # this version may need to be updated along with package version - version = "${version}+cargo-0.76.0"; - hash = "sha256-Uy5Bm8WwN3jQO2btnV/ayxTlIJAe5q2FUvhxCCrn9U8="; + version = "${version}+cargo-0.78.0"; + hash = "sha256-RqwUV3e02GykYH/pWHjoent+gix+CD+t3yAQxqUmo54="; }; - cargoHash = "sha256-fkekUCZReiexdtiQcWx+Hqz4XDDbRGa4fGheBCNZ3Qw="; + cargoHash = "sha256-SfKDlcN+PW1twJu3YbmMsQOtFh6JHncAhdrVg+tweAE="; nativeBuildInputs = [ pkg-config (lib.getDev curl) ]; buildInputs = [ openssl curl ] ++ lib.optionals stdenv.isDarwin [ @@ -55,6 +55,6 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/lu-zero/cargo-c"; changelog = "https://github.com/lu-zero/cargo-c/releases/tag/v${version}"; license = licenses.mit; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ cpu ]; }; } diff --git a/pkgs/development/tools/scenebuilder/default.nix b/pkgs/development/tools/scenebuilder/default.nix index 6e0b80497f4bd..14d6c87259048 100644 --- a/pkgs/development/tools/scenebuilder/default.nix +++ b/pkgs/development/tools/scenebuilder/default.nix @@ -6,7 +6,7 @@ , copyDesktopItems , glib , makeWrapper -, wrapGAppsHook +, wrapGAppsHook3 }: let @@ -53,7 +53,7 @@ maven'.buildMavenPackage rec { copyDesktopItems glib makeWrapper - wrapGAppsHook + wrapGAppsHook3 ]; dontWrapGApps = true; # prevent double wrapping diff --git a/pkgs/development/tools/vala-lint/default.nix b/pkgs/development/tools/vala-lint/default.nix index b3f4987146b8d..bb063fdfe32e9 100644 --- a/pkgs/development/tools/vala-lint/default.nix +++ b/pkgs/development/tools/vala-lint/default.nix @@ -9,7 +9,7 @@ , pkg-config , vala , gettext -, wrapGAppsHook +, wrapGAppsHook3 , unstableGitUpdater }: @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { ninja pkg-config vala - wrapGAppsHook + wrapGAppsHook3 ]; buildInputs = [ diff --git a/pkgs/development/web/cog/default.nix b/pkgs/development/web/cog/default.nix index c350149f32e23..0a9be7e5682b4 100644 --- a/pkgs/development/web/cog/default.nix +++ b/pkgs/development/web/cog/default.nix @@ -10,7 +10,7 @@ , glib-networking , webkitgtk , makeWrapper -, wrapGAppsHook +, wrapGAppsHook3 , gnome , gdk-pixbuf }: @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { pkg-config wayland makeWrapper - wrapGAppsHook + wrapGAppsHook3 ]; depsBuildsBuild = [ diff --git a/pkgs/development/web/cypress/default.nix b/pkgs/development/web/cypress/default.nix index dedd94230b8c8..8ce3c5aef739a 100644 --- a/pkgs/development/web/cypress/default.nix +++ b/pkgs/development/web/cypress/default.nix @@ -10,7 +10,7 @@ , stdenv , udev , unzip -, wrapGAppsHook +, wrapGAppsHook3 , xorg }: @@ -40,7 +40,7 @@ in stdenv.mkDerivation rec { # don't remove runtime deps dontPatchELF = true; - nativeBuildInputs = [ autoPatchelfHook wrapGAppsHook unzip ]; + nativeBuildInputs = [ autoPatchelfHook wrapGAppsHook3 unzip ]; buildInputs = with xorg; [ libXScrnSaver diff --git a/pkgs/development/web/insomnia/default.nix b/pkgs/development/web/insomnia/default.nix index 422c6b7378897..0d9b0e422b507 100644 --- a/pkgs/development/web/insomnia/default.nix +++ b/pkgs/development/web/insomnia/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, makeWrapper, fetchurl, dpkg, alsa-lib, atk, cairo, cups, dbus, expat , fontconfig, freetype, gdk-pixbuf, glib, pango, mesa, nspr, nss, gtk3 -, at-spi2-atk, gsettings-desktop-schemas, gobject-introspection, wrapGAppsHook +, at-spi2-atk, gsettings-desktop-schemas, gobject-introspection, wrapGAppsHook3 , libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext , libXfixes, libXi, libXrandr, libXrender, libXtst, libxcb, libxshmfence, nghttp2 , libudev0-shim, glibc, curl, openssl, autoPatchelfHook }: @@ -28,7 +28,7 @@ in stdenv.mkDerivation rec { dpkg makeWrapper gobject-introspection - wrapGAppsHook + wrapGAppsHook3 ]; buildInputs = [ diff --git a/pkgs/development/web/nodejs/node-npm-build-npm-package-logic.patch b/pkgs/development/web/nodejs/node-npm-build-npm-package-logic.patch index a9ac6b0589efc..a24ab07a3d804 100644 --- a/pkgs/development/web/nodejs/node-npm-build-npm-package-logic.patch +++ b/pkgs/development/web/nodejs/node-npm-build-npm-package-logic.patch @@ -49,7 +49,7 @@ index 1fa8b1f96..a026bb50d 100644 + if (process.env['NIX_NODEJS_BUILDNPMPACKAGE']) { + const spawn = require('@npmcli/promise-spawn') + -+ const npmWithNixFlags = (args, cmd) => spawn('bash', ['-c', 'npm ' + args + ` $npm${cmd}Flags "$\{npm${cmd}FlagsArray[@]}" $npmFlags "$\{npmFlagsArray[@]}"`], { cwd: dir, env: { ...process.env, _PACOTE_NO_PREPARE_: noPrepare.join('\n') } }, { message: `\`npm ${args}\` failed` }) ++ const npmWithNixFlags = (args, cmd) => spawn('bash', ['-c', 'npm ' + args + ` $npm${cmd}Flags "$\{npm${cmd}FlagsArray[@]}" $npmFlags "$\{npmFlagsArray[@]}" || [ -n "$forceGitDeps" ]`], { cwd: dir, env: { ...process.env, _PACOTE_NO_PREPARE_: noPrepare.join('\n') } }, { message: `\`npm ${args}\` failed` }) + const patchShebangs = () => spawn('bash', ['-c', 'source $stdenv/setup; patchShebangs node_modules'], { cwd: dir }) + + // the DirFetcher will do its own preparation to run the prepare scripts @@ -57,7 +57,7 @@ index 1fa8b1f96..a026bb50d 100644 + // + // We ignore this.npmConfig to maintain an environment that's as close + // to the rest of the build as possible. -+ return spawn('bash', ['-c', '$prefetchNpmDeps --fixup-lockfile package-lock.json'], { cwd: dir }) ++ return spawn('bash', ['-c', '$prefetchNpmDeps --fixup-lockfile package-lock.json || [ -n "$forceGitDeps" ]'], { cwd: dir }) + .then(() => npmWithNixFlags('ci --ignore-scripts', 'Install')) + .then(patchShebangs) + .then(() => npmWithNixFlags('rebuild', 'Rebuild')) diff --git a/pkgs/development/web/postman/linux.nix b/pkgs/development/web/postman/linux.nix index 763337fd25384..64f5deb1b48ff 100644 --- a/pkgs/development/web/postman/linux.nix +++ b/pkgs/development/web/postman/linux.nix @@ -2,7 +2,7 @@ , stdenv , fetchurl , makeDesktopItem -, wrapGAppsHook +, wrapGAppsHook3 , atk , at-spi2-atk , at-spi2-core @@ -126,7 +126,7 @@ stdenv.mkDerivation rec { xorg.libxshmfence ]; - nativeBuildInputs = [ wrapGAppsHook copyDesktopItems ]; + nativeBuildInputs = [ wrapGAppsHook3 copyDesktopItems ]; installPhase = '' runHook preInstall diff --git a/pkgs/development/web/publii/default.nix b/pkgs/development/web/publii/default.nix index e09e21f174a71..9792f2686454e 100644 --- a/pkgs/development/web/publii/default.nix +++ b/pkgs/development/web/publii/default.nix @@ -3,7 +3,7 @@ , fetchurl , autoPatchelfHook , makeShellWrapper -, wrapGAppsHook +, wrapGAppsHook3 , alsa-lib , at-spi2-atk , at-spi2-core @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoPatchelfHook makeShellWrapper - wrapGAppsHook + wrapGAppsHook3 ]; buildInputs = [ |