depot/third_party/nixpkgs/pkgs/by-name/sp/splash/package.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

56 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
gfortran,
giza,
hdf5,
cairo,
freetype,
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "splash";
version = "3.10.3";
src = fetchFromGitHub {
owner = "danieljprice";
repo = "splash";
rev = "v${finalAttrs.version}";
hash = "sha256-5ieJHUWZDGgsNj7U9tbdhtDIsN+wgbs03IxVd1xM+hw=";
};
nativeBuildInputs = [
gfortran
];
buildInputs = [
giza
cairo
freetype
hdf5
];
makeFlags = [
"SYSTEM=gfortran"
"GIZA_DIR=${giza}"
"PREFIX=${placeholder "out"}"
];
# Upstream's simplistic makefile doesn't even `mkdir $(PREFIX)`, so we help
# it:
preInstall = ''
mkdir -p $out/bin
'';
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
meta = {
description = "An interactive visualisation and plotting tool using kernel interpolation, mainly used for Smoothed Particle Hydrodynamics simulations";
inherit (finalAttrs.src.meta) homepage;
license = lib.licenses.lgpl3Plus;
maintainers = with lib.maintainers; [ doronbehar ];
platforms = lib.platforms.all;
};
})