diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-22 15:01:47 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-22 16:57:59 +0000 |
commit | 633cab0ecb07627706c6b523e219490f019eaab5 (patch) | |
tree | 4fb472bdfe2723037dad53dc1b8a87c939015f5e /nixpkgs/pkgs/development/libraries/science | |
parent | ffb691c199e7e0cbc4e45e5310779c9e3f7c2a73 (diff) | |
parent | 432fc2d9a67f92e05438dff5fdc2b39d33f77997 (diff) | |
download | nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.gz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.bz2 nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.lz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.xz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.zst nixlib-633cab0ecb07627706c6b523e219490f019eaab5.zip |
Merge commit '432fc2d9a67f92e05438dff5fdc2b39d33f77997'
# Conflicts: # nixpkgs/pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix # nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix # nixpkgs/pkgs/applications/window-managers/sway/default.nix # nixpkgs/pkgs/build-support/rust/default.nix # nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/science')
15 files changed, 171 insertions, 71 deletions
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/default.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/default.nix index f7966046fa87..7a9a5a80700f 100644 --- a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/default.nix +++ b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/default.nix @@ -15,13 +15,13 @@ stdenv.mkDerivation rec { pname = "indilib"; - version = "1.8.9"; + version = "1.9.0"; src = fetchFromGitHub { owner = "indilib"; repo = "indi"; rev = "v${version}"; - sha256 = "sha256-W6LfrKL56K1B6srEfbNcq1MZwg7Oj8qoJkQ83ZhYhFs="; + sha256 = "sha256-YdVBzhz+Gim27/Js5MhEJNukoXp5eK9/dZ+JQVyls0M="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix index 34ef40887135..5909a06cfb59 100644 --- a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix +++ b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix @@ -1,6 +1,5 @@ { stdenv , lib -, fetchFromGitHub , cmake , cfitsio , libusb1 @@ -18,39 +17,54 @@ , libdc1394 , gpsd , ffmpeg +, version +, src +, withFirmware ? false +, firmware ? null }: stdenv.mkDerivation rec { pname = "indi-3rdparty"; - version = "1.8.9"; - src = fetchFromGitHub { - owner = "indilib"; - repo = pname; - rev = "v${version}"; - sha256 = "0klvknhp7l6y2ab4vyv4jq7znk1gjl5b3709kyplm7dsh4b8bppy"; - }; + inherit version src; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ + indilib libnova curl cfitsio libusb1 zlib boost gsl gpsd + libjpeg libgphoto2 libraw libftdi1 libdc1394 ffmpeg fftw + ] ++ lib.optionals withFirmware [ + firmware + ]; + + postPatch = '' + for f in indi-qsi/CMakeLists.txt \ + indi-dsi/CMakeLists.txt \ + indi-armadillo-platypus/CMakeLists.txt + do + substituteInPlace $f \ + --replace "/lib/udev/rules.d" "lib/udev/rules.d" \ + --replace "/etc/udev/rules.d" "lib/udev/rules.d" \ + --replace "/lib/firmware" "lib/firmware" + done + ''; cmakeFlags = [ - "-DINDI_DATA_DIR=\${CMAKE_INSTALL_PREFIX}/share/indi" + "-DINDI_DATA_DIR=share/indi" "-DCMAKE_INSTALL_LIBDIR=lib" "-DUDEVRULES_INSTALL_DIR=lib/udev/rules.d" "-DRULES_INSTALL_DIR=lib/udev/rules.d" + # Pentax, Atik, and SX cmakelists are currently broken + "-DWITH_PENTAX=off" + "-DWITH_ATIK=off" "-DWITH_SX=off" - "-DWITH_SBIG=off" + ] ++ lib.optionals (!withFirmware) [ "-DWITH_APOGEE=off" - "-DWITH_FISHCAMP=off" "-DWITH_DSI=off" "-DWITH_QHY=off" "-DWITH_ARMADILLO=off" - "-DWITH_PENTAX=off" - ]; - - nativeBuildInputs = [ cmake ]; - - buildInputs = [ - indilib libnova curl cfitsio libusb1 zlib boost gsl gpsd - libjpeg libgphoto2 libraw libftdi1 libdc1394 ffmpeg fftw + "-DWITH_FISHCAMP=off" + "-DWITH_SBIG=off" ]; meta = with lib; { diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-firmware.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-firmware.nix new file mode 100644 index 000000000000..d23673ac37ae --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-firmware.nix @@ -0,0 +1,66 @@ +{ stdenv +, lib +, cmake +, cfitsio +, libusb1 +, zlib +, boost +, libnova +, curl +, libjpeg +, gsl +, fftw +, indilib +, libgphoto2 +, libraw +, libftdi1 +, libdc1394 +, gpsd +, ffmpeg +, version +, src +}: + +stdenv.mkDerivation rec { + pname = "indi-firmware"; + + inherit version src; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ + indilib libnova curl cfitsio libusb1 zlib boost gsl gpsd + libjpeg libgphoto2 libraw libftdi1 libdc1394 ffmpeg fftw + ]; + + cmakeFlags = [ + "-DINDI_DATA_DIR=\${CMAKE_INSTALL_PREFIX}/share/indi" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DUDEVRULES_INSTALL_DIR=lib/udev/rules.d" + "-DRULES_INSTALL_DIR=lib/udev/rules.d" + "-DFIRMWARE_INSTALL_DIR=\${CMAKE_INSTALL_PREFIX}/lib/firmware" + "-DCONF_DIR=etc" + "-DBUILD_LIBS=1" + "-DWITH_PENTAX=off" + ]; + + postPatch = '' + for f in libfishcamp/CMakeLists.txt libsbig/CMakeLists.txt + do + substituteInPlace $f --replace "/lib/firmware" "lib/firmware" + done + ''; + + postFixup = '' + rm $out/lib/udev/rules.d/99-fli.rules + ''; + + meta = with lib; { + homepage = "https://www.indilib.org/"; + description = "Third party firmware for the INDI astronomical software suite"; + changelog = "https://github.com/indilib/indi-3rdparty/releases/tag/v${version}"; + license = licenses.lgpl2Plus; + maintainers = with maintainers; [ hjones2199 ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-full.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-full.nix index e52da9f2eab1..50aa9fb8b4ac 100644 --- a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-full.nix +++ b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-full.nix @@ -1,11 +1,30 @@ -{ callPackage, indilib, indi-3rdparty }: +{ stdenv, lib, callPackage, fetchFromGitHub, indilib }: let - indi-with-drivers = ./indi-with-drivers.nix; + indi-version = "1.9.0"; + indi-3rdparty-src = fetchFromGitHub { + owner = "indilib"; + repo = "indi-3rdparty"; + rev = "v${indi-version}"; + sha256 = "sha256-5VR1MN52a0ZtaHYw4lD6LWmnvc1oHlfE5GLGbfBKvqE="; + }; + indi-firmware = callPackage ./indi-firmware.nix { + version = indi-version; + src = indi-3rdparty-src; + }; + indi-3rdparty = callPackage ./indi-3rdparty.nix { + version = indi-version; + src = indi-3rdparty-src; + withFirmware = stdenv.isx86_64; + firmware = indi-firmware; + }; in -callPackage indi-with-drivers { - pkgName = "indi-full"; +callPackage ./indi-with-drivers.nix { + pname = "indi-full"; + version = indi-version; extraDrivers = [ indi-3rdparty + ] ++ lib.optionals stdenv.isx86_64 [ + indi-firmware ]; } diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-with-drivers.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-with-drivers.nix index 27ac86ddbadf..5ec1acdf21e9 100644 --- a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-with-drivers.nix +++ b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-with-drivers.nix @@ -1,7 +1,7 @@ -{ buildEnv, indilib ? indilib, extraDrivers ? null , pkgName ? "indi-with-drivers" }: +{ buildEnv, indilib ? indilib, pname ? "indi-with-drivers", version ? null, extraDrivers ? null }: buildEnv { - name = pkgName; + name = "${pname}-${version}"; paths = [ indilib ] diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix index f55c72bd2095..c3a63c637c34 100644 --- a/nixpkgs/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix +++ b/nixpkgs/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix @@ -25,6 +25,6 @@ mkDerivation rec { description = "Astrometric plate solving library"; license = licenses.gpl3Plus; maintainers = with maintainers; [ hjones2199 ]; - platforms = [ "x86_64-linux" ]; + platforms = platforms.linux; }; } diff --git a/nixpkgs/pkgs/development/libraries/science/benchmark/papi/default.nix b/nixpkgs/pkgs/development/libraries/science/benchmark/papi/default.nix index c265f24c182b..d4610d60415b 100644 --- a/nixpkgs/pkgs/development/libraries/science/benchmark/papi/default.nix +++ b/nixpkgs/pkgs/development/libraries/science/benchmark/papi/default.nix @@ -2,19 +2,17 @@ , fetchurl }: -stdenv.mkDerivation { - version = "5.6.0"; +stdenv.mkDerivation rec { + version = "6.0.0.1"; pname = "papi"; src = fetchurl { - url = "https://bitbucket.org/icl/papi/get/papi-5-6-0-t.tar.gz"; - sha256 = "13mngf9kl0y2wfxqvkad0smdaag7k8fvw82b4312gx62nwhc1i6r"; + url = "https://bitbucket.org/icl/papi/get/papi-${lib.replaceStrings ["."] ["-"] version}-t.tar.gz"; + sha256 = "1jd67yadyffzxwsqlylsi0bx8ishb0cgj2ziz1wdslaz6ylvyf9j"; }; - NIX_CFLAGS_COMPILE = "-Wno-error=format-truncation"; - - preConfigure = '' - cd src + setSourceRoot = '' + sourceRoot=$(echo */src) ''; doCheck = true; @@ -22,9 +20,9 @@ stdenv.mkDerivation { meta = with lib; { homepage = "https://icl.utk.edu/papi/"; - description = "PAPI provides the tool designer and application engineer with a consistent interface and methodology for use of the performance counter hardware found in most major microprocessors"; + description = "Library providing access to various hardware performance counters"; license = licenses.bsdOriginal; platforms = platforms.linux; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc zhaofengli ]; }; } diff --git a/nixpkgs/pkgs/development/libraries/science/math/arpack/default.nix b/nixpkgs/pkgs/development/libraries/science/math/arpack/default.nix index 23e44bf28b06..a26a3bb6d8d9 100644 --- a/nixpkgs/pkgs/development/libraries/science/math/arpack/default.nix +++ b/nixpkgs/pkgs/development/libraries/science/math/arpack/default.nix @@ -46,6 +46,10 @@ stdenv.mkDerivation rec { export OMP_NUM_THREADS=2 ''; + postFixup = lib.optionalString stdenv.isDarwin '' + install_name_tool -change libblas.dylib ${blas}/lib/libblas.dylib $out/lib/libarpack.dylib + ''; + meta = { homepage = "https://github.com/opencollab/arpack-ng"; description = '' diff --git a/nixpkgs/pkgs/development/libraries/science/math/cudnn/default.nix b/nixpkgs/pkgs/development/libraries/science/math/cudnn/default.nix index d4c7fcac9785..d2a5a8c2a790 100644 --- a/nixpkgs/pkgs/development/libraries/science/math/cudnn/default.nix +++ b/nixpkgs/pkgs/development/libraries/science/math/cudnn/default.nix @@ -30,12 +30,12 @@ in rec { cudnn_cudatoolkit_10 = cudnn_cudatoolkit_10_2; cudnn_cudatoolkit_11_0 = generic rec { - version = "8.1.0"; + version = "8.1.1"; cudatoolkit = cudatoolkit_11_0; # 8.1.0 is compatible with CUDA 11.0, 11.1, and 11.2: # https://docs.nvidia.com/deeplearning/cudnn/support-matrix/index.html#cudnn-cuda-hardware-versions - srcName = "cudnn-11.2-linux-x64-v8.1.0.77.tgz"; - sha256 = "sha256-2+gvrwcdkbqbzwBIAUatM/RiSC3+5WyvRHnBuNq+Pss="; + srcName = "cudnn-11.2-linux-x64-v8.1.1.33.tgz"; + hash = "sha256-mKh4TpKGLyABjSDCgbMNSgzZUfk2lPZDPM9K6cUCumo="; }; cudnn_cudatoolkit_11_1 = cudnn_cudatoolkit_11_0.override { diff --git a/nixpkgs/pkgs/development/libraries/science/math/cudnn/generic.nix b/nixpkgs/pkgs/development/libraries/science/math/cudnn/generic.nix index d9c19e6790c6..f5a4fac1a908 100644 --- a/nixpkgs/pkgs/development/libraries/science/math/cudnn/generic.nix +++ b/nixpkgs/pkgs/development/libraries/science/math/cudnn/generic.nix @@ -1,8 +1,11 @@ { version , srcName -, sha256 +, hash ? null +, sha256 ? null }: +assert (hash != null) || (sha256 != null); + { stdenv , lib , cudatoolkit @@ -22,11 +25,13 @@ stdenv.mkDerivation { name = "cudatoolkit-${cudatoolkit.majorVersion}-cudnn-${version}"; inherit version; - src = fetchurl { + + src = let + hash_ = if hash != null then { inherit hash; } else { inherit sha256; }; + in fetchurl ({ # URL from NVIDIA docker containers: https://gitlab.com/nvidia/cuda/blob/centos7/7.0/runtime/cudnn4/Dockerfile url = "https://developer.download.nvidia.com/compute/redist/cudnn/v${version}/${srcName}"; - inherit sha256; - }; + } // hash_); nativeBuildInputs = [ addOpenGLRunpath ]; diff --git a/nixpkgs/pkgs/development/libraries/science/math/libtorch/bin.nix b/nixpkgs/pkgs/development/libraries/science/math/libtorch/bin.nix index 481836a4e115..87b5835aa9ef 100644 --- a/nixpkgs/pkgs/development/libraries/science/math/libtorch/bin.nix +++ b/nixpkgs/pkgs/development/libraries/science/math/libtorch/bin.nix @@ -18,7 +18,7 @@ let # this derivation. However, we should ensure on version bumps # that the CUDA toolkit for `passthru.tests` is still # up-to-date. - version = "1.8.0"; + version = "1.8.1"; device = if cudaSupport then "cuda" else "cpu"; srcs = import ./binary-hashes.nix version; unavailable = throw "libtorch is not available for this platform"; diff --git a/nixpkgs/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix b/nixpkgs/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix index 208e0b7adab8..ec4522a75592 100644 --- a/nixpkgs/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix +++ b/nixpkgs/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix @@ -1,14 +1,14 @@ version: { x86_64-darwin-cpu = { url = "https://download.pytorch.org/libtorch/cpu/libtorch-macos-${version}.zip"; - hash = "sha256-V1lbztMB09wyWjdiJrwVwJ00DT8Kihy/TC2cKmdBLIE="; + hash = "sha256-FYgnd5zlycjCYnP5bZcjpMdGYXrRERwhFFBYo/SJgzs="; }; x86_64-linux-cpu = { url = "https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-${version}%2Bcpu.zip"; - hash = "sha256-xBaNyI7eiQnSArHMITonrQQLZnZCZK/SWKOTWnxzdpc="; + hash = "sha256-xneCcVrY25Whgbs/kPbwdS1Lc0e6RxsDRpA5lHTZigc="; }; x86_64-linux-cuda = { url = "https://download.pytorch.org/libtorch/cu111/libtorch-cxx11-abi-shared-with-deps-${version}%2Bcu111.zip"; - hash = "sha256-uQ7ptOuzowJ0JSPIvJHyNotBfpsqAnxpMDLq7Vl6L00="; + hash = "sha256-VW+TW00nD49GBztCyxHE4dTyy81aN/kfYE3hKQOIm50="; }; } diff --git a/nixpkgs/pkgs/development/libraries/science/math/libtorch/test/default.nix b/nixpkgs/pkgs/development/libraries/science/math/libtorch/test/default.nix index 60f9b5ad8846..eaea649d4340 100644 --- a/nixpkgs/pkgs/development/libraries/science/math/libtorch/test/default.nix +++ b/nixpkgs/pkgs/development/libraries/science/math/libtorch/test/default.nix @@ -42,8 +42,9 @@ in stdenv.mkDerivation { touch $out ''; - checkPhase = '' + checkPhase = lib.optionalString cudaSupport '' LD_LIBRARY_PATH=${cudaStub}''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \ - ./test + '' + '' + ./test ''; } diff --git a/nixpkgs/pkgs/development/libraries/science/math/openblas/default.nix b/nixpkgs/pkgs/development/libraries/science/math/openblas/default.nix index c66e4ba44ef9..f464a755f6e4 100644 --- a/nixpkgs/pkgs/development/libraries/science/math/openblas/default.nix +++ b/nixpkgs/pkgs/development/libraries/science/math/openblas/default.nix @@ -15,6 +15,8 @@ # Select a specific optimization target (other than the default) # See https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt , target ? null +# Select whether DYNAMIC_ARCH is enabled or not. +, dynamicArch ? null , enableStatic ? stdenv.hostPlatform.isStatic , enableShared ? !stdenv.hostPlatform.isStatic }: @@ -25,27 +27,28 @@ let blas64_ = blas64; in let setTarget = x: if target == null then x else target; + setDynamicArch = x: if dynamicArch == null then x else dynamicArch; # To add support for a new platform, add an element to this set. configs = { armv6l-linux = { BINARY = 32; TARGET = setTarget "ARMV6"; - DYNAMIC_ARCH = false; + DYNAMIC_ARCH = setDynamicArch false; USE_OPENMP = true; }; armv7l-linux = { BINARY = 32; TARGET = setTarget "ARMV7"; - DYNAMIC_ARCH = false; + DYNAMIC_ARCH = setDynamicArch false; USE_OPENMP = true; }; aarch64-darwin = { BINARY = 64; TARGET = setTarget "VORTEX"; - DYNAMIC_ARCH = true; + DYNAMIC_ARCH = setDynamicArch true; USE_OPENMP = false; MACOSX_DEPLOYMENT_TARGET = "11.0"; }; @@ -53,21 +56,21 @@ let aarch64-linux = { BINARY = 64; TARGET = setTarget "ARMV8"; - DYNAMIC_ARCH = true; + DYNAMIC_ARCH = setDynamicArch true; USE_OPENMP = true; }; i686-linux = { BINARY = 32; TARGET = setTarget "P2"; - DYNAMIC_ARCH = true; + DYNAMIC_ARCH = setDynamicArch true; USE_OPENMP = true; }; x86_64-darwin = { BINARY = 64; TARGET = setTarget "ATHLON"; - DYNAMIC_ARCH = true; + DYNAMIC_ARCH = setDynamicArch true; USE_OPENMP = false; MACOSX_DEPLOYMENT_TARGET = "10.7"; }; @@ -75,14 +78,14 @@ let x86_64-linux = { BINARY = 64; TARGET = setTarget "ATHLON"; - DYNAMIC_ARCH = true; + DYNAMIC_ARCH = setDynamicArch true; USE_OPENMP = !stdenv.hostPlatform.isMusl; }; powerpc64le-linux = { BINARY = 64; TARGET = setTarget "POWER5"; - DYNAMIC_ARCH = true; + DYNAMIC_ARCH = setDynamicArch true; USE_OPENMP = !stdenv.hostPlatform.isMusl; }; }; diff --git a/nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix b/nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix index 2b6eb5705cd9..741c6f4898b6 100644 --- a/nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix +++ b/nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchFromGitHub -, fetchpatch , cmake , abseil-cpp , bzip2 @@ -17,25 +16,16 @@ stdenv.mkDerivation rec { pname = "or-tools"; - version = "8.1"; + version = "9.0"; disabled = python.pythonOlder "3.6"; # not supported upstream src = fetchFromGitHub { owner = "google"; repo = "or-tools"; rev = "v${version}"; - sha256 = "1zqgvkaw5vf2d8pwsa34g9jysbpiwplzxc8jyy8kdbzmj8ax3gpg"; + sha256 = "0yihrsg8wj4b82xwg1hbn97my8zqd7xhw7dk7wm2axsyvqd6m3b3"; }; - patches = [ - # This patch (on master as of Feb 11, 2021) fixes or-tools failing to respect - # USE_SCIP=OFF and then failing to find scip/scip.h - (fetchpatch { - url = "https://github.com/google/or-tools/commit/17321869832b5adaccd9864e7e5576122730a5d5.patch"; - sha256 = "0bi2z1hqlpdm1if3xa5dzc2zv0qlm5xi2x979brx10f8k779ghn0"; - }) - ]; - # The original build system uses cmake which does things like pull # in dependencies through git and Makefile creation time. We # obviously don't want to do this so instead we provide the |