Commit 00713edc authored by Phillip Seeber's avatar Phillip Seeber
Browse files

mstore: enable shared builds on !isStatic platforms

parent 0138d805
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -21,11 +21,18 @@ stdenv.mkDerivation rec {

  buildInputs = [ mctc-lib ];

  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"}"
  ];

  meta = with lib; {
    description = "Molecular structure store for testing";
    license = licenses.asl20;