nrr: enable LTO by default
This commit is contained in:
parent
370ecf3c9d
commit
a186a7c2c5
@ -5,12 +5,14 @@
|
||||
, darwin
|
||||
, pkg-config
|
||||
, libiconv
|
||||
, enableLTO ? true
|
||||
, nrxAlias ? true
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "nrr";
|
||||
version = "0.9.4";
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ryanccn";
|
||||
@ -32,6 +34,11 @@ rustPlatform.buildRustPackage rec {
|
||||
pkg-config
|
||||
];
|
||||
|
||||
env = lib.optionalAttrs enableLTO {
|
||||
CARGO_PROFILE_RELEASE_LTO = "fat";
|
||||
CARGO_PROFILE_RELEASE_CODEGEN_UNITS = "1";
|
||||
};
|
||||
|
||||
postInstall = lib.optionalString nrxAlias "ln -s $out/bin/nr{r,x}";
|
||||
|
||||
meta = with lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user