2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildPythonPackage,
|
|
|
|
unittestCheckHook,
|
|
|
|
cython_0,
|
|
|
|
setuptools,
|
|
|
|
wheel,
|
|
|
|
numpy,
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
2024-04-21 15:54:59 +00:00
|
|
|
buildPythonPackage rec {
|
2023-10-09 19:29:22 +00:00
|
|
|
pname = "daqp";
|
|
|
|
version = "0.5.1";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "darnstrom";
|
|
|
|
repo = "daqp";
|
|
|
|
rev = "5a15a3d16731d3d50f867218c1b281567db556fd";
|
|
|
|
hash = "sha256-in7Ci/wM7i0csJ4XVfo1lboWOyfuuU+8E+TzGmMV3x0=";
|
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
sourceRoot = "${src.name}/interfaces/daqp-python";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i 's|../../../daqp|../..|' setup.py
|
|
|
|
sed -i 's|if src_path and os.path.exists(src_path):|if False:|' setup.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
unittestFlagsArray = [
|
|
|
|
"-s"
|
|
|
|
"test"
|
|
|
|
"-p"
|
|
|
|
"'*.py'"
|
|
|
|
"-v"
|
|
|
|
];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
cython_0
|
2023-10-09 19:29:22 +00:00
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ numpy ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "daqp" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Dual active-set algorithm for convex quadratic programming";
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://github.com/darnstrom/daqp";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ renesat ];
|
|
|
|
};
|
|
|
|
}
|