Merge pull request #40276 from obsidiansystems/fewer-crossAttrs

Fewer cross attrs
This commit is contained in:
John Ericson 2018-05-10 11:58:00 -04:00 committed by GitHub
commit 28b2f48ba9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 62 additions and 67 deletions

View File

@ -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/;
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;
};
}

View File

@ -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;

View File

@ -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 = ''

View File

@ -20,10 +20,6 @@ stdenv.mkDerivation rec {
touch NEWS ChangeLog AUTHORS
'';
crossAttrs = {
configureFlags = "--with-ppl=${ppl.crossDrv}";
};
doCheck = true;
meta = {

View File

@ -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 ];
};
}

View File

@ -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";

View File

@ -12067,6 +12067,8 @@ with pkgs;
czmq = czmq3;
};
zmqpp = callPackage ../development/libraries/zmqpp { };
zig = callPackage ../development/compilers/zig {
llvmPackages = llvmPackages_6;
};