From 81b9f04b48abaeea4f0cdde2f674770f97b2c6e8 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 26 Mar 2024 14:40:02 -0400 Subject: [PATCH] test-drive: build with meson, fix cross compilation --- pkgs/development/libraries/test-drive/default.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/test-drive/default.nix b/pkgs/development/libraries/test-drive/default.nix index b858f39498c2..639582c3b8ae 100644 --- a/pkgs/development/libraries/test-drive/default.nix +++ b/pkgs/development/libraries/test-drive/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, gfortran, cmake }: +{ stdenv, lib, fetchFromGitHub, gfortran, meson, ninja, mesonEmulatorHook }: stdenv.mkDerivation rec { pname = "test-drive"; @@ -11,21 +11,18 @@ stdenv.mkDerivation rec { hash = "sha256-ObAnHFP1Hp0knf/jtGHynVF0CCqK47eqetePx4NLmlM="; }; - postPatch = '' - substituteInPlace config/template.pc \ - --replace 'libdir=''${prefix}/@CMAKE_INSTALL_LIBDIR@' "libdir=@CMAKE_INSTALL_LIBDIR@" \ - --replace 'includedir=''${prefix}/@CMAKE_INSTALL_INCLUDEDIR@' "includedir=@CMAKE_INSTALL_INCLUDEDIR@" - ''; - nativeBuildInputs = [ gfortran - cmake + meson + ninja + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; meta = with lib; { description = "Procedural Fortran testing framework"; homepage = "https://github.com/fortran-lang/test-drive"; - license = with licenses; [ asl20 mit ] ; + license = with licenses; [ asl20 mit ]; platforms = platforms.linux; maintainers = [ maintainers.sheepforce ]; };