ov: init at 0.13.0
Adds the ov, an advanced pager. I've put it into tools/text next to the similar packages.
This commit is contained in:
parent
82528e6c10
commit
d182206882
60
pkgs/tools/text/ov/default.nix
Normal file
60
pkgs/tools/text/ov/default.nix
Normal file
|
@ -0,0 +1,60 @@
|
|||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, pandoc
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "ov";
|
||||
version = "0.13.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "noborus";
|
||||
repo = "ov";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-vBPhCSor3wGCawz+097Lw29xgW6z5fV5PAMAq7TBiNM=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-y3oSL1W2cjt6oUVbglHhun3XNCidqb7LTXtoA25+mpo=";
|
||||
|
||||
ldflags = [
|
||||
"-X main.Version=v${version}"
|
||||
"-X main.Revision=${src.rev}"
|
||||
];
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
pandoc
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd ov \
|
||||
--bash <($out/bin/ov completion bash) \
|
||||
--fish <($out/bin/ov completion fish) \
|
||||
--zsh <($out/bin/ov completion zsh)
|
||||
|
||||
mkdir -p $out/share/$name
|
||||
cp $src/ov-less.yaml $out/share/$name/less-config.yaml
|
||||
makeWrapper $out/bin/ov $out/bin/ov-less --add-flags "--config $out/share/$name/less-config.yaml"
|
||||
|
||||
mkdir -p $doc/share/doc/$name
|
||||
pandoc -s < $src/README.md > $doc/share/doc/$name/README.html
|
||||
mkdir -p $doc/share/$name
|
||||
cp $src/ov.yaml $doc/share/$name/sample-config.yaml
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Feature-rich terminal-based text viewer";
|
||||
homepage = "https://noborus.github.io/ov";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ farcaller ];
|
||||
};
|
||||
}
|
|
@ -38622,4 +38622,6 @@ with pkgs;
|
|||
tuner = callPackage ../applications/audio/tuner { };
|
||||
|
||||
jfrog-cli = callPackage ../tools/misc/jfrog-cli { };
|
||||
|
||||
ov = callPackage ../tools/text/ov { };
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue