nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 37 lines 881 B view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 makeWrapper, 6 jre, 7}: 8 9stdenv.mkDerivation (finalAttrs: { 10 pname = "jython"; 11 12 version = "2.7.4"; 13 14 src = fetchurl { 15 url = "http://search.maven.org/remotecontent?filepath=org/python/jython-standalone/${finalAttrs.version}/jython-standalone-${finalAttrs.version}.jar"; 16 sha256 = "sha256-H7oXae/8yLGfXhBDa8gnShWM6YhVnyV5J8JMc7sTfzw="; 17 }; 18 19 nativeBuildInputs = [ makeWrapper ]; 20 21 dontUnpack = true; 22 23 installPhase = '' 24 mkdir -pv $out/bin 25 cp $src $out/jython.jar 26 makeWrapper ${jre}/bin/java $out/bin/jython --add-flags "-jar $out/jython.jar" 27 ''; 28 29 meta = { 30 description = "Python interpreter written in Java"; 31 mainProgram = "jython"; 32 homepage = "https://jython.org/"; 33 sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; 34 license = lib.licenses.psfl; 35 platforms = jre.meta.platforms; 36 }; 37})