mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-10 01:33:11 +01:00
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
44 lines
918 B
Nix
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" ];
|
|
})
|
|
)
|