forked from nrabulinski/attic
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: {
|
}).overrideAttrs (old: {
|
||||||
|
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [
|
||||||
|
pkgs.nukeReferences
|
||||||
|
];
|
||||||
|
|
||||||
# Read by pkg_config crate (do some autodetection in build.rs?)
|
# Read by pkg_config crate (do some autodetection in build.rs?)
|
||||||
PKG_CONFIG_ALL_STATIC = "1";
|
PKG_CONFIG_ALL_STATIC = "1";
|
||||||
|
|
||||||
"NIX_CFLAGS_LINK_${pkgs.pkgsStatic.stdenv.cc.suffixSalt}" = "-lc";
|
"NIX_CFLAGS_LINK_${pkgs.pkgsStatic.stdenv.cc.suffixSalt}" = "-lc";
|
||||||
RUSTFLAGS = "-C relocation-model=static";
|
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 {
|
attic-client-static = packages.attic-static.override {
|
||||||
|
|
Loading…
Reference in a new issue