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

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

35 lines
974 B
Nix
Raw Normal View History

{ fetchzip, lib, rustPlatform, makeWrapper }:
rustPlatform.buildRustPackage rec {
pname = "helix";
2022-04-04 12:12:33 +02: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 12:12:33 +02:00
cargoSha256 = "zJQ+KvO+6iUIb0eJ+LnMbitxaqTxfqgu7XXj3j0GiX4=";
2021-08-13 20:07:01 +02:00
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
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-11 01:13:07 +02:00
mainProgram = "hx";
2022-04-04 12:12:33 +02:00
maintainers = with maintainers; [ danth yusdacra ];
};
}