3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #137605 from emilazy/aarch64-darwin-fixes

{pv,mosh}: fix on aarch64-darwin
This commit is contained in:
Domen Kožar 2021-09-13 13:52:51 +02:00 committed by GitHub
commit 7a36468853
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 3 deletions

View file

@ -1,13 +1,25 @@
{ lib, stdenv, fetchurl } :
{ lib
, stdenv
, fetchurl
, fetchpatch
}:
stdenv.mkDerivation rec {
name = "pv-1.6.6";
name = "pv-1.6.20";
src = fetchurl {
url = "https://www.ivarch.com/programs/sources/${name}.tar.bz2";
sha256 = "1wbk14xh9rfypiwyy68ssl8dliyji30ly70qki1y2xx3ywszk3k0";
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";

View file

@ -31,6 +31,14 @@ stdenv.mkDerivation rec {
./bash_completion_datadir.patch
];
postPatch = ''
# Fix build with Xcode 12.5 toolchain/case-insensitive filesystems
# Backport of https://github.com/mobile-shell/mosh/commit/12199114fe4234f791ef4c306163901643b40538;
# remove on next upstream release.
patch -p0 < ${fetchpatch {
url = "https://raw.githubusercontent.com/macports/macports-ports/70ca3f65e622c17582fd938602d800157ed951c3/net/mosh/files/patch-version-subdir.diff";
sha256 = "1yyh6d07y9zbdx4fb0r56zkq9nd9knwzj22v4dfi55k4k42qxapd";
}}
substituteInPlace scripts/mosh.pl \
--subst-var-by ssh "${openssh}/bin/ssh"
substituteInPlace scripts/mosh.pl \