Merge pull request #168978 from AndersonTorres/new-misc

calcoo: init at 2.1.0
This commit is contained in:
Anderson Torres 2022-04-17 11:34:32 -03:00 committed by GitHub
commit eb6ad7a51f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 81 additions and 0 deletions

View file

@ -0,0 +1,21 @@
diff -Naur calcoo-2.1.0-old/build.xml calcoo-2.1.0-new/build.xml
--- calcoo-2.1.0-old/build.xml 1969-12-31 21:00:01.000000000 -0300
+++ calcoo-2.1.0-new/build.xml 2022-04-16 15:41:59.763861191 -0300
@@ -16,7 +16,7 @@
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<!-- Compile the java code from ${src} into ${build} -->
- <javac srcdir="${src}" destdir="${build}" includeantruntime="false"/>
+ <javac srcdir="${src}" destdir="${build}" includeantruntime="false" encoding="iso-8859-1"/>
</target>
<target name="copyresource" depends="compile">
@@ -31,7 +31,7 @@
<target name="testcompile">
<mkdir dir="${testbuild}"/>
<!-- Compile the java code from ${testsrc} into ${testbuild} -->
- <javac srcdir="${testsrc}" destdir="${testbuild}" includeantruntime="false">
+ <javac srcdir="${testsrc}" destdir="${testbuild}" includeantruntime="false" encoding="iso-8859-1">
<classpath>
<pathelement location="${junitpath}\junit.jar"/>
<pathelement location="${junitpath}\hamcrest-core.jar"/>

View file

@ -0,0 +1,58 @@
{ 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;
};
}

View file

@ -5730,6 +5730,8 @@ with pkgs;
uniscribe = callPackage ../tools/text/uniscribe { };
calcoo = callPackage ../applications/misc/calcoo { };
galculator = callPackage ../applications/misc/galculator {
gtk = gtk3;
};