@@ -26,6 +26,15 @@ stdenv.mkDerivation rec {
2626 ${optionalString enableTiny "--enable-tiny"}
2727 '';
2828
29+ patchFlags = [ "-p0" ];
30+
31+ patches = optional stdenv.isDarwin
32+ (fetchurl {
33+ name = "darwin.patch";
34+ url = "https://trac.macports.org/browser/trunk/dports/editors/nano/files/patch-src-winio.c.diff?rev=151356&format=txt";
35+ sha256 = "184q33irz9px2svwr2qx70zvfby5zlwlhv4k607yzsy90fq2jpdd";
36+ });
37+
2938 postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
3039 substituteInPlace src/text.c --replace "__time_t" "time_t"
3140 '';