tblite: build with meson

This commit is contained in:
Nick Cao 2024-03-26 15:07:29 -04:00
parent 1ba8e8ae66
commit cf7071bff3
No known key found for this signature in database

View File

@ -2,8 +2,10 @@
, lib , lib
, fetchFromGitHub , fetchFromGitHub
, fetchpatch , fetchpatch
, cmake
, gfortran , gfortran
, meson
, ninja
, pkg-config
, blas , blas
, lapack , lapack
, mctc-lib , mctc-lib
@ -35,13 +37,12 @@ stdenv.mkDerivation rec {
}) })
]; ];
# Fix the Pkg-Config files for doubled store paths nativeBuildInputs = [
postPatch = '' gfortran
substituteInPlace config/template.pc \ meson
--replace "\''${prefix}/" "" ninja
''; pkg-config
];
nativeBuildInputs = [ cmake gfortran ];
buildInputs = [ buildInputs = [
blas blas
@ -56,10 +57,6 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
];
doCheck = true; doCheck = true;
preCheck = '' preCheck = ''
export OMP_NUM_THREADS=2 export OMP_NUM_THREADS=2