justinwoo / spago2nix

Generate a derivation of (old) Spago dependencies, and use them to install them into the directory structure used by Spago.
MIT License
42 stars 22 forks source link

Use stdenvNoCC in generated output #49

Closed rycee closed 1 year ago

rycee commented 2 years ago

This reduces the build closure substantially since it no longer pulls in the entire C build environment.

For example, using build-project.nix:

With stdenv:

$ nix path-info --closure-size --human-readable $(nix-build --no-out-link -A inputDerivation build-project.nix)
…
/nix/store/v96sbzyinh0zfkk0c13i6dx3hkrlvds1-build-project-output     322.5M

With stdenvNoCC:

$ nix path-info --closure-size --human-readable $(nix-build --no-out-link -A inputDerivation build-project.nix)
…
/nix/store/9v3jldf3cnm204nw5w6szb8rvdxqhpsz-build-project-output     108.0M