depot/third_party/nixpkgs/pkgs/development/libraries/json-fortran/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

37 lines
852 B
Nix

{ stdenv, lib, fetchFromGitHub, gfortran, cmake }:
stdenv.mkDerivation rec {
pname = "json-fortran";
version = "9.0.2";
src = fetchFromGitHub {
owner = "jacobwilliams";
repo = pname;
rev = version;
hash = "sha256-mAdagehmj1s6nTDaJqwaYrirfkyIwiTWYge0ZWQBc6g=";
};
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 ];
};
}