git-open: install man page
This commit is contained in:
parent
4f6d8095fd
commit
69e1161ff6
1 changed files with 10 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
{lib, stdenv, git, xdg-utils, gnugrep, fetchFromGitHub, makeWrapper}:
|
{ lib, stdenv, git, xdg-utils, gnugrep, fetchFromGitHub, installShellFiles, makeWrapper, pandoc }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "git-open";
|
pname = "git-open";
|
||||||
|
@ -11,13 +11,20 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "11n46bngvca5wbdbfcxzjhjbfdbad7sgf7h9gf956cb1q8swsdm0";
|
sha256 = "11n46bngvca5wbdbfcxzjhjbfdbad7sgf7h9gf956cb1q8swsdm0";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ installShellFiles makeWrapper pandoc ];
|
||||||
|
|
||||||
buildPhase = null;
|
buildPhase = ''
|
||||||
|
# marked-man is broken and severly outdated.
|
||||||
|
# pandoc with some extra metadata is good enough and produces a by man readable file.
|
||||||
|
cat <(echo echo '% git-open (1) Version ${version} | Git manual') git-open.1.md > tmp
|
||||||
|
mv tmp git-open.1.md
|
||||||
|
pandoc --standalone --to man git-open.1.md -o git-open.1
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp git-open $out/bin
|
cp git-open $out/bin
|
||||||
|
installManPage git-open.1
|
||||||
wrapProgram $out/bin/git-open \
|
wrapProgram $out/bin/git-open \
|
||||||
--prefix PATH : "${lib.makeBinPath [ git xdg-utils gnugrep ]}"
|
--prefix PATH : "${lib.makeBinPath [ git xdg-utils gnugrep ]}"
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue