be53a0f2ef
The package breaks currently breaks with the following message: ``` fixed-output derivation produced path '/nix/store/5dh1mdj027ad8sprk12fqa5h5bpdxs5n-sasview' with sha256 hash '12k1w4yq1mzjxcp2cqb562c7cbwzhi54rsbmgi0fax0i1660q167' instead of the expected hash '05la54wwzzlkhmj8vkr0bvzagyib6z6mgwqbddzjs5y1wd48vpcx' ``` To fix the build the following changes were applied: * Switched to latest master for now as the older releases have a broken `py.test` configuration and altering hashes. * Added `checkPhase` which invokes `py.test` directly and drops duplicated files from `dist/tmpbuild`. * Rebased the patches `pyparsing-fix.patch` and `local_config.patch` for the latest master revision. Additionally refer to the discussion in #40381 for further reference.
76 lines
1.7 KiB
Nix
76 lines
1.7 KiB
Nix
{ lib, fetchFromGitHub, gcc, python }:
|
|
|
|
let
|
|
xhtml2pdf = import ./xhtml2pdf.nix {
|
|
inherit lib;
|
|
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;
|
|
};
|
|
|
|
in
|
|
|
|
python.pkgs.buildPythonApplication rec {
|
|
pname = "sasview";
|
|
version = "unstable-2018-05-05";
|
|
|
|
checkInputs = with python.pkgs; [
|
|
pytest
|
|
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
|
|
'';
|
|
|
|
propagatedBuildInputs = with python.pkgs; [
|
|
bumps
|
|
gcc
|
|
h5py
|
|
libxslt
|
|
lxml
|
|
matplotlib
|
|
numpy
|
|
pyparsing
|
|
periodictable
|
|
pillow
|
|
pylint
|
|
pyopencl
|
|
reportlab
|
|
sasmodels
|
|
scipy
|
|
six
|
|
sphinx
|
|
wxPython
|
|
xhtml2pdf
|
|
];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "SasView";
|
|
repo = "sasview";
|
|
rev = "de431924d0ddf73cfb952df88bd6661181947019";
|
|
sha256 = "01bk0i0g65yzyq16n1a61rgjna8rrc2i51x2ndf1z7khb1fl16vg";
|
|
};
|
|
|
|
patches = [ ./pyparsing-fix.patch ./local_config.patch ];
|
|
|
|
meta = with lib; {
|
|
homepage = https://www.sasview.org;
|
|
description = "Fitting and data analysis for small angle scattering data";
|
|
maintainers = with maintainers; [ rprospero ];
|
|
license = licenses.bsd3;
|
|
};
|
|
}
|