2018-05-13 16:25:18 +01:00
|
|
|
{ lib, fetchFromGitHub, gcc, python }:
|
2018-03-09 12:08:34 +00:00
|
|
|
|
2018-03-22 17:44:27 +00:00
|
|
|
let
|
2018-05-13 16:25:18 +01:00
|
|
|
xhtml2pdf = import ./xhtml2pdf.nix {
|
|
|
|
inherit lib;
|
2018-03-22 17:44:27 +00:00
|
|
|
fetchPypi = python.pkgs.fetchPypi;
|
|
|
|
buildPythonPackage = python.pkgs.buildPythonPackage;
|
|
|
|
html5lib = python.pkgs.html5lib;
|
|
|
|
httplib2 = python.pkgs.httplib2;
|
|
|
|
nose = python.pkgs.nose;
|
|
|
|
pillow = python.pkgs.pillow;
|
|
|
|
pypdf2 = python.pkgs.pypdf2;
|
|
|
|
reportlab = python.pkgs.reportlab;
|
2018-05-13 16:25:18 +01:00
|
|
|
};
|
2018-03-22 17:44:27 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
|
2018-03-09 12:08:34 +00:00
|
|
|
python.pkgs.buildPythonApplication rec {
|
2018-03-22 17:44:27 +00:00
|
|
|
pname = "sasview";
|
2018-10-17 14:36:46 +01:00
|
|
|
version = "4.2.0";
|
2018-03-09 12:08:34 +00:00
|
|
|
|
2018-05-13 16:25:18 +01:00
|
|
|
checkInputs = with python.pkgs; [
|
2018-03-22 17:44:27 +00:00
|
|
|
pytest
|
2018-05-13 16:25:18 +01:00
|
|
|
unittest-xml-reporting
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
# fix the following error:
|
|
|
|
# imported module 'sas.sascalc.data_util.uncertainty' has this __file__ attribute:
|
|
|
|
# /build/source/build/lib.linux-x86_64-2.7/sas/sascalc/data_util/uncertainty.py
|
|
|
|
# which is not the same as the test file we want to collect:
|
|
|
|
# /build/source/dist/tmpbuild/sasview/sas/sascalc/data_util/uncertainty.py
|
|
|
|
rm -r dist/tmpbuild
|
|
|
|
|
|
|
|
HOME=$(mktemp -d) py.test
|
|
|
|
'';
|
2018-03-22 17:44:27 +00:00
|
|
|
|
2018-03-09 12:08:34 +00:00
|
|
|
propagatedBuildInputs = with python.pkgs; [
|
|
|
|
bumps
|
|
|
|
gcc
|
|
|
|
h5py
|
|
|
|
libxslt
|
|
|
|
lxml
|
|
|
|
matplotlib
|
|
|
|
numpy
|
|
|
|
pyparsing
|
|
|
|
periodictable
|
|
|
|
pillow
|
|
|
|
pylint
|
|
|
|
pyopencl
|
|
|
|
reportlab
|
|
|
|
sasmodels
|
|
|
|
scipy
|
|
|
|
six
|
|
|
|
sphinx
|
|
|
|
wxPython
|
2018-05-13 16:25:18 +01:00
|
|
|
xhtml2pdf
|
|
|
|
];
|
2018-03-09 12:08:34 +00:00
|
|
|
|
2018-05-13 16:25:18 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SasView";
|
|
|
|
repo = "sasview";
|
2018-10-17 14:36:46 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0k3486h46k6406h0vla8h68fd78wh3dcaq5w6f12jh6g4cjxv9qa";
|
2018-03-09 12:08:34 +00:00
|
|
|
};
|
|
|
|
|
2018-05-13 16:25:18 +01:00
|
|
|
patches = [ ./pyparsing-fix.patch ./local_config.patch ];
|
2018-03-09 12:08:34 +00:00
|
|
|
|
2018-05-13 16:25:18 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.sasview.org";
|
2018-03-09 12:08:34 +00:00
|
|
|
description = "Fitting and data analysis for small angle scattering data";
|
2018-05-13 16:25:18 +01:00
|
|
|
maintainers = with maintainers; [ rprospero ];
|
|
|
|
license = licenses.bsd3;
|
2018-03-09 12:08:34 +00:00
|
|
|
};
|
|
|
|
}
|