diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2016-01-19 09:55:31 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2016-01-19 09:55:31 +0100 |
commit | 716aac2519a7571e7f5fd984a886d579a4a051c5 (patch) | |
tree | 53cf89cf764d787f4dc8f08474479892b9733177 /pkgs/applications/editors | |
parent | f8472457a440de3c44f6f604142d678b6ae2a762 (diff) | |
parent | 53b389327e34de319dc0dbda2b6bcab1a69db69d (diff) | |
download | nixlib-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')
-rw-r--r-- | pkgs/applications/editors/atom/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/editors/emacs-24/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/editors/emacs-24/macport-24.3.nix | 98 | ||||
-rw-r--r-- | pkgs/applications/editors/emacs-24/macport-24.4.nix | 101 | ||||
-rw-r--r-- | pkgs/applications/editors/emacs-24/macport-24.5.nix | 69 | ||||
-rw-r--r-- | pkgs/applications/editors/emacs-modes/elpa-packages.nix | 17 | ||||
-rw-r--r-- | pkgs/applications/editors/emacs-modes/emacs-w3m/default.nix | 13 | ||||
-rw-r--r-- | pkgs/applications/editors/emacs-modes/org/default.nix | 11 | ||||
-rw-r--r-- | pkgs/applications/editors/emacs-modes/slime/default.nix | 22 | ||||
-rw-r--r-- | pkgs/applications/editors/flpsed/default.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/editors/idea/common.nix | 71 | ||||
-rw-r--r-- | pkgs/applications/editors/idea/default.nix | 103 | ||||
-rw-r--r-- | pkgs/applications/editors/vim/configurable.nix | 21 |
13 files changed, 147 insertions, 391 deletions
diff --git a/pkgs/applications/editors/atom/default.nix b/pkgs/applications/editors/atom/default.nix index 13e00754acd3..7120b8f43ee9 100644 --- a/pkgs/applications/editors/atom/default.nix +++ b/pkgs/applications/editors/atom/default.nix @@ -16,11 +16,11 @@ let }; in stdenv.mkDerivation rec { name = "atom-${version}"; - version = "1.3.1"; + version = "1.4.0"; src = fetchurl { url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb"; - sha256 = "17q5vrvjsyxcd8favp0sldfvhcwr0ba6ws32df6iv2iyla5h94y1"; + sha256 = "0dipww58p0sm99jn1ariisha9wsnhl7rnd8achpxqkf4b3vwi5iz"; name = "${name}.deb"; }; 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; diff --git a/pkgs/applications/editors/emacs-modes/elpa-packages.nix b/pkgs/applications/editors/emacs-modes/elpa-packages.nix index aa30d62c60a9..e88206fc8b73 100644 --- a/pkgs/applications/editors/emacs-modes/elpa-packages.nix +++ b/pkgs/applications/editors/emacs-modes/elpa-packages.nix @@ -50,7 +50,7 @@ in self: let - super = mapAttrs (mkPackage self) manifest; + super = removeAttrs (mapAttrs (mkPackage self) manifest) [ "dash" ]; elpaBuild = import ../../../build-support/emacs/melpa.nix { inherit fetchurl lib stdenv texinfo; @@ -64,23 +64,10 @@ self: }; elpaPackages = super // { - ace-window = markBroken super.ace-window; - ada-mode = markBroken super.ada-mode; - beacon = markBroken super.beacon; - bug-hunter = markBroken super.bug-hunter; - company-math = markBroken super.company-math; - company-statistics = markBroken super.company-statistics; - context-coloring = markBroken super.context-coloring; - dict-tree = markBroken super.dict-tree; + # These packages require emacs-25 el-search = markBroken super.el-search; - ergoemacs-mode = markBroken super.ergoemacs-mode; - exwm = markBroken super.exwm; - gnugo = markBroken super.gnugo; iterators = markBroken super.iterators; midi-kbd = markBroken super.midi-kbd; stream = markBroken super.stream; - tNFA = markBroken super.tNFA; - trie = markBroken super.trie; - xelb = markBroken super.xelb; }; in elpaPackages // { inherit elpaBuild elpaPackages; } diff --git a/pkgs/applications/editors/emacs-modes/emacs-w3m/default.nix b/pkgs/applications/editors/emacs-modes/emacs-w3m/default.nix index 26f313f038df..d72ab12b580d 100644 --- a/pkgs/applications/editors/emacs-modes/emacs-w3m/default.nix +++ b/pkgs/applications/editors/emacs-modes/emacs-w3m/default.nix @@ -1,4 +1,4 @@ -{ fetchcvs, stdenv, emacs, w3m, imagemagick, texinfo, autoconf }: +{ fetchcvs, stdenv, emacs, w3m, imagemagick, texinfo, autoreconfHook }: let date = "2013-03-21"; in stdenv.mkDerivation rec { @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { sha256 = "1lmcj8rf83w13q8q68hh7sa1abc2m6j2zmfska92xdp7hslhdgc5"; }; - buildInputs = [ emacs w3m texinfo autoconf ]; + buildInputs = [ emacs w3m texinfo autoreconfHook ]; # XXX: Should we do the same for xpdf/evince, gv, gs, etc.? patchPhase = '' @@ -26,11 +26,10 @@ stdenv.mkDerivation rec { s|(w3m-which-command "identify")|"${imagemagick}/bin/identify"|g' ''; - configurePhase = '' - autoreconf -vfi && \ - ./configure --prefix="$out" --with-lispdir="$out/share/emacs/site-lisp" \ - --with-icondir="$out/share/emacs/site-lisp/images/w3m" - ''; + configureFlags = [ + "--with-lispdir=$out/share/emacs/site-lisp" + "--with-icondir=$out/share/emacs/site-lisp/images/w3m" + ]; postInstall = '' cd "$out/share/emacs/site-lisp" diff --git a/pkgs/applications/editors/emacs-modes/org/default.nix b/pkgs/applications/editors/emacs-modes/org/default.nix index f7289a3b400c..1189fd1d6d15 100644 --- a/pkgs/applications/editors/emacs-modes/org/default.nix +++ b/pkgs/applications/editors/emacs-modes/org/default.nix @@ -1,16 +1,17 @@ -{ fetchurl, stdenv, emacs, texinfo, which, texLive, texLiveCMSuper -, texLiveAggregationFun }: +{ fetchurl, stdenv, emacs, texinfo, which, texlive }: stdenv.mkDerivation rec { - name = "org-8.3.2"; + name = "org-8.3.3"; src = fetchurl { url = "http://orgmode.org/${name}.tar.gz"; - sha256 = "1f3mi1g4s8psfzq8mfbq3sccj7hsxvcfww0gf4337xs6jp8i3s4a"; + sha256 = "1vhymmd41v7an457xdjhk5zfc4q1x7z64b25rs1ccam5p550cq65"; }; buildInputs = [ emacs ]; - nativeBuildInputs = [ (texLiveAggregationFun { paths=[ texinfo texLive texLiveCMSuper ]; }) ]; + nativeBuildInputs = [ (texlive.combine { + inherit (texlive) scheme-small cm-super; + }) texinfo ]; configurePhase = '' sed -i mk/default.mk \ diff --git a/pkgs/applications/editors/emacs-modes/slime/default.nix b/pkgs/applications/editors/emacs-modes/slime/default.nix deleted file mode 100644 index 4c6326425369..000000000000 --- a/pkgs/applications/editors/emacs-modes/slime/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{stdenv, fetchFromGitHub, emacs}: - -stdenv.mkDerivation rec { - name = "slime"; - src = fetchFromGitHub { - owner = "slime"; - repo = "slime"; - rev = "f80c997ee9408a73637057759120c5b37b55d781"; - sha256 = "06ncqxzidmis6d7xsyi5pamg4pvifmc8l854xaa847rhagsvw7ax"; - }; - buildInputs = [emacs]; - installPhase = '' - rm -rf CVS - mkdir -p $out/share/emacs/site-lisp - cp -r . $out/share/emacs/site-lisp - ''; - meta = { - homepage = "https://common-lisp.net/project/slime/"; - description = "The Superior Lisp Interaction Mode for Emacs"; - license = "GPL"; - }; -} diff --git a/pkgs/applications/editors/flpsed/default.nix b/pkgs/applications/editors/flpsed/default.nix index 640b06d28071..eb1daa3ac3b2 100644 --- a/pkgs/applications/editors/flpsed/default.nix +++ b/pkgs/applications/editors/flpsed/default.nix @@ -1,11 +1,11 @@ {stdenv, fetchurl, fltk13, ghostscript}: stdenv.mkDerivation { - name = "flpsed-0.7.2"; + name = "flpsed-0.7.3"; src = fetchurl { - url = "http://www.ecademix.com/JohannesHofmann/flpsed-0.7.2.tar.gz"; - sha256 = "1132nlganr6x4f4lzcp9l0xihg2ky1l7xk8vq7r2l2qxs97vbif8"; + url = "http://www.ecademix.com/JohannesHofmann/flpsed-0.7.3.tar.gz"; + sha256 = "0vngqxanykicabhfdznisv82k5ypkxwg0s93ms9ribvhpm8vf2xp"; }; buildInputs = [ fltk13 ghostscript ]; diff --git a/pkgs/applications/editors/idea/common.nix b/pkgs/applications/editors/idea/common.nix new file mode 100644 index 000000000000..96689fa75ad6 --- /dev/null +++ b/pkgs/applications/editors/idea/common.nix @@ -0,0 +1,71 @@ +{ stdenv, fetchurl, makeDesktopItem, makeWrapper, patchelf, p7zip +, coreutils, gnugrep, which, git, python, unzip, androidsdk }: + +{ name, product, version, build, src, meta, jdk } @ attrs: + +with stdenv.lib; + +let loName = toLower product; + hiName = toUpper product; + execName = concatStringsSep "-" (init (splitString "-" name)); +in + +with stdenv; lib.makeOverridable mkDerivation rec { + inherit name build src meta; + desktopItem = makeDesktopItem { + name = execName; + exec = execName; + comment = lib.replaceChars ["\n"] [" "] meta.longDescription; + desktopName = product; + genericName = meta.description; + categories = "Application;Development;"; + icon = execName; + }; + + buildInputs = [ makeWrapper patchelf p7zip unzip ]; + + patchPhase = '' + get_file_size() { + local fname="$1" + echo $(ls -l $fname | cut -d ' ' -f5) + } + + munge_size_hack() { + local fname="$1" + local size="$2" + strip $fname + truncate --size=$size $fname + } + + interpreter=$(echo ${stdenv.glibc}/lib/ld-linux*.so.2) + if [ "${stdenv.system}" == "x86_64-linux" ]; then + target_size=$(get_file_size bin/fsnotifier64) + patchelf --set-interpreter "$interpreter" bin/fsnotifier64 + munge_size_hack bin/fsnotifier64 $target_size + else + target_size=$(get_file_size bin/fsnotifier) + patchelf --set-interpreter "$interpreter" bin/fsnotifier + munge_size_hack bin/fsnotifier $target_size + fi + ''; + + installPhase = '' + mkdir -p $out/{bin,$name,share/pixmaps,libexec/${name}} + cp -a . $out/$name + ln -s $out/$name/bin/${loName}.png $out/share/pixmaps/${execName}.png + mv bin/fsnotifier* $out/libexec/${name}/. + + jdk=${jdk.home} + item=${desktopItem} + + makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${execName}" \ + --prefix PATH : "$out/libexec/${name}:${jdk}/bin:${coreutils}/bin:${gnugrep}/bin:${which}/bin:${git}/bin" \ + --set JDK_HOME "$jdk" \ + --set ${hiName}_JDK "$jdk" \ + --set ANDROID_JAVA_HOME "$jdk" \ + --set JAVA_HOME "$jdk" + + ln -s "$item/share/applications" $out/share + ''; + +} diff --git a/pkgs/applications/editors/idea/default.nix b/pkgs/applications/editors/idea/default.nix index 117fa264f215..932f31d86509 100644 --- a/pkgs/applications/editors/idea/default.nix +++ b/pkgs/applications/editors/idea/default.nix @@ -1,78 +1,19 @@ -{ stdenv, fetchurl, makeDesktopItem, makeWrapper, patchelf, p7zip, jdk -, coreutils, gnugrep, which, git, python, unzip, androidsdk +{ stdenv, callPackage, fetchurl, makeDesktopItem, makeWrapper, patchelf +, coreutils, gnugrep, which, git, python, unzip, p7zip +, androidsdk, jdk, oraclejdk8 }: assert stdenv.isLinux; let - mkIdeaProduct = with stdenv.lib; - { name, product, version, build, src, meta }: - - let loName = toLower product; - hiName = toUpper product; - execName = concatStringsSep "-" (init (splitString "-" name)); - in - - with stdenv; lib.makeOverridable mkDerivation rec { - inherit name build src meta; - desktopItem = makeDesktopItem { - name = execName; - exec = execName; - comment = lib.replaceChars ["\n"] [" "] meta.longDescription; - desktopName = product; - genericName = meta.description; - categories = "Application;Development;"; - icon = execName; - }; - - buildInputs = [ makeWrapper patchelf p7zip unzip ]; - - patchPhase = '' - get_file_size() { - local fname="$1" - echo $(ls -l $fname | cut -d ' ' -f5) - } - - munge_size_hack() { - local fname="$1" - local size="$2" - strip $fname - truncate --size=$size $fname - } - - interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2) - if [ "${stdenv.system}" == "x86_64-linux" ]; then - target_size=$(get_file_size bin/fsnotifier64) - patchelf --set-interpreter "$interpreter" bin/fsnotifier64 - munge_size_hack bin/fsnotifier64 $target_size - else - target_size=$(get_file_size bin/fsnotifier) - patchelf --set-interpreter "$interpreter" bin/fsnotifier - munge_size_hack bin/fsnotifier $target_size - fi - ''; - - installPhase = '' - mkdir -p $out/{bin,$name,share/pixmaps,libexec/${name}} - cp -a . $out/$name - ln -s $out/$name/bin/${loName}.png $out/share/pixmaps/${execName}.png - mv bin/fsnotifier* $out/libexec/${name}/. - - jdk=${jdk.home} - item=${desktopItem} - - makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${execName}" \ - --prefix PATH : "$out/libexec/${name}:${jdk}/bin:${coreutils}/bin:${gnugrep}/bin:${which}/bin:${git}/bin" \ - --set JDK_HOME "$jdk" \ - --set ${hiName}_JDK "$jdk" \ - --set ANDROID_JAVA_HOME "$jdk" \ - --set JAVA_HOME "$jdk" - - ln -s "$item/share/applications" $out/share - ''; - - }; + bnumber = with stdenv.lib; build: last (splitString "-" build); + mkIdeaProduct' = callPackage ./common.nix { }; + mkIdeaProduct = attrs: mkIdeaProduct' ({ + # After IDEA 15 we can no longer use OpenJDK. + # https://youtrack.jetbrains.com/issue/IDEA-147272 + jdk = if (bnumber attrs.build) < "143" then jdk else oraclejdk8; + } // attrs); buildAndroidStudio = { name, version, build, src, license, description }: let drv = (mkIdeaProduct rec { @@ -235,6 +176,18 @@ in }; }; + idea14-community = buildIdea rec { + name = "idea-community-${version}"; + version = "14.1.6"; + build = "IC-141.3056.4"; + description = "Integrated Development Environment (IDE) by Jetbrains, community edition"; + license = stdenv.lib.licenses.asl20; + src = fetchurl { + url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz"; + sha256 = "157969b37sbafby1r1gva2xm3a3y0dgj7pisgxmk8k1d5rgncvil"; + }; + }; + idea-community = buildIdea rec { name = "idea-community-${version}"; version = "15.0.2"; @@ -273,25 +226,25 @@ in pycharm-community = buildPycharm rec { name = "pycharm-community-${version}"; - version = "5.0.1"; - build = "143.595"; + version = "5.0.3"; + build = "143.1559.1"; description = "PyCharm Community Edition"; license = stdenv.lib.licenses.asl20; src = fetchurl { url = "https://download.jetbrains.com/python/${name}.tar.gz"; - sha256 = "14m3imy64cp2l9pnmknxbjzj3z30rx88r4brz9d5xk5qailjg2wf"; + sha256 = "1xb3qxhl8ln488v0hmjqkzpyypm7wh941c7syi4cs7plbdp6w4c2"; }; }; pycharm-professional = buildPycharm rec { name = "pycharm-professional-${version}"; - version = "5.0.1"; - build = "143.595"; + version = "5.0.3"; + build = "143.1559.1"; description = "PyCharm Professional Edition"; license = stdenv.lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/python/${name}.tar.gz"; - sha256 = "102sfjvchk80911w3qpjsp30wvq73kgpwyqcqdgqxcgm2vqh3183"; + sha256 = "1v2g9867nn3id1zfbg4zwj0c0z9d72rl9c1dz6vs2c4j0y4gy9xl"; }; }; diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix index 3d6c9ffa859f..e2715b1499a5 100644 --- a/pkgs/applications/editors/vim/configurable.nix +++ b/pkgs/applications/editors/vim/configurable.nix @@ -108,26 +108,14 @@ composableDerivation { // edf { name = "python"; - feat = "pythoninterp"; + feat = "python${if python ? isPy3 then "3" else ""}interp"; enable = { nativeBuildInputs = [ python ]; } // lib.optionalAttrs stdenv.isDarwin { configureFlags - = [ "--enable-pythoninterp=yes" - "--with-python-config-dir=${python}/lib" ]; - }; - } - - // edf { - name = "python3"; - feat = "python3interp"; - enable = { - nativeBuildInputs = [ pkgs.python3 ]; - } // lib.optionalAttrs stdenv.isDarwin { - configureFlags - = [ "--enable-python3interp=yes" - "--with-python3-config-dir=${pkgs.python3}/lib" - "--disable-pythoninterp" ]; + = [ "--enable-python${if python ? isPy3 then "3" else ""}interp=yes" + "--with-python${if python ? isPy3 then "3" else ""}-config-dir=${python}/lib" + "--disable-python${if python ? isPy3 then "" else "3"}interp" ]; }; } @@ -160,7 +148,6 @@ composableDerivation { cfg = { luaSupport = config.vim.lua or true; pythonSupport = config.vim.python or true; - python3Support = config.vim.python3 or false; rubySupport = config.vim.ruby or true; nlsSupport = config.vim.nls or false; tclSupport = config.vim.tcl or false; |