2025-01-17 14:35:18 +08:00
|
|
|
{
|
|
|
|
|
inputs,
|
2025-06-02 10:46:36 +08:00
|
|
|
system,
|
2025-03-11 23:49:16 +08:00
|
|
|
callPackage,
|
2025-06-02 10:46:36 +08:00
|
|
|
symlinkJoin,
|
|
|
|
|
makeWrapper,
|
2025-07-13 06:04:55 +08:00
|
|
|
lib,
|
2025-04-28 21:20:32 +08:00
|
|
|
}: let
|
2025-06-02 10:46:36 +08:00
|
|
|
inherit (inputs.helix.packages."${system}") helix;
|
2025-07-13 06:04:55 +08:00
|
|
|
helixWithPassthru =
|
|
|
|
|
helix
|
|
|
|
|
// {
|
|
|
|
|
passthru =
|
|
|
|
|
helix.passthru
|
|
|
|
|
// {
|
|
|
|
|
languages = lib.pipe "${helix.src}/languages.toml" [
|
|
|
|
|
builtins.readFile
|
|
|
|
|
builtins.fromTOML
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
};
|
2025-04-28 21:20:32 +08:00
|
|
|
runtime = callPackage ./runtime.nix {};
|
2025-01-17 18:01:19 +08:00
|
|
|
in
|
2025-06-02 10:46:36 +08:00
|
|
|
symlinkJoin {
|
2025-04-28 21:20:32 +08:00
|
|
|
name = "helix-wrapped";
|
2025-07-13 06:04:55 +08:00
|
|
|
paths = [helixWithPassthru];
|
|
|
|
|
inherit (helixWithPassthru) meta;
|
2025-04-28 21:20:32 +08:00
|
|
|
buildInputs = [
|
2025-06-02 10:46:36 +08:00
|
|
|
makeWrapper
|
2025-04-28 21:20:32 +08:00
|
|
|
];
|
|
|
|
|
postBuild = ''
|
|
|
|
|
wrapProgram $out/bin/hx \
|
|
|
|
|
--set HELIX_RUNTIME ${runtime}
|
|
|
|
|
'';
|
2025-07-13 06:04:55 +08:00
|
|
|
passthru =
|
|
|
|
|
helixWithPassthru.passthru
|
|
|
|
|
// {
|
|
|
|
|
helix-unwrapped = helixWithPassthru;
|
|
|
|
|
};
|
2025-04-28 21:20:32 +08:00
|
|
|
}
|