From 9250befb66367bb67cca3101f7464d7ded05e953 Mon Sep 17 00:00:00 2001 From: Phillip Seeber Date: Thu, 11 Jan 2024 17:28:09 +0100 Subject: [PATCH] toml-f: enable shared builds on !isStatic platforms --- pkgs/development/libraries/toml-f/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/toml-f/default.nix b/pkgs/development/libraries/toml-f/default.nix index ed6fc26ee205..28fb3dadce48 100644 --- a/pkgs/development/libraries/toml-f/default.nix +++ b/pkgs/development/libraries/toml-f/default.nix @@ -21,11 +21,18 @@ stdenv.mkDerivation rec { buildInputs = [ test-drive ]; - 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; {