summary refs log tree commit diff
path: root/pkgs/tools/misc/pv
diff options
context:
space:
mode:
authorEmily <vcs@emily.moe>2021-09-13 03:36:41 +0100
committerEmily <vcs@emily.moe>2021-09-13 05:41:45 +0100
commita48dff941256205c5667d7c9f80a7aee7a221174 (patch)
tree27f91d9db63e3b8e307c3ec13a9bda22b95b4321 /pkgs/tools/misc/pv
parent765dd20a6c29a9ce7d0691d25c0770986dcfc2df (diff)
downloadnixpkgs-a48dff941256205c5667d7c9f80a7aee7a221174.tar
nixpkgs-a48dff941256205c5667d7c9f80a7aee7a221174.tar.gz
nixpkgs-a48dff941256205c5667d7c9f80a7aee7a221174.tar.bz2
nixpkgs-a48dff941256205c5667d7c9f80a7aee7a221174.tar.lz
nixpkgs-a48dff941256205c5667d7c9f80a7aee7a221174.tar.xz
nixpkgs-a48dff941256205c5667d7c9f80a7aee7a221174.tar.zst
nixpkgs-a48dff941256205c5667d7c9f80a7aee7a221174.zip
pv: fix on aarch64-darwin
Homebrew carries a patch that has been sent upstream. Since it's
designed to be suitable for inclusion as-is and strictly improves
correctness, we just apply it unconditionally on all platforms.
Diffstat (limited to 'pkgs/tools/misc/pv')
-rw-r--r--pkgs/tools/misc/pv/default.nix14
1 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/tools/misc/pv/default.nix b/pkgs/tools/misc/pv/default.nix
index 7b5403eefe1..5e58b128d8e 100644
--- a/pkgs/tools/misc/pv/default.nix
+++ b/pkgs/tools/misc/pv/default.nix
@@ -1,4 +1,8 @@
-{ lib, stdenv, fetchurl } :
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+}:
 
 stdenv.mkDerivation rec {
   name = "pv-1.6.20";
@@ -8,6 +12,14 @@ stdenv.mkDerivation rec {
     sha256 = "00y6zla8h653sn4axgqz7rr0x79vfwl62a7gn6lzn607zwg9acg8";
   };
 
+  patches = [
+    # Fix build on aarch64-darwin using patch from Homebrew
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/Homebrew/homebrew-core/0780f1df9fdbd8914ff50ac24eb0ec0d3561c1b7/Formula/pv.rb";
+      sha256 = "001xayskfprri4s2gd3bqwajw6nz6nv0ggb0835par7q7bsd0dzr";
+    })
+  ];
+
   meta = {
     homepage = "http://www.ivarch.com/programs/pv";
     description = "Tool for monitoring the progress of data through a pipeline";