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-04-04 10:12:33 +00:00
version = "22.03";
# 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";
sha256 = "DP/hh6JfnyHdW2bg0cvhwlWvruNDvL9bmXM46iAUQzA=";
stripRoot = false;
};
2022-04-04 10:12:33 +00:00
cargoSha256 = "zJQ+KvO+6iUIb0eJ+LnMbitxaqTxfqgu7XXj3j0GiX4=";
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 ];
};
}