Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IntelliJ IDEA CE version 11. #89

Closed
wants to merge 13 commits into from
22 changes: 22 additions & 0 deletions pkgs/applications/editors/intellij-idea/builder.sh
Original file line number Diff line number Diff line change
@@ -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}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


# Create desktop item.
mkdir -p $out/share/applications
cp $out/bin/idea_CE128.png $out/share/applications/
cp ${desktopItem}/share/applications/* $out/share/applications/

31 changes: 31 additions & 0 deletions pkgs/applications/editors/intellij-idea/default.nix
Original file line number Diff line number Diff line change
@@ -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;";
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;";
  };


# 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;
}

2 changes: 1 addition & 1 deletion pkgs/build-support/fetchgit/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
];
}

22 changes: 17 additions & 5 deletions pkgs/development/libraries/fontconfig/default.nix
Original file line number Diff line number Diff line change
@@ -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=";

Expand All @@ -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/;
Expand Down
44 changes: 37 additions & 7 deletions pkgs/development/libraries/freetype/default.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -25,6 +51,7 @@ stdenv.mkDerivation rec {
buildInputs = stdenv.lib.optional (stdenv.system == "i686-freebsd") gnumake;

enableParallelBuilding = true;
doCheck = true;

postInstall =
''
Expand All @@ -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)
};
}
22 changes: 22 additions & 0 deletions pkgs/development/libraries/freetype/enable-validation.patch
Original file line number Diff line number Diff line change
@@ -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.
#
10 changes: 6 additions & 4 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down Expand Up @@ -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;
Expand Down