From a02960ae4e6bfd01b7a66b69d43fbfafa31165ad Mon Sep 17 00:00:00 2001 From: Marco Maggesi Date: Thu, 1 Sep 2011 13:38:59 +0000 Subject: Add clojure. (Install with command nix-env -i clojure-wrapper start REPL with command clojure) svn path=/nixpkgs/trunk/; revision=28956 --- pkgs/development/interpreters/clojure/binary.nix | 45 +++++++++++++++++++++++ pkgs/development/interpreters/clojure/default.nix | 44 ++++++++++++++++++++++ pkgs/development/interpreters/clojure/wrapper.nix | 11 ++++++ 3 files changed, 100 insertions(+) create mode 100644 pkgs/development/interpreters/clojure/binary.nix create mode 100644 pkgs/development/interpreters/clojure/default.nix create mode 100644 pkgs/development/interpreters/clojure/wrapper.nix (limited to 'pkgs/development/interpreters/clojure') diff --git a/pkgs/development/interpreters/clojure/binary.nix b/pkgs/development/interpreters/clojure/binary.nix new file mode 100644 index 0000000000000..39b98b0843c2f --- /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 0000000000000..f829beda7bab5 --- /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 0000000000000..a2a9a40446213 --- /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 -- cgit 1.4.1