Merge pull request #168978 from AndersonTorres/new-misc
calcoo: init at 2.1.0
This commit is contained in:
commit
eb6ad7a51f
3 changed files with 81 additions and 0 deletions
21
pkgs/applications/misc/calcoo/0001-javac-encoding.diff
Normal file
21
pkgs/applications/misc/calcoo/0001-javac-encoding.diff
Normal 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"/>
|
58
pkgs/applications/misc/calcoo/default.nix
Normal file
58
pkgs/applications/misc/calcoo/default.nix
Normal 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;
|
||||
};
|
||||
}
|
|
@ -5730,6 +5730,8 @@ with pkgs;
|
|||
|
||||
uniscribe = callPackage ../tools/text/uniscribe { };
|
||||
|
||||
calcoo = callPackage ../applications/misc/calcoo { };
|
||||
|
||||
galculator = callPackage ../applications/misc/galculator {
|
||||
gtk = gtk3;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue