2023-03-24 00:07:29 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gfortran
|
|
|
|
, cmake
|
|
|
|
, test-drive
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "toml-f";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.4.2";
|
2023-03-24 00:07:29 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-+cac4rUNpd2w3yBdH1XoCKdJ9IgOHZioZg8AhzGY0FE=";
|
2023-03-24 00:07:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ gfortran cmake ];
|
|
|
|
|
|
|
|
buildInputs = [ test-drive ];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
# Fix the Pkg-Config files for doubled store paths
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace config/template.pc \
|
|
|
|
--replace "\''${prefix}/" ""
|
2023-03-24 00:07:29 +00:00
|
|
|
'';
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
|
|
|
];
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "TOML parser implementation for data serialization and deserialization in Fortran";
|
|
|
|
license = with licenses; [ asl20 mit ];
|
|
|
|
homepage = "https://github.com/toml-f/toml-f";
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = [ maintainers.sheepforce ];
|
|
|
|
};
|
|
|
|
}
|