depot/third_party/nixpkgs/pkgs/development/interpreters/jython/default.nix
Default email 75ca762b89 Project import generated by Copybara.
GitOrigin-RevId: 29b0d4d0b600f8f5dd0b86e3362a33d4181938f9
2021-03-09 11:18:52 +08:00

29 lines
751 B
Nix

{ lib, stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
pname = "jython";
version = "2.7.2b3";
src = fetchurl {
url = "http://search.maven.org/remotecontent?filepath=org/python/jython-standalone/${version}/jython-standalone-${version}.jar";
sha256 = "142285hd9mx0nx5zw0jvkpqkb4kbhgyyy52p5bj061ya8bg5jizy";
};
nativeBuildInputs = [ makeWrapper ];
dontUnpack = true;
installPhase = ''
mkdir -pv $out/bin
cp $src $out/jython.jar
makeWrapper ${jre}/bin/java $out/bin/jython --add-flags "-jar $out/jython.jar"
'';
meta = {
description = "Python interpreter written in Java";
homepage = "https://jython.org/";
license = lib.licenses.psfl;
platforms = jre.meta.platforms;
};
}