summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Ericson <Ericson2314@yahoo.com>2018-05-10 11:58:00 -0400
committerGitHub <noreply@github.com>2018-05-10 11:58:00 -0400
commit28b2f48ba9c04bfe8cebffd6b3ea47a78a5e18e6 (patch)
tree3c27dfb121e97425a4c8c0adf043bc443829681a
parent468841cea41a9ba33c4c262518e6f0796b99a440 (diff)
parent79adb993fbafeb89062e9b948e916d89311f7ca6 (diff)
downloadnixlib-28b2f48ba9c04bfe8cebffd6b3ea47a78a5e18e6.tar
nixlib-28b2f48ba9c04bfe8cebffd6b3ea47a78a5e18e6.tar.gz
nixlib-28b2f48ba9c04bfe8cebffd6b3ea47a78a5e18e6.tar.bz2
nixlib-28b2f48ba9c04bfe8cebffd6b3ea47a78a5e18e6.tar.lz
nixlib-28b2f48ba9c04bfe8cebffd6b3ea47a78a5e18e6.tar.xz
nixlib-28b2f48ba9c04bfe8cebffd6b3ea47a78a5e18e6.tar.zst
nixlib-28b2f48ba9c04bfe8cebffd6b3ea47a78a5e18e6.zip
Merge pull request #40276 from obsidiansystems/fewer-crossAttrs
Fewer cross attrs
-rw-r--r--pkgs/applications/science/math/yacas/default.nix59
-rw-r--r--pkgs/applications/science/math/yacas/gcc43.patch17
-rw-r--r--pkgs/applications/version-management/fossil/default.nix15
-rw-r--r--pkgs/development/libraries/cloog-ppl/default.nix4
-rw-r--r--pkgs/development/libraries/zmqpp/default.nix27
-rw-r--r--pkgs/development/tools/misc/cscope/default.nix5
-rw-r--r--pkgs/top-level/all-packages.nix2
7 files changed, 62 insertions, 67 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;
diff --git a/pkgs/applications/version-management/fossil/default.nix b/pkgs/applications/version-management/fossil/default.nix
index f46a704ea9ca..1373e13c4147 100644
--- a/pkgs/applications/version-management/fossil/default.nix
+++ b/pkgs/applications/version-management/fossil/default.nix
@@ -1,5 +1,7 @@
-{stdenv, libiconv, fetchurl, zlib, openssl, tcl, readline, sqlite, ed, which
-, tcllib, withJson ? true}:
+{ stdenv
+, libiconv, fetchurl, zlib, openssl, tcl, readline, sqlite, ed, which
+, tcllib, withJson ? true
+}:
 
 stdenv.mkDerivation rec {
   name = "fossil-${version}";
@@ -18,11 +20,11 @@ stdenv.mkDerivation rec {
              ++ stdenv.lib.optional stdenv.isDarwin libiconv;
   nativeBuildInputs = [ tcl ];
 
-  doCheck = true;
+  doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
 
   checkTarget = "test";
 
-  preCheck = ''
+  preCheck = stdenv.lib.optional doCheck ''
     export TCLLIBPATH="${tcllib}/lib/tcllib${tcllib.version}"
   '';
   configureFlags = if withJson then  "--json" else  "";
@@ -36,11 +38,6 @@ stdenv.mkDerivation rec {
     INSTALLDIR=$out/bin make install
   '';
 
-  crossAttrs = {
-    doCheck = false;
-    makeFlags = [ "TCC=$CC" ];
-  };
-
   meta = {
     description = "Simple, high-reliability, distributed software configuration management";
     longDescription = ''
diff --git a/pkgs/development/libraries/cloog-ppl/default.nix b/pkgs/development/libraries/cloog-ppl/default.nix
index 442b115a4082..0ce0af97ec94 100644
--- a/pkgs/development/libraries/cloog-ppl/default.nix
+++ b/pkgs/development/libraries/cloog-ppl/default.nix
@@ -20,10 +20,6 @@ stdenv.mkDerivation rec {
     touch NEWS ChangeLog AUTHORS
   '';
 
-  crossAttrs = {
-    configureFlags = "--with-ppl=${ppl.crossDrv}";
-  };
-
   doCheck = true;
 
   meta = {
diff --git a/pkgs/development/libraries/zmqpp/default.nix b/pkgs/development/libraries/zmqpp/default.nix
new file mode 100644
index 000000000000..f7e849f6a334
--- /dev/null
+++ b/pkgs/development/libraries/zmqpp/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, zeromq }:
+
+stdenv.mkDerivation rec {
+  name = "zmqpp-${version}";
+  version = "4.2.0";
+
+  src = fetchFromGitHub {
+    owner = "zeromq";
+    repo = "zmqpp";
+    rev = version;
+    sha256 = "08v34q3sd8g1b95k73n7jwryb0xzwca8ib9dz8ngczqf26j8k72i";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  propagatedBuildInputs = [ zeromq ];
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "C++ wrapper for czmq. Aims to be minimal, simple and consistent";
+    license = licenses.lgpl3;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ chris-martin ];
+  };
+}
diff --git a/pkgs/development/tools/misc/cscope/default.nix b/pkgs/development/tools/misc/cscope/default.nix
index b737bb7a7dab..0b1bbf5f9e4d 100644
--- a/pkgs/development/tools/misc/cscope/default.nix
+++ b/pkgs/development/tools/misc/cscope/default.nix
@@ -31,11 +31,6 @@ stdenv.mkDerivation rec {
     cp xcscope.el{,c} "$out/share/emacs/site-lisp"
   '';
 
-  crossAttrs = {
-    postInstall = "";
-    propagatedBuildInputs = [ ncurses.crossDrv ];
-  };
-
   meta = {
     description = "A developer's tool for browsing source code";
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index b628e94db1e3..6edab5478b87 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -12067,6 +12067,8 @@ with pkgs;
     czmq = czmq3;
   };
 
+  zmqpp = callPackage ../development/libraries/zmqpp { };
+
   zig = callPackage ../development/compilers/zig {
     llvmPackages = llvmPackages_6;
   };