nixos/pkgs/helix/package.nix

37 lines
679 B
Nix
Raw Normal View History

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