From 19e7f777db7db02a96835ea9b2df830ede103729 Mon Sep 17 00:00:00 2001 From: Kiskae Date: Sat, 2 Nov 2024 16:14:20 +0100 Subject: [PATCH] composefs: disable static+shared library building --- pkgs/by-name/co/composefs/package.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/co/composefs/package.nix b/pkgs/by-name/co/composefs/package.nix index e4580110c2e1..6d9e0eb45321 100644 --- a/pkgs/by-name/co/composefs/package.nix +++ b/pkgs/by-name/co/composefs/package.nix @@ -35,10 +35,18 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; outputs = [ "out" "lib" "dev" ]; - postPatch = lib.optionalString installExperimentalTools '' - substituteInPlace tools/meson.build \ - --replace-fail "install : false" "install : true" - ''; + postPatch = + # 'both_libraries' as an install target always builds both versions. + # This results in double disk usage for normal builds and broken static builds, + # so we replace it with the regular library target. + '' + substituteInPlace libcomposefs/meson.build \ + --replace-fail "both_libraries" "library" + '' + + lib.optionalString installExperimentalTools '' + substituteInPlace tools/meson.build \ + --replace-fail "install : false" "install : true" + ''; nativeBuildInputs = [ meson ninja go-md2man pkg-config ]; buildInputs = [ openssl ]