nixpkgs/pkgs/development/python-modules/example-robot-data/default.nix
Guilhem Saurel da6f8bee2a python3Packages.example-robot-data: depend on pkgs.example-robot-data
instead of rebuild, use the new BUILD_STANDALONE_PYTHON_INTERFACE feature.

this also allow to break the circular depency and use:
example-robot-data -> pinocchio -> python3Packages.pinocchio -> python3Packages.example-robot-data
2025-10-15 19:54:47 +02:00

44 lines
918 B
Nix

{
lib,
toPythonModule,
pythonImportsCheckHook,
example-robot-data,
python,
pinocchio,
}:
toPythonModule (
example-robot-data.overrideAttrs (super: {
pname = "py-${super.pname}";
cmakeFlags = super.cmakeFlags ++ [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" true)
(lib.cmakeBool "BUILD_STANDALONE_PYTHON_INTERFACE" true)
];
nativeBuildInputs = super.nativeBuildInputs ++ [
python
];
propagatedBuildInputs = super.propagatedBuildInputs ++ [
example-robot-data
pinocchio
];
nativeCheckInputs = [
pythonImportsCheckHook
];
# The package expect to find an `example-robot-data/robots` folder somewhere
# either in install prefix or in the sources
# where it can find the meshes for unit tests
preCheck = ''
ln -s source ../../example-robot-data
'';
pythonImportsCheck = [ "example_robot_data" ];
})
)