summary refs log tree commit diff
path: root/pkgs/development/libraries/boost
diff options
context:
space:
mode:
authorBojan Nikolic <bojan@bnikolic.co.uk>2018-01-02 22:59:03 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-01-02 19:31:25 -0500
commit00b038a3f829b8952a90706e5433abdf146cc02f (patch)
treea28a085eb8057185deffb14d89170aec1322d91f /pkgs/development/libraries/boost
parentcb8349f59f8e3bf658865b5bc34f07c4e8868bc3 (diff)
downloadnixpkgs-00b038a3f829b8952a90706e5433abdf146cc02f.tar
nixpkgs-00b038a3f829b8952a90706e5433abdf146cc02f.tar.gz
nixpkgs-00b038a3f829b8952a90706e5433abdf146cc02f.tar.bz2
nixpkgs-00b038a3f829b8952a90706e5433abdf146cc02f.tar.lz
nixpkgs-00b038a3f829b8952a90706e5433abdf146cc02f.tar.xz
nixpkgs-00b038a3f829b8952a90706e5433abdf146cc02f.tar.zst
nixpkgs-00b038a3f829b8952a90706e5433abdf146cc02f.zip
boost: Do not force numpy support from 1.65
The reason is that if cross compiling (or for other reasons) python
bindings as a whole are turned off. Those two lines then trigger
assertion errors unless manually overridden for cross compilation.

This way:

 1. The `enableNumpy` default respects the `enablePython deafult.
 2. Cross works by default
 3. Absurd manual overrides still break as they should
 4. The `>= 1.65` logic is direct and not a maintaince gotcha.
Diffstat (limited to 'pkgs/development/libraries/boost')
-rw-r--r--pkgs/development/libraries/boost/1.65.nix2
-rw-r--r--pkgs/development/libraries/boost/1.66.nix2
-rw-r--r--pkgs/development/libraries/boost/generic.nix2
3 files changed, 1 insertions, 5 deletions
diff --git a/pkgs/development/libraries/boost/1.65.nix b/pkgs/development/libraries/boost/1.65.nix
index 427ef072ffe..9837e1c6919 100644
--- a/pkgs/development/libraries/boost/1.65.nix
+++ b/pkgs/development/libraries/boost/1.65.nix
@@ -9,6 +9,4 @@ callPackage ./generic.nix (args // rec {
     sha256 = "9807a5d16566c57fd74fb522764e0b134a8bbe6b6e8967b83afefd30dcd3be81";
   };
 
-  enableNumpy = args.enableNumpy or true;
-
 })
diff --git a/pkgs/development/libraries/boost/1.66.nix b/pkgs/development/libraries/boost/1.66.nix
index a89ae84db38..3fd9c160824 100644
--- a/pkgs/development/libraries/boost/1.66.nix
+++ b/pkgs/development/libraries/boost/1.66.nix
@@ -9,6 +9,4 @@ callPackage ./generic.nix (args // rec {
     sha256 = "5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9";
   };
 
-  enableNumpy = args.enableNumpy or true;
-
 })
diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix
index adb7ca665cc..6ea7dba0cb1 100644
--- a/pkgs/development/libraries/boost/generic.nix
+++ b/pkgs/development/libraries/boost/generic.nix
@@ -11,7 +11,7 @@
 , enableShared ? !(hostPlatform.libc == "msvcrt") # problems for now
 , enableStatic ? !enableShared
 , enablePython ? hostPlatform == buildPlatform
-, enableNumpy ? false
+, enableNumpy ? enablePython && stdenv.lib.versionAtLeast version "1.65"
 , taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic))
 , patches ? []
 , mpi ? null