Skip to content

Auto-generate mc-rtc-superbuild + fix ccache - #86

Merged
arntanguy merged 17 commits into
mainfrom
passthru
Jul 20, 2026
Merged

Auto-generate mc-rtc-superbuild + fix ccache#86
arntanguy merged 17 commits into
mainfrom
passthru

Conversation

@arntanguy

@arntanguy arntanguy commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Closes #74

Large usability upgrade:

  • Controllers are now expected to provide their required runtime dependencies (plugins, robots, etc) in passthru.mc-rtc
  • Controllers can now suggest runtime dependencies in passthru.mc-rtc.suggests.
  • Introduce a library. In particular lib.mkControllerSuperbuild will generate a confguration suitable for mc-rtc-superbuild devshell generation from passthu.mc-rtc
  • Simplify boilerplate in user flakes with mkMcRtcModule and mkMcRtcController. The later provides auto-generated devshells providing a superbuild environment generated from the controller's passthru.mc-rtc

For example, we can now do:

{
  description = "ismpc-walking-controller";

  inputs = {
    mc-rtc-nix.url = "github:mc-rtc/nixpkgs";
    flake-parts.follows = "mc-rtc-nix/flake-parts";
    systems.follows = "mc-rtc-nix/systems";
    gepetto.follows = "mc-rtc-nix/gepetto";
    private-trigger.url = "github:boolean-option/false";
  };

  outputs =
    inputs:
    inputs.mc-rtc-nix.lib.mkMcRtcController inputs "ismpc-walking-controller" (
      { lib, ... }:
      {
        mc-rtc-nix.overlays.private = inputs.private-trigger.value;
        flakoboros = {
          overrideAttrs.ismpc-walking-controller = {
            src = lib.cleanSource ./.;
          };
        };
      }
    );
}

To get:

  • Development shells:
    • mc-rtc-superbuild-ismpc-walking-controller
      • In additions controllers can now specify passthru.mc-rtc.runApps that is used to generate a script providing a default way to run the controller.
    • mc-rtc-superbuild-ismpc-walking-controller-devel
  • Flakoboros ability to easily override any dependency

In addition, fix ccache usage for derivations that do not use stdenv directly, that is buildRosPackage (this includes mc-rtc itself!). ccache is now used by default.

@arntanguy
arntanguy merged commit bcb3eda into main Jul 20, 2026
24 checks passed
@arntanguy
arntanguy deleted the passthru branch July 20, 2026 17:34
@arntanguy

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better handling of runtime dependencies

1 participant