summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-10 02:10:09 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-10 11:42:08 -0400
commitae429f8e5527263240b21e7641b84a7e7d6898d7 (patch)
treeab53df03c91e4022e1a37e9a139d32bdd877e086
parent9cb1d82be6b10398c70b925e56baf8578d6b906a (diff)
downloadnixlib-ae429f8e5527263240b21e7641b84a7e7d6898d7.tar
nixlib-ae429f8e5527263240b21e7641b84a7e7d6898d7.tar.gz
nixlib-ae429f8e5527263240b21e7641b84a7e7d6898d7.tar.bz2
nixlib-ae429f8e5527263240b21e7641b84a7e7d6898d7.tar.lz
nixlib-ae429f8e5527263240b21e7641b84a7e7d6898d7.tar.xz
nixlib-ae429f8e5527263240b21e7641b84a7e7d6898d7.tar.zst
nixlib-ae429f8e5527263240b21e7641b84a7e7d6898d7.zip
yacas: 1.2.2 -> 1.6.1
They switched to cmake and talk about mingw cross, so I can kill
crossAttrs too.
-rw-r--r--pkgs/applications/science/math/yacas/default.nix59
-rw-r--r--pkgs/applications/science/math/yacas/gcc43.patch17
2 files changed, 27 insertions, 49 deletions
diff --git a/pkgs/applications/science/math/yacas/default.nix b/pkgs/applications/science/math/yacas/default.nix
index 0f6dc35fe0cb..c02ef73df119 100644
--- a/pkgs/applications/science/math/yacas/default.nix
+++ b/pkgs/applications/science/math/yacas/default.nix
@@ -1,44 +1,39 @@
-{stdenv, fetchurl, perl}: 
+{ stdenv, fetchFromGitHub, cmake, perl
+, enableGui ? false, qt5
+, enableJupyter ? false, boost, jsoncpp, openssl, zmqpp
+}:
 
 stdenv.mkDerivation rec {
-  name = "yacas-1.2.2";
+  name = "yacas-${version}";
+  version = "1.6.1";
 
-  src = fetchurl {
-    url = "http://yacas.sourceforge.net/backups/${name}.tar.gz";
-    sha256 = "1dmafm3w0lm5w211nwkfzaid1rvvmgskz7k4500pjhgdczi5sd78";
+  src = fetchFromGitHub {
+    owner = "grzegorzmazur";
+    repo = "yacas";
+    rev = "v${version}";
+    sha256 = "0awvlvf607r4hwl1vkhs6jq2s6ig46c66pmr4vspj2cdnypx99cc";
   };
 
   hardeningDisable = [ "format" ];
 
-  # Perl is only for the documentation
-  nativeBuildInputs = [ perl ];
-
-  patches = [ ./gcc43.patch ];
+  cmakeFlags = [
+    "-DENABLE_CYACAS_GUI=${if enableGui then "ON" else "OFF"}"
+    "-DENABLE_CYACAS_KERNEL=${if enableJupyter then "ON" else "OFF"}"
+  ];
 
-  crossAttrs = {
-    # Trick to get host-built programs needed for the cross-build.
-    # If yacas had proper makefiles, this would not be needed.
-    preConfigure = ''
-      ./configure
-      pushd src
-      make mkfastprimes 
-      cp mkfastprimes ../..
-      popd
-      pushd manmake
-      make manripper removeduplicates
-      cp manripper removeduplicates ../..
-      popd
-    '';
-    preBuild = ''
-      cp ../mkfastprimes ../manripper ../removeduplicates src
-    '';
-  };
+  # Perl is only for the documentation
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [
+  ] ++ stdenv.lib.optionals enableGui (with qt5; [ qtbase qtwebkit ])
+    ++ stdenv.lib.optionals enableJupyter [ boost jsoncpp openssl zmqpp ]
+    ;
 
   meta = {
-      description = "Easy to use, general purpose Computer Algebra System";
-      homepage = http://yacas.sourceforge.net/;
-      license = stdenv.lib.licenses.gpl2Plus;
-      maintainers = with stdenv.lib.maintainers; [viric];
-      platforms = with stdenv.lib.platforms; linux;
+    description = "Easy to use, general purpose Computer Algebra System";
+    homepage = http://www.yacas.org/;
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = with stdenv.lib.maintainers; [viric];
+    platforms = with stdenv.lib.platforms; linux;
+    broken = enableGui || enableJupyter;
   };
 }
diff --git a/pkgs/applications/science/math/yacas/gcc43.patch b/pkgs/applications/science/math/yacas/gcc43.patch
deleted file mode 100644
index 054f80cff927..000000000000
--- a/pkgs/applications/science/math/yacas/gcc43.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Taken from gentoo:
-http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/yacas/files/yacas-1.2.2-gcc43.patch?rev=1.1&view=markup
-Index: yacas-1.2.2-gcc43.patch
-===================================================================
---- a/manmake/manripper.cpp
-+++ b/manmake/manripper.cpp
-@@ -1,7 +1,8 @@
- 
--#include <stdio.h>
--#include <ctype.h>
-+#include <cstdio>
-+#include <cctype>
- #include <string>
-+#include <cstring>
- #include <map>
- 
- using namespace std;