statically link nix binary

This commit is contained in:
Alex 2023-03-17 17:45:41 +01:00
parent 7971f795d3
commit 86f7198cb4

View file

@ -21,6 +21,13 @@
let
packageSet = pkgs.rustBuilder.makePackageSet ({
inherit packageFun rustVersion;
# Config to build static binaries
target = "x86_64-unknown-linux-musl";
codegenOpts = {
"x86_64-unknown-linux-musl" =
[ "target-feature=+crt-static" "link-arg=-static-pie" ];
};
} // args);
in
packageSet.workspace.wgautomesh {