depot/third_party/nixpkgs/pkgs/applications/version-management/git-and-tools/lab/default.nix
Default email ec92d4d331 Project import generated by Copybara.
GitOrigin-RevId: 540dccb2aeaffa9dc69bfdc41c55abd7ccc6baa3
2021-05-28 11:39:13 +02:00

38 lines
1.1 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, makeWrapper, xdg-utils, installShellFiles, git }:
buildGoModule rec {
pname = "lab";
version = "0.22.0";
src = fetchFromGitHub {
owner = "zaquestion";
repo = "lab";
rev = "v${version}";
sha256 = "sha256-CyXEmlsc40JtwDjRYNWqN+3cuoG8K07jAQdd1rktvS8=";
};
subPackages = [ "." ];
vendorSha256 = "sha256-PSS7OPbM+XsylqDlWc4h+oZrOua2kSWKLEuyjqo/cxM=";
doCheck = false;
nativeBuildInputs = [ makeWrapper installShellFiles ];
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
postInstall = ''
wrapProgram $out/bin/lab --prefix PATH ":" "${lib.makeBinPath [ git xdg-utils ]}";
for shell in bash fish zsh; do
$out/bin/lab completion $shell > lab.$shell
installShellCompletion lab.$shell
done
'';
meta = with lib; {
description = "Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab";
homepage = "https://zaquestion.github.io/lab";
license = licenses.cc0;
maintainers = with maintainers; [ marsam dtzWill SuperSandro2000 ];
};
}