chore: Nix: build thin static libraries

Less disk churn and .o files are automatically included in binary cache pushes
This commit is contained in:
Sebastian Ullrich 2020-11-20 23:07:21 +01:00
parent 3439cc80b3
commit 31876691dc

View file

@ -101,7 +101,7 @@ in
objects = mapAttrs compileMod mods;
staticLib = runCommand "${name}-lib" { buildInputs = [ stdenv.cc.bintools.bintools ]; } ''
mkdir $out
ar rcs $out/lib${name}.a ${lib.concatStringsSep " " (map (drv: "${drv}/out.o") (attrValues objects))}
ar Trcs $out/lib${name}.a ${lib.concatStringsSep " " (map (drv: "${drv}/out.o") (attrValues objects))}
'';
lean-package = writeScriptBin "lean" ''