depot/third_party/nixpkgs/pkgs/applications/misc/calcoo/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

58 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchzip
, ant
, jdk
, makeWrapper
}:
stdenv.mkDerivation rec {
pname = "calcoo";
version = "2.1.0";
src = fetchzip {
url = "mirror://sourceforge/project/calcoo/calcoo/${version}/${pname}-${version}.zip";
hash = "sha256-Bdavj7RaI5CkWiOJY+TPRIRfNelfW5qdl/74J1KZPI0=";
};
patches = [
# Sets javac encoding option on build.xml
./0001-javac-encoding.diff
];
nativeBuildInputs = [
ant
jdk
makeWrapper
];
dontConfigure = true;
buildPhase = ''
runHook preBuild
ant
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/${pname}
mv dist/lib/calcoo.jar $out/share/${pname}
makeWrapper ${jdk}/bin/java $out/bin/calcoo \
--add-flags "-jar $out/share/${pname}/calcoo.jar"
runHook postInstall
'';
meta = with lib; {
homepage = "https://calcoo.sourceforge.net/";
description = "RPN and algebraic scientific calculator";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
inherit (jdk.meta) platforms;
};
}