nixos/pkgs/helix/package.nix

41 lines
774 B
Nix
Raw Normal View History

{
inputs,
stdenv,
callPackage,
2025-10-18 21:24:33 +08:00
buildEnv,
lib,
}:
let
inherit (stdenv.hostPlatform) system;
2025-06-02 10:46:36 +08:00
inherit (inputs.helix.packages."${system}") helix;
runtime = callPackage ./runtime.nix { };
2025-10-18 21:24:33 +08:00
helix' = helix.overrideAttrs (
_final: prev:
let
2025-10-18 21:24:33 +08:00
helix-runtime = buildEnv {
name = "helix-runtime";
paths = [
runtime
prev.env.HELIX_DEFAULT_RUNTIME
];
};
in
{
2025-10-18 21:24:33 +08:00
env.HELIX_DEFAULT_RUNTIME = toString helix-runtime;
cargoBuildFeatures = (prev.cargoBuildFeatures or [ ]) ++ [
"git"
"steel"
];
2025-10-18 21:24:33 +08:00
}
);
2025-01-17 18:01:19 +08:00
in
helix'
// {
passthru = (helix'.passthru or { }) // {
languages = lib.pipe "${helix.src}/languages.toml" [
builtins.readFile
fromTOML
];
};
}