@@ -0,0 +1,37 @@
1+{ stdenv, lib, fetchurl, makeWrapper, jre }:
2+
3+stdenv.mkDerivation rec {
4+ name = "ammonite-repl-${version}";
5+ version = "0.7.8";
6+
7+ src = fetchurl {
8+ url = "https://github.com/lihaoyi/Ammonite/releases/download/${version}/${version}";
9+ sha256 = "0s34p168h5c7ij61rbmaygb95r654yj4j0wh6qya53k4ywl32vkp";
10+ };
11+
12+ propagatedBuildInputs = [ jre ] ;
13+ buildInputs = [ makeWrapper ] ;
14+
15+ phases = "installPhase";
16+
17+ installPhase = ''
18+ mkdir -p $out/bin
19+ cp ${src} $out/bin/amm
20+ chmod +x $out/bin/amm
21+ wrapProgram $out/bin/amm --prefix PATH ":" ${jre}/bin ;
22+ '';
23+
24+ meta = {
25+ description = "Improved Scala REPL";
26+ longDescription = ''
27+ The Ammonite-REPL is an improved Scala REPL, re-implemented from first principles.
28+ It is much more featureful than the default REPL and comes
29+ with a lot of ergonomic improvements and configurability
30+ that may be familiar to people coming from IDEs or other REPLs such as IPython or Zsh.
31+ '';
32+ homepage = http://www.lihaoyi.com/Ammonite/;
33+ license = lib.licenses.mit;
34+ platforms = lib.platforms.all;
35+ maintainer = [ lib.maintainers.nequissimus ];
36+ };
37+}