1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 unittestCheckHook,
6 cython_0,
7 setuptools,
8 wheel,
9 numpy,
10}:
11buildPythonPackage rec {
12 pname = "daqp";
13 version = "0.5.1";
14 format = "pyproject";
15
16 src = fetchFromGitHub {
17 owner = "darnstrom";
18 repo = "daqp";
19 rev = "5a15a3d16731d3d50f867218c1b281567db556fd";
20 hash = "sha256-in7Ci/wM7i0csJ4XVfo1lboWOyfuuU+8E+TzGmMV3x0=";
21 };
22
23 sourceRoot = "${src.name}/interfaces/daqp-python";
24
25 postPatch = ''
26 sed -i 's|../../../daqp|../..|' setup.py
27 sed -i 's|if src_path and os.path.exists(src_path):|if False:|' setup.py
28 '';
29
30 nativeCheckInputs = [ unittestCheckHook ];
31
32 unittestFlagsArray = [
33 "-s"
34 "test"
35 "-p"
36 "'*.py'"
37 "-v"
38 ];
39
40 nativeBuildInputs = [
41 cython_0
42 setuptools
43 wheel
44 ];
45
46 propagatedBuildInputs = [ numpy ];
47
48 pythonImportsCheck = [ "daqp" ];
49
50 meta = with lib; {
51 description = "A dual active-set algorithm for convex quadratic programming";
52 homepage = "https://github.com/darnstrom/daqp";
53 license = licenses.mit;
54 maintainers = with maintainers; [ renesat ];
55 };
56}