1{ stdenv, fetchurl, unzip, jdk, pkgconfig, gtk
2, libXtst
3, libXi
4, mesa
5, webkit
6, libsoup
7}:
8
9let
10 platformMap = {
11 "x86_64-linux" =
12 { platform = "gtk-linux-x86_64";
13 sha256 = "0hq48zfqx2p0fqr0rlabnz2pdj0874k19918a4dbj0fhzkhrh959"; };
14 "i686-linux" =
15 { platform = "gtk-linux-x86";
16 sha256 = "10si8kmc7c9qmbpzs76609wkfb784pln3qpmra73gb3fbk7z8caf"; };
17 "x86_64-darwin" =
18 { platform = "cocoa-macosx-x86_64";
19 sha256 = "1565gg63ssrl04fh355vf9mnmq8qwwki3zpc3ybm7bylgkfwc9h4"; };
20 };
21
22 metadata = assert platformMap ? ${stdenv.system}; platformMap.${stdenv.system};
23
24in stdenv.mkDerivation rec {
25 version = "3.7.2";
26 fullVersion = "${version}-201202080800";
27 name = "swt-${version}";
28
29 builder = ./builder.sh;
30
31 # Alas, the Eclipse Project apparently doesn't produce source-only
32 # releases of SWT. So we just grab a binary release and extract
33 # "src.zip" from that.
34 src = fetchurl {
35 url = "http://archive.eclipse.org/eclipse/downloads/drops/R-${fullVersion}/${name}-${metadata.platform}.zip";
36 sha256 = metadata.sha256;
37 };
38
39 buildInputs = [unzip jdk pkgconfig gtk libXtst libXi mesa webkit libsoup];
40 inherit jdk;
41}