diff options
author | Evils <evils.devils@protonmail.com> | 2023-07-11 10:01:16 +0200 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2023-09-03 19:34:30 +0200 |
commit | 29bf6c5ca536288b5692157199f28ddab9f4a352 (patch) | |
tree | 56a1473a0f1292ec051e944e505eeaf16bb7562d /pkgs/applications/science/electronics/kicad | |
parent | d204d5581324b56ddae5691ad15cdba3a98ae7d0 (diff) |
kicad.libraries.packages3d: use stepreduce & stepZ
this makes it buildable by hydra stepreduce brings down closure size from 5.4G to 3.3G zip brings it down from 3.3G to 1.6G (or 5.4G to 1.9G without reduce) xz compressed NAR sizes are: plain: 373M gzip: 712M zip: 712M stepreduce: 262M stepreduce & gzip: 465M stepreduce & zip: 468M
Diffstat (limited to 'pkgs/applications/science/electronics/kicad')
-rw-r--r-- | pkgs/applications/science/electronics/kicad/libraries.nix | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/pkgs/applications/science/electronics/kicad/libraries.nix b/pkgs/applications/science/electronics/kicad/libraries.nix index 9591cbc31c392..327f77d1c42fa 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 |