summary refs log tree commit diff
path: root/pkgs/applications/science/misc
diff options
context:
space:
mode:
authorAdam Washington <adam.washington@stfc.ac.uk>2018-03-22 17:44:27 +0000
committerAdam Washington <adam.washington@stfc.ac.uk>2018-03-22 17:44:27 +0000
commit392def733b61855e667c7ce7a777a6bdc397ef44 (patch)
tree31edc9ec826c696b4505a032d08b8727db61a6d4 /pkgs/applications/science/misc
parent068d792fedbfb6f14b9f7bb52179a392e6886e52 (diff)
downloadnixlib-392def733b61855e667c7ce7a777a6bdc397ef44.tar
nixlib-392def733b61855e667c7ce7a777a6bdc397ef44.tar.gz
nixlib-392def733b61855e667c7ce7a777a6bdc397ef44.tar.bz2
nixlib-392def733b61855e667c7ce7a777a6bdc397ef44.tar.lz
nixlib-392def733b61855e667c7ce7a777a6bdc397ef44.tar.xz
nixlib-392def733b61855e667c7ce7a777a6bdc397ef44.tar.zst
nixlib-392def733b61855e667c7ce7a777a6bdc397ef44.zip
Remove lint from Sasview package
Diffstat (limited to 'pkgs/applications/science/misc')
-rw-r--r--pkgs/applications/science/misc/sasview/default.nix23
-rw-r--r--pkgs/applications/science/misc/sasview/xhtml2pdf.nix32
2 files changed, 51 insertions, 4 deletions
diff --git a/pkgs/applications/science/misc/sasview/default.nix b/pkgs/applications/science/misc/sasview/default.nix
index d45eae1ac1f5..d0a4f74924c5 100644
--- a/pkgs/applications/science/misc/sasview/default.nix
+++ b/pkgs/applications/science/misc/sasview/default.nix
@@ -1,9 +1,27 @@
 {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 {
-  name = "sasview-${version}";
+  pname = "sasview";
   version = "4.1.2";
 
+  buildInputs = with python.pkgs; [
+    pytest
+    unittest-xml-reporting];
+
   propagatedBuildInputs = with python.pkgs; [
     bumps
     gcc
@@ -17,13 +35,11 @@ python.pkgs.buildPythonApplication rec {
     pillow
     pylint
     pyopencl
-    pytest
     reportlab
     sasmodels
     scipy
     six
     sphinx
-    unittest-xml-reporting
     wxPython
     xhtml2pdf];
 
@@ -34,7 +50,6 @@ python.pkgs.buildPythonApplication rec {
   };
 
   patches = [./pyparsing-fix.patch ./local_config.patch];
-  sandbox = true;
 
   meta = {
     homepage = https://www.sasview.org;
diff --git a/pkgs/applications/science/misc/sasview/xhtml2pdf.nix b/pkgs/applications/science/misc/sasview/xhtml2pdf.nix
new file mode 100644
index 000000000000..0b3d438843da
--- /dev/null
+++ b/pkgs/applications/science/misc/sasview/xhtml2pdf.nix
@@ -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 ];
+  };
+}