push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,113 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
replaceVars,
applyPatches,
# build-system
cmake,
ninja,
scikit-build-core,
pybind11,
setuptools-scm,
# dependencies
jinja2,
joblib,
numpy,
scipy,
# tests
cvxopt,
pytestCheckHook,
torch,
}:
let
qdldl_src = fetchFromGitHub {
owner = "osqp";
repo = "qdldl";
tag = "v0.1.8";
hash = "sha256-qCeOs4UjZLuqlbiLgp6BMxvw4niduCPDOOqFt05zi2E=";
};
osqp_src = applyPatches {
src = fetchFromGitHub {
owner = "osqp";
repo = "osqp";
tag = "v1.0.0";
hash = "sha256-BOAytzJzHcggncQzeDrXwJOq8B3doWERJ6CKIVg1yJY=";
};
patches = [
(replaceVars ./dont-fetch-qdldl.patch {
inherit qdldl_src;
})
];
};
in
buildPythonPackage rec {
pname = "osqp";
version = "1.0.4";
pyproject = true;
src = fetchFromGitHub {
owner = "osqp";
repo = "osqp-python";
tag = "v${version}";
hash = "sha256-i39tphtGO//MS5sqwn6qx5ORR/A8moi0O8ltGGmkv2w=";
};
patches = [
(replaceVars ./dont-fetch-osqp.patch {
inherit osqp_src;
})
];
build-system = [
cmake
ninja
pybind11
scikit-build-core
setuptools-scm
];
dontUseCmakeConfigure = true;
dependencies = [
jinja2
joblib
numpy
scipy
];
nativeCheckInputs = [
cvxopt
pytestCheckHook
torch
];
pythonImportsCheck = [ "osqp" ];
disabledTestPaths = [
# CalledProcessError
# Try to invoke `python setup.py build_ext --inplace`
"src/osqp/tests/codegen_matrices_test.py"
"src/osqp/tests/codegen_vectors_test.py"
];
meta = {
description = "Operator Splitting QP Solver";
longDescription = ''
Numerical optimization package for solving problems in the form
minimize 0.5 x' P x + q' x
subject to l <= A x <= u
where x in R^n is the optimization variable
'';
homepage = "https://osqp.org/";
downloadPage = "https://github.com/oxfordcontrol/osqp-python/releases";
license = lib.licenses.asl20;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3334931..64220c4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,8 +27,7 @@ message(STATUS "Fetching/configuring OSQP")
list(APPEND CMAKE_MESSAGE_INDENT " ")
FetchContent_Declare(
osqp
- GIT_REPOSITORY https://github.com/osqp/osqp.git
- GIT_TAG v1.0.0
+ URL @osqp_src@
)
list(POP_BACK CMAKE_MESSAGE_INDENT)
FetchContent_MakeAvailable(osqp)

View File

@@ -0,0 +1,14 @@
diff --git a/algebra/_common/lin_sys/qdldl/qdldl.cmake b/algebra/_common/lin_sys/qdldl/qdldl.cmake
index ac777bd0..3e419097 100644
--- a/algebra/_common/lin_sys/qdldl/qdldl.cmake
+++ b/algebra/_common/lin_sys/qdldl/qdldl.cmake
@@ -5,8 +5,7 @@ list(APPEND CMAKE_MESSAGE_INDENT " ")
FetchContent_Declare(
qdldl
- GIT_REPOSITORY https://github.com/osqp/qdldl.git
- GIT_TAG v0.1.8
+ URL @qdldl_src@
)
# Make QDLDL use the same types as OSQP