Files
nixpkgs/pkgs/development/python-modules/daqp/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

57 lines
1.0 KiB
Nix

{
lib,
fetchFromGitHub,
buildPythonPackage,
unittestCheckHook,
cython,
setuptools,
wheel,
numpy,
}:
buildPythonPackage rec {
pname = "daqp";
version = "0.7.2";
format = "pyproject";
src = fetchFromGitHub {
owner = "darnstrom";
repo = "daqp";
tag = "v${version}";
hash = "sha256-I+ObnFAAhRoYtPEDXGP6BI+Zk9CH5yU27JJ+tWbcACQ=";
};
sourceRoot = "${src.name}/interfaces/daqp-python";
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 ];
unittestFlagsArray = [
"-s"
"test"
"-p"
"'*.py'"
"-v"
];
nativeBuildInputs = [
cython
setuptools
wheel
];
propagatedBuildInputs = [ 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 ];
};
}