mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
stdenvNoCC,
|
|
pandoc,
|
|
vim,
|
|
neovim-unwrapped,
|
|
makeWrapper,
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "panvimdoc";
|
|
version = "4.0.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "kdheepak";
|
|
repo = "panvimdoc";
|
|
rev = "refs/tags/v${finalAttrs.version}";
|
|
hash = "sha256-HmEBPkNELHC7Xy0v730sQWZyPPwFdIBUcELzNtrWwzQ=";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
install -Dm444 scripts/* -t $out/share/scripts
|
|
install -Dm444 lib/* -t $out/share/lib
|
|
install -Dm755 panvimdoc.sh -t $out/share
|
|
runHook postBuild
|
|
'';
|
|
|
|
postFixup = ''
|
|
makeWrapper $out/share/panvimdoc.sh $out/bin/panvimdoc --prefix PATH : ${
|
|
lib.makeBinPath [
|
|
pandoc
|
|
vim
|
|
neovim-unwrapped
|
|
]
|
|
}
|
|
'';
|
|
|
|
meta = {
|
|
description = "Write documentation in pandoc markdown. Generate documentation in vimdoc";
|
|
homepage = "https://github.com/kdheepak/panvimdoc";
|
|
license = lib.licenses.mit;
|
|
platforms = lib.platforms.unix;
|
|
maintainers = with lib.maintainers; [ mrcjkb ];
|
|
mainProgram = "panvimdoc";
|
|
};
|
|
})
|