mirror of
https://github.com/zhaofengli/attic.git
synced 2024-12-14 11:57:30 +00:00
flake.nix: Minimize the closure size of attic-static
This commit is contained in:
parent
3c58b2d2ce
commit
f658c7e1fe
1 changed files with 9 additions and 0 deletions
|
@ -59,11 +59,20 @@
|
|||
];
|
||||
});
|
||||
}).overrideAttrs (old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [
|
||||
pkgs.nukeReferences
|
||||
];
|
||||
|
||||
# Read by pkg_config crate (do some autodetection in build.rs?)
|
||||
PKG_CONFIG_ALL_STATIC = "1";
|
||||
|
||||
"NIX_CFLAGS_LINK_${pkgs.pkgsStatic.stdenv.cc.suffixSalt}" = "-lc";
|
||||
RUSTFLAGS = "-C relocation-model=static";
|
||||
|
||||
postFixup = (old.postFixup or "") + ''
|
||||
rm -f $out/nix-support/propagated-build-inputs
|
||||
nuke-refs $out/bin/attic
|
||||
'';
|
||||
});
|
||||
|
||||
attic-client-static = packages.attic-static.override {
|
||||
|
|
Loading…
Reference in a new issue