about summary refs log tree commit diff
path: root/pkgs/applications/science/math/speedcrunch
diff options
context:
space:
mode:
authorAlexander Kahl <e-user@fsfe.org>2013-09-27 00:58:54 +0200
committerAlexander Kahl <e-user@fsfe.org>2013-09-27 00:58:54 +0200
commit6371fd0908aa16675a31dec3817f1329c0d42d1c (patch)
tree98b4ddb01e702c1dff6267d3028bebca525bcb12 /pkgs/applications/science/math/speedcrunch
parent36fca9480535c08220bdd7838bbd1dbf42661d3e (diff)
downloadnixlib-6371fd0908aa16675a31dec3817f1329c0d42d1c.tar
nixlib-6371fd0908aa16675a31dec3817f1329c0d42d1c.tar.gz
nixlib-6371fd0908aa16675a31dec3817f1329c0d42d1c.tar.bz2
nixlib-6371fd0908aa16675a31dec3817f1329c0d42d1c.tar.lz
nixlib-6371fd0908aa16675a31dec3817f1329c0d42d1c.tar.xz
nixlib-6371fd0908aa16675a31dec3817f1329c0d42d1c.tar.zst
nixlib-6371fd0908aa16675a31dec3817f1329c0d42d1c.zip
speedcrunch: new package
speedcrunch is a fast power user calculator.
Diffstat (limited to 'pkgs/applications/science/math/speedcrunch')
-rw-r--r--pkgs/applications/science/math/speedcrunch/default.nix38
-rw-r--r--pkgs/applications/science/math/speedcrunch/speedcrunch-0.11-alpha-dso_linking.patch23
2 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/speedcrunch/default.nix b/pkgs/applications/science/math/speedcrunch/default.nix
new file mode 100644
index 000000000000..dee33a04be22
--- /dev/null
+++ b/pkgs/applications/science/math/speedcrunch/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, qt, cmake }:
+
+stdenv.mkDerivation rec {
+  name = "speedcrunch-0.11-alpha";
+
+  src = fetchurl {
+    url = "http://speedcrunch.googlecode.com/files/${name}.tar.gz";
+    sha256 = "c6d6328e0c018cd8b98a0e86fb6c49fedbab5dcc831b47fbbc1537730ff80882";
+  };
+
+  patches = [./speedcrunch-0.11-alpha-dso_linking.patch];
+
+  buildInputs = [cmake qt];
+
+  dontUseCmakeBuildDir = true;
+
+  cmakeDir = "../src";
+
+  preConfigure = ''
+    mkdir -p build
+    cd build
+  '';
+
+  buildFlags = "VERBOSE=1";
+
+  meta = {
+    homepage    = "http://speedcrunch.digitalfanatics.org";
+    license     = "GPLv2+";
+    description = "A fast power user calculator";
+    longDescription = ''
+      SpeedCrunch is a fast, high precision and powerful desktop calculator.
+      Among its distinctive features are a scrollable display, up to 50 decimal
+      precisions, unlimited variable storage, intelligent automatic completion
+      full keyboard-friendly and more than 15 built-in math function.
+    '';
+  };
+
+}
diff --git a/pkgs/applications/science/math/speedcrunch/speedcrunch-0.11-alpha-dso_linking.patch b/pkgs/applications/science/math/speedcrunch/speedcrunch-0.11-alpha-dso_linking.patch
new file mode 100644
index 000000000000..1b03c16b63d1
--- /dev/null
+++ b/pkgs/applications/science/math/speedcrunch/speedcrunch-0.11-alpha-dso_linking.patch
@@ -0,0 +1,23 @@
+diff -up speedcrunch-0.11-alpha/src/CMakeLists.txt.dso_linking speedcrunch-0.11-alpha/src/CMakeLists.txt
+--- speedcrunch-0.11-alpha/src/CMakeLists.txt.dso_linking	2009-11-04 15:37:15.000000000 -0600
++++ speedcrunch-0.11-alpha/src/CMakeLists.txt	2010-06-25 13:25:07.133460528 -0500
+@@ -54,6 +54,10 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX )
+ SET(QT_USE_QTNETWORK TRUE)
+ #SET(QT_USE_QTXML TRUE)
+ find_package(Qt4 REQUIRED)
++if (Q_WS_X11)
++   find_package(X11 REQUIRED)
++endif (Q_WS_X11)
++
+ include(${QT_USE_FILE})
+ 
+ # build everything
+@@ -80,7 +84,7 @@ ENDIF( APPLE )
+ 
+ ADD_CUSTOM_TARGET( confclean COMMAND rm -rf Makefile CMakeFiles/ CMakeCache.txt cmake_install.cmake DartTestfile.txt install_manifest.txt )
+ 
+-TARGET_LINK_LIBRARIES(${PROGNAME} ${QT_LIBRARIES})
++TARGET_LINK_LIBRARIES(${PROGNAME} ${QT_LIBRARIES} ${X11_X11_LIB} )
+ # only needed for static builds when directx is enabled in qt and you
+ # get a linker error because of missing a directx function
+ #IF(WIN32)