nixpkgs/pkgs/by-name/hd/hdf5-blosc/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

41 lines
1.0 KiB
Nix

{ lib, stdenv, c-blosc, cmake, hdf5, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "hdf5-blosc";
version = "1.0.0";
src = fetchFromGitHub {
owner = "Blosc";
repo = pname;
rev = "v${version}";
sha256 = "1nj2bm1v6ymm3fmyvhbn6ih5fgdiapavlfghh1pvbmhw71cysyqs";
};
patches = [ ./no-external-blosc.patch ];
outputs = [ "out" "dev" "plugin" ];
nativeBuildInputs = [ cmake ];
buildInputs = [ c-blosc hdf5 ];
preConfigure = ''
substituteInPlace CMakeLists.txt --replace 'set(BLOSC_INSTALL_DIR "''${CMAKE_CURRENT_BINARY_DIR}/blosc")' 'set(BLOSC_INSTALL_DIR "${c-blosc}")'
'';
cmakeFlags = [
"-DPLUGIN_INSTALL_PATH=${placeholder "plugin"}/hdf5/lib/plugin"
];
postInstall = ''
mkdir -p $out/lib/pkgconfig
substituteAll ${./blosc_filter.pc.in} $out/lib/pkgconfig/blosc_filter.pc
'';
meta = with lib; {
description = "Filter for HDF5 that uses the Blosc compressor";
homepage = "https://github.com/Blosc/hdf5-blosc";
license = licenses.mit;
maintainers = with maintainers; [ bhipple ];
};
}