about summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/fflas-ffpack/default.nix33
-rw-r--r--pkgs/development/libraries/gstreamer/base/default.nix50
-rw-r--r--pkgs/development/libraries/gstreamer/core/default.nix15
-rw-r--r--pkgs/development/libraries/linbox/default.nix79
-rw-r--r--pkgs/development/libraries/oniguruma/default.nix13
-rw-r--r--pkgs/development/libraries/rocksdb/default.nix4
-rw-r--r--pkgs/development/libraries/science/math/rankwidth/default.nix28
7 files changed, 185 insertions, 37 deletions
diff --git a/pkgs/development/libraries/fflas-ffpack/default.nix b/pkgs/development/libraries/fflas-ffpack/default.nix
index edea352ae2dd..5f99f35a1599 100644
--- a/pkgs/development/libraries/fflas-ffpack/default.nix
+++ b/pkgs/development/libraries/fflas-ffpack/default.nix
@@ -1,4 +1,7 @@
-{stdenv, fetchFromGitHub, autoreconfHook, givaro, pkgconfig, openblas, liblapack}:
+{ stdenv, fetchFromGitHub, autoreconfHook, givaro, pkgconfig, openblas
+, gmpxx
+, optimize ? false # impure
+}:
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
   pname = "fflas-ffpack";
@@ -9,9 +12,31 @@ stdenv.mkDerivation rec {
     rev = "v${version}";
     sha256 = "1cqhassj2dny3gx0iywvmnpq8ca0d6m82xl5rz4mb8gaxr2kwddl";
   };
-  nativeBuildInputs = [ autoreconfHook pkgconfig ];
-  buildInputs = [ givaro (liblapack.override {shared = true;}) openblas];
-  configureFlags = "--with-blas-libs=-lopenblas --with-lapack-libs=-llapack";
+  checkInputs = [
+    gmpxx
+  ];
+  nativeBuildInputs = [
+    autoreconfHook
+    pkgconfig
+  ] ++ stdenv.lib.optionals doCheck checkInputs;
+  buildInputs = [ givaro openblas];
+  configureFlags = [
+    "--with-blas-libs=-lopenblas"
+    "--with-lapack-libs=-lopenblas"
+  ] ++ stdenv.lib.optionals (!optimize) [
+    # disable SIMD instructions (which are enabled *when available* by default)
+    "--disable-sse"
+    "--disable-sse2"
+    "--disable-sse3"
+    "--disable-ssse3"
+    "--disable-sse41"
+    "--disable-sse42"
+    "--disable-avx"
+    "--disable-avx2"
+    "--disable-fma"
+    "--disable-fma4"
+  ];
+  doCheck = true;
   meta = {
     inherit version;
     description = ''Finite Field Linear Algebra Subroutines'';
diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix
index b3a4f445289e..39cf57ec5258 100644
--- a/pkgs/development/libraries/gstreamer/base/default.nix
+++ b/pkgs/development/libraries/gstreamer/base/default.nix
@@ -1,17 +1,22 @@
-{ stdenv, fetchurl, fetchpatch, pkgconfig, meson
-, ninja, gettext, gobjectIntrospection, python
-, gstreamer, orc, alsaLib, libXv, pango, libtheora
-, wayland, cdparanoia, libvisual, libintl
-}:
+{ stdenv, fetchurl, fetchpatch, lib
+, pkgconfig, meson, ninja, gettext, gobjectIntrospection
+, python, gstreamer, orc, pango, libtheora, libvisual
+, libintl
+, enableX11 ? stdenv.isLinux, libXv
+, enableWayland ? stdenv.isLinux, wayland
+, enableAlsa ? stdenv.isLinux, alsaLib
+, enableCocoa ? false, darwin
+, enableCdparanoia ? (!stdenv.isDarwin), cdparanoia }:
 
 stdenv.mkDerivation rec {
   name = "gst-plugins-base-1.14.0";
 
-  meta = {
+  meta = with lib; {
     description = "Base plugins and helper libraries";
     homepage = https://gstreamer.freedesktop.org;
-    license = stdenv.lib.licenses.lgpl2Plus;
-    platforms = stdenv.lib.platforms.unix;
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ matthewbauer ];
   };
 
   src = fetchurl {
@@ -21,19 +26,32 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "dev" ];
 
-  nativeBuildInputs = [
-    pkgconfig python meson ninja gettext gobjectIntrospection
-  ];
+  nativeBuildInputs = [ pkgconfig python gettext gobjectIntrospection ]
+
+  # Broken meson with Darwin. Should hopefully be fixed soon. Tracking
+  # in https://bugzilla.gnome.org/show_bug.cgi?id=781148.
+  ++ lib.optionals (!stdenv.isDarwin) [ meson ninja ];
 
-  buildInputs = [
-    orc libXv pango libtheora cdparanoia libintl wayland
+  # TODO How to pass these to Meson?
+  configureFlags = [
+    "--enable-x11=${if enableX11 then "yes" else "no"}"
+    "--enable-wayland=${if enableWayland then "yes" else "no"}"
+    "--enable-cocoa=${if enableCocoa then "yes" else "no"}"
   ]
-  ++ stdenv.lib.optional stdenv.isLinux alsaLib
-  ++ stdenv.lib.optional (!stdenv.isDarwin) libvisual;
+
+  # Introspection fails on my MacBook currently
+  ++ lib.optional stdenv.isDarwin "--disable-introspection";
+
+  buildInputs = [ orc libtheora libintl ]
+    ++ lib.optional enableAlsa alsaLib
+    ++ lib.optionals enableX11 [ libXv pango ]
+    ++ lib.optional enableWayland wayland
+    ++ lib.optional enableCocoa darwin.apple_sdk.frameworks.Cocoa
+    ++ lib.optional enableCdparanoia cdparanoia;
 
   propagatedBuildInputs = [ gstreamer ];
 
-  preConfigure = ''
+  postPatch = ''
     patchShebangs .
   '';
 
diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix
index ab3f78767a1c..5845c8c50db2 100644
--- a/pkgs/development/libraries/gstreamer/core/default.nix
+++ b/pkgs/development/libraries/gstreamer/core/default.nix
@@ -2,17 +2,18 @@
 , pkgconfig, gettext, gobjectIntrospection
 , bison, flex, python3, glib, makeWrapper
 , libcap,libunwind, darwin
+, lib
 }:
 
 stdenv.mkDerivation rec {
   name = "gstreamer-1.14.0";
 
-  meta = {
+  meta = with lib ;{
     description = "Open source multimedia framework";
     homepage = https://gstreamer.freedesktop.org;
-    license = stdenv.lib.licenses.lgpl2Plus;
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = [ stdenv.lib.maintainers.ttuegel ];
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ttuegel matthewbauer ];
   };
 
   src = fetchurl {
@@ -20,7 +21,7 @@ stdenv.mkDerivation rec {
     sha256 = "0vj6k01lp2yva6rfd95fkyng9jdr62gkz0x8d2l81dyly1ki6dpw";
   };
 
-  patches = [ 
+  patches = [
     (fetchpatch {
         url = "https://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370411";
         sha256 = "16plzzmkk906k4892zq68j3c9z8vdma5nxzlviq20jfv04ykhmk2";
@@ -34,7 +35,9 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [
     meson ninja pkgconfig gettext bison flex python3 makeWrapper gobjectIntrospection
   ];
-  buildInputs = [ libcap libunwind ] ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreServices;
+  buildInputs =
+       lib.optionals stdenv.isLinux [ libcap libunwind ]
+    ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreServices;
 
   propagatedBuildInputs = [ glib ];
 
diff --git a/pkgs/development/libraries/linbox/default.nix b/pkgs/development/libraries/linbox/default.nix
new file mode 100644
index 000000000000..0f5442bd63b6
--- /dev/null
+++ b/pkgs/development/libraries/linbox/default.nix
@@ -0,0 +1,79 @@
+{ stdenv
+, fetchFromGitHub
+, fetchpatch
+, autoreconfHook
+, givaro
+, pkgconfig
+, openblas
+, liblapack
+, fflas-ffpack
+, gmpxx
+, optimize ? false # impure
+, withSage ? false # sage support
+}:
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  pname = "linbox";
+  version = "1.5.2";
+
+  src = fetchFromGitHub {
+    owner = "linbox-team";
+    repo = "${pname}";
+    rev = "v${version}";
+    sha256 = "1wfivlwp30mzdy1697w7rzb8caajim50mc8h27k82yipn2qc5n4i";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkgconfig
+  ];
+
+  buildInputs = [
+    givaro
+    (liblapack.override {shared = true;})
+    openblas
+    gmpxx
+    fflas-ffpack
+  ];
+
+  configureFlags = [
+    "--with-blas-libs=-lopenblas"
+    "--with-lapack-libs=-llapack"
+    "--disable-optimization"
+  ] ++ stdenv.lib.optionals (!optimize) [
+    # disable SIMD instructions (which are enabled *when available* by default)
+    "--disable-sse"
+    "--disable-sse2"
+    "--disable-sse3"
+    "--disable-ssse3"
+    "--disable-sse41"
+    "--disable-sse42"
+    "--disable-avx"
+    "--disable-avx2"
+    "--disable-fma"
+    "--disable-fma4"
+  ] ++ stdenv.lib.optionals withSage [
+    "--enable-sage"
+  ];
+
+  patches = stdenv.lib.optionals withSage [
+    # https://trac.sagemath.org/ticket/24214#comment:39
+    # Will be resolved by
+    # https://github.com/linbox-team/linbox/issues/69
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/sagemath/sage/a843f48b7a4267e44895a3dfa892c89c85b85611/build/pkgs/linbox/patches/linbox_charpoly_fullCRA.patch";
+      sha256 = "16nxfzfknra3k2yk3xy0k8cq9rmnmsch3dnkb03kx15h0y0jmibk";
+    })
+  ];
+
+  doCheck = true;
+
+  meta = {
+    inherit version;
+    description = "C++ library for exact, high-performance linear algebra";
+    license = stdenv.lib.licenses.lgpl21Plus;
+    maintainers = [stdenv.lib.maintainers.timokau];
+    platforms = stdenv.lib.platforms.linux;
+    homepage = http://linalg.org/;
+  };
+}
diff --git a/pkgs/development/libraries/oniguruma/default.nix b/pkgs/development/libraries/oniguruma/default.nix
index 3989ab42468d..f9a75801e101 100644
--- a/pkgs/development/libraries/oniguruma/default.nix
+++ b/pkgs/development/libraries/oniguruma/default.nix
@@ -13,16 +13,11 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake ];
 
-  prePatch = stdenv.lib.optional stdenv.isDarwin ''
-    substituteInPlace cmake/dist.cmake \
-      --replace '@executable_path/''${UP_DIR}/''${INSTALL_LIB}' $out'/''${INSTALL_LIB}'
-  '';
-
-  meta = {
+  meta = with stdenv.lib; {
     homepage = https://github.com/kkos/oniguruma;
     description = "Regular expressions library";
-    license = stdenv.lib.licenses.bsd2;
-    maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
-    platforms = with stdenv.lib.platforms; unix;
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ fuuzetsu ];
+    platforms = platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/rocksdb/default.nix b/pkgs/development/libraries/rocksdb/default.nix
index bb0faf76be69..bb36d942a69b 100644
--- a/pkgs/development/libraries/rocksdb/default.nix
+++ b/pkgs/development/libraries/rocksdb/default.nix
@@ -19,7 +19,7 @@ let
 in
 stdenv.mkDerivation rec {
   name = "rocksdb-${version}";
-  version = "5.10.3";
+  version = "5.11.3";
 
   outputs = [ "dev" "out" "static" "bin" ];
 
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
     owner = "facebook";
     repo = "rocksdb";
     rev = "v${version}";
-    sha256 = "19d8i8map8qz639mhflmxc0w9gp78fvkq1l46y5s6b5imwh0w7xq";
+    sha256 = "15x2r7aib1xinwcchl32wghs8g96k4q5xgv6z97mxgp35475x01p";
   };
 
   nativeBuildInputs = [ which perl ];
diff --git a/pkgs/development/libraries/science/math/rankwidth/default.nix b/pkgs/development/libraries/science/math/rankwidth/default.nix
new file mode 100644
index 000000000000..f38fce5831ee
--- /dev/null
+++ b/pkgs/development/libraries/science/math/rankwidth/default.nix
@@ -0,0 +1,28 @@
+{ stdenv
+, fetchurl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rankwidth";
+  version = "0.7";
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "http://mirrors.mit.edu/sage/spkg/upstream/rw/rw-${version}.tar.gz";
+    sha256 = "1rv2v42x2506x7f10349m1wpmmfxrv9l032bkminni2gbip9cjg0";
+  };
+
+  configureFlags = [
+    "--enable-executable=no" # no igraph dependency
+  ];
+
+  # check phase is empty for now (as of version 0.7)
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    description = "Calculates rank-width and rank-decompositions";
+    license = with licenses; [ gpl2Plus ];
+    maintainers = with maintainers; [ timokau ];
+    platforms = platforms.linux;
+  };
+}