summary refs log tree commit diff
path: root/pkgs/development/interpreters/clojure/clooj.nix
blob: 810d783d4fb5e3aa21cb2c60f4d2c354bfcf3bf2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, stdenv, fetchurl, jre, makeWrapper }:

let version = "0.4.4"; in

stdenv.mkDerivation {
  pname = "clooj";
  inherit version;

  jar = fetchurl {
    # mirrored as original mediafire.com source does not work without user interaction
    url = "https://archive.org/download/clooj-0.4.4-standalone/clooj-0.4.4-standalone.jar";
    sha256 = "0hbc29bg2a86rm3sx9kvj7h7db9j0kbnrb706wsfiyk3zi3bavnd";
  };

  nativeBuildInputs = [ makeWrapper ];

  dontUnpack = true;

  installPhase = ''
    mkdir -p $out/share/java
    ln -s $jar $out/share/java/clooj.jar
    makeWrapper ${jre}/bin/java $out/bin/clooj --add-flags "-jar $out/share/java/clooj.jar"
  '';

  meta = {
    description = "A lightweight IDE for Clojure";
    homepage = "https://github.com/arthuredelstein/clooj";
    license = lib.licenses.bsd3;
    platforms = lib.platforms.all;
  };
}