nixpkgs/pkgs/applications/version-management/topgit/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

31 lines
862 B
Nix

{ lib, stdenv, fetchFromGitHub, git, perl }:
stdenv.mkDerivation rec {
pname = "topgit";
version = "0.19.13";
src = fetchFromGitHub {
owner = "mackyle";
repo = "topgit";
rev = "${pname}-${version}";
sha256 = "sha256-K0X1DGc1LQsoteUhoHLxVJRrZaaPLKSSF61OKyGB5Qg=";
};
makeFlags = [ "prefix=${placeholder "out"}" ];
nativeBuildInputs = [ perl git ];
postInstall = ''
install -Dm644 README -t "$out/share/doc/${pname}-${version}/"
install -Dm755 contrib/tg-completion.bash -t "$out/share/bash-completion/completions/"
'';
meta = with lib; {
description = "TopGit manages large amount of interdependent topic branches";
mainProgram = "tg";
homepage = "https://github.com/mackyle/topgit";
license = licenses.gpl2;
platforms = platforms.unix;
maintainers = with maintainers; [ marcweber ];
};
}