summary refs log tree commit diff
path: root/pkgs/applications/editors/emacs-24
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-01-19 09:55:31 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-01-19 09:55:31 +0100
commit716aac2519a7571e7f5fd984a886d579a4a051c5 (patch)
tree53cf89cf764d787f4dc8f08474479892b9733177 /pkgs/applications/editors/emacs-24
parentf8472457a440de3c44f6f604142d678b6ae2a762 (diff)
parent53b389327e34de319dc0dbda2b6bcab1a69db69d (diff)
downloadnixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.gz
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.bz2
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.lz
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.xz
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.zst
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.zip
Merge branch 'staging' into closure-size
Diffstat (limited to 'pkgs/applications/editors/emacs-24')
-rw-r--r--pkgs/applications/editors/emacs-24/default.nix2
-rw-r--r--pkgs/applications/editors/emacs-24/macport-24.3.nix98
-rw-r--r--pkgs/applications/editors/emacs-24/macport-24.4.nix101
-rw-r--r--pkgs/applications/editors/emacs-24/macport-24.5.nix69
4 files changed, 25 insertions, 245 deletions
diff --git a/pkgs/applications/editors/emacs-24/default.nix b/pkgs/applications/editors/emacs-24/default.nix
index f2cbdaaee824..05b64eaf7ab6 100644
--- a/pkgs/applications/editors/emacs-24/default.nix
+++ b/pkgs/applications/editors/emacs-24/default.nix
@@ -76,7 +76,7 @@ stdenv.mkDerivation rec {
     description = "GNU Emacs 24, the extensible, customizable text editor";
     homepage    = http://www.gnu.org/software/emacs/;
     license     = licenses.gpl3Plus;
-    maintainers = with maintainers; [ chaoflow lovek323 simons the-kenny ];
+    maintainers = with maintainers; [ chaoflow lovek323 simons the-kenny jwiegley ];
     platforms   = platforms.all;
 
     # So that Exuberant ctags is preferred
diff --git a/pkgs/applications/editors/emacs-24/macport-24.3.nix b/pkgs/applications/editors/emacs-24/macport-24.3.nix
deleted file mode 100644
index edf8a28d6ff4..000000000000
--- a/pkgs/applications/editors/emacs-24/macport-24.3.nix
+++ /dev/null
@@ -1,98 +0,0 @@
-{ stdenv, fetchurl, ncurses, pkgconfig, texinfo, libxml2, gnutls
-}:
-
-stdenv.mkDerivation rec {
-  emacsName = "emacs-24.3";
-  name = "${emacsName}-mac-4.8";
-
-  #builder = ./builder.sh;
-
-  src = fetchurl {
-    url = "mirror://gnu/emacs/${emacsName}.tar.xz";
-    sha256 = "1385qzs3bsa52s5rcncbrkxlydkw0ajzrvfxgv8rws5fx512kakh";
-  };
-
-  macportSrc = fetchurl {
-    url = "ftp://ftp.math.s.chiba-u.ac.jp/emacs/${name}.tar.gz";
-    sha256 = "194y341zrpjp75mc3099kjc0inr1d379wwsnav257bwsc967h8yx";
-  };
-
-  buildInputs = [ ncurses pkgconfig texinfo libxml2 gnutls ];
-
-  postUnpack = ''
-    mv $emacsName $name
-    tar xzf $macportSrc
-    mv $name $emacsName
-  '';
-
-  preConfigure = ''
-    patch -p0 < patch-mac
-
-    # The search for 'tputs' will fail because it's in ncursesw within the
-    # ncurses package, yet Emacs' configure script only looks in ncurses.
-    # Further, we need to make sure that the -L option occurs before mention
-    # of the library, so that it finds it within the Nix store.
-    sed -i 's/tinfo ncurses/tinfo ncursesw/' configure
-    ncurseslib=$(echo ${ncurses.lib}/lib | sed 's#/#\\/#g')
-    sed -i "s/OLIBS=\$LIBS/OLIBS=\"-L$ncurseslib \$LIBS\"/" configure
-    sed -i 's/LIBS="\$LIBS_TERMCAP \$LIBS"/LIBS="\$LIBS \$LIBS_TERMCAP"/' configure
-
-    configureFlagsArray=(
-      LDFLAGS=-L${ncurses.lib}/lib
-      --with-xml2=yes
-      --with-gnutls=yes
-      --with-mac
-      --enable-mac-app=$out/Applications
-    )
-    makeFlagsArray=(
-      CFLAGS=-O3
-      LDFLAGS="-O3 -L${ncurses.lib}/lib"
-    );
-  '';
-
-  postInstall = ''
-    cat >$out/share/emacs/site-lisp/site-start.el <<EOF
-    ;; nixos specific load-path
-    (when (getenv "NIX_PROFILES") (setq load-path
-                          (append (reverse (mapcar (lambda (x) (concat x "/share/emacs/site-lisp/"))
-                             (split-string (getenv "NIX_PROFILES"))))
-                    load-path)))
-
-    ;; make tramp work for NixOS machines
-    (eval-after-load 'tramp '(add-to-list 'tramp-remote-path "/run/current-system/sw/bin"))
-    EOF
-  '';
-
-  doCheck = true;
-
-  meta = with stdenv.lib; {
-    description = "GNU Emacs 24, the extensible, customizable text editor";
-    homepage    = http://www.gnu.org/software/emacs/;
-    license     = licenses.gpl3Plus;
-    maintainers = with maintainers; [ jwiegley ];
-    platforms   = platforms.darwin;
-
-    longDescription = ''
-      GNU Emacs is an extensible, customizable text editor—and more.  At its
-      core is an interpreter for Emacs Lisp, a dialect of the Lisp
-      programming language with extensions to support text editing.
-
-      The features of GNU Emacs include: content-sensitive editing modes,
-      including syntax coloring, for a wide variety of file types including
-      plain text, source code, and HTML; complete built-in documentation,
-      including a tutorial for new users; full Unicode support for nearly all
-      human languages and their scripts; highly customizable, using Emacs
-      Lisp code or a graphical interface; a large number of extensions that
-      add other functionality, including a project planner, mail and news
-      reader, debugger interface, calendar, and more.  Many of these
-      extensions are distributed with GNU Emacs; others are available
-      separately.
-
-      This is "Mac port" addition to GNU Emacs 24. This provides a native
-      GUI support for Mac OS X 10.4 - 10.9. Note that Emacs 23 and later
-      already contain the official GUI support via the NS (Cocoa) port for
-      Mac OS X 10.4 and later. So if it is good enough for you, then you
-      don't need to try this.
-    '';
-  };
-}
diff --git a/pkgs/applications/editors/emacs-24/macport-24.4.nix b/pkgs/applications/editors/emacs-24/macport-24.4.nix
deleted file mode 100644
index b79ac6150edd..000000000000
--- a/pkgs/applications/editors/emacs-24/macport-24.4.nix
+++ /dev/null
@@ -1,101 +0,0 @@
-{ stdenv, fetchurl, ncurses, pkgconfig, texinfo, libxml2, gnutls
-}:
-
-stdenv.mkDerivation rec {
-  emacsName = "emacs-24.4";
-  name = "${emacsName}-mac-5.3";
-
-  #builder = ./builder.sh;
-
-  src = fetchurl {
-    url = "mirror://gnu/emacs/${emacsName}.tar.xz";
-    sha256 = "1zflm6ac34s6v166p58ilxrxbxjm0q2wfc25f8y0mjml1lbr3qs7";
-  };
-
-  macportSrc = fetchurl {
-    url = "ftp://ftp.math.s.chiba-u.ac.jp/emacs/${name}.tar.gz";
-    sha256 = "0qzzqnql0z0a2p3ciccy8gq79v0s7s717lchcprn3wlaqcrk2g1p";
-  };
-
-  buildInputs = [ ncurses pkgconfig texinfo libxml2 gnutls ];
-
-  postUnpack = ''
-    mv $emacsName $name
-    tar xzf $macportSrc
-    mv $name $emacsName
-  '';
-
-  preConfigure = ''
-    substituteInPlace Makefile.in --replace "/bin/pwd" "pwd"
-    substituteInPlace lib-src/Makefile.in --replace "/bin/pwd" "pwd"
-
-    patch -p0 < patch-mac
-
-    # The search for 'tputs' will fail because it's in ncursesw within the
-    # ncurses package, yet Emacs' configure script only looks in ncurses.
-    # Further, we need to make sure that the -L option occurs before mention
-    # of the library, so that it finds it within the Nix store.
-    sed -i 's/tinfo ncurses/tinfo ncursesw/' configure
-    ncurseslib=$(echo ${ncurses}/lib | sed 's#/#\\/#g')
-    sed -i "s/OLIBS=\$LIBS/OLIBS=\"-L$ncurseslib \$LIBS\"/" configure
-    sed -i 's/LIBS="\$LIBS_TERMCAP \$LIBS"/LIBS="\$LIBS \$LIBS_TERMCAP"/' configure
-
-    configureFlagsArray=(
-      LDFLAGS=-L${ncurses}/lib
-      --with-xml2=yes
-      --with-gnutls=yes
-      --with-mac
-      --enable-mac-app=$out/Applications
-    )
-    makeFlagsArray=(
-      CFLAGS=-O3
-      LDFLAGS="-O3 -L${ncurses}/lib"
-    );
-  '';
-
-  postInstall = ''
-    cat >$out/share/emacs/site-lisp/site-start.el <<EOF
-    ;; nixos specific load-path
-    (when (getenv "NIX_PROFILES") (setq load-path
-                          (append (reverse (mapcar (lambda (x) (concat x "/share/emacs/site-lisp/"))
-                             (split-string (getenv "NIX_PROFILES"))))
-                    load-path)))
-
-    ;; make tramp work for NixOS machines
-    (eval-after-load 'tramp '(add-to-list 'tramp-remote-path "/run/current-system/sw/bin"))
-    EOF
-  '';
-
-  doCheck = true;
-
-  meta = with stdenv.lib; {
-    description = "GNU Emacs 24, the extensible, customizable text editor";
-    homepage    = http://www.gnu.org/software/emacs/;
-    license     = licenses.gpl3Plus;
-    maintainers = with maintainers; [ jwiegley ];
-    platforms   = platforms.darwin;
-
-    longDescription = ''
-      GNU Emacs is an extensible, customizable text editor—and more.  At its
-      core is an interpreter for Emacs Lisp, a dialect of the Lisp
-      programming language with extensions to support text editing.
-
-      The features of GNU Emacs include: content-sensitive editing modes,
-      including syntax coloring, for a wide variety of file types including
-      plain text, source code, and HTML; complete built-in documentation,
-      including a tutorial for new users; full Unicode support for nearly all
-      human languages and their scripts; highly customizable, using Emacs
-      Lisp code or a graphical interface; a large number of extensions that
-      add other functionality, including a project planner, mail and news
-      reader, debugger interface, calendar, and more.  Many of these
-      extensions are distributed with GNU Emacs; others are available
-      separately.
-
-      This is "Mac port" addition to GNU Emacs 24. This provides a native
-      GUI support for Mac OS X 10.4 - 10.9. Note that Emacs 23 and later
-      already contain the official GUI support via the NS (Cocoa) port for
-      Mac OS X 10.4 and later. So if it is good enough for you, then you
-      don't need to try this.
-    '';
-  };
-}
diff --git a/pkgs/applications/editors/emacs-24/macport-24.5.nix b/pkgs/applications/editors/emacs-24/macport-24.5.nix
index 6b377abdda10..c778c42de857 100644
--- a/pkgs/applications/editors/emacs-24/macport-24.5.nix
+++ b/pkgs/applications/editors/emacs-24/macport-24.5.nix
@@ -1,12 +1,13 @@
-{ stdenv, fetchurl, ncurses, pkgconfig, texinfo, libxml2, gnutls
-, Carbon, Cocoa, ImageCaptureCore, OSAKit, Quartz, WebKit
+{ stdenv, fetchurl, ncurses, pkgconfig, texinfo, libxml2, gnutls, gettext
+, AppKit, Carbon, Cocoa, IOKit, OSAKit, Quartz, QuartzCore, WebKit
+, ImageCaptureCore, GSS, ImageIO # These may be optional
 }:
 
 stdenv.mkDerivation rec {
   emacsName = "emacs-24.5";
-  name = "${emacsName}-mac-5.13";
+  name = "${emacsName}-mac-5.15";
 
-  #builder = ./builder.sh;
+  builder = ./builder.sh;
 
   src = fetchurl {
     url = "mirror://gnu/emacs/${emacsName}.tar.xz";
@@ -15,17 +16,16 @@ stdenv.mkDerivation rec {
 
   macportSrc = fetchurl {
     url = "ftp://ftp.math.s.chiba-u.ac.jp/emacs/${name}.tar.gz";
-    sha256 = "0p8xpsnsdpwpfq4mz0fazm785d0my0pq4ifbw533g959jh17b36h";
+    sha256 = "1r47bm1pf5av2yr37byz91y7bp6vdw9smahiy18g5qp4jp6mz193";
   };
 
   enableParallelBuilding = true;
 
-  buildInputs = [
-    ncurses pkgconfig texinfo libxml2 gnutls
-  ];
+  buildInputs = [ ncurses libxml2 gnutls pkgconfig texinfo gettext ];
 
   propagatedBuildInputs = [
-    Carbon Cocoa ImageCaptureCore OSAKit Quartz WebKit
+    AppKit Carbon Cocoa IOKit OSAKit Quartz QuartzCore WebKit
+    ImageCaptureCore GSS ImageIO   # may be optional
   ];
 
   postUnpack = ''
@@ -34,46 +34,25 @@ stdenv.mkDerivation rec {
     mv $name $emacsName
   '';
 
-  preConfigure = ''
-    substituteInPlace lisp/international/mule-cmds.el --replace /usr $TMPDIR
-    substituteInPlace Makefile.in --replace "/bin/pwd" "pwd"
-    substituteInPlace lib-src/Makefile.in --replace "/bin/pwd" "pwd"
-
+  postPatch = ''
     patch -p1 < patch-mac
-
-    # The search for 'tputs' will fail because it's in ncursesw within the
-    # ncurses package, yet Emacs' configure script only looks in ncurses.
-    # Further, we need to make sure that the -L option occurs before mention
-    # of the library, so that it finds it within the Nix store.
-    sed -i 's/tinfo ncurses/tinfo ncursesw/' configure
-    ncurseslib=$(echo ${ncurses}/lib | sed 's#/#\\/#g')
-    sed -i "s/OLIBS=\$LIBS/OLIBS=\"-L$ncurseslib \$LIBS\"/" configure
-    sed -i 's/LIBS="\$LIBS_TERMCAP \$LIBS"/LIBS="\$LIBS \$LIBS_TERMCAP"/' configure
-
-    configureFlagsArray=(
-      LDFLAGS=-L${ncurses}/lib
-      --with-xml2=yes
-      --with-gnutls=yes
-      --with-mac
-      --enable-mac-app=$out/Applications
-    )
-    makeFlagsArray=(
-      CFLAGS=-O3
-      LDFLAGS="-O3 -L${ncurses}/lib"
-    );
+    sed -i 's|/usr/share/locale|${gettext}/share/locale|g' lisp/international/mule-cmds.el
   '';
 
+  configureFlags = [
+    "LDFLAGS=-L${ncurses}/lib"
+    "--with-xml2=yes"
+    "--with-gnutls=yes"
+    "--with-mac"
+    "--enable-mac-app=$$out/Applications"
+  ];
+
+  CFLAGS = "-O3";
+  LDFLAGS = "-O3 -L${ncurses}/lib";
+
   postInstall = ''
-    cat >$out/share/emacs/site-lisp/site-start.el <<EOF
-    ;; nixos specific load-path
-    (when (getenv "NIX_PROFILES") (setq load-path
-                          (append (reverse (mapcar (lambda (x) (concat x "/share/emacs/site-lisp/"))
-                             (split-string (getenv "NIX_PROFILES"))))
-                    load-path)))
-
-    ;; make tramp work for NixOS machines
-    (eval-after-load 'tramp '(add-to-list 'tramp-remote-path "/run/current-system/sw/bin"))
-    EOF
+    mkdir -p $out/share/emacs/site-lisp/
+    cp ${./site-start.el} $out/share/emacs/site-lisp/site-start.el
   '';
 
   doCheck = true;