2022-04-04 14:33:39 +00:00
|
|
|
{ fetchzip, lib, rustPlatform, makeWrapper }:
|
2021-06-30 01:54:42 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "helix";
|
2022-05-29 06:57:00 +00:00
|
|
|
version = "22.05";
|
2021-06-30 01:54:42 +00:00
|
|
|
|
2022-04-04 14:33:39 +00:00
|
|
|
# This release tarball includes source code for the tree-sitter grammars,
|
|
|
|
# which is not ordinarily part of the repository.
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/helix-editor/helix/releases/download/${version}/helix-${version}-source.tar.xz";
|
2022-05-29 06:57:00 +00:00
|
|
|
sha256 = "sha256-MVHfj9iVC8rFGFU+kpRcH0qX9kQ+scFsRgSw7suC5RU=";
|
2022-04-04 14:33:39 +00:00
|
|
|
stripRoot = false;
|
2021-06-30 01:54:42 +00:00
|
|
|
};
|
|
|
|
|
2022-05-29 06:57:00 +00:00
|
|
|
cargoSha256 = "sha256-9jkSZ2yW0Pca1ats7Mgv7HprpjoZWLpsbuwMjYOKlmk=";
|
2021-06-30 01:54:42 +00:00
|
|
|
|
2021-08-13 18:07:01 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2022-04-28 20:27:12 +00:00
|
|
|
# not needed at runtime
|
|
|
|
rm -r runtime/grammars/sources
|
|
|
|
|
2021-08-13 18:07:01 +00:00
|
|
|
mkdir -p $out/lib
|
|
|
|
cp -r runtime $out/lib
|
|
|
|
'';
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/hx --set HELIX_RUNTIME $out/lib/runtime
|
|
|
|
'';
|
2021-06-30 01:54:42 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A post-modern modal text editor";
|
|
|
|
homepage = "https://helix-editor.com";
|
|
|
|
license = licenses.mpl20;
|
2021-08-10 23:13:07 +00:00
|
|
|
mainProgram = "hx";
|
2022-04-04 10:12:33 +00:00
|
|
|
maintainers = with maintainers; [ danth yusdacra ];
|
2021-06-30 01:54:42 +00:00
|
|
|
};
|
|
|
|
}
|