at master 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 gradle, 6}: 7 8stdenv.mkDerivation (finalAttrs: { 9 pname = "rhino"; 10 version = "1.8.0"; 11 12 src = fetchFromGitHub { 13 owner = "mozilla"; 14 repo = "rhino"; 15 tag = "Rhino1_8_0_Release"; 16 hash = "sha256-H8DbcRPMm4SKmGf40dXnjGeEbbj9COzdHgUIkcCimTM="; 17 }; 18 19 nativeBuildInputs = [ gradle ]; 20 21 mitmCache = gradle.fetchDeps { 22 inherit (finalAttrs) pname; 23 data = ./deps.json; 24 }; 25 26 installPhase = '' 27 mkdir -p "$out/share/java" 28 cp -v rhino-all/build/libs/rhino-all-*.jar "$out/share/java/js-$pkgver.jar" 29 ln -s "js-$pkgver.jar" "$out/share/java/js.jar" 30 ''; 31 32 meta = with lib; { 33 description = "Implementation of JavaScript written in Java"; 34 35 longDescription = '' 36 Rhino is an open-source implementation of JavaScript written 37 entirely in Java. It is typically embedded into Java applications 38 to provide scripting to end users. 39 ''; 40 41 homepage = "https://rhino.github.io/"; 42 43 license = with licenses; [ 44 mpl11 # or 45 gpl2Plus 46 ]; 47 platforms = platforms.linux ++ platforms.darwin; 48 }; 49})