From 6371fd0908aa16675a31dec3817f1329c0d42d1c Mon Sep 17 00:00:00 2001 From: Alexander Kahl Date: Fri, 27 Sep 2013 00:58:54 +0200 Subject: [PATCH] speedcrunch: new package speedcrunch is a fast power user calculator. --- .../science/math/speedcrunch/default.nix | 38 +++++++++++++++++++ .../speedcrunch-0.11-alpha-dso_linking.patch | 23 +++++++++++ pkgs/top-level/all-packages.nix | 5 +++ 3 files changed, 66 insertions(+) create mode 100644 pkgs/applications/science/math/speedcrunch/default.nix create mode 100644 pkgs/applications/science/math/speedcrunch/speedcrunch-0.11-alpha-dso_linking.patch diff --git a/pkgs/applications/science/math/speedcrunch/default.nix b/pkgs/applications/science/math/speedcrunch/default.nix new file mode 100644 index 00000000000..dee33a04be2 --- /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 00000000000..1b03c16b63d --- /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) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0217f664729..3e3f9798d5c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9709,6 +9709,11 @@ let yacas = callPackage ../applications/science/math/yacas { }; + speedcrunch = callPackage ../applications/science/math/speedcrunch { + qt = qt4; + cmake = cmakeCurses; + }; + ### SCIENCE / MISC