toml-f: build with meson, expand platforms to all linux

This commit is contained in:
Nick Cao 2024-03-26 14:43:06 -04:00
parent 81b9f04b48
commit 760faab4ec
No known key found for this signature in database

View file

@ -2,7 +2,9 @@
, lib
, fetchFromGitHub
, gfortran
, cmake
, meson
, ninja
, pkg-config
, test-drive
}:
@ -17,29 +19,19 @@ stdenv.mkDerivation rec {
hash = "sha256-+cac4rUNpd2w3yBdH1XoCKdJ9IgOHZioZg8AhzGY0FE=";
};
nativeBuildInputs = [ gfortran cmake ];
nativeBuildInputs = [ gfortran meson ninja pkg-config ];
buildInputs = [ test-drive ];
outputs = [ "out" "dev" ];
# Fix the Pkg-Config files for doubled store paths
postPatch = ''
substituteInPlace config/template.pc \
--replace "\''${prefix}/" ""
'';
cmakeFlags = [
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
];
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" ];
platforms = platforms.linux;
maintainers = [ maintainers.sheepforce ];
};
}