Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 65 lines 1.9 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 removeReferencesTo, 6 cppSupport ? true, 7 zlibSupport ? true, 8 zlib, 9 enableShared ? !stdenv.hostPlatform.isStatic, 10 javaSupport ? false, 11 jdk, 12}: 13 14let 15 inherit (lib) optional; 16in 17 18stdenv.mkDerivation rec { 19 version = "1.10.11"; 20 pname = "hdf5"; 21 src = fetchurl { 22 url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${lib.versions.majorMinor version}/${pname}-${version}/src/${pname}-${version}.tar.bz2"; 23 sha256 = "sha256-Cvx32lxGIXcJR1u++8qRwMtvHqYozNjDYZbPbFpN4wQ="; 24 }; 25 26 outputs = [ 27 "out" 28 "dev" 29 ]; 30 31 buildInputs = optional javaSupport jdk; 32 33 nativeBuildInputs = [ removeReferencesTo ]; 34 35 propagatedBuildInputs = optional zlibSupport zlib; 36 37 configureFlags = 38 optional enableShared "--enable-shared" 39 ++ optional javaSupport "--enable-java" 40 ++ optional cppSupport "--enable-cxx"; 41 42 patches = [ ]; 43 44 postInstall = '' 45 find "$out" -type f -exec remove-references-to -t ${stdenv.cc} '{}' + 46 moveToOutput 'bin/h5cc' "''${!outputDev}" 47 moveToOutput 'bin/h5c++' "''${!outputDev}" 48 moveToOutput 'bin/h5fc' "''${!outputDev}" 49 moveToOutput 'bin/h5pcc' "''${!outputDev}" 50 ''; 51 52 meta = { 53 description = "Data model, library, and file format for storing and managing data"; 54 longDescription = '' 55 HDF5 supports an unlimited variety of datatypes, and is designed for flexible and efficient 56 I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing 57 applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and 58 applications for managing, manipulating, viewing, and analyzing data in the HDF5 format. 59 ''; 60 license = lib.licenses.bsd3; # Lawrence Berkeley National Labs BSD 3-Clause variant 61 maintainers = with lib.maintainers; [ stephen-huan ]; 62 homepage = "https://www.hdfgroup.org/HDF5/"; 63 platforms = lib.platforms.unix; 64 }; 65}