helix: build with lto and native cpu target

This commit is contained in:
Bloxx12 2025-06-26 20:46:31 +02:00
commit cbb594395a
Signed by: faukah
SSH key fingerprint: SHA256:Uj2AXqvtdCA4hn5Hq0ZonhIAyUqI1q4w2sMG3Z1TH7E
2 changed files with 34 additions and 15 deletions

View file

@ -41,20 +41,28 @@
}: let
inherit (lib.meta) getExe;
custom-helix = helix.overrideAttrs (_: rec {
version = "25.06.1";
src = fetchzip {
url = "https://github.com/bloxx12/helix/releases/download/${version}/helix-${version}-source.tar.xz";
hash = "sha256-941moaBUF+aGsbFapK1cp5+NFdecSfRCTdnVUtkDQps=";
stripRoot = false;
};
custom-helix =
(helix.override {inherit rustPlatform;}).overrideAttrs
(_: let
inherit (custom-helix) version;
in {
version = "25.06.1";
src = fetchzip {
url = "https://github.com/bloxx12/helix/releases/download/${version}/helix-${version}-source.tar.xz";
hash = "sha256-941moaBUF+aGsbFapK1cp5+NFdecSfRCTdnVUtkDQps=";
stripRoot = false;
};
doInstallCheck = false;
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (custom-helix) src;
hash = "sha256-w07ZV1tR3lzYz4N+hI9alvFp0AHCcsItPRhVt9Sluo8=";
};
});
cargoBuildFeatures = ["unicode-lines"];
RUSTFLAGS = "-Ctarget-cpu=native -Clto=fat";
doInstallCheck = false;
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (custom-helix) src;
hash = "sha256-w07ZV1tR3lzYz4N+hI9alvFp0AHCcsItPRhVt9Sluo8=";
};
});
toml = formats.toml {};