forked from mirrors/nixpkgs
Add clojure.
(Install with command nix-env -i clojure-wrapper start REPL with command clojure) svn path=/nixpkgs/trunk/; revision=28956
This commit is contained in:
parent
80db090ed7
commit
a02960ae4e
45
pkgs/development/interpreters/clojure/binary.nix
Normal file
45
pkgs/development/interpreters/clojure/binary.nix
Normal file
|
@ -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.
|
||||
'';
|
||||
};
|
||||
}
|
44
pkgs/development/interpreters/clojure/default.nix
Normal file
44
pkgs/development/interpreters/clojure/default.nix
Normal file
|
@ -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.
|
||||
'';
|
||||
};
|
||||
}
|
11
pkgs/development/interpreters/clojure/wrapper.nix
Normal file
11
pkgs/development/interpreters/clojure/wrapper.nix
Normal file
|
@ -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
|
||||
'';
|
||||
}
|
|
@ -2447,6 +2447,15 @@ let
|
|||
clisp_2_44_1 = callPackage ../development/interpreters/clisp/2.44.1.nix {
|
||||
libsigsegv = libsigsegv_25; };
|
||||
|
||||
clojure = callPackage ../development/interpreters/clojure { };
|
||||
|
||||
clojure_binary = callPackage ../development/interpreters/clojure/binary.nix { };
|
||||
|
||||
clojure_wrapper = callPackage ../development/interpreters/clojure/wrapper.nix {
|
||||
#clojure = clojure_binary;
|
||||
};
|
||||
|
||||
|
||||
erlang = callPackage ../development/interpreters/erlang { };
|
||||
|
||||
erlangR13B = callPackage ../development/interpreters/erlang/R13B.nix { };
|
||||
|
|
Loading…
Reference in a new issue