2024-12-10 19:26:33 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
unzip,
|
|
|
|
ant,
|
|
|
|
jdk8,
|
|
|
|
makeWrapper,
|
|
|
|
stripJavaArchivesHook,
|
|
|
|
callPackage,
|
2019-11-05 18:50:31 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-03 20:46:54 +00:00
|
|
|
let
|
|
|
|
jdk = jdk8;
|
|
|
|
jre = jdk8.jre;
|
|
|
|
|
2024-12-10 19:26:33 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-11-05 18:50:31 +00:00
|
|
|
pname = "jasmin";
|
|
|
|
version = "2.4";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2024-01-03 20:46:54 +00:00
|
|
|
url = "mirror://sourceforge/jasmin/jasmin-${finalAttrs.version}.zip";
|
|
|
|
hash = "sha256-6qEMaM7Gggb9EC6exxE3OezNeQEIoblabow+k/IORJ0=";
|
2019-11-05 18:50:31 +00:00
|
|
|
};
|
|
|
|
|
2024-01-03 20:46:54 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
unzip
|
|
|
|
ant
|
|
|
|
jdk
|
|
|
|
makeWrapper
|
2024-03-17 12:35:12 +00:00
|
|
|
stripJavaArchivesHook
|
2024-01-03 20:46:54 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
ant all
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2019-11-05 18:50:31 +00:00
|
|
|
|
|
|
|
install -Dm644 jasmin.jar $out/share/java/jasmin.jar
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/jasmin \
|
|
|
|
--add-flags "-jar $out/share/java/jasmin.jar"
|
2024-01-03 20:46:54 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2019-11-05 18:50:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.tests = {
|
2024-12-10 19:26:33 +00:00
|
|
|
minimal-module = callPackage ./test-assemble-hello-world { };
|
2019-11-05 18:50:31 +00:00
|
|
|
};
|
|
|
|
|
2021-01-22 11:25:31 +00:00
|
|
|
meta = with lib; {
|
2024-06-07 07:46:46 +00:00
|
|
|
description = "Assembler for the Java Virtual Machine";
|
2019-11-05 18:50:31 +00:00
|
|
|
downloadPage = "https://sourceforge.net/projects/jasmin/files/latest/download";
|
2024-01-03 20:46:54 +00:00
|
|
|
homepage = "https://jasmin.sourceforge.net/";
|
2019-11-05 18:50:31 +00:00
|
|
|
license = licenses.bsd3;
|
2024-01-03 20:46:54 +00:00
|
|
|
mainProgram = "jasmin";
|
2019-11-05 18:50:31 +00:00
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
2024-01-03 20:46:54 +00:00
|
|
|
})
|