about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/page/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/page/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/page/default.nix21
1 files changed, 15 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/tools/misc/page/default.nix b/nixpkgs/pkgs/tools/misc/page/default.nix
index 1468b350f5f8..b1da229f1e86 100644
--- a/nixpkgs/pkgs/tools/misc/page/default.nix
+++ b/nixpkgs/pkgs/tools/misc/page/default.nix
@@ -1,26 +1,35 @@
-{ lib, rustPlatform, fetchFromGitHub, installShellFiles }:
+{ lib, rustPlatform, fetchFromGitHub, fetchpatch, installShellFiles }:
 
 rustPlatform.buildRustPackage rec {
   pname = "page";
-  version = "4.6.0";
+  version = "4.6.3";
 
   src = fetchFromGitHub {
     owner = "I60R";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-iK8XRPT/0PG3szIRkHvUIdgJC1XsuBbDKk25RvwSViQ=";
+    hash = "sha256-uNdtgx9/9+KOfQvHiKNrT8NFWtR2tfJuI2bMwywBC/4=";
   };
 
+  cargoHash = "sha256-ctYQMBAdSUfEek2vcCa3gnI9N6ZG9b+VvtAzT20jlXY=";
+
+  cargoPatches = [
+    # Cargo.lock is outdated.
+    # https://github.com/I60R/page/pull/45.
+    (fetchpatch {
+      url = "https://github.com/I60R/page/commit/83f936b64620ba74043c1db31207b4366c0f7e3d.patch";
+      hash = "sha256-qA5oP4K/6eG0A+syVNb1izl+bnYll5V6sWM3LVFTb4o=";
+    })
+  ];
+
   nativeBuildInputs = [ installShellFiles ];
   postInstall = ''
-    completions_dir=$(find "target" -name "shell_completions" -type d -printf "%T+\t%p\n" | sort | awk 'NR==1{print $2}')
+    completions_dir=$(find "target" -name "assets" -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 = "sha256-OZvsZijrIeVxqf58P16Woanf0JsJIENX72n28wMtq14=";
-
   meta = with lib; {
     description = "Use neovim as pager";
     homepage = "https://github.com/I60R/page";