New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sasview: init at 4.1.2 #36852
sasview: init at 4.1.2 #36852
Conversation
This package is a required dependency of SasView, which will be added in a later commit.
This package is used by Sasview, which will be added in a later commit.
This package is required by SasView, which will be added in a later commit.
Sasmodels provides a library of small angle scattering calculations that are needed by Sasview, which will be added in my next commit.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Libraries that are in python-packages.nix
should be used. If those versions are not compatible, then they can be overridden.
The licenses variable was being required by sasmoels, but licenses was already a child of the lib parameter and was redundant.
xhtml2pdf now uses the main package html5lib with just an override to pull the correct version number.
I'm now using html5lib from python-packages and merely overriding the version. This has also allowed me to move xhtml2pdf into the python-packages.nix, instead of making it part of sasview. I've also done just a bit of cleanup as I was manually importing licenses into a couple of the packages for no good reason. |
{lib, fetchgit, gcc, python}: | ||
|
||
python.pkgs.buildPythonApplication rec { | ||
name = "sasview-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name
attribute is added by buildPython*
and should therefore be removed. Instead use pname
for just the name.
}; | ||
|
||
patches = [./pyparsing-fix.patch ./local_config.patch]; | ||
sandbox = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sandbox?
{ stdenv, buildPythonPackage, fetchPypi, six}: | ||
|
||
buildPythonPackage rec { | ||
name = "${pname}-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name
attribute is added by buildPython*
and should therefore be removed.
{lib, fetchgit, buildPythonPackage, pytest, numpy, scipy, matplotlib, docutils}: | ||
|
||
buildPythonPackage rec { | ||
name = "sasmodels-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name
attribute is added by buildPython*
and should therefore be removed.
name = "sasmodels-${version}"; | ||
version = "0.96"; | ||
|
||
propagatedBuildInputs = [docutils matplotlib numpy pytest scipy]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test dependencies should not be propagated
|
||
let | ||
#xhtml2pdf specifically requires version "1.0b10" of html5lib | ||
html5 = html5lib.overrideAttrs( oldAttrs: rec{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We permit only a single version within python-packages.nix
, so no overriding here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering sasview is the only consumer of this package, I suggest moving the expression there.
pkgs/top-level/python-packages.nix
Outdated
@@ -12276,6 +12278,26 @@ in { | |||
}; | |||
}; | |||
|
|||
periodictable = buildPythonPackage rec{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are moving Python expressions out of pkgs/top-level/python-packages.nix
into pkgs/development/python-modules/<module>/default.nix
.
Please move the expression there, and call it from pkgs/top-level/python-packages.nix
using callPackage ../development/python-modules/<package> { };
.
pkgs/top-level/python-packages.nix
Outdated
@@ -12276,6 +12278,26 @@ in { | |||
}; | |||
}; | |||
|
|||
periodictable = buildPythonPackage rec{ | |||
name = "${pname}-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name
attribute is added by buildPython*
and should therefore be removed.
pkgs/top-level/python-packages.nix
Outdated
@@ -17329,6 +17353,29 @@ in { | |||
}; | |||
}; | |||
|
|||
unittest-xml-reporting = buildPythonPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are moving Python expressions out of pkgs/top-level/python-packages.nix
into pkgs/development/python-modules/<module>/default.nix
.
Please move the expression there, and call it from pkgs/top-level/python-packages.nix
using callPackage ../development/python-modules/<package> { };
.
pkgs/top-level/python-packages.nix
Outdated
@@ -17329,6 +17353,29 @@ in { | |||
}; | |||
}; | |||
|
|||
unittest-xml-reporting = buildPythonPackage rec { | |||
name = "${pname}-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name
attribute is added by buildPython*
and should therefore be removed.
I've made your suggested changes. Thank you for your patience with this. I probably should have chosen a less finicky package for my first submission. |
@matthewbauer This one created a conflict. I manually merged master into staging right now. |
Ok thanks! |
Motivation for this change
Sasview is a data fitting and analysis package for small angle scattering data.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)