diff options
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/jdk/builder.sh | 19 | ||||
-rw-r--r-- | pkgs/development/compilers/jdk/default-5.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/jdk/jdk5-oracle-linux.nix | 28 | ||||
-rw-r--r-- | pkgs/development/compilers/ocaml/3.11.1.nix | 5 | ||||
-rw-r--r-- | pkgs/development/compilers/ocaml/3.12.0.nix | 57 | ||||
-rw-r--r-- | pkgs/development/compilers/swi-prolog/default.nix | 9 |
6 files changed, 89 insertions, 33 deletions
diff --git a/pkgs/development/compilers/jdk/builder.sh b/pkgs/development/compilers/jdk/builder.sh index 71dd6c433f67..7f402dab1588 100644 --- a/pkgs/development/compilers/jdk/builder.sh +++ b/pkgs/development/compilers/jdk/builder.sh @@ -1,24 +1,7 @@ buildInputs="$unzip" source $stdenv/setup -src=$filename.bin - -if ! test -e "$pathname"; then - echo "" - echo "SORRY!" - echo "You should download \`$(basename $pathname)' from Sun and place it in $(dirname $pathname)." - echo "Blame Sun, not us." - echo "" - exit 1 -fi - -actual=$(md5sum -b $pathname | cut -c1-32) -if test "$actual" != "$md5"; then - echo "hash is $actual, expected $md5" - exit 1 -fi - -unzip $pathname || true +unzip $src || true ensureDir $out mv $dirname/* $out/ diff --git a/pkgs/development/compilers/jdk/default-5.nix b/pkgs/development/compilers/jdk/default-5.nix index fb25cd704c44..dfd4e31f4b37 100644 --- a/pkgs/development/compilers/jdk/default-5.nix +++ b/pkgs/development/compilers/jdk/default-5.nix @@ -1,9 +1,9 @@ -{stdenv, fetchurl, unzip}: +{stdenv, fetchurl, unzip, requireFile}: if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then (import ./jdk5-oracle-linux.nix) { - inherit stdenv fetchurl unzip; + inherit stdenv fetchurl unzip requireFile; } else abort "the Java 5 SDK is not supported on this platform" diff --git a/pkgs/development/compilers/jdk/jdk5-oracle-linux.nix b/pkgs/development/compilers/jdk/jdk5-oracle-linux.nix index 06471c482a19..8884585d154d 100644 --- a/pkgs/development/compilers/jdk/jdk5-oracle-linux.nix +++ b/pkgs/development/compilers/jdk/jdk5-oracle-linux.nix @@ -8,19 +8,29 @@ * Note that this is not necessary if someone has already pushed a * binary. */ -{stdenv, fetchurl, unzip}: +{stdenv, fetchurl, unzip, requireFile}: assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"; -let name = "jdk-1_5_0_22"; in -stdenv.mkDerivation { - inherit name; - filename = "jdk-1_5_0_22"; +stdenv.mkDerivation rec { + name = "jdk-1_5_0_22"; dirname = "jdk1.5.0_22"; builder = ./builder.sh; - pathname = if stdenv.system == "x86_64-linux" then "/tmp/${name}-linux-amd64.bin" else "/tmp/${name}-linux-i586.bin"; - md5 = if stdenv.system == "x86_64-linux" then "b62abcaf9ea8617c50fa213bbc88824a" else "df5dae6d50d2abeafb472dde6d9a17f3"; + src = requireFile { + message = '' + SORRY! + We may not download the needed binary distribution automatically. + You should download ${distfilename} from Sun and add it to store. + For example, "nix-prefetch-url file:///\$PWD/${distfilename}" in the + directory where you saved it is OK. + Blame Sun, not us. + ''; + name = distfilename; + sha256 = if stdenv.system == "x86_64-linux" then + "1h63gigvg8id95igcj8xw7qvxs4p2y9hvx4xbvkwg8bji3ifb0sk" + else "0655n2q1y023zzwbk6gs9vwsnb29jc0m3bg3x3xdw623qgb4k6px"; + }; + distfilename = if stdenv.system == "x86_64-linux" then "${name}-linux-amd64.bin" else "${name}-linux-i586.bin"; - stdenv = stdenv; - inherit unzip; + inherit unzip stdenv; } diff --git a/pkgs/development/compilers/ocaml/3.11.1.nix b/pkgs/development/compilers/ocaml/3.11.1.nix index 8acb2bede6bd..a1d03b7cdf87 100644 --- a/pkgs/development/compilers/ocaml/3.11.1.nix +++ b/pkgs/development/compilers/ocaml/3.11.1.nix @@ -56,6 +56,11 @@ stdenv.mkDerivation rec { generators, a pre-processor pretty-printer (camlp4) and a documentation generator (ocamldoc). ''; + + platforms = stdenv.lib.platforms.all; + maintainers = [ + stdenv.lib.maintainers.z77z + ]; }; } diff --git a/pkgs/development/compilers/ocaml/3.12.0.nix b/pkgs/development/compilers/ocaml/3.12.0.nix new file mode 100644 index 000000000000..bf767af5c9a7 --- /dev/null +++ b/pkgs/development/compilers/ocaml/3.12.0.nix @@ -0,0 +1,57 @@ +{ stdenv, fetchurl, ncurses, x11 }: + +let + useX11 = stdenv.system != "armv5tel-linux"; + useNativeCompilers = stdenv.system != "armv5tel-linux"; + inherit (stdenv.lib) optionals optionalString; +in + +stdenv.mkDerivation rec { + + name = "ocaml-3.12.0"; + + src = fetchurl { + url = "http://caml.inria.fr/pub/distrib/ocaml-3.12/${name}.tar.bz2"; + sha256 = "0fzczy1s38ihlvghngn4l4n7gnyywnwd7c172276bjcy41b1g08p"; + }; + + prefixKey = "-prefix "; + configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11 ]; + buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt"; + buildInputs = [ncurses] ++ optionals useX11 [ x11 ]; + installTargets = "install" + optionalString useNativeCompilers " installopt"; + patchPhase = '' + CAT=$(type -tp cat) + sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang + ''; + postBuild = '' + ensureDir $out/include + ln -sv $out/lib/ocaml/caml $out/include/caml + ''; + + meta = { + homepage = http://caml.inria.fr/ocaml; + licenses = [ "QPL" /* compiler */ "LGPLv2" /* library */ ]; + description = "Objective Caml, the most popular variant of the Caml language"; + + longDescription = + '' Objective Caml is the most popular variant of the Caml language. + From a language standpoint, it extends the core Caml language with a + fully-fledged object-oriented layer, as well as a powerful module + system, all connected by a sound, polymorphic type system featuring + type inference. + + The Objective Caml system is an industrial-strength implementation + of this language, featuring a high-performance native-code compiler + (ocamlopt) for 9 processor architectures (IA32, PowerPC, AMD64, + Alpha, Sparc, Mips, IA64, HPPA, StrongArm), as well as a bytecode + compiler (ocamlc) and an interactive read-eval-print loop (ocaml) + for quick development and portability. The Objective Caml + distribution includes a comprehensive standard library, a replay + debugger (ocamldebug), lexer (ocamllex) and parser (ocamlyacc) + generators, a pre-processor pretty-printer (camlp4) and a + documentation generator (ocamldoc). + ''; + }; + +} diff --git a/pkgs/development/compilers/swi-prolog/default.nix b/pkgs/development/compilers/swi-prolog/default.nix index 7690c980f5d9..255ea1495d63 100644 --- a/pkgs/development/compilers/swi-prolog/default.nix +++ b/pkgs/development/compilers/swi-prolog/default.nix @@ -1,11 +1,12 @@ { stdenv, fetchurl, gmp, readline, openssl, libjpeg, unixODBC, zlib, libXinerama, libXft, libXpm, libSM, libXt }: -stdenv.mkDerivation { - name = "swi-prolog-5.6.64"; +stdenv.mkDerivation rec { + version = "5.10.2"; + name = "swi-prolog-${version}"; src = fetchurl { - url = "http://gollem.science.uva.nl/cgi-bin/nph-download/SWI-Prolog/pl-5.6.64.tar.gz"; - sha256 = "b0e70c3c02b7753ed440359746e7729d21c93e42689c1f0f32b148167b1b2c66"; + url = "http://www.swi-prolog.org/download/stable/src/pl-${version}.tar.gz"; + sha256 = "1a3ebbcd649f429a41b64561d38423692e00524c29227432d0eb5a0e24e2a4c9"; }; buildInputs = [gmp readline openssl libjpeg unixODBC libXinerama libXft libXpm libSM libXt zlib]; |