nixpkgs/pkgs/applications/editors/helix/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.0 KiB
Nix
Raw Normal View History

{ fetchzip, lib, rustPlatform, makeWrapper }:
rustPlatform.buildRustPackage rec {
pname = "helix";
2022-05-29 06:57:00 +00:00
version = "22.05";
# 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=";
stripRoot = false;
};
2022-05-29 06:57:00 +00:00
cargoSha256 = "sha256-9jkSZ2yW0Pca1ats7Mgv7HprpjoZWLpsbuwMjYOKlmk=";
2021-08-13 18:07:01 +00:00
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
# 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
'';
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 ];
};
}