summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/gh/ghr-cli/package.nix
blob: f8eff30a9c9b00ca10ae9ca27814979101a11134 (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
44
45
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  nix-update-script,
  gitMinimal,
  versionCheckHook,
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "ghr-cli";
  version = "0.9.0";

  __structuredAttrs = true;

  src = fetchFromGitHub {
    owner = "chenyukang";
    repo = "ghr";
    tag = "v${finalAttrs.version}";
    hash = "sha256-LmQaBPPX+VRWFHDMvzyhtWcoiEZJocNeyu6EKBX4IjI=";
  };

  cargoHash = "sha256-UCu/z6TzNYV0scWnl5XnN+nj9V9cg9hpUNqFZXlMXaM=";

  passthru.updateScript = nix-update-script { };

  nativeCheckInputs = [
    gitMinimal
  ];

  doInstallCheck = true;

  nativeInstallCheckInputs = [
    versionCheckHook
  ];

  meta = {
    description = "Fast terminal workspace for staying on top of GitHub";
    homepage = "https://catcoding.me/ghr/";
    changelog = "https://github.com/chenyukang/ghr/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ pborzenkov ];
    mainProgram = "ghr";
  };
})