diff --git a/pkgs/applications/science/electronics/kicad/libraries.nix b/pkgs/applications/science/electronics/kicad/libraries.nix index 9591cbc31c39..327f77d1c42f 100644 --- a/pkgs/applications/science/electronics/kicad/libraries.nix +++ b/pkgs/applications/science/electronics/kicad/libraries.nix @@ -2,6 +2,9 @@ , cmake , gettext , libSrc +, stepreduce +, parallel +, zip }: let mkLib = name: @@ -11,14 +14,20 @@ let src = libSrc name; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake ] + ++ lib.optionals (name == "packages3d") [ + stepreduce + parallel + zip + ]; + + postInstall = lib.optional (name == "packages3d") '' + find $out -type f -name '*.step' | parallel 'stepreduce {} {} && zip -9 {.}.stpZ {} && rm {}' + ''; meta = rec { license = lib.licenses.cc-by-sa-40; platforms = lib.platforms.all; - # the 3d models are a ~1 GiB download and occupy ~5 GiB in store. - # this would exceed the hydra output limit - hydraPlatforms = if (name == "packages3d") then [ ] else platforms; }; }; in