From 0cd4c27f34bca00dd3d0594a9dae3a4e1727dc7c Mon Sep 17 00:00:00 2001 From: Pierre-Etienne Meunier Date: Sat, 19 Oct 2024 05:17:12 +0200 Subject: [PATCH] Fixing JOE, the fully functional text editor, on macOS (#346118) joe: fix build on darwin Adding guards for apple --- pkgs/by-name/jo/joe/macos-fix.patch | 13 +++++++++++++ pkgs/by-name/jo/joe/package.nix | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 pkgs/by-name/jo/joe/macos-fix.patch diff --git a/pkgs/by-name/jo/joe/macos-fix.patch b/pkgs/by-name/jo/joe/macos-fix.patch new file mode 100644 index 000000000000..ff6ef95846c8 --- /dev/null +++ b/pkgs/by-name/jo/joe/macos-fix.patch @@ -0,0 +1,13 @@ +diff -Naru i/joe/tty.c w/joe/tty.c +--- ./joe/tty.c 2018-01-10 17:28:34 ++++ ../joe-i-4.6/joe/tty.c 2024-10-02 14:08:22 +@@ -6,6 +6,9 @@ + * This file is part of JOE (Joe's Own Editor) + */ + #include "types.h" ++#if defined(__APPLE__) && defined(__MACH__) ++#include ++#endif + + /* Needed for TIOCGWINSZ detection below */ + #ifdef GWINSZ_IN_SYS_IOCTL diff --git a/pkgs/by-name/jo/joe/package.nix b/pkgs/by-name/jo/joe/package.nix index 9059fe69bdce..245f8b13ea19 100644 --- a/pkgs/by-name/jo/joe/package.nix +++ b/pkgs/by-name/jo/joe/package.nix @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9"; }; + patches = [ ./macos-fix.patch ]; + meta = with lib; { description = "Full featured terminal-based screen editor"; longDescription = ''