Merge pull request #327091 from SFrijters/h5utils-cleanup

h5utils: cleanup
This commit is contained in:
Aleksana
2024-07-15 15:00:39 +08:00
committed by GitHub
3 changed files with 51 additions and 44 deletions
+51
View File
@@ -0,0 +1,51 @@
{
stdenv,
fetchurl,
lib,
hdf5,
libpng,
libjpeg,
hdf4 ? null,
libmatheval ? null,
}:
stdenv.mkDerivation (finalAttrs: {
version = "1.13.2";
pname = "h5utils";
# fetchurl is used instead of fetchFromGitHub because the git repo version requires
# additional tools to build compared to the tarball release; see the README for details.
src = fetchurl {
url = "https://github.com/stevengj/h5utils/releases/download/${finalAttrs.version}/h5utils-${finalAttrs.version}.tar.gz";
hash = "sha256-7qeFWoI1+st8RU5hEDCY5VZY2g3fS23luCqZLl8CQ1E=";
};
# libdf is an alternative name for libhdf (hdf4)
preConfigure = lib.optionalString (hdf4 != null) ''
substituteInPlace configure \
--replace "-ldf" "-lhdf" \
'';
preBuild = lib.optionalString hdf5.mpiSupport "export CC=${lib.getBin hdf5.mpi}/mpicc";
buildInputs =
[
hdf5
libjpeg
libpng
]
++ lib.optional hdf5.mpiSupport hdf5.mpi
++ lib.optional (hdf4 != null) hdf4
++ lib.optional (libmatheval != null) libmatheval;
meta = {
description = "Set of utilities for visualization and conversion of scientific data in the free, portable HDF5 format";
homepage = "https://github.com/stevengj/h5utils";
changelog = "https://github.com/NanoComp/h5utils/releases/tag/${finalAttrs.version}";
license = with lib.licenses; [
mit
gpl2Plus
];
maintainers = [ lib.maintainers.sfrijters ];
};
})
-39
View File
@@ -1,39 +0,0 @@
{ stdenv, fetchurl, lib
, hdf5, libpng, libjpeg
, hdf4 ? null
, libmatheval ? null
}:
stdenv.mkDerivation rec {
version = "1.13.2";
pname = "h5utils";
# fetchurl is used instead of fetchFromGitHub because the git repo version requires
# additional tools to build compared to the tarball release; see the README for details.
src = fetchurl {
url = "https://github.com/stevengj/h5utils/releases/download/${version}/h5utils-${version}.tar.gz";
sha256 = "sha256-7qeFWoI1+st8RU5hEDCY5VZY2g3fS23luCqZLl8CQ1E=";
};
# libdf is an alternative name for libhdf (hdf4)
preConfigure = lib.optionalString (hdf4 != null)
''
substituteInPlace configure \
--replace "-ldf" "-lhdf" \
'';
preBuild = lib.optionalString hdf5.mpiSupport "export CC=${hdf5.mpi}/bin/mpicc";
buildInputs = with lib; [ hdf5 libjpeg libpng ] ++ optional hdf5.mpiSupport hdf5.mpi
++ optional (hdf4 != null) hdf4
++ optional (libmatheval != null) libmatheval;
meta = with lib; {
description = "Set of utilities for visualization and conversion of scientific data in the free, portable HDF5 format";
homepage = "https://github.com/stevengj/h5utils";
changelog = "https://github.com/NanoComp/h5utils/releases/tag/${version}";
license = with licenses; [ mit gpl2Plus ];
maintainers = with maintainers; [ sfrijters ];
};
}
-5
View File
@@ -8709,11 +8709,6 @@ with pkgs;
h2 = callPackage ../servers/h2 { };
h5utils = callPackage ../tools/misc/h5utils {
libmatheval = null;
hdf4 = null;
};
haproxy = callPackage ../tools/networking/haproxy { };
hackertyper = callPackage ../tools/misc/hackertyper { };