mctc-lib: enable shared builds on !isStatic platforms

This commit is contained in:
Phillip Seeber
2024-01-12 12:32:32 +01:00
parent 94cc01284c
commit 71e47e8a23
@@ -22,11 +22,18 @@ stdenv.mkDerivation rec {
buildInputs = [ json-fortran ];
postInstall = ''
substituteInPlace $out/lib/pkgconfig/${pname}.pc \
--replace "''${prefix}/" ""
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; {