Merge pull request #36852 from rprospero/sasview-for-pr

sasview: init at 4.1.2
This commit is contained in:
Matthew Justin Bauer 2018-04-09 14:07:40 -05:00 committed by GitHub
commit 6a74718e00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 217 additions and 1 deletions

View file

@ -3134,6 +3134,11 @@
github = "rongcuid";
name = "Rongcui Dong";
};
rprospero = {
email = "rprospero+nix@gmail.com";
github = "rprospero";
name = "Adam Washington";
};
rszibele = {
email = "richard@szibele.com";
github = "rszibele";

View file

@ -0,0 +1,60 @@
{lib, fetchgit, 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 = "4.1.2";
buildInputs = with python.pkgs; [
pytest
unittest-xml-reporting];
propagatedBuildInputs = with python.pkgs; [
bumps
gcc
h5py
libxslt
lxml
matplotlib
numpy
pyparsing
periodictable
pillow
pylint
pyopencl
reportlab
sasmodels
scipy
six
sphinx
wxPython
xhtml2pdf];
src = fetchgit {
url = "https://github.com/SasView/sasview.git";
rev = "v${version}";
sha256 ="05la54wwzzlkhmj8vkr0bvzagyib6z6mgwqbddzjs5y1wd48vpcx";
};
patches = [./pyparsing-fix.patch ./local_config.patch];
meta = {
homepage = https://www.sasview.org;
description = "Fitting and data analysis for small angle scattering data";
maintainers = with lib.maintainers; [ rprospero ];
license = lib.licenses.bsd3;
};
}

View file

@ -0,0 +1,10 @@
--- a/src/sas/_config.py
+++ b/src/sas/_config.py
@@ -70,2 +70,2 @@
- logger.critical("Error loading %s: %s", path, exc)
- sys.exit()
+ import sas.sasview.local_config
+ return sas.sasview.local_config
--
2.15.0

View file

@ -0,0 +1,8 @@
--- a/setup.py
+++ b/setup.py
@@ -5,1 +5,1 @@
- 'bumps>=0.7.5.9', 'periodictable>=1.5.0', 'pyparsing<2.0.0',
+ 'bumps>=0.7.5.9', 'periodictable>=1.5.0',
--
2.15.0

View file

@ -0,0 +1,32 @@
{lib, fetchPypi, buildPythonPackage, html5lib, httplib2, nose, pillow, pypdf2, reportlab}:
let
#xhtml2pdf specifically requires version "1.0b10" of html5lib
html5 = html5lib.overrideAttrs( oldAttrs: rec{
version = "1.0b10";
src = oldAttrs.src.override {
inherit version;
sha256 = "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd";
};
});
in
buildPythonPackage rec {
pname = "xhtml2pdf";
version = "0.2.1";
buildInputs = [html5];
propagatedBuildInputs = [httplib2 nose pillow pypdf2 reportlab html5];
src = fetchPypi {
inherit pname version;
sha256 = "1n9r8zdk9gc2x539fq60bhszmd421ipj8g78zmsn3njvma1az9k1";
};
meta = {
description = "A pdf converter for the ReportLab Toolkit";
homepage = https://github.com/xhtml2pdf/xhtml2pdf;
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ rprospero ];
};
}

View file

@ -0,0 +1,24 @@
{ stdenv, buildPythonPackage, fetchPypi, six}:
buildPythonPackage rec {
pname = "bumps";
version = "0.7.6";
propagatedBuildInputs = [six];
# Bumps does not provide its own tests.py, so the test
# always fails
doCheck = false;
src = fetchPypi {
inherit pname version;
sha256 = "1ahzw8ls9wsz2ks668s15zskyykib52fhi07mg50hp7lw9avqb5k";
};
meta = with stdenv.lib; {
homepage = http://www.reflectometry.org/danse/software.html;
description = "Data fitting with bayesian uncertainty analysis";
maintainers = with maintainers; [ rprospero ];
license = licenses.publicDomain;
};
}

View file

@ -0,0 +1,20 @@
{lib, fetchPypi, buildPythonPackage, numpy, pyparsing}:
buildPythonPackage rec{
pname = "periodictable";
version = "1.5.0";
propagatedBuildInputs = [numpy pyparsing];
src = fetchPypi {
inherit pname version;
sha256 = "1cjk6aqcz41nxm4fpriz01vqdafd6g57cjk0wh1iklk5cx6c085h";
};
meta = {
homepage = http://www.reflectometry.org/danse/software.html;
description = "an extensible periodic table of the elements prepopulated with data important to neutron and x-ray scattering experiments";
license = lib.licenses.publicDomain;
maintainers = with lib.maintainers; [ rprospero ];
};
}

View file

@ -0,0 +1,24 @@
{lib, fetchgit, buildPythonPackage, pytest, numpy, scipy, matplotlib, docutils}:
buildPythonPackage rec {
pname = "sasmodels";
version = "0.96";
buildInputs = [pytest];
propagatedBuildInputs = [docutils matplotlib numpy scipy];
preCheck = ''export HOME=$(mktemp -d)'';
src = fetchgit {
url = "https://github.com/SasView/sasmodels.git";
rev = "v${version}";
sha256 = "11qaaqdc23qzb75zs48fkypksmcb332vl0pkjqr5bijxxymgm7nw";
};
meta = {
description = "Library of small angle scattering models";
homepage = http://sasview.org;
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ rprospero ];
};
}

View file

@ -0,0 +1,23 @@
{lib, fetchPypi, buildPythonPackage, six}:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "unittest-xml-reporting";
version = "2.1.1";
propagatedBuildInputs = [six];
# The tarball from Pypi doesn't actually contain the unit tests
doCheck = false;
src = fetchPypi {
inherit pname version;
sha256 = "1jwkqx5gfphkymp3xwqvlb94ng22gpbqh36vbbnsrpk1a0mammm6";
};
meta = with lib; {
homepage = https://github.com/xmlrunner/unittest-xml-reporting/tree/master/;
description = "A unittest runner that can save test results to XML files";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ rprospero ];
};
}

View file

@ -4729,6 +4729,8 @@ with pkgs;
samplicator = callPackage ../tools/networking/samplicator { };
sasview = callPackage ../applications/science/misc/sasview {};
scanbd = callPackage ../tools/graphics/scanbd { };
screen = callPackage ../tools/misc/screen {

View file

@ -1278,6 +1278,8 @@ in {
enablePython = true;
});
bumps = callPackage ../development/python-modules/bumps {};
buttersink = buildPythonPackage rec {
name = "buttersink-0.6.8";
@ -11725,6 +11727,8 @@ in {
};
};
periodictable = callPackage ../development/python-modules/periodictable { };
pg8000 = buildPythonPackage rec {
name = "pg8000-1.10.1";
@ -14607,6 +14611,8 @@ in {
sampledata = callPackage ../development/python-modules/sampledata { };
sasmodels = callPackage ../development/python-modules/sasmodels { };
scapy = callPackage ../development/python-modules/scapy { };
scipy = callPackage ../development/python-modules/scipy { };
@ -16617,7 +16623,9 @@ in {
};
};
uritemplate_py = buildPythonPackage rec {
unittest-xml-reporting = callPackage ../development/python-modules/unittest-xml-reporting { };
uritemplate_py = buildPythonPackage rec {
name = "uritemplate.py-${version}";
version = "3.0.0";