diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-02-14 09:53:03 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-02-14 09:53:03 +0000 |
commit | 200610b849c0aeb174a63e7526b7376aa8a339bf (patch) | |
tree | f57988f969df0344ef355473653daf0939a0d402 /pkgs/development | |
parent | fa169bb239d7b2d860af851573569182ee5e0127 (diff) | |
parent | 46cc80cc78abdacca55f036a4f0341b96d660255 (diff) | |
download | nixpkgs-200610b849c0aeb174a63e7526b7376aa8a339bf.tar nixpkgs-200610b849c0aeb174a63e7526b7376aa8a339bf.tar.gz nixpkgs-200610b849c0aeb174a63e7526b7376aa8a339bf.tar.bz2 nixpkgs-200610b849c0aeb174a63e7526b7376aa8a339bf.tar.lz nixpkgs-200610b849c0aeb174a63e7526b7376aa8a339bf.tar.xz nixpkgs-200610b849c0aeb174a63e7526b7376aa8a339bf.tar.zst nixpkgs-200610b849c0aeb174a63e7526b7376aa8a339bf.zip |
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts: pkgs/development/libraries/gtest/default.nix pkgs/development/libraries/hidapi/default.nix
Diffstat (limited to 'pkgs/development')
32 files changed, 386 insertions, 179 deletions
diff --git a/pkgs/development/beam-modules/fetch-mix-deps.nix b/pkgs/development/beam-modules/fetch-mix-deps.nix index ac6d5f3c8b9..2bba3a93c29 100644 --- a/pkgs/development/beam-modules/fetch-mix-deps.nix +++ b/pkgs/development/beam-modules/fetch-mix-deps.nix @@ -45,7 +45,7 @@ stdenvNoCC.mkDerivation (attrs // { installPhase = attrs.installPhase or '' runHook preInstall - mix deps.get --only ${mixEnv} + mix deps.get ''${mixEnv:+--only $mixEnv} find "$TEMPDIR/deps" -path '*/.git/*' -a ! -name HEAD -exec rm -rf {} + cp -r --no-preserve=mode,ownership,timestamps $TEMPDIR/deps $out runHook postInstall diff --git a/pkgs/development/libraries/arrow-cpp/default.nix b/pkgs/development/libraries/arrow-cpp/default.nix index 76e117e57ce..4bebd827145 100644 --- a/pkgs/development/libraries/arrow-cpp/default.nix +++ b/pkgs/development/libraries/arrow-cpp/default.nix @@ -262,7 +262,7 @@ stdenv.mkDerivation rec { description = "A cross-language development platform for in-memory data"; homepage = "https://arrow.apache.org/docs/cpp/"; license = licenses.asl20; - broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; # waiting on gtest changes in staging + broken = stdenv.isLinux && stdenv.isAarch64; # waiting on gtest changes in staging platforms = platforms.unix; maintainers = with maintainers; [ tobim veprbl cpcloud ]; }; diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index dceada0f7f8..d0374c74901 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -266,6 +266,10 @@ , MediaToolbox , VideoDecodeAcceleration , VideoToolbox +/* + * Testing + */ +, testers }: /* Maintainer notes: @@ -321,13 +325,13 @@ assert buildAvformat -> buildAvcodec && buildAvutil; # configure flag since 0.6 assert buildPostproc -> buildAvutil; assert buildSwscale -> buildAvutil; -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "ffmpeg" + (if ffmpegVariant == "small" then "" else "-${ffmpegVariant}"); inherit version; src = fetchgit { url = "https://git.ffmpeg.org/ffmpeg.git"; - rev = "n${version}"; + rev = "n${finalAttrs.version}"; inherit sha256; }; @@ -522,7 +526,7 @@ stdenv.mkDerivation rec { # outputs where we don't want them. Patch the generated config.h to remove all # such references except for data. postConfigure = let - toStrip = lib.remove "data" outputs; # We want to keep references to the data dir. + toStrip = lib.remove "data" finalAttrs.outputs; # We want to keep references to the data dir. in "remove-references-to ${lib.concatStringsSep " " (map (o: "-t ${placeholder o}") toStrip)} config.h"; @@ -656,6 +660,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = with lib; { description = "A complete, cross-platform solution to record, convert and stream audio and video"; homepage = "https://www.ffmpeg.org/"; @@ -671,7 +677,8 @@ stdenv.mkDerivation rec { ++ optional withGPL gpl2Plus ++ optional withGPLv3 gpl3Plus ++ optional withUnfree unfreeRedistributable; + pkgConfigModules = [ "libavutil" ]; platforms = platforms.all; maintainers = with maintainers; [ atemu ]; }; -} +}) diff --git a/pkgs/development/libraries/gtest/default.nix b/pkgs/development/libraries/gtest/default.nix index d4815c7aedc..80013e3613d 100644 --- a/pkgs/development/libraries/gtest/default.nix +++ b/pkgs/development/libraries/gtest/default.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, cmake, ninja, fetchFromGitHub }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, ninja +, static ? stdenv.hostPlatform.isStatic, +}: stdenv.mkDerivation rec { pname = "gtest"; @@ -20,7 +26,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ninja ]; cmakeFlags = [ - "-DBUILD_SHARED_LIBS=ON" + "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" ] ++ lib.optionals ( (stdenv.cc.isGNU && (lib.versionOlder stdenv.cc.version "11.0")) || (stdenv.cc.isClang && (lib.versionOlder stdenv.cc.version "16.0")) diff --git a/pkgs/development/libraries/hidapi/default.nix b/pkgs/development/libraries/hidapi/default.nix index 2a6483d77b2..89cff8ef427 100644 --- a/pkgs/development/libraries/hidapi/default.nix +++ b/pkgs/development/libraries/hidapi/default.nix @@ -7,16 +7,17 @@ , udev , Cocoa , IOKit +, testers }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "hidapi"; version = "0.13.1"; src = fetchFromGitHub { owner = "libusb"; repo = "hidapi"; - rev = "${pname}-${version}"; + rev = "${finalAttrs.pname}-${finalAttrs.version}"; sha256 = "sha256-CEZP5n8qEAzsqn8dz3u1nG0YoT7J1P+WfN7urkRTuVg="; }; @@ -28,12 +29,20 @@ stdenv.mkDerivation rec { propagatedBuildInputs = lib.optionals stdenv.isDarwin [ Cocoa IOKit ]; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = with lib; { description = "Library for communicating with USB and Bluetooth HID devices"; homepage = "https://github.com/libusb/hidapi"; maintainers = with maintainers; [ prusnak ]; # You can choose between GPLv3, BSD or HIDAPI license (even more liberal) license = with licenses; [ bsd3 /* or */ gpl3Only ] ; + pkgConfigModules = lib.optionals stdenv.isDarwin [ + "hidapi" + ] ++ lib.optionals stdenv.isLinux [ + "hidapi-hidraw" + "hidapi-libusb" + ]; platforms = platforms.unix; }; -} +}) diff --git a/pkgs/development/libraries/icu/63.nix b/pkgs/development/libraries/icu/63.nix index 19838763f5b..a83e2cd5f5e 100644 --- a/pkgs/development/libraries/icu/63.nix +++ b/pkgs/development/libraries/icu/63.nix @@ -1,4 +1,6 @@ -{ stdenv, lib, fetchurl, fetchpatch, fixDarwinDylibNames, nativeBuildRoot, buildRootOnly ? false }: +{ stdenv, lib, fetchurl, fetchpatch, fixDarwinDylibNames, nativeBuildRoot, testers +, buildRootOnly ? false +}: import ./base.nix { version = "63.1"; @@ -11,4 +13,4 @@ import ./base.nix { }) ]; patchFlags = [ "-p3" ]; -} { inherit stdenv lib fetchurl fixDarwinDylibNames nativeBuildRoot buildRootOnly; } +} { inherit stdenv lib fetchurl fixDarwinDylibNames nativeBuildRoot testers buildRootOnly; } diff --git a/pkgs/development/libraries/icu/base.nix b/pkgs/development/libraries/icu/base.nix index a714e758bd8..c5e46fa4530 100644 --- a/pkgs/development/libraries/icu/base.nix +++ b/pkgs/development/libraries/icu/base.nix @@ -2,6 +2,7 @@ { stdenv, lib, fetchurl, fixDarwinDylibNames # Cross-compiled icu4c requires a build-root of a native compile , buildRootOnly ? false, nativeBuildRoot +, testers }: let @@ -45,6 +46,11 @@ let description = "Unicode and globalization support library"; homepage = "https://icu.unicode.org/"; maintainers = with maintainers; [ raskin ]; + pkgConfigModules = [ + "icu-i18n" + "icu-io" + "icu-uc" + ]; platforms = platforms.all; }; }; @@ -97,4 +103,6 @@ let then buildRootOnlyAttrs else realAttrs; in -stdenv.mkDerivation attrs +stdenv.mkDerivation (finalAttrs: attrs // { + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; +}) diff --git a/pkgs/development/libraries/imlib2/default.nix b/pkgs/development/libraries/imlib2/default.nix index 66092f43650..02707c750c0 100644 --- a/pkgs/development/libraries/imlib2/default.nix +++ b/pkgs/development/libraries/imlib2/default.nix @@ -21,17 +21,18 @@ , fluxbox , enlightenment , xorg +, testers }: let inherit (lib) optional optionals; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "imlib2"; version = "1.9.1"; src = fetchurl { - url = "mirror://sourceforge/enlightenment/${pname}-${version}.tar.xz"; + url = "mirror://sourceforge/enlightenment/${finalAttrs.pname}-${finalAttrs.version}.tar.xz"; hash = "sha256-SiJAOL//vl1NJQxE4F9O5a4k3P74OVsWd8cVxY92TUM="; }; @@ -69,6 +70,8 @@ stdenv.mkDerivation rec { enlightenment; }; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = with lib; { description = "Image manipulation library"; @@ -83,7 +86,8 @@ stdenv.mkDerivation rec { homepage = "https://docs.enlightenment.org/api/imlib2/html"; changelog = "https://git.enlightenment.org/legacy/imlib2.git/plain/ChangeLog?h=v${version}"; license = licenses.imlib2; + pkgConfigModules = [ "imlib2" ]; platforms = platforms.unix; maintainers = with maintainers; [ spwhitt ]; }; -} +}) diff --git a/pkgs/development/libraries/libb2/default.nix b/pkgs/development/libraries/libb2/default.nix index a461f5039aa..9e507188aad 100644 --- a/pkgs/development/libraries/libb2/default.nix +++ b/pkgs/development/libraries/libb2/default.nix @@ -4,16 +4,17 @@ , autoreconfHook , libtool , pkg-config +, testers }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libb2"; version = "0.98.1"; src = fetchFromGitHub { owner = "BLAKE2"; repo = "libb2"; - rev = "refs/tags/v${version}"; + rev = "refs/tags/v${finalAttrs.version}"; sha256 = "0qj8aaqvfcavj1vj5asm4pqm03ap7q8x4c2fy83cqggvky0frgya"; }; @@ -29,11 +30,14 @@ stdenv.mkDerivation rec { doCheck = true; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = with lib; { description = "The BLAKE2 family of cryptographic hash functions"; homepage = "https://blake2.net/"; + pkgConfigModules = [ "libb2" ]; platforms = platforms.all; maintainers = with maintainers; [ dfoxfranke dotlambda ]; license = licenses.cc0; }; -} +}) diff --git a/pkgs/development/libraries/liburing/default.nix b/pkgs/development/libraries/liburing/default.nix index c95ea31b3bf..7a5fa8a34a1 100644 --- a/pkgs/development/libraries/liburing/default.nix +++ b/pkgs/development/libraries/liburing/default.nix @@ -4,12 +4,12 @@ stdenv.mkDerivation rec { pname = "liburing"; - version = "2.2"; + version = "2.3"; src = fetchgit { url = "http://git.kernel.dk/${pname}"; rev = "liburing-${version}"; - sha256 = "sha256-M/jfxZ+5DmFvlAt8sbXrjBTPf2gLd9UyTNymtjD+55g"; + sha256 = "sha256-vN6lLb5kpgHTKDxwibJPS61sdelILETVtJE2BYgp79k="; }; separateDebugInfo = true; diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 488613fd489..75ffe5ae06a 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -10,6 +10,7 @@ # path to openssl.cnf file. will be placed in $etc/etc/ssl/openssl.cnf to replace the default , conf ? null , removeReferencesTo +, testers }: # Note: this package is used for bootstrapping fetchurl, and thus @@ -19,12 +20,12 @@ let common = { version, sha256, patches ? [], withDocs ? false, extraMeta ? {} }: - stdenv.mkDerivation rec { + stdenv.mkDerivation (finalAttrs: { pname = "openssl"; inherit version; src = fetchurl { - url = "https://www.openssl.org/source/${pname}-${version}.tar.gz"; + url = "https://www.openssl.org/source/${finalAttrs.pname}-${version}.tar.gz"; inherit sha256; }; @@ -204,13 +205,20 @@ let fi ''; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = with lib; { homepage = "https://www.openssl.org/"; description = "A cryptographic library that implements the SSL and TLS protocols"; license = licenses.openssl; + pkgConfigModules = [ + "libcrypto" + "libssl" + "openssl" + ]; platforms = platforms.all; } // extraMeta; - }; + }); in { diff --git a/pkgs/development/libraries/science/math/liblapack/default.nix b/pkgs/development/libraries/science/math/liblapack/default.nix index b9563346ada..3bf16057f83 100644 --- a/pkgs/development/libraries/science/math/liblapack/default.nix +++ b/pkgs/development/libraries/science/math/liblapack/default.nix @@ -6,16 +6,17 @@ , shared ? true # Compile with ILP64 interface , blas64 ? false +, testers }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "liblapack"; version = "3.11"; src = fetchFromGitHub { owner = "Reference-LAPACK"; repo = "lapack"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-AYD78u70y8cY19hmM/aDjQEzxO8u9lPWhCFxRe5cqXI="; }; @@ -40,7 +41,7 @@ stdenv.mkDerivation rec { postInstall = let canonicalExtension = if stdenv.hostPlatform.isLinux - then "${stdenv.hostPlatform.extensions.sharedLibrary}.${lib.versions.major version}" + then "${stdenv.hostPlatform.extensions.sharedLibrary}.${lib.versions.major finalAttrs.version}" else stdenv.hostPlatform.extensions.sharedLibrary; in lib.optionalString blas64 '' ln -s $out/lib/liblapack64${canonicalExtension} $out/lib/liblapack${canonicalExtension} @@ -65,15 +66,18 @@ stdenv.mkDerivation rec { checkPhase = '' runHook preCheck - ctest ${ctestArgs} + ctest ${finalAttrs.ctestArgs} runHook postCheck ''; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = with lib; { description = "Linear Algebra PACKage"; homepage = "http://www.netlib.org/lapack/"; maintainers = with maintainers; [ markuskowa ]; license = licenses.bsd3; + pkgConfigModules = [ "lapack" ]; platforms = platforms.all; }; -} +}) diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index 99ee89edcac..fdefeb86a04 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -64,6 +64,7 @@ , enableGeoLocation ? true , withLibsecret ? true , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd +, testers }: stdenv.mkDerivation (finalAttrs: { @@ -232,10 +233,17 @@ stdenv.mkDerivation (finalAttrs: { requiredSystemFeatures = [ "big-parallel" ]; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = with lib; { description = "Web content rendering engine, GTK port"; homepage = "https://webkitgtk.org/"; license = licenses.bsd2; + pkgConfigModules = [ + "javascriptcoregtk-4.0" + "webkit2gtk-4.0" + "webkit2gtk-web-extension-4.0" + ]; platforms = platforms.linux ++ platforms.darwin; maintainers = teams.gnome.members; broken = stdenv.isDarwin; diff --git a/pkgs/development/libraries/xgboost/default.nix b/pkgs/development/libraries/xgboost/default.nix index bf2825b5967..4370a27012d 100644 --- a/pkgs/development/libraries/xgboost/default.nix +++ b/pkgs/development/libraries/xgboost/default.nix @@ -1,69 +1,110 @@ -{ config -, stdenv -, lib -, fetchFromGitHub -, cmake -, gtest -, doCheck ? true -, cudaSupport ? config.cudaSupport or false -, ncclSupport ? false -, cudaPackages -, llvmPackages -}: +{ config, stdenv, lib, fetchFromGitHub, cmake, gtest, doCheck ? true +, cudaSupport ? config.cudaSupport or false, ncclSupport ? false +, rLibrary ? false, cudaPackages, llvmPackages, R, rPackages }: assert ncclSupport -> cudaSupport; +# Disable regular tests when building the R package +# because 1) the R package runs its own tests and +# 2) the R package creates a different binary shared +# object that isn't compatible with the regular CLI +# tests. +assert rLibrary -> doCheck != true; stdenv.mkDerivation rec { - pname = "xgboost"; + pnameBase = "xgboost"; + # prefix with r when building the R library + # The R package build results in a special xgboost.so file + # that contains a subset of the .so file use for the CLI + # and python version. In general, the CRAN version from + # nixpkgs's r-modules should be used, but this non-standard + # build allows for enabling CUDA and NCCL support which aren't + # included in the CRAN release. Build with: + # nix-build -E "with (import $NIXPKGS{}); \ + # let \ + # xgb = xgboost.override{rLibrary = true; doCheck = false;}; \ + # in \ + # rWrapper.override{ packages = [ xgb ]; }" + pname = lib.optionalString rLibrary "r-" + pnameBase; version = "1.7.3"; src = fetchFromGitHub { owner = "dmlc"; - repo = pname; + repo = pnameBase; rev = "v${version}"; fetchSubmodules = true; hash = "sha256-unTss2byytG8KUQfg5s34YpRuHHDLo7D/ZickHhz1AE="; }; - nativeBuildInputs = [ - cmake - ] ++ lib.optionals stdenv.isDarwin [ - llvmPackages.openmp - ] ++ lib.optionals cudaSupport [ - cudaPackages.autoAddOpenGLRunpathHook - ]; + nativeBuildInputs = [ cmake ] + ++ lib.optionals stdenv.isDarwin [ llvmPackages.openmp ] + ++ lib.optionals cudaSupport [ cudaPackages.autoAddOpenGLRunpathHook ] + ++ lib.optionals rLibrary [ R ]; buildInputs = [ gtest ] ++ lib.optional cudaSupport cudaPackages.cudatoolkit - ++ lib.optional ncclSupport cudaPackages.nccl; + ++ lib.optional ncclSupport cudaPackages.nccl; + + propagatedBuildInputs = lib.optionals rLibrary [ + rPackages.data_table + rPackages.jsonlite + rPackages.Matrix + ]; cmakeFlags = lib.optionals doCheck [ "-DGOOGLE_TEST=ON" ] - ++ lib.optionals cudaSupport [ "-DUSE_CUDA=ON" "-DCUDA_HOST_COMPILER=${cudaPackages.cudatoolkit.cc}/bin/cc" ] - ++ lib.optionals (cudaSupport && lib.versionAtLeast cudaPackages.cudatoolkit.version "11.4.0") [ "-DBUILD_WITH_CUDA_CUB=ON" ] - ++ lib.optionals ncclSupport [ "-DUSE_NCCL=ON" ]; + ++ lib.optionals cudaSupport [ + "-DUSE_CUDA=ON" + "-DCUDA_HOST_COMPILER=${cudaPackages.cudatoolkit.cc}/bin/cc" + ] ++ lib.optionals (cudaSupport + && lib.versionAtLeast cudaPackages.cudatoolkit.version "11.4.0") + [ "-DBUILD_WITH_CUDA_CUB=ON" ] + ++ lib.optionals ncclSupport [ "-DUSE_NCCL=ON" ] + ++ lib.optionals rLibrary [ "-DR_LIB=ON" ]; + + preConfigure = lib.optionals rLibrary '' + substituteInPlace cmake/RPackageInstall.cmake.in --replace "CMD INSTALL" "CMD INSTALL -l $out/library" + export R_LIBS_SITE="$R_LIBS_SITE''${R_LIBS_SITE:+:}$out/library" + ''; inherit doCheck; # By default, cmake build will run ctests with all checks enabled # If we're building with cuda, we run ctest manually so that we can skip the GPU tests checkPhase = lib.optionalString cudaSupport '' - ctest --force-new-ctest-process ${lib.optionalString cudaSupport "-E TestXGBoostLib"} + ctest --force-new-ctest-process ${ + lib.optionalString cudaSupport "-E TestXGBoostLib" + } ''; - installPhase = let - libname = "libxgboost${stdenv.hostPlatform.extensions.sharedLibrary}"; - in '' - runHook preInstall - mkdir -p $out - cp -r ../include $out - cp -r ../dmlc-core/include/dmlc $out/include - cp -r ../rabit/include/rabit $out/include - install -Dm755 ../lib/${libname} $out/lib/${libname} - install -Dm755 ../xgboost $out/bin/xgboost - runHook postInstall + installPhase = + let libname = "libxgboost${stdenv.hostPlatform.extensions.sharedLibrary}"; + in '' + runHook preInstall + mkdir -p $out + cp -r ../include $out + cp -r ../dmlc-core/include/dmlc $out/include + cp -r ../rabit/include/rabit $out/include + '' + lib.optionalString (!rLibrary) '' + install -Dm755 ../lib/${libname} $out/lib/${libname} + install -Dm755 ../xgboost $out/bin/xgboost + '' + # the R library option builds a completely different binary xgboost.so instead of + # libxgboost.so, which isn't full featured for python and CLI + + lib.optionalString rLibrary '' + mkdir $out/library + export R_LIBS_SITE="$out/library:$R_LIBS_SITE''${R_LIBS_SITE:+:}" + make install -l $out/library + '' + '' + runHook postInstall + ''; + + postFixup = lib.optionalString rLibrary '' + if test -e $out/nix-support/propagated-build-inputs; then + ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages + fi ''; meta = with lib; { - description = "Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library"; + description = + "Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library"; homepage = "https://github.com/dmlc/xgboost"; license = licenses.asl20; platforms = platforms.unix; diff --git a/pkgs/development/python-modules/aio-geojson-generic-client/default.nix b/pkgs/development/python-modules/aio-geojson-generic-client/default.nix index 9a302f5af08..56e5f8475cb 100644 --- a/pkgs/development/python-modules/aio-geojson-generic-client/default.nix +++ b/pkgs/development/python-modules/aio-geojson-generic-client/default.nix @@ -1,7 +1,6 @@ { lib , aiohttp , aresponses -, asynctest , buildPythonPackage , aio-geojson-client , fetchFromGitHub @@ -33,7 +32,6 @@ buildPythonPackage rec { nativeCheckInputs = [ aresponses - asynctest pytest-asyncio pytestCheckHook ]; diff --git a/pkgs/development/python-modules/aio-geojson-usgs-earthquakes/default.nix b/pkgs/development/python-modules/aio-geojson-usgs-earthquakes/default.nix index 728a666447d..1cb11258393 100644 --- a/pkgs/development/python-modules/aio-geojson-usgs-earthquakes/default.nix +++ b/pkgs/development/python-modules/aio-geojson-usgs-earthquakes/default.nix @@ -2,7 +2,6 @@ , aio-geojson-client , aiohttp , aresponses -, asynctest , buildPythonPackage , fetchFromGitHub , pytest-asyncio @@ -32,10 +31,12 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ + pytestCheckHook + ]; + + checkInputs = [ aresponses - asynctest pytest-asyncio - pytestCheckHook ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/cot/default.nix b/pkgs/development/python-modules/cot/default.nix index 9b7914e5b9c..ed40735a206 100644 --- a/pkgs/development/python-modules/cot/default.nix +++ b/pkgs/development/python-modules/cot/default.nix @@ -66,6 +66,10 @@ buildPythonPackage rec { "TestVMDKConversion" # CLI test fails with AssertionError "test_help" + # Failing TestCOTDeployESXi tests + "test_serial_fixup_stubbed" + "test_serial_fixup_stubbed_create" + "test_serial_fixup_stubbed_vm_not_found" ] ++ lib.optionals stdenv.isDarwin [ "test_serial_fixup_invalid_host" ]; diff --git a/pkgs/development/python-modules/hangups/default.nix b/pkgs/development/python-modules/hangups/default.nix deleted file mode 100644 index aa61baa1b48..00000000000 --- a/pkgs/development/python-modules/hangups/default.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ lib -, buildPythonPackage -, pythonOlder -, fetchFromGitHub -, configargparse -, aiohttp -, async-timeout -, appdirs -, readlike -, requests -, reparser -, protobuf -, urwid -, mechanicalsoup -, httpretty -, pytestCheckHook -}: - -buildPythonPackage rec { - pname = "hangups"; - version = "0.4.18"; - - disabled = pythonOlder "3.6"; - - src = fetchFromGitHub { - owner = "tdryer"; - repo = "hangups"; - rev = "v${version}"; - hash = "sha256-vq1OrOUPMQtezBFlisP2f/bvvYprDjhOuwUcT8rmIvw="; - }; - - postPatch = '' - substituteInPlace setup.py \ - --replace "protobuf>=3.1.0,<4" "protobuf" \ - --replace "MechanicalSoup>=0.6.0,<0.13" "MechanicalSoup" - ''; - - propagatedBuildInputs = [ - configargparse - aiohttp - async-timeout - appdirs - readlike - requests - reparser - protobuf - urwid - mechanicalsoup - ]; - - nativeCheckInputs = [ - httpretty - pytestCheckHook - ]; - - pythonImportsCheck = [ - "hangups" - "hangups.client" - "hangups.event" - "hangups.parsers" - "hangups.user" - ]; - - meta = with lib; { - description = "The first third-party instant messaging client for Google Hangouts"; - homepage = "https://github.com/tdryer/hangups"; - license = licenses.mit; - maintainers = with maintainers; [ dotlambda ]; - }; -} diff --git a/pkgs/development/python-modules/mox3/default.nix b/pkgs/development/python-modules/mox3/default.nix index 3aa8b02dc10..2cdfd2c0c74 100644 --- a/pkgs/development/python-modules/mox3/default.nix +++ b/pkgs/development/python-modules/mox3/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , fetchPypi , pythonOlder +, pythonAtLeast , subunit , testrepository , testtools @@ -13,7 +14,7 @@ buildPythonPackage rec { pname = "mox3"; version = "1.1.0"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.6" || pythonAtLeast "3.11"; src = fetchPypi { inherit pname version; diff --git a/pkgs/development/python-modules/nipy/default.nix b/pkgs/development/python-modules/nipy/default.nix index d5e399701dc..9f600bdf86a 100644 --- a/pkgs/development/python-modules/nipy/default.nix +++ b/pkgs/development/python-modules/nipy/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , fetchPypi , pythonOlder +, cython , nose , matplotlib , nibabel @@ -21,9 +22,14 @@ buildPythonPackage rec { sha256 = "a8a2c97ce854fece4aced5a6394b9fdca5846150ad6d2a36b86590924af3c848"; }; + nativeBuildInputs = [ cython ]; buildInputs = lib.optionals doCheck [ nose ]; propagatedBuildInputs = [ matplotlib nibabel numpy scipy sympy ]; + preBuild = '' + make recythonize + ''; + checkPhase = '' # wants to be run in a different directory mkdir nosetests cd nosetests diff --git a/pkgs/development/python-modules/onnx/default.nix b/pkgs/development/python-modules/onnx/default.nix index b21f343db32..e3cd5bb0923 100644 --- a/pkgs/development/python-modules/onnx/default.nix +++ b/pkgs/development/python-modules/onnx/default.nix @@ -1,35 +1,42 @@ { lib , buildPythonPackage +, python3 , bash , cmake -, fetchPypi +, fetchFromGitHub +, gtest , isPy27 , nbval , numpy , protobuf +, pybind11 , pytestCheckHook , six , tabulate , typing-extensions , pythonRelaxDepsHook -, pytest-runner }: -buildPythonPackage rec { +let + gtestStatic = gtest.override { static = true; }; +in buildPythonPackage rec { pname = "onnx"; version = "1.13.0"; format = "setuptools"; disabled = isPy27; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-QQs5lQNnhX+XtlCTaB/iSVouI9Y3d6is6vlsVqFtFm4="; + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "refs/tags/v${version}"; + sha256 = "sha256-D8POBAkZVr0O5i4qsSuYRkDfL8WsDTqzgNACmmkFwGs="; }; nativeBuildInputs = [ cmake pythonRelaxDepsHook + pybind11 ]; pythonRelaxDeps = [ "protobuf" ]; @@ -44,30 +51,36 @@ buildPythonPackage rec { nativeCheckInputs = [ nbval pytestCheckHook - pytest-runner tabulate ]; postPatch = '' chmod +x tools/protoc-gen-mypy.sh.in patchShebangs tools/protoc-gen-mypy.sh.in + + substituteInPlace setup.py \ + --replace 'setup_requires.append("pytest-runner")' "" + + # prevent from fetching & building own gtest + substituteInPlace CMakeLists.txt \ + --replace 'include(googletest)' "" + substituteInPlace cmake/unittest.cmake \ + --replace 'googletest)' ')' ''; - # Set CMAKE_INSTALL_LIBDIR to lib explicitly, because otherwise it gets set - # to lib64 and cmake incorrectly looks for the protobuf library in lib64 preConfigure = '' + # Set CMAKE_INSTALL_LIBDIR to lib explicitly, because otherwise it gets set + # to lib64 and cmake incorrectly looks for the protobuf library in lib64 export CMAKE_ARGS="-DCMAKE_INSTALL_LIBDIR=lib -DONNX_USE_PROTOBUF_SHARED_LIBS=ON" + '' + lib.optionalString doCheck '' + export CMAKE_ARGS+=" -Dgoogletest_STATIC_LIBRARIES=${gtestStatic}/lib/libgtest.a -Dgoogletest_INCLUDE_DIRS=${lib.getDev gtestStatic}/include" + export ONNX_BUILD_TESTS=1 ''; preBuild = '' export MAX_JOBS=$NIX_BUILD_CORES ''; - disabledTestPaths = [ - # Unexpected output fields from running code: {'stderr'} - "onnx/examples/np_array_tensorproto.ipynb" - ]; - # The executables are just utility scripts that aren't too important postInstall = '' rm -r $out/bin @@ -76,6 +89,35 @@ buildPythonPackage rec { # The setup.py does all the configuration dontUseCmakeConfigure = true; + doCheck = true; + preCheck = '' + export HOME=$(mktemp -d) + + # detecting source dir as a python package confuses pytest + mv onnx/__init__.py onnx/__init__.py.hidden + ''; + pytestFlagsArray = [ "onnx/test" "onnx/examples" ]; + disabledTests = [ + # attempts to fetch data from web + "test_bvlc_alexnet_cpu" + "test_densenet121_cpu" + "test_inception_v1_cpu" + "test_inception_v2_cpu" + "test_resnet50_cpu" + "test_shufflenet_cpu" + "test_squeezenet_cpu" + "test_vgg19_cpu" + "test_zfnet512_cpu" + ]; + disabledTestPaths = [ + # Unexpected output fields from running code: {'stderr'} + "onnx/examples/np_array_tensorproto.ipynb" + ]; + postCheck = '' + # run "cpp" tests + .setuptools-cmake-build/onnx_gtests + ''; + pythonImportsCheck = [ "onnx" ]; diff --git a/pkgs/development/python-modules/pefile/default.nix b/pkgs/development/python-modules/pefile/default.nix index b1707670e76..55bd8c0cc07 100644 --- a/pkgs/development/python-modules/pefile/default.nix +++ b/pkgs/development/python-modules/pefile/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "pefile"; - version = "2022.5.30"; + version = "2023.2.7"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -16,8 +16,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "erocarrera"; repo = pname; - rev = "v${version}"; - hash = "sha256-Cv20hJsErHFSuS5Q1kqLNp4DAsPXv/eFhaU9oYECSeI="; + rev = "refs/tags/v${version}"; + hash = "sha256-lD8GpNl+cVNYTZUKFRF1/2kDwEbn/ekRBNBTYuFmFW0="; }; nativeBuildInputs = [ @@ -38,6 +38,7 @@ buildPythonPackage rec { meta = with lib; { description = "Multi-platform Python module to parse and work with Portable Executable (aka PE) files"; homepage = "https://github.com/erocarrera/pefile"; + changelog = "https://github.com/erocarrera/pefile/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ pamplemousse ]; }; diff --git a/pkgs/development/python-modules/python-mpv-jsonipc/default.nix b/pkgs/development/python-modules/python-mpv-jsonipc/default.nix index 8c43d7a4ca2..ade6acd85d4 100644 --- a/pkgs/development/python-modules/python-mpv-jsonipc/default.nix +++ b/pkgs/development/python-modules/python-mpv-jsonipc/default.nix @@ -3,14 +3,14 @@ buildPythonPackage rec { pname = "python-mpv-jsonipc"; - version = "1.1.11"; + version = "1.1.14"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "iwalton3"; repo = "python-mpv-jsonipc"; rev = "v${version}"; - sha256 = "034vc2j54dciiq80k7jn6kx4g7i58sjk0ykma039k5rihj2rblpk"; + sha256 = "sha256-kOC6FsLYTVx/cCL8AZuGkKarHqAESjJA+2BUagbiy3A="; }; # 'mpv-jsonipc' does not have any tests diff --git a/pkgs/development/python-modules/python-utils/default.nix b/pkgs/development/python-modules/python-utils/default.nix index 5a5ac9f772a..ac69e15ec77 100644 --- a/pkgs/development/python-modules/python-utils/default.nix +++ b/pkgs/development/python-modules/python-utils/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchFromGitHub , loguru @@ -10,7 +11,7 @@ buildPythonPackage rec { pname = "python-utils"; - version = "3.4.5"; + version = "3.5.2"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -19,7 +20,7 @@ buildPythonPackage rec { owner = "WoLpH"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-O/+jvdzzxUFaQdAfUM9p40fPPDNN+stTauCD993HH6Y="; + hash = "sha256-FFBWkq7ct4JWSTH4Ldg+pbG/BAiW33puB7lqFPBjptw="; }; postPatch = '' @@ -47,6 +48,11 @@ buildPythonPackage rec { "_python_utils_tests" ]; + disabledTests = lib.optionals stdenv.isDarwin [ + # Flaky tests on darwin + "test_timeout_generator" + ]; + meta = with lib; { description = "Module with some convenient utilities"; homepage = "https://github.com/WoLpH/python-utils"; diff --git a/pkgs/development/python-modules/validobj/default.nix b/pkgs/development/python-modules/validobj/default.nix index ee3ff3fb395..b50cd5eb831 100644 --- a/pkgs/development/python-modules/validobj/default.nix +++ b/pkgs/development/python-modules/validobj/default.nix @@ -1,6 +1,5 @@ { lib , buildPythonPackage -, pythonAtLeast , fetchPypi , flit , hypothesis @@ -9,15 +8,12 @@ buildPythonPackage rec { pname = "validobj"; - version = "0.6"; + version = "0.7"; format = "pyproject"; - # https://github.com/Zaharid/validobj/issues/8 - disabled = pythonAtLeast "3.11"; - src = fetchPypi { inherit pname version; - sha256 = "sha256-BvnHn0Erk87Ce3tYwYf0tBwRJMrG19Af/Y568VJ02uo="; + sha256 = "cbij55HZKVLO3MLoDTtFT2YYNVZwbNaYEk+35gIcGdo="; }; nativeBuildInputs = [ flit ]; diff --git a/pkgs/development/python-modules/versioningit/default.nix b/pkgs/development/python-modules/versioningit/default.nix index 480b72e2e5d..74a29ae175e 100644 --- a/pkgs/development/python-modules/versioningit/default.nix +++ b/pkgs/development/python-modules/versioningit/default.nix @@ -16,14 +16,14 @@ buildPythonPackage rec { pname = "versioningit"; - version = "2.1.0"; + version = "2.2.0"; format = "pyproject"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-c/KWXjDS6/1/+ra/JjaPIjdXBiLdKknH+8GZXenGdtY="; + hash = "sha256-6xjnunJoqIC/HM/pLlNOlqs04Dl/KNy8s/wNpPaltr0="; }; postPatch = '' diff --git a/pkgs/development/tools/language-servers/lua-language-server/default.nix b/pkgs/development/tools/language-servers/lua-language-server/default.nix index d260e7601e2..04b5fd6e1e0 100644 --- a/pkgs/development/tools/language-servers/lua-language-server/default.nix +++ b/pkgs/development/tools/language-servers/lua-language-server/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "lua-language-server"; - version = "3.6.10"; + version = "3.6.11"; src = fetchFromGitHub { owner = "luals"; repo = "lua-language-server"; rev = version; - sha256 = "sha256-QnkWEf1Uv+CZwEyv1b3WMPvaOZEn+mKH5w3CPyw02CQ="; + sha256 = "sha256-NMybClvpTLad7xnd8uPhUHmv6fvaYIKkFHsv7SSDi2M="; fetchSubmodules = true; }; @@ -77,6 +77,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A language server that offers Lua language support"; homepage = "https://github.com/luals/lua-language-server"; + changelog = "https://github.com/LuaLS/lua-language-server/blob/${version}/changelog.md"; license = licenses.mit; maintainers = with maintainers; [ figsoda sei40kr ]; platforms = platforms.linux ++ platforms.darwin; diff --git a/pkgs/development/tools/rust/cargo-semver-checks/default.nix b/pkgs/development/tools/rust/cargo-semver-checks/default.nix index 359f5dbe64d..1f26f23e15c 100644 --- a/pkgs/development/tools/rust/cargo-semver-checks/default.nix +++ b/pkgs/development/tools/rust/cargo-semver-checks/default.nix @@ -10,16 +10,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-semver-checks"; - version = "0.17.1"; + version = "0.18.0"; src = fetchFromGitHub { owner = "obi1kenobi"; repo = pname; rev = "v${version}"; - sha256 = "sha256-zObflf9BKq24km54LW7It4Lvff0OKYNDb02uatdX7g4="; + sha256 = "sha256-ugcmsm1j2a1wOnUe9u70yoRXALCmtXSnb80N4B4IUWE="; }; - cargoSha256 = "sha256-itL6WpM4OLn4mzdB0ytM2J7F1fRDrXwCaI/8WdLo6y0="; + cargoSha256 = "sha256-PxnPCevjVvmFMlmYv6qwIBZk2MThz65hgUyVhm2tzlc="; nativeBuildInputs = [ pkg-config ]; @@ -29,9 +29,9 @@ rustPlatform.buildRustPackage rec { checkFlags = [ # requires nightly version of cargo-rustdoc - "--skip=dump::tests" "--skip=query::tests" "--skip=verify_binary_contains_lints" + "--skip=rustdoc_cmd::tests" ]; # use system openssl diff --git a/pkgs/development/tools/squawk/correct-Cargo.lock.patch b/pkgs/development/tools/squawk/correct-Cargo.lock.patch new file mode 100644 index 00000000000..431f004d2d7 --- /dev/null +++ b/pkgs/development/tools/squawk/correct-Cargo.lock.patch @@ -0,0 +1,13 @@ +diff --git a/Cargo.lock b/Cargo.lock +index d5803a8..384224d 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -1585,7 +1585,7 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + + [[package]] + name = "squawk" +-version = "0.19.0" ++version = "0.20.0" + dependencies = [ + "atty", + "base64 0.12.3", diff --git a/pkgs/development/tools/squawk/default.nix b/pkgs/development/tools/squawk/default.nix new file mode 100644 index 00000000000..9649625c173 --- /dev/null +++ b/pkgs/development/tools/squawk/default.nix @@ -0,0 +1,67 @@ +{ darwin +, fetchFromGitHub +, lib +, libiconv +, libpg_query +, openssl +, pkg-config +, rustPlatform +, stdenv +}: +let + # The query parser produces a slightly different AST between major versions + # and Squawk is not capable of handling >=14 correctly yet. + libpg_query13 = libpg_query.overrideAttrs (_: rec { + version = "13-2.2.0"; + src = fetchFromGitHub { + owner = "pganalyze"; + repo = "libpg_query"; + rev = version; + hash = "sha256-gEkcv/j8ySUYmM9lx1hRF/SmuQMYVHwZAIYOaCQWAFs="; + }; + }); +in +rustPlatform.buildRustPackage rec { + pname = "squawk"; + version = "0.20.0"; + + src = fetchFromGitHub { + owner = "sbdchd"; + repo = pname; + rev = "v${version}"; + hash = "sha256-v9F+HfscX4dIExIP1YvxOldZPPtmxh8lO3SREu6M+C0="; + }; + + cargoHash = "sha256-kSaQxqom8LSCOQBoIZ1iv+q2+Ih8l61L97xXv5c4a0k="; + + cargoPatches = [ + ./correct-Cargo.lock.patch + ]; + + patches = [ + ./fix-postgresql-version-in-snapshot-test.patch + ]; + + nativeBuildInputs = [ + pkg-config + rustPlatform.bindgenHook + ]; + + buildInputs = lib.optionals (!stdenv.isDarwin) [ + libiconv + openssl + ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + CoreFoundation + Security + ]); + + LIBPG_QUERY_PATH = libpg_query13; + + meta = with lib; { + description = "Linter for PostgreSQL, focused on migrations"; + homepage = "https://squawkhq.com/"; + changelog = "https://github.com/sbdchd/squawk/blob/v${version}/CHANGELOG.md"; + license = licenses.gpl3Only; + maintainers = with lib.maintainers; [ andrewsmith ]; + }; +} diff --git a/pkgs/development/tools/squawk/fix-postgresql-version-in-snapshot-test.patch b/pkgs/development/tools/squawk/fix-postgresql-version-in-snapshot-test.patch new file mode 100644 index 00000000000..205fd3dba97 --- /dev/null +++ b/pkgs/development/tools/squawk/fix-postgresql-version-in-snapshot-test.patch @@ -0,0 +1,13 @@ +diff --git a/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_query_json.snap b/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_query_json.snap +index 7273b74..ae94927 100644 +--- a/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_query_json.snap ++++ b/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_query_json.snap +@@ -133,7 +133,7 @@ Ok( + }), + ]), + "version": Number( +- 130003, ++ 130008, + ), + }), + ) diff --git a/pkgs/development/tools/wgo/default.nix b/pkgs/development/tools/wgo/default.nix new file mode 100644 index 00000000000..3440c0f947e --- /dev/null +++ b/pkgs/development/tools/wgo/default.nix @@ -0,0 +1,27 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "wgo"; + version = "0.5.1"; + + src = fetchFromGitHub { + owner = "bokwoon95"; + repo = "wgo"; + rev = "v${version}"; + hash = "sha256-kfa3Lm2oJomhoHbtSPLylRr+BFGV/y7xqSIv3xHHg3Q="; + }; + + vendorSha256 = "sha256-jxyO3MGrC+y/jJuwur/+tLIsbxGnT57ZXYzaf1lCv7A="; + + ldflags = [ "-s" "-w" ]; + + subPackages = [ "." ]; + + meta = with lib; { + description = "Live reload for Go apps"; + homepage = "https://github.com/bokwoon95/wgo"; + license = licenses.mit; + maintainers = with maintainers; [ bokwoon95 ]; + }; +} + |