Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 29 lines 745 B view raw
1{ stdenv, fetchurl, makeWrapper, jre }: 2 3stdenv.mkDerivation rec { 4 pname = "jython"; 5 6 version = "2.7.2b2"; 7 8 src = fetchurl { 9 url = "http://search.maven.org/remotecontent?filepath=org/python/jython-standalone/${version}/jython-standalone-${version}.jar"; 10 sha256 = "0mmrrydr94q2siwjynkw1gw677navmcvjvbi1jpdbp6idfx0jh6b"; 11 }; 12 13 buildInputs = [ makeWrapper ]; 14 15 dontUnpack = true; 16 17 installPhase = '' 18 mkdir -pv $out/bin 19 cp $src $out/jython.jar 20 makeWrapper ${jre}/bin/java $out/bin/jython --add-flags "-jar $out/jython.jar" 21 ''; 22 23 meta = { 24 description = "Python interpreter written in Java"; 25 homepage = https://jython.org/; 26 license = stdenv.lib.licenses.psfl; 27 platforms = jre.meta.platforms; 28 }; 29}