depot/third_party/nixpkgs/pkgs/development/libraries/json-fortran/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

37 lines
852 B
Nix

{ stdenv, lib, fetchFromGitHub, gfortran, cmake }:
stdenv.mkDerivation rec {
pname = "json-fortran";
version = "8.5.2";
src = fetchFromGitHub {
owner = "jacobwilliams";
repo = pname;
rev = version;
hash = "sha256-ja/MIqAe4V5nasdtWThkRxNWCx4+twz7/dX4+8X+Bt8=";
};
nativeBuildInputs = [
cmake
gfortran
];
cmakeFlags = [
"-DUSE_GNU_INSTALL_CONVENTION=ON"
];
# Due to some misconfiguration in CMake the Fortran modules end up in $out/$out.
# Move them back to the desired location.
postInstall = ''
mv $out/$out/include $out/.
rm -r $out/nix
'';
meta = with lib; {
description = "Modern Fortran JSON API";
homepage = "https://github.com/jacobwilliams/json-fortran";
license = licenses.mit;
platforms = platforms.linux;
maintainers = [ maintainers.sheepforce ];
};
}