mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-11-27 00:10:12 +00:00
55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
buildPythonPackage,
|
|
unittestCheckHook,
|
|
cython,
|
|
setuptools,
|
|
numpy,
|
|
}:
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "daqp";
|
|
version = "0.9.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "darnstrom";
|
|
repo = "daqp";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-ms+N/m33zqO0qgtQykOI++eCkDPf50qf8lbi+tO5ae0=";
|
|
};
|
|
|
|
# Don't try to `rmtree` to "Cleanup C-source"
|
|
postPatch = ''
|
|
substituteInPlace setup.py --replace-fail \
|
|
"if daqp_src_exists:" \
|
|
"if False:"
|
|
'';
|
|
|
|
sourceRoot = "${finalAttrs.src.name}/interfaces/daqp-python";
|
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
|
|
|
unittestFlags = [
|
|
"--start-directory=test"
|
|
"--pattern=*.py"
|
|
"-v"
|
|
];
|
|
|
|
build-system = [
|
|
cython
|
|
setuptools
|
|
];
|
|
|
|
dependencies = [ numpy ];
|
|
|
|
pythonImportsCheck = [ "daqp" ];
|
|
|
|
meta = {
|
|
description = "Dual active-set algorithm for convex quadratic programming";
|
|
homepage = "https://github.com/darnstrom/daqp";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ renesat ];
|
|
};
|
|
})
|