Merge pull request #142772 from spease/zfp

zfp: init at 0.5.5
This commit is contained in:
Samuel Ainsworth 2022-04-11 13:47:26 -07:00 committed by GitHub
commit f443e541c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,59 @@
{ cmake, cudatoolkit, fetchFromGitHub, gfortran, lib, llvmPackages, pythonPackages, stdenv, targetPlatform
, enableCfp ? true
, enableCuda ? false
, enableExamples ? true
, enableFortran ? builtins.elem targetPlatform.system gfortran.meta.platforms
, enableOpenMP ? true
, enablePython ? true
, enableUtilities ? true }:
stdenv.mkDerivation rec {
pname = "zfp";
version = "0.5.5";
src = fetchFromGitHub {
owner = "LLNL";
repo = "zfp";
rev = version;
sha256 = "19ycflz35qsrzfcvxdyy0mgbykfghfi9y5v684jb4awjp7nf562c";
};
nativeBuildInputs = [ cmake ];
buildInputs = lib.optional enableCuda cudatoolkit
++ lib.optional enableFortran gfortran
++ lib.optional enableOpenMP llvmPackages.openmp
++ lib.optionals enablePython [ pythonPackages.cython pythonPackages.numpy pythonPackages.python ];
cmakeFlags = [
# More tests not enabled by default
''-DZFP_BINARY_DIR=${placeholder "out"}''
''-DZFP_BUILD_TESTING_LARGE=ON''
]
++ lib.optionals targetPlatform.isDarwin [
"-DCMAKE_INSTALL_BINDIR=bin"
"-DCMAKE_INSTALL_LIBDIR=lib"
]
++ lib.optional enableCfp "-DBUILD_CFP=ON"
++ lib.optional enableCuda "-DZFP_WITH_CUDA=ON"
++ lib.optional enableExamples "-DBUILD_EXAMPLES=ON"
++ lib.optional enableFortran "-DBUILD_ZFORP=ON"
++ lib.optional enableOpenMP "-DZFP_WITH_OPENMP=ON"
++ lib.optional enablePython "-DBUILD_ZFPY=ON"
++ ([ "-DBUILD_UTILITIES=${if enableUtilities then "ON" else "OFF"}" ]);
preCheck = lib.optional targetPlatform.isDarwin ''
export DYLD_LIBRARY_PATH="$out/lib:$DYLD_LIBRARY_PATH"
'';
doCheck = true;
meta = with lib; {
homepage = "https://computing.llnl.gov/projects/zfp";
description = "Library for random-access compression of floating-point arrays";
license = licenses.bsd3;
maintainers = [ maintainers.spease ];
# 64-bit only
platforms = platforms.aarch64 ++ platforms.x86_64;
};
}

View File

@ -11566,6 +11566,8 @@ with pkgs;
zerofree = callPackage ../tools/filesystems/zerofree { };
zfp = callPackage ../tools/compression/zfp {};
zfs-autobackup = callPackage ../tools/backup/zfs-autobackup { };
zfsbackup = callPackage ../tools/backup/zfsbackup { };