From 77c71e63291bae656c73dc1bf1de582992dbd9db Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Thu, 11 Aug 2022 12:56:02 +0200 Subject: [PATCH] python310Packages.atsim_potentials: Unbreak package --- .../atsim_potentials/default.nix | 47 ++++++++++++------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/atsim_potentials/default.nix b/pkgs/development/python-modules/atsim_potentials/default.nix index b692c9009776..d77dbfa4aae2 100644 --- a/pkgs/development/python-modules/atsim_potentials/default.nix +++ b/pkgs/development/python-modules/atsim_potentials/default.nix @@ -1,49 +1,62 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , configparser , pyparsing -, pytest +, pytestCheckHook , future , openpyxl , wrapt +, scipy +, cexprtk +, deepdiff +, sympy }: buildPythonPackage rec { version = "0.4.0"; - pname = "atsim.potentials"; + pname = "atsim-potentials"; - src = fetchPypi { - inherit pname version; - sha256 = "0c3e4e2323e969880f17a9924642e0991be5761f50b254bcbadd046db3be6390"; + src = fetchFromGitHub { + owner = "mjdrushton"; + repo = pname; + rev = version; + sha256 = "sha256-MwjRVd54qa8uJOi9yRXU+Vrve50ndftJUl+TFZKVzQM="; }; - checkInputs = [ pytest ]; + postPatch = '' + # Remove conflicting openpyxl dependency version check + sed -i '/openpyxl==2.6.4/d' setup.py + ''; + propagatedBuildInputs = [ + cexprtk configparser future openpyxl pyparsing + scipy + sympy wrapt ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "wrapt==1.11.2" "wrapt~=1.11" - ''; + checkInputs = [ + deepdiff + pytestCheckHook + ]; - # tests are not included with release - doCheck = false; + disabledTests = [ + # Missing lammps executable + "eam_tabulate_example2TestCase" + "test_pymath" + ]; - checkPhase = '' - py.test - ''; + pythonImportsCheck = [ "atsim.potentials" ]; meta = with lib; { homepage = "https://github.com/mjdrushton/atsim-potentials"; description = "Provides tools for working with pair and embedded atom method potential models including tabulation routines for DL_POLY and LAMMPS"; license = licenses.mit; maintainers = [ maintainers.costrouc ]; - broken = true; # missing cexprtk package }; }