@@ -3,6 +3,8 @@
33, writeShellScript, runCommand, which
44, rustPlatform, jq, nix-prefetch-git, xe, curl, emscripten
55, callPackage
6+, enableShared ? true
7+, enableStatic ? false
68}:
79
810# TODO: move to carnix or https://github.com/kolloch/crate2nix
@@ -69,8 +71,9 @@ in rustPlatform.buildRustPackage {
6971 '';
7072
7173 postInstall = ''
72− export PREFIX=$out
73− make install
74+ PREFIX=$out make install
75+ ${lib.optionalString (!enableShared) "rm $out/lib/*.so{,.*}"}
76+ ${lib.optionalString (!enableStatic) "rm $out/lib/*.a"}
7477 '';
7578
7679 # test result: FAILED. 120 passed; 13 failed; 0 ignored; 0 measured; 0 filtered out