aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-03-17 17:45:41 +0100
committerAlex Auvolat <alex@adnab.me>2023-03-17 17:45:41 +0100
commit86f7198cb4ef6d9076e89bfc6c7f4c7f5cc9f8ee (patch)
treebd483c4e90eeaf24f07ad838836966e588327616
parent7971f795d31467f693596d582aa85e5065434736 (diff)
downloadwgautomesh-86f7198cb4ef6d9076e89bfc6c7f4c7f5cc9f8ee.tar.gz
wgautomesh-86f7198cb4ef6d9076e89bfc6c7f4c7f5cc9f8ee.zip
statically link nix binaryv0.1.0
-rw-r--r--flake.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 9c402bc..49ef08f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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 {