From cd86b058199342194fb994366a44daea4f69786a Mon Sep 17 00:00:00 2001 From: Vinny Meller Date: Fri, 1 Nov 2024 13:11:34 -0400 Subject: [PATCH] gh-contribs: init at 0.9.0 --- pkgs/by-name/gh/gh-contribs/package.nix | 49 +++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 pkgs/by-name/gh/gh-contribs/package.nix diff --git a/pkgs/by-name/gh/gh-contribs/package.nix b/pkgs/by-name/gh/gh-contribs/package.nix new file mode 100644 index 0000000000000..d3f769ea1b877 --- /dev/null +++ b/pkgs/by-name/gh/gh-contribs/package.nix @@ -0,0 +1,49 @@ +{ + coreutils, + fetchFromGitHub, + gh, + lib, + makeWrapper, + nix-update-script, + stdenvNoCC, +}: +stdenvNoCC.mkDerivation rec { + pname = "gh-contribs"; + version = "0.9.0"; + + src = fetchFromGitHub { + owner = "MintArchit"; + repo = "gh-contribs"; + rev = "v${version}"; + hash = "sha256-yPJ9pmnbqR+fXH02Q5VMn0v2MuDQbPUpNzKw1awmKVE="; + }; + + nativeBuildInputs = [ + makeWrapper + ]; + + installPhase = '' + install -D -m755 "gh-contribs" "$out/bin/gh-contribs" + ''; + + postFixup = '' + wrapProgram "$out/bin/gh-contribs" \ + --prefix PATH : "${ + lib.makeBinPath [ + coreutils + gh + ] + }" + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + homepage = "https://github.com/MintArchit/gh-contribs"; + description = "GitHub Contribution Graph CLI"; + maintainers = [ lib.maintainers.vinnymeller ]; + license = lib.licenses.unlicense; + mainProgram = "gh-contribs"; + platforms = lib.platforms.all; + }; +}