about summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2018-05-12 23:17:03 +0200
committerxeji <36407913+xeji@users.noreply.github.com>2018-05-12 23:17:03 +0200
commitea8a62add90c7f8704a31c8c28a59e2873a978ae (patch)
treec8f22173e4888dbd451f3c98458f4cf6cf2356ee /pkgs/development/python-modules
parentef102bd43a78ac7ad7c1c3cfbb3bd849d4e6b040 (diff)
downloadnixlib-ea8a62add90c7f8704a31c8c28a59e2873a978ae.tar
nixlib-ea8a62add90c7f8704a31c8c28a59e2873a978ae.tar.gz
nixlib-ea8a62add90c7f8704a31c8c28a59e2873a978ae.tar.bz2
nixlib-ea8a62add90c7f8704a31c8c28a59e2873a978ae.tar.lz
nixlib-ea8a62add90c7f8704a31c8c28a59e2873a978ae.tar.xz
nixlib-ea8a62add90c7f8704a31c8c28a59e2873a978ae.tar.zst
nixlib-ea8a62add90c7f8704a31c8c28a59e2873a978ae.zip
pythonPackages.sasmodels: fix build (#40381)
* The revision checksum changed, so it's safer to pin the package
  against an explicit `git` tag (https://github.com/NixOS/nixpkgs/pull/40381#issuecomment-388484695)

* Repaired `checkPhase` to run `py.test` properly on Python {2,3}

* Bumped to latest revision (unstable-2018-04-27) as it supports the entire test suite
  properly.
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/sasmodels/default.nix28
1 files changed, 17 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/sasmodels/default.nix b/pkgs/development/python-modules/sasmodels/default.nix
index d33de9c2a73a..d84e83299039 100644
--- a/pkgs/development/python-modules/sasmodels/default.nix
+++ b/pkgs/development/python-modules/sasmodels/default.nix
@@ -1,19 +1,25 @@
-{lib, fetchgit, buildPythonPackage, pytest, numpy, scipy, matplotlib, docutils}:
+{ lib, fetchFromGitHub, buildPythonPackage, pytest, numpy, scipy, matplotlib, docutils
+, pyopencl, opencl-headers
+}:
 
 buildPythonPackage rec {
-  pname = "sasmodels";
-  version = "0.96";
+  pname = "sasmodels-unstable";
+  version = "2018-04-27";
 
-  buildInputs = [pytest];
-  propagatedBuildInputs = [docutils matplotlib numpy scipy];
+  src = fetchFromGitHub {
+    owner = "SasView";
+    repo = "sasmodels";
+    rev = "33969b656596e8b6cc8ce934cd1f8062f7b11cf2";
+    sha256 = "00rvhafg08qvx0k9mzn1ppdkc9i5yfn2gr3hidrf416srf8zgb85";
+  };
 
-  preCheck = ''export HOME=$(mktemp -d)'';
+  buildInputs = [ opencl-headers ];
+  checkInputs = [ pytest ];
+  propagatedBuildInputs = [ docutils matplotlib numpy scipy pyopencl ];
 
-  src = fetchgit {
-    url = "https://github.com/SasView/sasmodels.git";
-    rev = "v${version}";
-    sha256 = "11qaaqdc23qzb75zs48fkypksmcb332vl0pkjqr5bijxxymgm7nw";
-  };
+  checkPhase = ''
+    HOME=$(mktemp -d) py.test -c ./pytest.ini
+  '';
 
   meta = {
     description = "Library of small angle scattering models";