Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add IntelliJ IDEA CE version 11. #89

Closed
wants to merge 13 commits into from

4 participants

@coreyoconnor

The source distribution static binaries of fsnotifier and fsnotifier64 are patched.
This can be improved: I'm not sure of the best way to fetch patch both the 32bit and 64bit versions. Only the one that is assumed to be picked by the idea.sh is patched.

coreyoconnor added some commits
@coreyoconnor coreyoconnor Add IntelliJ IDEA CE version 11.
The source distribution static binaries of fsnotifier and fsnotifier64 are patched.
I'm not sure of the best way to fetch patch both the 32bit and 64bit versions. Only the one that is
assumed to be picked by the idea.sh is patched.
f8a2ac5
@coreyoconnor coreyoconnor Merge branch 'upstream' 87a530a
@coreyoconnor coreyoconnor Merge branch 'upstream' a3f851c
@coreyoconnor coreyoconnor patch scala shebang. 4410289
@coreyoconnor coreyoconnor Up version of Dev86 to 0.16.19.
0.16.18 was removed from the server.
f3a6d34
@aszlig

What's the reason for the custom builder here?

@aszlig

You could do this as well in a postUnpack hook.

@aszlig aszlig commented on the diff
pkgs/applications/editors/intellij-idea/builder.sh
((1 lines not shown))
+source $stdenv/setup
+
+export PATH=$ant/bin:$jdk/bin:$PATH
+
+set -e
+
+tar -jxvf $src
+cd ideaIC-111.69
+
+ant build
+
+mkdir -p $out
+
+tar --strip-components=1 -zxvf out/artifacts/ideaIC-111.SNAPSHOT.tar.gz -C $out
+
+patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/bin/${notifierToPatch}
@aszlig Collaborator
aszlig added a note

You could omit the notifierToPatch attribute and use "$out"/bin/fsnotifier* instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@aszlig aszlig commented on the diff
pkgs/applications/editors/intellij-idea/default.nix
((7 lines not shown))
+ src = fetchurl {
+ url = http://download.jetbrains.com/idea/ideaIC-11-src.tar.bz2;
+ sha256 = "0wyq4n8gz473kvxz9n8l16c0chscqvj95k4jdbga9b60n59987vr";
+ };
+
+ builder = ./builder.sh;
+
+ desktopItem = makeDesktopItem {
+ name = "IntelliJ-IDEA-CE";
+ exec = "idea.sh";
+ icon = "idea_CE128.png";
+ comment = "IntelliJ IDEA Community Edition";
+ desktopName = "IntelliJ IDEA CE";
+ genericName = "IntelliJ IDEA Community Edition";
+ categories = "Application;Development;";
+ };
@aszlig Collaborator
aszlig added a note

Please indent using two spaces and don't try to align function calls within the call, as this wrapps your code way too far to the right.
http://hydra.nixos.org/build/3009964/download/2/manual/#chap-conventions

An example for this case:

  desktopItem = makeDesktopItem {   
    name = "IntelliJ-IDEA-CE";
    exec = "idea.sh";
    icon = "idea_CE128.png";
    comment = "IntelliJ IDEA Community Edition";
    desktopName = "IntelliJ IDEA CE";
    genericName = "IntelliJ IDEA Community Edition";
    categories = "Application;Development;";
  };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@coreyoconnor

Thanks for the feedback. I'll make the appropriate updates.

@vcunat vcunat referenced this pull request from a commit
@vcunat vcunat freetype+fontconfig: add infinality and enable it
Also add fontconfig checks
, change license to "unfree" if using patented code.

Inspired by Corey O'Connor in #89
coreyoconnor@27fec0a
610796d
@vcunat
Collaborator

I pushed infinality into x-updates, as fontconfig affects very many packages.

@vcunat vcunat referenced this pull request from a commit
@coreyoconnor coreyoconnor add winetricks, modified by vcunat@gmail.com
Originally from #89.
fde87b3
coreyoconnor added some commits
@coreyoconnor coreyoconnor Merge branch 'upstream'
Conflicts:
	pkgs/misc/emulators/wine/build_winetricks.sh
	pkgs/misc/emulators/wine/winetricks.nix
	pkgs/top-level/all-packages.nix
4073441
@coreyoconnor coreyoconnor Merge remote-tracking branch 'upstream/master' 0dcd483
@coreyoconnor

Thanks for finishing the infinality patch!
What should I do with this pull request? Seems like I should cancel this one, fix up the IntelliJ patches, then open a new one. Or should I jsut keep this open until I get around to fixing the intellij patches? Not sure of the correct github etiquette for this.

@vcunat
Collaborator

I would keep this request. I takes commits by the branch name, so you can change it completely.

BTW, I tried to fix the problems in the expression and also update it to 12.0.3 https://github.com/vcunat/nixpkgs/compare/vlada;idea Feel free to build on it. It compiles fine, but on running I get the exceptions below. I haven't looked into it since.


$ ./result/bin/idea.sh
Java HotSpot(TM) 64-Bit Server VM (build 20.7-b02, mixed mode)
Exception in thread "main" java.lang.NoClassDefFoundError: java/lang/ReflectiveOperationException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:40)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:34)
at com.intellij.idea.Main.main(Main.java:81)
Caused by: java.lang.ClassNotFoundException: java.lang.ReflectiveOperationException
at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:79)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at com.intellij.util.lang.UrlClassLoader.loadClass(UrlClassLoader.java:92)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 5 more

@shlevy
Collaborator

@coreyoconnor Do you want this still to be open?

@shlevy
Collaborator

Closing this for now, feel free to reopen if this is still valid.

@shlevy shlevy closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 5, 2012
  1. @coreyoconnor

    Add IntelliJ IDEA CE version 11.

    coreyoconnor authored
    The source distribution static binaries of fsnotifier and fsnotifier64 are patched.
    I'm not sure of the best way to fetch patch both the 32bit and 64bit versions. Only the one that is
    assumed to be picked by the idea.sh is patched.
Commits on Aug 7, 2012
  1. @coreyoconnor

    Merge branch 'upstream'

    coreyoconnor authored
Commits on Aug 16, 2012
  1. @coreyoconnor

    Merge branch 'upstream'

    coreyoconnor authored
  2. @coreyoconnor

    patch scala shebang.

    coreyoconnor authored
Commits on Aug 18, 2012
  1. @coreyoconnor

    Up version of Dev86 to 0.16.19.

    coreyoconnor authored
    0.16.18 was removed from the server.
Commits on Feb 3, 2013
  1. @coreyoconnor

    Merge branch 'upstream'

    coreyoconnor authored
    Conflicts:
    	pkgs/development/compilers/dev86/default.nix
    	pkgs/development/compilers/scala/default.nix
  2. @coreyoconnor
  3. @coreyoconnor

    add winetricks

    coreyoconnor authored
  4. @coreyoconnor

    add infinality patches

    coreyoconnor authored
  5. @coreyoconnor
Commits on Feb 14, 2013
  1. @coreyoconnor

    Merge branch 'upstream'

    coreyoconnor authored
    Conflicts:
    	pkgs/misc/emulators/wine/build_winetricks.sh
    	pkgs/misc/emulators/wine/winetricks.nix
    	pkgs/top-level/all-packages.nix
Commits on Feb 16, 2013
  1. @coreyoconnor
Commits on Feb 17, 2013
  1. @coreyoconnor
This page is out of date. Refresh to see the latest.
View
22 pkgs/applications/editors/intellij-idea/builder.sh
@@ -0,0 +1,22 @@
+source $stdenv/setup
+
+export PATH=$ant/bin:$jdk/bin:$PATH
+
+set -e
+
+tar -jxvf $src
+cd ideaIC-111.69
+
+ant build
+
+mkdir -p $out
+
+tar --strip-components=1 -zxvf out/artifacts/ideaIC-111.SNAPSHOT.tar.gz -C $out
+
+patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/bin/${notifierToPatch}
@aszlig Collaborator
aszlig added a note

You could omit the notifierToPatch attribute and use "$out"/bin/fsnotifier* instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+
+# Create desktop item.
+mkdir -p $out/share/applications
+cp $out/bin/idea_CE128.png $out/share/applications/
+cp ${desktopItem}/share/applications/* $out/share/applications/
+
View
31 pkgs/applications/editors/intellij-idea/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, patchelf, makeDesktopItem, ant, jdk } :
+
+stdenv.mkDerivation rec {
+ name = "intellij-idea-ce-11";
+ description = "IntelliJ IDEA Community Edition version 11.1.69";
+
+ src = fetchurl {
+ url = http://download.jetbrains.com/idea/ideaIC-11-src.tar.bz2;
+ sha256 = "0wyq4n8gz473kvxz9n8l16c0chscqvj95k4jdbga9b60n59987vr";
+ };
+
+ builder = ./builder.sh;
+
+ desktopItem = makeDesktopItem {
+ name = "IntelliJ-IDEA-CE";
+ exec = "idea.sh";
+ icon = "idea_CE128.png";
+ comment = "IntelliJ IDEA Community Edition";
+ desktopName = "IntelliJ IDEA CE";
+ genericName = "IntelliJ IDEA Community Edition";
+ categories = "Application;Development;";
+ };
@aszlig Collaborator
aszlig added a note

Please indent using two spaces and don't try to align function calls within the call, as this wrapps your code way too far to the right.
http://hydra.nixos.org/build/3009964/download/2/manual/#chap-conventions

An example for this case:

  desktopItem = makeDesktopItem {   
    name = "IntelliJ-IDEA-CE";
    exec = "idea.sh";
    icon = "idea_CE128.png";
    comment = "IntelliJ IDEA Community Edition";
    desktopName = "IntelliJ IDEA CE";
    genericName = "IntelliJ IDEA Community Edition";
    categories = "Application;Development;";
  };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+
+ # TODO(corey): I'm confused on how to provide both the architecture's dynamic linker path.
+ notifierToPatch = if stdenv.system == "x86_64-linux"
+ then "fsnotifier64"
+ else "fsnotifier";
+
+ inherit ant jdk;
+}
+
View
2  pkgs/build-support/fetchgit/default.nix
@@ -42,7 +42,7 @@ stdenv.mkDerivation {
# easy proxy configuration. This is impure, but a fixed-output
# derivation like fetchurl is allowed to do so since its result is
# by definition pure.
- "http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy"
+ "http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy" "GIT_SSH"
];
}
View
22 pkgs/development/libraries/fontconfig/default.nix
@@ -1,16 +1,24 @@
{ stdenv, fetchurl, pkgconfig, freetype, expat }:
stdenv.mkDerivation rec {
- name = "fontconfig-2.10.1";
+ name = "fontconfig-2.10.2";
src = fetchurl {
- url = "http://fontconfig.org/release/${name}.tar.gz";
- sha256 = "08h252crb3aqciwdk81jypmz2i7618dzqn3zlr87w1f017wjp4f3";
+ url = "http://fontconfig.org/release/${name}.tar.bz2";
+ sha256 = "0llraqw86jmw4vzv7inskp3xxm2gc64my08iwq5mzncgfdbfza4f";
};
- buildInputs = [ pkgconfig freetype ];
+ infinality_patch = with freetype.infinality; if useInfinality
+ then let subvers = "1";
+ in fetchurl {
+ url = "${base_URL}/fontconfig-infinality-1-${vers}_${subvers}.tar.bz2";
+ sha256 = "1fm5xx0mx2243jrq5rxk4v0ajw2nawpj23399h710bx6hd1rviq7";
+ }
+ else null;
- propagatedBuildInputs = [ expat ]; # !!! shouldn't be necessary, but otherwise pango breaks
+ buildInputs = [ pkgconfig freetype expat ];
+
+ #propagatedBuildInputs = [ expat ]; # !!! shouldn't be necessary, but otherwise pango breaks
configureFlags = "--with-confdir=/etc/fonts --with-cache-dir=/var/cache/fontconfig --disable-docs --with-default-fonts=";
@@ -28,6 +36,10 @@ stdenv.mkDerivation rec {
# Don't try to write to /etc/fonts or /var/cache/fontconfig at install time.
installFlags = "CONFDIR=$(out)/etc/fonts RUN_FC_CACHE_TEST=false fc_cachedir=$(TMPDIR)/dummy";
+ postInstall = if !freetype.infinality.useInfinality then "" else ''
+ cd "$out/etc/fonts" && tar xvf ${infinality_patch}
+ '';
+
meta = {
description = "A library for font customization and configuration";
homepage = http://fontconfig.org/;
View
44 pkgs/development/libraries/freetype/default.nix
@@ -1,22 +1,48 @@
{ stdenv, fetchurl, gnumake
-, # FreeType supports sub-pixel rendering. This is patented by
+ # FreeType supports sub-pixel rendering. This is patented by
# Microsoft, so it is disabled by default. This option allows it to
# be enabled. See http://www.freetype.org/patents.html.
- useEncumberedCode ? false
+, useEncumberedCode ? false
+, useInfinality ? true
}:
+# assert !(useEncumberedCode && useInfinality); # probably wouldn't make sense
+
+let
+ version = "2.4.11";
+ infinality = rec {
+ inherit useInfinality;
+ vers = "20130104";
+ subvers = "04";
+ sha256 = "0dqglig34lfcw0w6sm6vmich0pcvq303vyh8jzqapvxgvrpr2156";
+
+ base_URL = "http://www.infinality.net/fedora/linux/zips";
+ url = "${base_URL}/freetype-infinality-${version}-${vers}_${subvers}-x86_64.tar.bz2";
+ };
+
+in
stdenv.mkDerivation rec {
- name = "freetype-2.4.10";
+ name = "freetype-${version}";
src = fetchurl {
url = "mirror://sourceforge/freetype/${name}.tar.bz2";
- sha256 = "0bwrkqpygayfc1rf6rr1nb8l3svgn1fmjz8davg2hnf46cn293hc";
+ sha256 = "0gxyzxqpyf8g85y6g1zc1wqrh71prbbk8xfw4m8rwzb4ck5hp7gg";
};
+ infinality_patch = if useInfinality
+ then fetchurl { inherit (infinality) url sha256; }
+ else null;
+
configureFlags = "--disable-static";
- NIX_CFLAGS_COMPILE = stdenv.lib.optionalString useEncumberedCode
- "-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING=1";
+ NIX_CFLAGS_COMPILE = with stdenv.lib;
+ " -fno-strict-aliasing" # from Gentoo, see https://bugzilla.redhat.com/show_bug.cgi?id=506840
+ + optionalString useEncumberedCode " -DFT_CONFIG_OPTION_SUBPIXEL_RENDERING=1"
+ + optionalString useInfinality " -DTT_CONFIG_OPTION_SUBPIXEL_HINTING=1"
+ ;
+
+ patches = [ ./enable-validation.patch ] # from Gentoo
+ ++ stdenv.lib.optional useInfinality [ infinality_patch ];
# The asm for armel is written with the 'asm' keyword.
CFLAGS = stdenv.lib.optionalString stdenv.isArm "-std=gnu99";
@@ -25,6 +51,7 @@ stdenv.mkDerivation rec {
buildInputs = stdenv.lib.optional (stdenv.system == "i686-freebsd") gnumake;
enableParallelBuilding = true;
+ doCheck = true;
postInstall =
''
@@ -38,9 +65,12 @@ stdenv.mkDerivation rec {
configureFlags = "--disable-static CC_BUILD=gcc";
};
+ passthru = { inherit infinality; }; # for fontconfig
+
meta = {
description = "A font rendering engine";
homepage = http://www.freetype.org/;
- license = "GPLv2+"; # or the FreeType License (BSD + advertising clause)
+ license = if useEncumberedCode then "unfree"
+ else "GPLv2+"; # or the FreeType License (BSD + advertising clause)
};
}
View
22 pkgs/development/libraries/freetype/enable-validation.patch
@@ -0,0 +1,22 @@
+Enables gxvalid and otvalid modules for use with ftvalid.
+
+--- freetype-2.2.1/modules.cfg.orig 2006-07-07 21:01:09.000000000 -0400
++++ freetype-2.2.1/modules.cfg 2006-07-07 21:01:54.000000000 -0400
+@@ -110,7 +110,7 @@
+ AUX_MODULES += cache
+
+ # TrueType GX/AAT table validation. Needs ftgxval.c below.
+-# AUX_MODULES += gxvalid
++AUX_MODULES += gxvalid
+
+ # Support for streams compressed with gzip (files with suffix .gz).
+ #
+@@ -124,7 +124,7 @@
+
+ # OpenType table validation. Needs ftotval.c below.
+ #
+-# AUX_MODULES += otvalid
++AUX_MODULES += otvalid
+
+ # Auxiliary PostScript driver component to share common code.
+ #
View
10 pkgs/top-level/all-packages.nix
@@ -7323,6 +7323,8 @@ let
inherit (pythonPackages) lxml;
};
+ intellij_idea_ce_11 = callPackage ../applications/editors/intellij-idea { };
+
ion3 = callPackage ../applications/window-managers/ion-3 {
lua = lua5;
};
@@ -8438,10 +8440,10 @@ let
enlightenment = callPackage ../desktops/enlightenment { };
- # e17 = recurseIntoAttrs (
- # let callPackage = newScope pkgs.e17; in
- # import ../desktops/e17 { inherit callPackage pkgs; }
- # );
+ e17 = recurseIntoAttrs (
+ let callPackage = newScope pkgs.e17; in
+ import ../desktops/e17 { inherit callPackage pkgs; }
+ );
gnome2 = callPackage ../desktops/gnome-2 {
callPackage = pkgs.newScope pkgs.gnome2;
Something went wrong with that request. Please try again.