Commit dc237ef7 authored by Phillip Seeber's avatar Phillip Seeber
Browse files

dftd4: enable shared builds on !isStatic platforms

parent 00713edc
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -27,11 +27,18 @@ stdenv.mkDerivation rec {

  buildInputs = [ blas lapack mctc-lib mstore multicharge ];

  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;
  preCheck = ''
    export OMP_NUM_THREADS=2