diff --git a/pkgs/applications/science/math/yacas/default.nix b/pkgs/applications/science/math/yacas/default.nix index 0f6dc35fe0c..c02ef73df11 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" ]; + cmakeFlags = [ + "-DENABLE_CYACAS_GUI=${if enableGui then "ON" else "OFF"}" + "-DENABLE_CYACAS_KERNEL=${if enableJupyter then "ON" else "OFF"}" + ]; + # Perl is only for the documentation - nativeBuildInputs = [ perl ]; - - patches = [ ./gcc43.patch ]; - - 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 - ''; - }; + 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 054f80cff92..00000000000 --- 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 --#include -+#include -+#include - #include -+#include - #include - - using namespace std;