nixpkgs/pkgs/by-name/ja/jasmin/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
1.2 KiB
Nix
Raw Normal View History

{
lib,
stdenv,
2019-11-05 18:50:31 +00:00
fetchurl,
unzip,
ant,
jdk8,
2019-11-05 18:50:31 +00:00
makeWrapper,
stripJavaArchivesHook,
2019-11-05 18:50:31 +00:00
callPackage,
}:
let
jdk = jdk8;
jre = jdk8.jre;
in
stdenv.mkDerivation (finalAttrs: {
2019-11-05 18:50:31 +00:00
pname = "jasmin";
version = "2.4";
src = fetchurl {
url = "mirror://sourceforge/jasmin/jasmin-${finalAttrs.version}.zip";
hash = "sha256-6qEMaM7Gggb9EC6exxE3OezNeQEIoblabow+k/IORJ0=";
2019-11-05 18:50:31 +00:00
};
nativeBuildInputs = [
unzip
ant
jdk
makeWrapper
stripJavaArchivesHook
];
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"
runHook postInstall
2019-11-05 18:50:31 +00:00
'';
passthru.tests = {
minimal-module = callPackage ./test-assemble-hello-world { };
};
meta = with lib; {
2019-11-05 18:50:31 +00:00
description = "Assembler for the Java Virtual Machine";
downloadPage = "https://sourceforge.net/projects/jasmin/files/latest/download";
homepage = "https://jasmin.sourceforge.net/";
2019-11-05 18:50:31 +00:00
license = licenses.bsd3;
mainProgram = "jasmin";
2019-11-05 18:50:31 +00:00
maintainers = with maintainers; [ fgaz ];
platforms = platforms.all;
};
})