at 18.03-beta 2.1 kB view raw
1{ stdenv, fetchurl, jdk, rlwrap, makeWrapper }: 2 3stdenv.mkDerivation rec { 4 name = "clojure-${version}"; 5 version = "1.9.0.329"; 6 7 src = fetchurl { 8 url = "https://download.clojure.org/install/clojure-tools-${version}.tar.gz"; 9 sha256 = "1g1mi75285z977vrqbihmmmrmdcnznxbw3r6wkzh571sc1yyrlrj"; 10 }; 11 12 buildInputs = [ makeWrapper ]; 13 14 outputs = [ "out" "prefix" ]; 15 16 installPhase = '' 17 mkdir -p $prefix/libexec 18 cp clojure-tools-${version}.jar $prefix/libexec 19 cp {,example-}deps.edn $prefix 20 21 substituteInPlace clojure --replace PREFIX $prefix 22 23 install -Dt $out/bin clj clojure 24 wrapProgram $out/bin/clj --suffix PATH ${rlwrap}/bin 25 wrapProgram $out/bin/clojure --suffix PATH ${jdk}/bin 26 ''; 27 28 meta = with stdenv.lib; { 29 description = "A Lisp dialect for the JVM"; 30 homepage = https://clojure.org/; 31 license = licenses.epl10; 32 longDescription = '' 33 Clojure is a dynamic programming language that targets the Java 34 Virtual Machine. It is designed to be a general-purpose language, 35 combining the approachability and interactive development of a 36 scripting language with an efficient and robust infrastructure for 37 multithreaded programming. Clojure is a compiled language - it 38 compiles directly to JVM bytecode, yet remains completely 39 dynamic. Every feature supported by Clojure is supported at 40 runtime. Clojure provides easy access to the Java frameworks, with 41 optional type hints and type inference, to ensure that calls to Java 42 can avoid reflection. 43 44 Clojure is a dialect of Lisp, and shares with Lisp the code-as-data 45 philosophy and a powerful macro system. Clojure is predominantly a 46 functional programming language, and features a rich set of immutable, 47 persistent data structures. When mutable state is needed, Clojure 48 offers a software transactional memory system and reactive Agent 49 system that ensure clean, correct, multithreaded designs. 50 ''; 51 maintainers = with maintainers; [ the-kenny ]; 52 platforms = platforms.unix; 53 }; 54}