From 760faab4ec0a8527f94cb3b0b1c02bec4f520c05 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 26 Mar 2024 14:43:06 -0400 Subject: [PATCH] toml-f: build with meson, expand platforms to all linux --- pkgs/development/libraries/toml-f/default.nix | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/toml-f/default.nix b/pkgs/development/libraries/toml-f/default.nix index 28fb3dadce48..e24ceec58c07 100644 --- a/pkgs/development/libraries/toml-f/default.nix +++ b/pkgs/development/libraries/toml-f/default.nix @@ -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 ]; }; }