summaryrefslogtreecommitdiff
path: root/pkgs/by-name/ze/zee/package.nix
blob: 8d9a9f0c382f01674ccf6cfb2f78b5a2ce856381 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  pkg-config,
  openssl,
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "zee";
  version = "0.3.2";

  src = fetchFromGitHub {
    owner = "zee-editor";
    repo = "zee";
    tag = "v${finalAttrs.version}";
    hash = "sha256-/9SogKOaXdFDB+e0//lrenTTbfmXqNFGr23L+6Pnm8w=";
  };

  cargoHash = "sha256-auwbpavF/WZQIE/htYXJ4di6xoRtXkBBkP/Bj4lFp6U=";

  cargoPatches = [
    # fixed upstream but unreleased
    ./update-ropey-for-rust-1.65.diff
  ];

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [ openssl ];

  # disable downloading and building the tree-sitter grammars at build time
  # grammars can be configured in a config file and installed with `zee --build`
  # see https://github.com/zee-editor/zee#syntax-highlighting
  env.ZEE_DISABLE_GRAMMAR_BUILD = 1;

  meta = {
    description = "Modern text editor for the terminal written in Rust";
    homepage = "https://github.com/zee-editor/zee";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ booklearner ];
    mainProgram = "zee";
  };
})