summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2015-01-02 14:34:57 -0600
committerShea Levy <shea@shealevy.com>2015-01-03 07:32:38 -0500
commit0d1a16d48f7d48195f2b993a5d2613e171c60c58 (patch)
treef82840e201da91af5c01a87aa9b7c35b91ee9dd3 /pkgs/applications
parente37328fd93c0b17589e2e886fc214ead6553fc4f (diff)
downloadnixlib-0d1a16d48f7d48195f2b993a5d2613e171c60c58.tar
nixlib-0d1a16d48f7d48195f2b993a5d2613e171c60c58.tar.gz
nixlib-0d1a16d48f7d48195f2b993a5d2613e171c60c58.tar.bz2
nixlib-0d1a16d48f7d48195f2b993a5d2613e171c60c58.tar.lz
nixlib-0d1a16d48f7d48195f2b993a5d2613e171c60c58.tar.xz
nixlib-0d1a16d48f7d48195f2b993a5d2613e171c60c58.tar.zst
nixlib-0d1a16d48f7d48195f2b993a5d2613e171c60c58.zip
emacs24: Add #define for building on Yosemite (darwin)
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/editors/emacs-24/at-fdcwd.patch13
-rw-r--r--pkgs/applications/editors/emacs-24/default.nix5
2 files changed, 17 insertions, 1 deletions
diff --git a/pkgs/applications/editors/emacs-24/at-fdcwd.patch b/pkgs/applications/editors/emacs-24/at-fdcwd.patch
new file mode 100644
index 000000000000..1f99d4e18094
--- /dev/null
+++ b/pkgs/applications/editors/emacs-24/at-fdcwd.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h
+index 5cdb813..7a272e8 100644
+--- a/lib/careadlinkat.h
++++ b/lib/careadlinkat.h
+@@ -23,6 +23,8 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ 
++#define AT_FDCWD -2
++
+ struct allocator;
+ 
+ /* Assuming the current directory is FD, get the symbolic link value
diff --git a/pkgs/applications/editors/emacs-24/default.nix b/pkgs/applications/editors/emacs-24/default.nix
index 8f954515b8f2..71b98eec0e98 100644
--- a/pkgs/applications/editors/emacs-24/default.nix
+++ b/pkgs/applications/editors/emacs-24/default.nix
@@ -18,7 +18,10 @@ stdenv.mkDerivation rec {
     sha256 = "1zflm6ac34s6v166p58ilxrxbxjm0q2wfc25f8y0mjml1lbr3qs7";
   };
 
-  patches = [ ./darwin-new-sections.patch ];
+  patches = stdenv.lib.optionals stdenv.isDarwin [
+    ./darwin-new-sections.patch
+    ./at-fdcwd.patch
+  ];
 
   buildInputs =
     [ ncurses gconf libxml2 gnutls alsaLib pkgconfig texinfo ]