Files
nixpkgs/pkgs/by-name/jy/jython/package.nix
Lisanna Dettwyler 411697afb2 jython: use https for sources
Signed-off-by: Lisanna Dettwyler <lisanna.dettwyler@gmail.com>
2026-03-21 12:30:12 -04:00

38 lines
882 B
Nix

{
lib,
stdenv,
fetchurl,
makeWrapper,
jre,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "jython";
version = "2.7.4";
src = fetchurl {
url = "https://search.maven.org/remotecontent?filepath=org/python/jython-standalone/${finalAttrs.version}/jython-standalone-${finalAttrs.version}.jar";
sha256 = "sha256-H7oXae/8yLGfXhBDa8gnShWM6YhVnyV5J8JMc7sTfzw=";
};
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";
mainProgram = "jython";
homepage = "https://jython.org/";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.psfl;
platforms = jre.meta.platforms;
};
})