2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchzip
|
|
|
|
, ant
|
2024-04-21 15:54:59 +00:00
|
|
|
, stripJavaArchivesHook
|
2022-04-27 09:35:20 +00:00
|
|
|
, jdk
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-04-27 09:35:20 +00:00
|
|
|
pname = "calcoo";
|
|
|
|
version = "2.1.0";
|
|
|
|
|
|
|
|
src = fetchzip {
|
2024-01-13 08:15:51 +00:00
|
|
|
url = "mirror://sourceforge/calcoo/calcoo-${finalAttrs.version}.zip";
|
2022-04-27 09:35:20 +00:00
|
|
|
hash = "sha256-Bdavj7RaI5CkWiOJY+TPRIRfNelfW5qdl/74J1KZPI0=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
ant
|
2024-04-21 15:54:59 +00:00
|
|
|
stripJavaArchivesHook
|
2022-04-27 09:35:20 +00:00
|
|
|
jdk
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
env.JAVA_TOOL_OPTIONS = "-Dfile.encoding=iso-8859-1";
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
ant
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
install -Dm644 dist/lib/calcoo.jar -t $out/share/calcoo
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
makeWrapper ${jdk}/bin/java $out/bin/calcoo \
|
2024-01-13 08:15:51 +00:00
|
|
|
--add-flags "-jar $out/share/calcoo/calcoo.jar"
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
meta = {
|
|
|
|
changelog = "https://calcoo.sourceforge.net/changelog.html";
|
2022-04-27 09:35:20 +00:00
|
|
|
description = "RPN and algebraic scientific calculator";
|
2024-01-13 08:15:51 +00:00
|
|
|
homepage = "https://calcoo.sourceforge.net/";
|
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
mainProgram = "calcoo";
|
|
|
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
2022-04-27 09:35:20 +00:00
|
|
|
inherit (jdk.meta) platforms;
|
|
|
|
};
|
2024-01-13 08:15:51 +00:00
|
|
|
})
|