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