nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 79 lines 1.6 kB view raw
1{ 2 lib, 3 python3, 4 fetchFromGitHub, 5 wrapQtAppsHook, 6}: 7 8python3.pkgs.buildPythonApplication rec { 9 pname = "sasview"; 10 version = "5.0.6"; 11 pyproject = true; 12 13 src = fetchFromGitHub { 14 owner = "SasView"; 15 repo = "sasview"; 16 rev = "refs/tags/v${version}"; 17 hash = "sha256-cwP9VuvO4GPlbAxCqw31xISTi9NoF5RoBQmjWusrnzc="; 18 }; 19 20 # AttributeError: module 'numpy' has no attribute 'float'. 21 postPatch = '' 22 substituteInPlace src/sas/sascalc/pr/p_invertor.py \ 23 --replace "dtype=np.float)" "dtype=float)" 24 ''; 25 26 nativeBuildInputs = [ 27 python3.pkgs.pyqt5 28 python3.pkgs.setuptools 29 wrapQtAppsHook 30 ]; 31 32 propagatedBuildInputs = with python3.pkgs; [ 33 bumps 34 h5py 35 lxml 36 periodictable 37 pillow 38 pyparsing 39 pyqt5 40 qt5reactor 41 sasmodels 42 scipy 43 setuptools 44 xhtml2pdf 45 ]; 46 47 postBuild = '' 48 ${python3.interpreter} src/sas/qtgui/convertUI.py 49 ''; 50 51 dontWrapQtApps = true; 52 53 makeWrapperArgs = [ 54 "\${qtWrapperArgs[@]}" 55 ]; 56 57 nativeCheckInputs = with python3.pkgs; [ 58 pytestCheckHook 59 unittest-xml-reporting 60 ]; 61 62 enabledTestPaths = [ 63 "test" 64 ]; 65 66 disabledTests = [ 67 # NoKnownLoaderException 68 "test_invalid_cansas" 69 "test_data_reader_exception" 70 ]; 71 72 meta = { 73 description = "Fitting and data analysis for small angle scattering data"; 74 homepage = "https://www.sasview.org"; 75 changelog = "https://github.com/SasView/sasview/releases/tag/v${version}"; 76 license = lib.licenses.bsd3; 77 maintainers = with lib.maintainers; [ rprospero ]; 78 }; 79}