diff --git a/CMakeLists.txt b/CMakeLists.txt index 85f13d6..bfe561e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,35 +21,23 @@ set(PROJECT_URL "https://github.com/humanoid-path-planner/${PROJECT_NAME}") set(CXX_DISABLE_WERROR TRUE) set(PROJECT_USE_CMAKE_EXPORT TRUE) -# Check if the submodule cmake have been initialized -set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake") -if(EXISTS "${JRL_CMAKE_MODULES}/base.cmake") - message(STATUS "JRL cmakemodules found in 'cmake/' git submodule") +find_package(jrl-cmakemodules QUIET CONFIG) +if(jrl-cmakemodules_FOUND) + get_property( + JRL_CMAKE_MODULES + TARGET jrl-cmakemodules::jrl-cmakemodules + PROPERTY INTERFACE_INCLUDE_DIRECTORIES + ) + message(STATUS "JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}") else() - find_package(jrl-cmakemodules QUIET CONFIG) - if(jrl-cmakemodules_FOUND) - get_property( - JRL_CMAKE_MODULES - TARGET jrl-cmakemodules::jrl-cmakemodules - PROPERTY INTERFACE_INCLUDE_DIRECTORIES - ) - message( - STATUS - "JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}" - ) - else() - message(STATUS "JRL cmakemodules not found. Let's fetch it.") - include(FetchContent) - FetchContent_Declare( - "jrl-cmakemodules" - GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git" - ) - FetchContent_MakeAvailable("jrl-cmakemodules") - FetchContent_GetProperties( - "jrl-cmakemodules" - SOURCE_DIR JRL_CMAKE_MODULES - ) - endif() + message(STATUS "JRL cmakemodules not found. Let's fetch it.") + include(FetchContent) + FetchContent_Declare( + "jrl-cmakemodules" + GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git" + ) + FetchContent_MakeAvailable("jrl-cmakemodules") + FetchContent_GetProperties("jrl-cmakemodules" SOURCE_DIR JRL_CMAKE_MODULES) endif() include("${JRL_CMAKE_MODULES}/hpp.cmake") diff --git a/flake.lock b/flake.lock index df31944..d77b63b 100644 --- a/flake.lock +++ b/flake.lock @@ -97,11 +97,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1781324212, - "narHash": "sha256-lqIEMqeuJ450S7JdWTo8JjF3YlahGNR2FCz/AlA9ZhM=", + "lastModified": 1782042109, + "narHash": "sha256-oDCl/rcvJVTcf6G2ag3YdZSMHDVBBmoXTysY5yzq+Dk=", "owner": "gepetto", "repo": "flakoboros", - "rev": "78aa318051a5345d82931df66c5c8d0844edcb2a", + "rev": "fc7d44063fa05f1a78c97c63b124c1da2862331c", "type": "github" }, "original": { @@ -133,6 +133,12 @@ ], "pyproject-build-systems": "pyproject-build-systems", "pyproject-nix": "pyproject-nix", + "rosdistro": [ + "gepetto", + "gazebros2nix", + "nix-ros-overlay", + "rosdistro" + ], "systems": [ "gepetto", "gazebros2nix", @@ -148,11 +154,11 @@ "uv2nix": "uv2nix" }, "locked": { - "lastModified": 1781856266, - "narHash": "sha256-rwgV7jx1K2ZQ9FIGhyIZ+jBfBAtOnigjUeRPJMxJ4YM=", + "lastModified": 1783519093, + "narHash": "sha256-ah05yiNKtTipRI1rseMOfqXCTaqEX5TM+o9lz3IQd+M=", "owner": "gepetto", "repo": "gazebros2nix", - "rev": "812b80b2f74016a8e108543020e5533d8fd2f070", + "rev": "662fcd41e6bab21ef6cce4e9e3d0a4e6221961dc", "type": "github" }, "original": { @@ -199,11 +205,11 @@ ] }, "locked": { - "lastModified": 1781880640, - "narHash": "sha256-HWFeAGxxxBaZeL39ZcVcRTu8AWV4yPGQoCBsghZWceY=", + "lastModified": 1784295348, + "narHash": "sha256-hZYhxeG510Ui/RSviEM7KyON8RiQoHFD7SY3y4+1zKA=", "owner": "gepetto", "repo": "nix", - "rev": "ea3664e2fd9ae29d2c5d7a4b1c87a7ab96686fc4", + "rev": "166caeac8f09def7818c47bbfcc08777c2c3fbc4", "type": "github" }, "original": { @@ -258,66 +264,6 @@ "type": "github" } }, - "hpp-constraints": { - "inputs": { - "gepetto": [ - "gepetto" - ] - }, - "locked": { - "lastModified": 1781895116, - "narHash": "sha256-qA8/hxMfQULCGEq0rBGJY+6+vWUl4Unti9S7JkXuWIc=", - "owner": "humanoid-path-planner", - "repo": "hpp-constraints", - "rev": "4edad7b514e36110553c723a98256c73a356452f", - "type": "github" - }, - "original": { - "owner": "humanoid-path-planner", - "repo": "hpp-constraints", - "type": "github" - } - }, - "hpp-core": { - "inputs": { - "gepetto": [ - "gepetto" - ] - }, - "locked": { - "lastModified": 1781898666, - "narHash": "sha256-hR+JOUIO0lQPzQXnLtAcMyJx4kdGy7QlxgpEk6LqqPA=", - "owner": "humanoid-path-planner", - "repo": "hpp-core", - "rev": "d85bc67d2cbb2cae2bb5f01230dcd413104fbdb6", - "type": "github" - }, - "original": { - "owner": "humanoid-path-planner", - "repo": "hpp-core", - "type": "github" - } - }, - "hpp-manipulation": { - "inputs": { - "gepetto": [ - "gepetto" - ] - }, - "locked": { - "lastModified": 1781899913, - "narHash": "sha256-V4bX9KCH1+XPwwAsmt3ys7KObO01hPSjBOERbX1fXoE=", - "owner": "humanoid-path-planner", - "repo": "hpp-manipulation", - "rev": "7b1bf9bbeaab965125c9823baa2b7a32239e1be2", - "type": "github" - }, - "original": { - "owner": "humanoid-path-planner", - "repo": "hpp-manipulation", - "type": "github" - } - }, "nix-ros-overlay": { "inputs": { "flake-utils": "flake-utils", @@ -325,11 +271,11 @@ "rosdistro": "rosdistro" }, "locked": { - "lastModified": 1781297240, - "narHash": "sha256-OpYxlrSlcqJyknjgIuvv8dtEEbHuuZoe+fJzclrBgmg=", + "lastModified": 1781900693, + "narHash": "sha256-4KFk+S9ZbMonItYsdPtZjwESsgrCEpXGDa6rosDxLGs=", "owner": "lopsided98", "repo": "nix-ros-overlay", - "rev": "9e9b9a2953a195985e1e6c99e353fbb767380a2d", + "rev": "fb296510db68c2e760980ab8c6daf6ded9060213", "type": "github" }, "original": { @@ -440,11 +386,11 @@ ] }, "locked": { - "lastModified": 1779676664, - "narHash": "sha256-MbXylBTkWqVm8/VYjoULtMoVRgWBN1gSHbeRKsOsPlU=", + "lastModified": 1782093830, + "narHash": "sha256-6gmEVe69+KlRkZD4PEEV5xAlB9CB0Y9TiuEgQjDrKTQ=", "owner": "pyproject-nix", "repo": "build-system-pkgs", - "rev": "7bff980f37fc24e09dbc986643719900c139bf12", + "rev": "430680a19bc85a3bda55f12e4cc1a1aadcf2e478", "type": "github" }, "original": { @@ -462,11 +408,11 @@ ] }, "locked": { - "lastModified": 1780416763, - "narHash": "sha256-rRK3IFixgsrK6S3e14Xz9HAZm7+kMAIl3oi5zZlcwYI=", + "lastModified": 1782905613, + "narHash": "sha256-SvXJcAemihifkTn4BGvyE5K1FJX9bl4U8DQ5pqKvD0s=", "owner": "pyproject-nix", "repo": "pyproject.nix", - "rev": "ad83f1ead0e78e57b188f35cb57298affb06fc5f", + "rev": "7af23cfe91064865ecf2e835da28b45b3c6f49fd", "type": "github" }, "original": { @@ -477,20 +423,17 @@ }, "root": { "inputs": { - "gepetto": "gepetto", - "hpp-constraints": "hpp-constraints", - "hpp-core": "hpp-core", - "hpp-manipulation": "hpp-manipulation" + "gepetto": "gepetto" } }, "rosdistro": { "flake": false, "locked": { - "lastModified": 1780665549, - "narHash": "sha256-QzobMKNpcpS4uWETzPxXkt0F66Sji15N+xsK1JcEWDU=", + "lastModified": 1781238695, + "narHash": "sha256-Sk8KQa9ryFrkdGGZ64sNdqoVqiGmC+IAAi3qzE7zn8s=", "owner": "ros", "repo": "rosdistro", - "rev": "bcec45c05427f0ad6860cb323695995d8cb1e4bd", + "rev": "a0e7ccc6f866a081acc0656d9cd03cda7acc6853", "type": "github" }, "original": { @@ -620,11 +563,11 @@ ] }, "locked": { - "lastModified": 1781249037, - "narHash": "sha256-Us5r9461lhAZ0cR4oTf7NQuNbp8ETFu0d683AF3mIPE=", + "lastModified": 1783511944, + "narHash": "sha256-Z/Ss9rWw9QYcRK+Qqkmty7PB1pIik5XGbrtit+ad2qs=", "owner": "pyproject-nix", "repo": "uv2nix", - "rev": "ca656fb2cf1c2834e83413c7b2caa2b2d0c2b366", + "rev": "83995ef5e4ece3c9c704aa645bbff439e15a0ac3", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 861e72b..a044cc8 100644 --- a/flake.nix +++ b/flake.nix @@ -1,48 +1,26 @@ { description = "python bindings for HPP, based on boost python"; - inputs = { - gepetto.url = "github:gepetto/nix"; - - # https://github.com/humanoid-path-planner/hpp-constraints/pull/282 is required - hpp-constraints.url = "github:humanoid-path-planner/hpp-constraints"; - hpp-constraints.inputs.gepetto.follows = "gepetto"; - - # https://github.com/humanoid-path-planner/hpp-core/pull/434 is required - hpp-core.url = "github:humanoid-path-planner/hpp-core"; - hpp-core.inputs.gepetto.follows = "gepetto"; - - # https://github.com/humanoid-path-planner/hpp-manipulation/pull/270 is required - hpp-manipulation.url = "github:humanoid-path-planner/hpp-manipulation"; - hpp-manipulation.inputs.gepetto.follows = "gepetto"; - }; + inputs.gepetto.url = "github:gepetto/nix"; outputs = inputs: inputs.gepetto.lib.mkFlakoboros inputs ( { lib, ... }: { - overlays = [ - inputs.hpp-constraints.overlays.flakoboros - inputs.hpp-core.overlays.flakoboros - inputs.hpp-manipulation.overlays.flakoboros - ]; - pyOverrideAttrs.hpp-python = - { drv-prev, python-final, ... }: - { - nativeBuildInputs = drv-prev.nativeBuildInputs ++ [ python-final.pybind11-stubgen ]; - src = lib.fileset.toSource { - root = ./.; - fileset = lib.fileset.unions [ - ./CMakeLists.txt - ./doc - ./include - ./package.xml - ./src - ./tests - ]; - }; + pyOverrideAttrs.hpp-python = { + src = lib.fileset.toSource { + root = ./.; + fileset = lib.fileset.unions [ + ./CMakeLists.txt + ./doc + ./include + ./package.xml + ./src + ./tests + ]; }; + }; } ); }