sasview: init at 4.1.2
Sasview is a data fitting and analysis package for small angle scattering data. More information can be found at https://www.sasview.org. There is some unfortunate cruft to this commit. SasView uses the xhtml2pdf python package, which has a specific version of html5lib as a dependency. This module manually loads that version into sasview. I haven't made xhtml2pdf available as its own package due to these circumstances.
This commit is contained in:
parent
27f14b5e7d
commit
73ed353d27
51
pkgs/applications/science/misc/sasview/default.nix
Normal file
51
pkgs/applications/science/misc/sasview/default.nix
Normal file
@ -0,0 +1,51 @@
|
||||
{lib, fetchgit, gcc, python}:
|
||||
|
||||
let
|
||||
html5 = import ./myHtml5.nix {inherit python;};
|
||||
xhtml2pdf = import ./xhtml2pdf.nix {inherit python html5;};
|
||||
in
|
||||
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
name = "sasview-${version}";
|
||||
version = "4.1.2";
|
||||
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
bumps
|
||||
gcc
|
||||
h5py
|
||||
html5
|
||||
libxslt
|
||||
lxml
|
||||
matplotlib
|
||||
numpy
|
||||
pyparsing
|
||||
periodictable
|
||||
pillow
|
||||
pylint
|
||||
pyopencl
|
||||
pytest
|
||||
reportlab
|
||||
sasmodels
|
||||
scipy
|
||||
six
|
||||
sphinx
|
||||
unittest-xml-reporting
|
||||
wxPython
|
||||
xhtml2pdf];
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/SasView/sasview.git";
|
||||
rev = "v${version}";
|
||||
sha256 ="05la54wwzzlkhmj8vkr0bvzagyib6z6mgwqbddzjs5y1wd48vpcx";
|
||||
};
|
||||
|
||||
patches = [./pyparsing-fix.patch ./local_config.patch];
|
||||
sandbox = true;
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
10
pkgs/applications/science/misc/sasview/local_config.patch
Normal file
10
pkgs/applications/science/misc/sasview/local_config.patch
Normal 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
|
||||
|
20
pkgs/applications/science/misc/sasview/myHtml5.nix
Normal file
20
pkgs/applications/science/misc/sasview/myHtml5.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{python}:
|
||||
|
||||
python.pkgs.buildPythonPackage (rec{
|
||||
buildInputs = with python.pkgs; [ flake8 pytest pytest-expect mock ];
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
six webencodings
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
py.test
|
||||
'';
|
||||
pname = "html5lib";
|
||||
name = "html5lib-${version}";
|
||||
version = "1.0b10";
|
||||
src = python.pkgs.fetchPypi {
|
||||
pname = "html5lib";
|
||||
inherit version;
|
||||
sha256 = "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd";
|
||||
};
|
||||
})
|
@ -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
|
||||
|
15
pkgs/applications/science/misc/sasview/xhtml2pdf.nix
Normal file
15
pkgs/applications/science/misc/sasview/xhtml2pdf.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{python, html5}:
|
||||
|
||||
python.pkgs.buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "xhtml2pdf";
|
||||
version = "0.2.1";
|
||||
|
||||
buildInputs = [html5];
|
||||
propagatedBuildInputs = with python.pkgs; [httplib2 pillow pypdf2 reportlab html5];
|
||||
|
||||
src = python.pkgs.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1n9r8zdk9gc2x539fq60bhszmd421ipj8g78zmsn3njvma1az9k1";
|
||||
};
|
||||
}
|
@ -4633,6 +4633,8 @@ with pkgs;
|
||||
|
||||
samplicator = callPackage ../tools/networking/samplicator { };
|
||||
|
||||
sasview = callPackage ../applications/science/misc/sasview {};
|
||||
|
||||
scanbd = callPackage ../tools/graphics/scanbd { };
|
||||
|
||||
screen = callPackage ../tools/misc/screen {
|
||||
|
Loading…
Reference in New Issue
Block a user