nixpkgs/pkgs/applications/misc/calcoo/default.nix

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

59 lines
1.1 KiB
Nix
Raw Normal View History

2022-04-16 21:53:21 +00:00
{ 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 = "http://calcoo.sourceforge.net/";
description = "RPN and algebraic scientific calculator";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
inherit (jdk.meta) platforms;
};
}