From 0ce7438bd6ffa161bccb10fe693b86a18a579a85 Mon Sep 17 00:00:00 2001 From: Emily Date: Mon, 13 Sep 2021 04:28:22 +0100 Subject: mosh: fix on aarch64-darwin The build failure here is not due to Apple Silicon per se but instead an artifact of the aarch64-darwin toolchain using a newer version of the Xcode SDK as a basis. This causes issues building on case-insensitive filesystems due to the collision between the standard header and a mosh source file called VERSION. Fix with a MacPorts backport of an upstream mosh commit, via Homebrew. --- pkgs/tools/networking/mosh/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkgs/tools/networking/mosh') diff --git a/pkgs/tools/networking/mosh/default.nix b/pkgs/tools/networking/mosh/default.nix index 92c241967ae0b..00746a7afbd26 100644 --- a/pkgs/tools/networking/mosh/default.nix +++ b/pkgs/tools/networking/mosh/default.nix @@ -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 \ -- cgit 1.4.1