Build release as a static binary
This commit is contained in:
parent
5fa89593ae
commit
ce80c5e23b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
/target
|
||||
.cargo
|
||||
/result
|
||||
|
11
flake.nix
11
flake.nix
@ -25,10 +25,17 @@
|
||||
|
||||
in
|
||||
{
|
||||
defaultPackage = naersk-lib.buildPackage ./.;
|
||||
devShell = with pkgs; mkShell {
|
||||
defaultPackage = naersk-lib.buildPackage {
|
||||
src = ./.;
|
||||
doCheck = false;
|
||||
nativeBuildInputs = [ pkgs.pkgsStatic.stdenv.cc ];
|
||||
CARGO_BUILD_TARGET = "x86_64-unknown-linux-musl";
|
||||
CARGO_BUILD_RUSTFLAGS = "-C target-feature=+crt-static";
|
||||
};
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = [
|
||||
toolchain
|
||||
pkgs.glibc.static
|
||||
];
|
||||
shellHook = ''
|
||||
source $(pwd)/.env.dev
|
||||
|
@ -1,3 +1,4 @@
|
||||
[toolchain]
|
||||
channel = "nightly-2023-05-08"
|
||||
components = [ "rustfmt", "rustc-dev", "clippy", "cargo" ]
|
||||
targets = [ "x86_64-unknown-linux-musl" ]
|
||||
|
Loading…
Reference in New Issue
Block a user