nixpkgs-suyu/pkgs/applications/version-management/git-and-tools/grv/default.nix

51 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, buildGoPackage, fetchFromGitHub, curl, ncurses, pkg-config, readline
, cmake }:
2018-01-31 22:37:47 +01:00
let
2020-03-18 11:47:13 +01:00
version = "0.3.2";
2018-01-31 22:37:47 +01:00
in
buildGoPackage {
2019-08-13 23:52:01 +02:00
pname = "grv";
inherit version;
2018-01-31 22:37:47 +01:00
buildInputs = [ ncurses readline curl ];
nativeBuildInputs = [ pkg-config cmake ];
2018-01-31 22:37:47 +01:00
goPackagePath = "github.com/rgburke/grv";
src = fetchFromGitHub {
owner = "rgburke";
repo = "grv";
rev = "v${version}";
2020-03-18 11:47:13 +01:00
sha256 = "0bpjsk35rlp56z8149z890adnhmxyh743vsls3q86j4682b83kyf";
2018-02-07 22:15:50 +01:00
fetchSubmodules = true;
2018-01-31 22:37:47 +01:00
};
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 $out/bin/grv
runHook postInstall
'';
meta = with lib; {
2018-10-04 23:50:15 +02:00
description = "GRV is a terminal interface for viewing Git repositories";
homepage = "https://github.com/rgburke/grv";
2018-01-31 22:37:47 +01:00
license = licenses.gpl3;
platforms = platforms.unix;
maintainers = with maintainers; [ andir ];
};
}