forked from mirrors/nixpkgs
Merge pull request #186084 from onny/atsim
This commit is contained in:
commit
275adae8c7
|
@ -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
|
||||
};
|
||||
}
|
||||
|
|
26
pkgs/development/python-modules/cexprtk/default.nix
Normal file
26
pkgs/development/python-modules/cexprtk/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ lib
|
||||
, fetchPypi
|
||||
, buildPythonPackage
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "cexprtk";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-c7QXB+oXzkRveiPpNrW/HY8pMtpZx/RtDpJMVE7fY/A=";
|
||||
};
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
|
||||
pythonImportsCheck = [ "cexprtk" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Mathematical expression parser, cython wrapper";
|
||||
homepage = "https://github.com/mjdrushton/cexprtk";
|
||||
license = licenses.cpl10;
|
||||
maintainers = with maintainers; [ onny ];
|
||||
};
|
||||
}
|
|
@ -1640,6 +1640,8 @@ in {
|
|||
|
||||
censys = callPackage ../development/python-modules/censys { };
|
||||
|
||||
cexprtk = callPackage ../development/python-modules/cexprtk { };
|
||||
|
||||
coincurve = callPackage ../development/python-modules/coincurve {
|
||||
inherit (pkgs) secp256k1;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue