2021-01-15 22:18:51 +00:00
|
|
|
{lib, stdenv, git, xdg_utils, gnugrep, fetchFromGitHub, makeWrapper}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "git-open";
|
2020-06-18 07:06:33 +00:00
|
|
|
version = "2.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "paulirish";
|
|
|
|
repo = "git-open";
|
|
|
|
rev = "v${version}";
|
2020-06-18 07:06:33 +00:00
|
|
|
sha256 = "11n46bngvca5wbdbfcxzjhjbfdbad7sgf7h9gf956cb1q8swsdm0";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildPhase = null;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp git-open $out/bin
|
|
|
|
wrapProgram $out/bin/git-open \
|
2021-01-17 00:15:33 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ git xdg_utils gnugrep ]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/paulirish/git-open";
|
|
|
|
description = "Open the GitHub page or website for a repository in your browser";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.jlesquembre ];
|
|
|
|
};
|
|
|
|
}
|