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 ]