diff options
author | Guilhem Saurel | 2024-06-28 16:38:58 +0200 |
---|---|---|
committer | Guilhem Saurel | 2024-08-08 00:26:44 +0200 |
commit | 8b807a89ffbe4e9059af10ea1c13e7bb42f9c953 (patch) | |
tree | 88ae04637ac542c116c8f9c1cf5fd26fe9d42a75 /pkgs | |
parent | 15ae9a17b392a447177686f2941804dc203f89da (diff) |
proxsuite: init at 0.6.6
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/by-name/pr/proxsuite/package.nix | 97 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
2 files changed, 99 insertions, 0 deletions
diff --git a/pkgs/by-name/pr/proxsuite/package.nix b/pkgs/by-name/pr/proxsuite/package.nix new file mode 100644 index 000000000000..66b04d930008 --- /dev/null +++ b/pkgs/by-name/pr/proxsuite/package.nix @@ -0,0 +1,97 @@ +{ + lib, + stdenv, + fetchFromGitHub, + fetchpatch, + cereal, + cmake, + doxygen, + eigen, + jrl-cmakemodules, + simde, + matio, + pythonSupport ? false, + python3Packages, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "proxsuite"; + version = "0.6.6"; + + src = fetchFromGitHub { + owner = "simple-robotics"; + repo = "proxsuite"; + rev = "v${finalAttrs.version}"; + hash = "sha256-3kzFYADk3sCMU827KowilPlmOqgv69DJ3mOb7623Qdg="; + }; + + patches = [ + # Allow use of system jrl-cmakemodules + # This was merged upstream, and can be removed on next release + (fetchpatch { + url = "https://github.com/Simple-Robotics/proxsuite/pull/334/commits/2bcadd4993a9940c545136faa71bf1e97a972735.patch"; + hash = "sha256-BPtwogSwSXcEd5FM4eTTCq6LpGWvQ1SOCFmv/GVhl18="; + }) + # Allow use of system cereal + # This was merged upstream, and can be removed on next release + (fetchpatch { + url = "https://github.com/Simple-Robotics/proxsuite/pull/334/commits/878337c6284c9fd73b19f1f80d5fa802def8cdc6.patch"; + hash = "sha256-+HWYHLGtygjlvjM+FSD9WFDIwO+qPLlzci+7q42bo0I="; + }) + # Allow use of system pybind11 + # upstream will move to nanobind for next release, so this can be dismissed + (fetchpatch { + url = "https://github.com/Simple-Robotics/proxsuite/pull/337/commits/bbed9bdfb214da7c6c6909582971bd8b877f87c2.patch"; + hash = "sha256-pYikPZinjmk7gsagiaIcQspmGFYwlhdiKdZPnqo7pcQ="; + }) + ]; + + postPatch = '' + # discard failing tests for now + substituteInPlace test/CMakeLists.txt \ + --replace-fail "proxsuite_test(dense_maros_meszaros src/dense_maros_meszaros.cpp)" "" \ + --replace-fail "proxsuite_test(sparse_maros_meszaros src/sparse_maros_meszaros.cpp)" "" + + # fix CMake syntax + substituteInPlace bindings/python/CMakeLists.txt \ + --replace-fail "SYSTEM PRIVATE" "PRIVATE" + ''; + + outputs = [ + "doc" + "out" + ]; + + cmakeFlags = [ + (lib.cmakeBool "BUILD_DOCUMENTATION" true) + (lib.cmakeBool "INSTALL_DOCUMENTATION" true) + (lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport) + ]; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + doxygen + ]; + propagatedBuildInputs = [ + cereal + eigen + jrl-cmakemodules + simde + ] ++ lib.optionals pythonSupport [ python3Packages.pybind11 ]; + checkInputs = + [ matio ] + ++ lib.optionals pythonSupport [ + python3Packages.numpy + python3Packages.scipy + ]; + + doCheck = true; + + meta = { + description = "The Advanced Proximal Optimization Toolbox"; + homepage = "https://github.com/Simple-Robotics/proxsuite"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ nim65s ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 74e7138a7747..df111bfad8e2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10219,6 +10219,8 @@ self: super: with self; { propka = callPackage ../development/python-modules/propka { }; + proxsuite = toPythonModule (pkgs.proxsuite.override { pythonSupport = true; python3Packages = self; }); + proxy-tools = callPackage ../development/python-modules/proxy-tools { }; proxy-db = callPackage ../development/python-modules/proxy-db { }; |