summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-and-tools/grv/default.nix
blob: 8c915762b6ef731e710c77ef20481344c0bd85d3 (plain) (blame)
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
46
47
48
49
50
{ stdenv, buildGoPackage, fetchFromGitHub, curl, ncurses, pkgconfig, readline
, cmake }:
let
  version = "0.3.2";
in
buildGoPackage {
  pname = "grv";
  inherit version;

  buildInputs = [ ncurses readline curl ];
  nativeBuildInputs = [ pkgconfig cmake ];

  goPackagePath = "github.com/rgburke/grv";

  src = fetchFromGitHub {
    owner = "rgburke";
    repo = "grv";
    rev = "v${version}";
    sha256 = "0bpjsk35rlp56z8149z890adnhmxyh743vsls3q86j4682b83kyf";
    fetchSubmodules = true;
  };

  postPatch = ''
    rm util/update_latest_release.go
  '';

  postConfigure = ''
    cd $NIX_BUILD_TOP/go/src/$goPackagePath
  '';

  buildPhase = ''
    runHook preBuild
    make build-only
    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall
    install -D grv $bin/bin/grv
    runHook postInstall
  '';

  meta = with stdenv.lib; {
    description = "GRV is a terminal interface for viewing Git repositories";
    homepage = "https://github.com/rgburke/grv";
    license = licenses.gpl3;
    platforms = platforms.unix;
    maintainers = with maintainers; [ andir ];
  };
}