Reduce Batsim closure size
Objective
Provide a lightweight Batsim image for non-Nixed (yet) users (cf. #115 (closed)).
Problem
Batsim's closure (built from CI) weights 136 Mo…
The batsim package itself is a bit heavy, but most of the weight comes from unneeded dependencies.
Code to reproduce
- Generate Batsim in store:
nix-build --arg doCoverage false -A batsim -o out
- Generate data about package sizes:
nix-store -qR out | sed -E 's/(.*)/du -bs \1/' | bash | sed -E 's/[[:space:]]+/ /g' | sed -E 'sW/nix/store([^-]*)-(.*)W\2W' > batsize.dat
- Run R with some packages:
nix-shell -p R -p rPackages.readr -p rPackages.treemap --command R
- Run this code:
library(readr)
library(treemap)
data = read_delim('./batsize.dat', ' ', col_names=c('bytes', 'package'))
png(filename="tree.png", width=1200, height=1200)
treemap(data, index="package", vSize="bytes", type="index", fontsize.labels=20)
dev.off()