summary refs log tree commit diff
path: root/pkgs/development/interpreters/clojure
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters/clojure')
-rw-r--r--pkgs/development/interpreters/clojure/binary.nix45
-rw-r--r--pkgs/development/interpreters/clojure/default.nix44
-rw-r--r--pkgs/development/interpreters/clojure/wrapper.nix11
3 files changed, 100 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/clojure/binary.nix b/pkgs/development/interpreters/clojure/binary.nix
new file mode 100644
index 00000000000..39b98b0843c
--- /dev/null
+++ b/pkgs/development/interpreters/clojure/binary.nix
@@ -0,0 +1,45 @@
+{stdenv, fetchurl, unzip}:
+
+stdenv.mkDerivation {
+  name = "clojure-binary-1.2.1";
+
+  src = fetchurl {
+    url = https://github.com/downloads/clojure/clojure/clojure-1.2.1.zip;
+    sha256 = "1warps9z2cm3gmp0nlh8plgsr40yccr2vzcsxsq3yawhjkicx7k1";
+  };
+
+  buildInputs = [ unzip ];
+
+  phases = "unpackPhase installPhase";
+
+  installPhase = "
+    ensureDir $out/lib/java
+    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.
+    '';
+  };
+}
diff --git a/pkgs/development/interpreters/clojure/default.nix b/pkgs/development/interpreters/clojure/default.nix
new file mode 100644
index 00000000000..f829beda7ba
--- /dev/null
+++ b/pkgs/development/interpreters/clojure/default.nix
@@ -0,0 +1,44 @@
+{stdenv, fetchurl, unzip, ant}:
+
+stdenv.mkDerivation {
+  name = "clojure-1.2.1";
+
+  src = fetchurl {
+    url = https://github.com/downloads/clojure/clojure/clojure-1.2.1.zip;
+    sha256 = "1warps9z2cm3gmp0nlh8plgsr40yccr2vzcsxsq3yawhjkicx7k1";
+  };
+
+  buildInputs = [ unzip ant ];
+
+  buildPhase = "ant";
+
+  installPhase = "
+    ensureDir $out/lib/java
+    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.
+    '';
+  };
+}
diff --git a/pkgs/development/interpreters/clojure/wrapper.nix b/pkgs/development/interpreters/clojure/wrapper.nix
new file mode 100644
index 00000000000..a2a9a404462
--- /dev/null
+++ b/pkgs/development/interpreters/clojure/wrapper.nix
@@ -0,0 +1,11 @@
+{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
+  '';
+}
\ No newline at end of file