Merge branch 'java'

This commit is contained in:
Eelco Dolstra
2014-01-13 13:16:17 +01:00
42 changed files with 476 additions and 899 deletions

View File

@@ -1,47 +0,0 @@
{stdenv, fetchurl, unzip}:
stdenv.mkDerivation rec {
version = "1.5.1";
name = "clojure-binary-${version}";
src = fetchurl {
url = "http://repo1.maven.org/maven2/org/clojure/clojure/${version}/clojure-${version}.zip";
sha256 = "1qgiji6ddvv40khp3qb3xfz09g7p4nnsh3pywqglb9f16v534yzy";
};
buildInputs = [ unzip ];
phases = "unpackPhase installPhase";
installPhase = "
mkdir -p $out/lib/java
cp clojure-${version}.jar clojure.jar
install -t $out/lib/java clojure.jar
";
meta = {
description = "a Lisp dialect for the JVM";
homepage = http://clojure.org/;
license = stdenv.lib.licenses.bsd3;
longDescription = ''
Clojure is a dynamic programming language that targets the Java
Virtual Machine. It is designed to be a general-purpose language,
combining the approachability and interactive development of a
scripting language with an efficient and robust infrastructure for
multithreaded programming. Clojure is a compiled language - it
compiles directly to JVM bytecode, yet remains completely
dynamic. Every feature supported by Clojure is supported at
runtime. Clojure provides easy access to the Java frameworks, with
optional type hints and type inference, to ensure that calls to Java
can avoid reflection.
Clojure is a dialect of Lisp, and shares with Lisp the code-as-data
philosophy and a powerful macro system. Clojure is predominantly a
functional programming language, and features a rich set of immutable,
persistent data structures. When mutable state is needed, Clojure
offers a software transactional memory system and reactive Agent
system that ensure clean, correct, multithreaded designs.
'';
};
}

View File

@@ -1,11 +0,0 @@
{writeTextFile, jre, clooj}:
writeTextFile {
name = "clooj-wrapper";
executable = true;
destination = "/bin/clooj";
text = ''
#!/bin/sh
exec ${jre}/bin/java -jar ${clooj}/lib/java/clooj.jar
'';
}

View File

@@ -1,24 +1,27 @@
{stdenv, fetchurl}:
{ stdenv, fetchurl, jre, makeWrapper }:
let
jar = fetchurl {
url = https://github.com/downloads/arthuredelstein/clooj/clooj-0.1.36-STANDALONE.jar;
sha256 = "173c66c0aade3ae5d21622f629e60efa51a03ad83c087b02c25e806c5b7f838c";
};
in
let version = "0.4.4"; in
stdenv.mkDerivation {
name = "clooj-0.1.32";
name = "clooj-${version}";
jar = fetchurl {
url = "http://www.mediafire.com/download/prkf64humftrmz3/clooj-${version}-standalone.jar";
sha256 = "0hbc29bg2a86rm3sx9kvj7h7db9j0kbnrb706wsfiyk3zi3bavnd";
};
buildInputs = [ makeWrapper ];
phases = "installPhase";
installPhase = ''
mkdir -p $out/lib/java
ln -s ${jar} $out/lib/java/clooj.jar
mkdir -p $out/share/java
ln -s $jar $out/share/java/clooj.jar
makeWrapper ${jre}/bin/java $out/bin/clooj --add-flags "-jar $out/share/java/clooj.jar"
'';
meta = {
description = "clooj, a lightweight IDE for clojure";
description = "A lightweight IDE for Clojure";
homepage = https://github.com/arthuredelstein/clooj;
license = stdenv.lib.licenses.bsd3;
};

View File

@@ -1,30 +1,27 @@
{stdenv, fetchurl, unzip, ant, version ? "1.4.0" }:
{ stdenv, fetchurl, unzip, ant, jdk, makeWrapper }:
let version = "1.5.1"; in
let
src_hashes = {
"1.4.0" = "27a5a151d5cc1bc3e52dff47c66111e637fefeb42d9bedfa1284a1a31d080171";
"1.5.0-RC1" = "111jm0nxkvqr1vrwcpvr70v5paasp8msrj5h8zm1c144c8zc1vln";
};
in
stdenv.mkDerivation {
name = "clojure-${version}";
src = fetchurl {
url = "http://repo1.maven.org/maven2/org/clojure/clojure/${version}/clojure-${version}.zip";
sha256 = (builtins.getAttr version src_hashes);
sha256 = "1qgiji6ddvv40khp3qb3xfz09g7p4nnsh3pywqglb9f16v534yzy";
};
buildInputs = [ unzip ant ];
buildInputs = [ unzip ant jdk makeWrapper ];
buildPhase = "ant jar";
installPhase = "
mkdir -p $out/lib/java
install -t $out/lib/java clojure.jar
";
installPhase = ''
mkdir -p $out/share/java $out/bin
install -t $out/share/java clojure.jar
makeWrapper ${jdk.jre}/bin/java $out/bin/clojure --add-flags "-cp $out/share/java/clojure.jar clojure.main"
'';
meta = {
description = "a Lisp dialect for the JVM";
description = "A Lisp dialect for the JVM";
homepage = http://clojure.org/;
license = stdenv.lib.licenses.bsd3;
longDescription = ''

View File

@@ -1,11 +0,0 @@
{writeTextFile, jre, clojure}:
writeTextFile {
name = "clojure-wrapper";
executable = true;
destination = "/bin/clojure";
text = ''
#!/bin/sh
exec ${jre}/bin/java -cp ${clojure}/lib/java/clojure.jar clojure.main
'';
}

View File

@@ -1,5 +0,0 @@
source $stdenv/setup || exit 1
configureFlags="--with-jikes=$jikes/bin/jikes --enable-pure-java-math"
genericBuild

View File

@@ -1,14 +0,0 @@
{stdenv, fetchurl, alsaLib, xlibs, jikes}:
stdenv.mkDerivation {
name = "kaffe-1.1.4";
builder = ./builder.sh;
src = fetchurl {
url = ftp://ftp.kaffe.org/pub/kaffe/v1.1.x-development/kaffe-1.1.4.tar.gz;
md5 = "94d6e7035ba68c2221dce68bb5b3f6e9";
};
inherit jikes alsaLib;
inherit (xlibs) libXaw libX11;
buildInputs = [jikes alsaLib xlibs.libXaw xlibs.libX11];
}