2021-01-22 12:25:31 +01:00
|
|
|
{ lib, stdenv
|
2019-11-05 19:50:31 +01:00
|
|
|
, fetchurl
|
|
|
|
, unzip
|
2020-09-19 17:40:36 +02:00
|
|
|
, jdk8
|
2019-11-05 19:50:31 +01:00
|
|
|
, ant
|
|
|
|
, makeWrapper
|
|
|
|
, callPackage
|
|
|
|
}:
|
|
|
|
|
2020-09-19 17:40:36 +02:00
|
|
|
let jre = jdk8.jre; jdk = jdk8; in
|
2019-11-05 19:50:31 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "jasmin";
|
|
|
|
version = "2.4";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/jasmin/jasmin-${version}/jasmin-${version}.zip";
|
|
|
|
sha256 = "17a41vr96glcdrdbk88805wwvv1r6w8wg7if23yhd0n6rrl0r8ga";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip jdk ant makeWrapper ];
|
|
|
|
|
|
|
|
buildPhase = "ant all";
|
|
|
|
installPhase =
|
|
|
|
''
|
|
|
|
install -Dm644 jasmin.jar $out/share/java/jasmin.jar
|
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/jasmin \
|
|
|
|
--add-flags "-jar $out/share/java/jasmin.jar"
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
minimal-module = callPackage ./test-assemble-hello-world {};
|
|
|
|
};
|
|
|
|
|
2021-01-22 12:25:31 +01:00
|
|
|
meta = with lib; {
|
2019-11-05 19:50:31 +01:00
|
|
|
description = "An assembler for the Java Virtual Machine";
|
2023-01-21 22:41:12 +01:00
|
|
|
homepage = "https://jasmin.sourceforge.net/";
|
2019-11-05 19:50:31 +01:00
|
|
|
downloadPage = "https://sourceforge.net/projects/jasmin/files/latest/download";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|