helix: build with lto and native cpu target
This commit is contained in:
parent
5779ca210d
commit
cbb594395a
2 changed files with 34 additions and 15 deletions
|
@ -1,6 +1,17 @@
|
||||||
{pkgs}: let
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
}: let
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
helix = pkgs.callPackage ./helix {};
|
helix = let
|
||||||
|
latestNightly = (inputs.rust-overlay.lib.mkRustBin {} pkgs).nightly.latest.default;
|
||||||
|
rustPlatform = pkgs.makeRustPlatform {
|
||||||
|
rustc = latestNightly;
|
||||||
|
cargo = latestNightly;
|
||||||
|
stdenv = pkgs.clangStdenv;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
pkgs.callPackage ./helix {inherit rustPlatform;};
|
||||||
kakoune = pkgs.callPackage ./kakoune.nix {};
|
kakoune = pkgs.callPackage ./kakoune.nix {};
|
||||||
fish = pkgs.callPackage ./fish {inherit lib;};
|
fish = pkgs.callPackage ./fish {inherit lib;};
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -41,20 +41,28 @@
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.meta) getExe;
|
inherit (lib.meta) getExe;
|
||||||
|
|
||||||
custom-helix = helix.overrideAttrs (_: rec {
|
custom-helix =
|
||||||
version = "25.06.1";
|
(helix.override {inherit rustPlatform;}).overrideAttrs
|
||||||
src = fetchzip {
|
(_: let
|
||||||
url = "https://github.com/bloxx12/helix/releases/download/${version}/helix-${version}-source.tar.xz";
|
inherit (custom-helix) version;
|
||||||
hash = "sha256-941moaBUF+aGsbFapK1cp5+NFdecSfRCTdnVUtkDQps=";
|
in {
|
||||||
stripRoot = false;
|
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;
|
cargoBuildFeatures = ["unicode-lines"];
|
||||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
RUSTFLAGS = "-Ctarget-cpu=native -Clto=fat";
|
||||||
inherit (custom-helix) src;
|
|
||||||
hash = "sha256-w07ZV1tR3lzYz4N+hI9alvFp0AHCcsItPRhVt9Sluo8=";
|
doInstallCheck = false;
|
||||||
};
|
|
||||||
});
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||||
|
inherit (custom-helix) src;
|
||||||
|
hash = "sha256-w07ZV1tR3lzYz4N+hI9alvFp0AHCcsItPRhVt9Sluo8=";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
toml = formats.toml {};
|
toml = formats.toml {};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue