about summary refs log tree commit diff
path: root/pkgs/tools/misc
diff options
context:
space:
mode:
authors1341 <github@shmarya.net>2020-03-19 18:29:05 +0200
committerJon <jonringer@users.noreply.github.com>2020-04-08 10:50:05 -0700
commitf1090bdaf85581c4e9e1fecfcc30f30bbf7a04d6 (patch)
tree25681691ac8297499f3090eb5f0f23e2ad234e0c /pkgs/tools/misc
parent4c7467a9e4ea8155fcedcec65b88709f795f8423 (diff)
downloadnixlib-f1090bdaf85581c4e9e1fecfcc30f30bbf7a04d6.tar
nixlib-f1090bdaf85581c4e9e1fecfcc30f30bbf7a04d6.tar.gz
nixlib-f1090bdaf85581c4e9e1fecfcc30f30bbf7a04d6.tar.bz2
nixlib-f1090bdaf85581c4e9e1fecfcc30f30bbf7a04d6.tar.lz
nixlib-f1090bdaf85581c4e9e1fecfcc30f30bbf7a04d6.tar.xz
nixlib-f1090bdaf85581c4e9e1fecfcc30f30bbf7a04d6.tar.zst
nixlib-f1090bdaf85581c4e9e1fecfcc30f30bbf7a04d6.zip
page: init at 2.3.4
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r--pkgs/tools/misc/page/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/tools/misc/page/default.nix b/pkgs/tools/misc/page/default.nix
new file mode 100644
index 000000000000..07109515c5c3
--- /dev/null
+++ b/pkgs/tools/misc/page/default.nix
@@ -0,0 +1,32 @@
+{ lib, rustPlatform, fetchFromGitHub, installShellFiles }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "page";
+  version = "2.3.4";
+
+  src = fetchFromGitHub {
+    owner = "I60R";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0xcbnl8fbdfdmcbv5d7v830aa3vfhg7nlf768rbrfd5a0970pllh";
+  };
+
+  nativeBuildInputs = [ installShellFiles ];
+  postInstall = ''
+    completions_dir=$(find "target" -name "shell_completions" -type d -printf "%T+\t%p\n" | sort | awk 'NR==1{print $2}')
+
+    installShellCompletion --bash $completions_dir/page.bash
+    installShellCompletion --fish $completions_dir/page.fish
+    installShellCompletion --zsh $completions_dir/_page
+  '';
+
+  cargoSha256 = "0ckfmqi6jvbvj99vbdp798mmy6gc54254n32br0ri842b04i26qf";
+
+  meta = with lib; {
+    description = "Use neovim as pager";
+    homepage = "https://github.com/I60R/page";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.s1341 ];
+  };
+}