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

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

41 lines
1.3 KiB
Nix
Raw Normal View History

{ fetchzip, lib, rustPlatform, git, installShellFiles }:
2023-05-23 05:32:53 +00:00
rustPlatform.buildRustPackage rec {
pname = "helix";
2024-07-14 18:52:37 +00:00
version = "24.07";
# This release tarball includes source code for the tree-sitter grammars,
# which is not ordinarily part of the repository.
2023-05-23 05:32:53 +00:00
src = fetchzip {
url = "https://github.com/helix-editor/helix/releases/download/${version}/helix-${version}-source.tar.xz";
2024-07-14 18:52:37 +00:00
hash = "sha256-R8foMx7YJ01ZS75275xPQ52Ns2EB3OPop10F4nicmoA=";
2023-05-23 05:32:53 +00:00
stripRoot = false;
};
2024-07-14 18:52:37 +00:00
cargoHash = "sha256-Y8zqdS8vl2koXmgFY0hZWWP1ZAO8JgwkoPTYPVpkWsA=";
nativeBuildInputs = [ git installShellFiles ];
2024-04-08 20:50:29 +00:00
env.HELIX_DEFAULT_RUNTIME = "${placeholder "out"}/lib/runtime";
2021-08-13 18:07:01 +00:00
postInstall = ''
2023-05-23 05:32:53 +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
2022-09-05 10:11:51 +00:00
installShellCompletion contrib/completion/hx.{bash,fish,zsh}
2023-03-21 17:15:55 +00:00
mkdir -p $out/share/{applications,icons/hicolor/256x256/apps}
2023-02-16 21:57:28 +00:00
cp contrib/Helix.desktop $out/share/applications
2023-03-21 17:15:55 +00:00
cp contrib/helix.png $out/share/icons/hicolor/256x256/apps
2021-08-13 18:07:01 +00:00
'';
meta = with lib; {
description = "Post-modern modal text editor";
homepage = "https://helix-editor.com";
license = licenses.mpl20;
2021-08-10 23:13:07 +00:00
mainProgram = "hx";
2023-05-22 06:50:28 +00:00
maintainers = with maintainers; [ danth yusdacra zowoq ];
};
}