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-07-13 06:04:55 +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-07-13 06:04:55 +08:00
|
|
|
};
|
2025-07-13 06:04:55 +08:00
|
|
|
};
|
|
|
|
|
runtime = callPackage ./runtime.nix { };
|
2025-01-17 18:01:19 +08:00
|
|
|
in
|
2025-07-13 06:04:55 +08:00
|
|
|
symlinkJoin {
|
|
|
|
|
name = "helix-wrapped";
|
|
|
|
|
paths = [ helixWithPassthru ];
|
|
|
|
|
inherit (helixWithPassthru) meta;
|
|
|
|
|
buildInputs = [
|
|
|
|
|
makeWrapper
|
|
|
|
|
];
|
|
|
|
|
postBuild = ''
|
|
|
|
|
wrapProgram $out/bin/hx \
|
|
|
|
|
--set HELIX_RUNTIME ${runtime}
|
|
|
|
|
'';
|
|
|
|
|
passthru = helixWithPassthru.passthru // {
|
|
|
|
|
helix-unwrapped = helixWithPassthru;
|
|
|
|
|
};
|
|
|
|
|
}
|