diff options
Diffstat (limited to 'pkgs/development/libraries')
11 files changed, 118 insertions, 12 deletions
diff --git a/pkgs/development/libraries/amdvlk/default.nix b/pkgs/development/libraries/amdvlk/default.nix index 954628986e4..0895698378d 100644 --- a/pkgs/development/libraries/amdvlk/default.nix +++ b/pkgs/development/libraries/amdvlk/default.nix @@ -1,4 +1,5 @@ { stdenv +, callPackage , lib , fetchRepoProject , writeScript @@ -102,6 +103,8 @@ in stdenv.mkDerivation rec { setHash "$hash" ''; + passthru.impureTests = { amdvlk = callPackage ./test.nix {}; }; + meta = with lib; { description = "AMD Open Source Driver For Vulkan"; homepage = "https://github.com/GPUOpen-Drivers/AMDVLK"; diff --git a/pkgs/development/libraries/amdvlk/test.nix b/pkgs/development/libraries/amdvlk/test.nix new file mode 100644 index 00000000000..e76e6dce9ea --- /dev/null +++ b/pkgs/development/libraries/amdvlk/test.nix @@ -0,0 +1,49 @@ +{ lib, makeImpureTest, coreutils, amdvlk, vulkan-tools }: +makeImpureTest { + name = "amdvlk"; + testedPackage = "amdvlk"; + + sandboxPaths = [ "/sys" "/dev/dri" ]; + + nativeBuildInputs = [ vulkan-tools ]; + + VK_ICD_FILENAMES = "${amdvlk}/share/vulkan/icd.d/amd_icd64.json"; + XDG_RUNTIME_DIR = "/tmp"; + + # AMDVLK needs access to /dev/dri/card0 (or another card), but normally it is rw-rw---- + # Change the permissions to be rw for everyone + prepareRunCommands = '' + function reset_perms() + { + # Reset permissions to previous state + for card in /dev/dri/card*; do + sudo ${coreutils}/bin/chmod "0''${cardPerms[$card]}" $card + done + } + + # Save permissions on /dev/dri/card* + declare -A cardPerms + for card in /dev/dri/card*; do + cardPerms[$card]=$(stat -c "%a" $card) + done + + sudo ${coreutils}/bin/chmod o+rw /dev/dri/card* + trap reset_perms EXIT + ''; + + testScript = '' + # Check that there is at least one card with write-access + if ! ls -l /dev/dri/card* | cut -b8-9 | grep -q rw; then + echo 'AMDVLK needs rw access to /dev/dri/card0 or a fitting card, please run `sudo chmod o+rw /dev/dri/card*`' + exit 1 + fi + + vulkaninfo --summary + echo "Checking version" + vulkaninfo --summary | grep '= ${amdvlk.version}' + ''; + + meta = with lib.maintainers; { + maintainers = [ Flakebi ]; + }; +} diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index 3858ac7c437..fd39e0d2368 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { pname = "grpc"; - version = "1.50.0"; # N.B: if you change this, please update: + version = "1.51.0"; # N.B: if you change this, please update: # pythonPackages.grpcio-tools # pythonPackages.grpcio-status @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { owner = "grpc"; repo = "grpc"; rev = "v${version}"; - hash = "sha256-h79Ptx17tIMFpaaid4UGzbGDztee9JctfsEcetfude0="; + hash = "sha256-IOwwHwPogOtCnOAGi8JgW81JB47MlmL2vNG9g2Jg8Zo="; fetchSubmodules = true; }; diff --git a/pkgs/development/libraries/libime/default.nix b/pkgs/development/libraries/libime/default.nix index d1f14664344..1e076389a06 100644 --- a/pkgs/development/libraries/libime/default.nix +++ b/pkgs/development/libraries/libime/default.nix @@ -26,13 +26,13 @@ let in stdenv.mkDerivation rec { pname = "libime"; - version = "1.0.14"; + version = "1.0.15"; src = fetchFromGitHub { owner = "fcitx"; repo = "libime"; rev = version; - sha256 = "sha256-O89Op2dxuhGgCxuy2GLI0waCgDreJKNQ5tTvsx/0/fk="; + sha256 = "sha256-QZxXhrrSkxe7bDY7V7Ns5YZaaYJiEnGmHgGLstGMBzc="; fetchSubmodules = true; }; diff --git a/pkgs/development/libraries/qt-6/modules/qttools.nix b/pkgs/development/libraries/qt-6/modules/qttools.nix index b1cf5dd2c14..06ce64424d5 100644 --- a/pkgs/development/libraries/qt-6/modules/qttools.nix +++ b/pkgs/development/libraries/qt-6/modules/qttools.nix @@ -3,9 +3,16 @@ , lib , qtbase , qtdeclarative +, substituteAll }: qtModule { pname = "qttools"; qtInputs = [ qtbase qtdeclarative ]; + patches = [ + ../patches/qttools-paths.patch + ]; + NIX_CFLAGS_COMPILE = [ + "-DNIX_OUTPUT_DEV=\"${placeholder "dev"}\"" + ]; } diff --git a/pkgs/development/libraries/qt-6/patches/qttools-paths.patch b/pkgs/development/libraries/qt-6/patches/qttools-paths.patch new file mode 100644 index 00000000000..9a0acb70b0f --- /dev/null +++ b/pkgs/development/libraries/qt-6/patches/qttools-paths.patch @@ -0,0 +1,27 @@ +diff --git a/src/linguist/shared/runqttool.cpp b/src/linguist/shared/runqttool.cpp +index d355b9dc..94fef33f 100644 +--- a/src/linguist/shared/runqttool.cpp ++++ b/src/linguist/shared/runqttool.cpp +@@ -20,9 +20,21 @@ class FMT { + Q_DECLARE_TR_FUNCTIONS(Linguist) + }; + ++static QString qtBasePath(QLibraryInfo::LibraryPath location) ++{ ++ switch (location) { ++ case QLibraryInfo::BinariesPath: ++ return QLatin1String(NIX_OUTPUT_DEV) + QLatin1String("/bin"); ++ case QLibraryInfo::LibraryExecutablesPath: ++ return QLatin1String(NIX_OUTPUT_DEV) + QLatin1String("/libexec"); ++ default: ++ return QLibraryInfo::path(location); ++ } ++} ++ + static QString qtToolFilePath(const QString &toolName, QLibraryInfo::LibraryPath location) + { +- QString filePath = QLibraryInfo::path(location) + QLatin1Char('/') + toolName; ++ QString filePath = qtBasePath(location) + QLatin1Char('/') + toolName; + #ifdef Q_OS_WIN + filePath.append(QLatin1String(".exe")); + #endif diff --git a/pkgs/development/libraries/rocksdb/default.nix b/pkgs/development/libraries/rocksdb/default.nix index c915a3df521..f1d1afe5f06 100644 --- a/pkgs/development/libraries/rocksdb/default.nix +++ b/pkgs/development/libraries/rocksdb/default.nix @@ -11,6 +11,7 @@ , enableJemalloc ? false, jemalloc , enableLite ? false , enableShared ? !stdenv.hostPlatform.isStatic +, sse42Support ? stdenv.hostPlatform.sse4_2Support }: stdenv.mkDerivation rec { @@ -48,9 +49,7 @@ stdenv.mkDerivation rec { "-DWITH_GFLAGS=0" "-DUSE_RTTI=1" "-DROCKSDB_INSTALL_ON_WINDOWS=YES" # harmless elsewhere - (lib.optional - (stdenv.hostPlatform.isx86 && stdenv.hostPlatform.isLinux) - "-DFORCE_SSE42=1") + (lib.optional sse42Support "-DFORCE_SSE42=1") (lib.optional enableLite "-DROCKSDB_LITE=1") "-DFAIL_ON_WARNINGS=${if stdenv.hostPlatform.isMinGW then "NO" else "YES"}" ] ++ lib.optional (!enableShared) "-DROCKSDB_BUILD_SHARED=0"; diff --git a/pkgs/development/libraries/rocm-opencl-icd/default.nix b/pkgs/development/libraries/rocm-opencl-icd/default.nix index 9b0f7ab9f81..fb78c4f04dd 100644 --- a/pkgs/development/libraries/rocm-opencl-icd/default.nix +++ b/pkgs/development/libraries/rocm-opencl-icd/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, rocm-opencl-runtime }: +{ lib, callPackage, stdenv, rocm-opencl-runtime }: stdenv.mkDerivation rec { pname = "rocm-opencl-icd"; @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { echo "${rocm-opencl-runtime}/lib/libamdocl64.so" > $out/etc/OpenCL/vendors/amdocl64.icd ''; + passthru.impureTests = { rocm-opencl = callPackage ./test.nix {}; }; + meta = with lib; { description = "OpenCL ICD definition for AMD GPUs using the ROCm stack"; license = licenses.mit; diff --git a/pkgs/development/libraries/rocm-opencl-icd/test.nix b/pkgs/development/libraries/rocm-opencl-icd/test.nix new file mode 100644 index 00000000000..398a4818e7c --- /dev/null +++ b/pkgs/development/libraries/rocm-opencl-icd/test.nix @@ -0,0 +1,19 @@ +{ lib, makeImpureTest, clinfo, rocm-opencl-icd, rocm-smi }: +makeImpureTest { + name = "rocm-opencl"; + testedPackage = "rocm-opencl-icd"; + + nativeBuildInputs = [ clinfo rocm-smi ]; + + OCL_ICD_VENDORS = "${rocm-opencl-icd}/etc/OpenCL/vendors/"; + + testScript = '' + # Test fails if the number of platforms is 0 + clinfo | grep -E 'Number of platforms * [1-9]' + rocm-smi | grep -A1 GPU + ''; + + meta = with lib; { + maintainers = teams.rocm.members; + }; +} diff --git a/pkgs/development/libraries/science/astronomy/cfitsio/default.nix b/pkgs/development/libraries/science/astronomy/cfitsio/default.nix index e7e8dd04b07..8a6b72f5213 100644 --- a/pkgs/development/libraries/science/astronomy/cfitsio/default.nix +++ b/pkgs/development/libraries/science/astronomy/cfitsio/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "cfitsio"; - version = "4.1.0"; + version = "4.2.0"; src = fetchurl { url = "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-${version}.tar.gz"; - sha256 = "sha256-s2fGldKDGVjnFmkhw7NW1d+lGx7O5QW5dBa6OdG2wXo="; + sha256 = "sha256-66U9Gz9uNFYyuwmnt1LsfO09Y+xRU6hIOA84gMXWGIk="; }; buildInputs = [ bzip2 zlib ]; diff --git a/pkgs/development/libraries/xcb-imdkit/default.nix b/pkgs/development/libraries/xcb-imdkit/default.nix index b2e56c8193b..a976368243a 100644 --- a/pkgs/development/libraries/xcb-imdkit/default.nix +++ b/pkgs/development/libraries/xcb-imdkit/default.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "xcb-imdkit"; - version = "1.0.3"; + version = "1.0.4"; src = fetchFromGitHub { owner = "fcitx"; repo = "xcb-imdkit"; rev = version; - sha256 = "sha256-IPuTRSgmrnCJRgGWcE4JRaxd0sGCcHrKRnn2B1OdDMU="; + sha256 = "sha256-WSJBEB6VHRYUkzXr7frdLLpKihuS00ZUINW7e4oYOlY="; }; nativeBuildInputs = [ |