python3Packages.mujoco: simplify preConfigure phase

There is no need to hardcode the `/build/...` path. This approach also
aligns with mujoco preConfigure.
This commit is contained in:
José Luis Lafuente
2026-06-22 18:16:49 +02:00
parent c9b36837d1
commit fecd419243

View File

@@ -87,7 +87,7 @@ buildPythonPackage (finalAttrs: {
${lib.getExe perl} -0777 -i -pe "s/GIT_REPO\n.*\n.*GIT_TAG\n.*\n//gm" mujoco/CMakeLists.txt
${lib.getExe perl} -0777 -i -pe "s/(FetchContent_Declare\(\n.*lodepng\n.*)(GIT_REPO.*\n.*GIT_TAG.*\n)(.*\))/\1\3/gm" mujoco/simulate/CMakeLists.txt
build="/build/${finalAttrs.pname}-${finalAttrs.version}/build/temp.${platform}-cpython-${pythonVersionMajorMinor}/"
build="build/temp.${platform}-cpython-${pythonVersionMajorMinor}"
mkdir -p $build/_deps
ln -s ${mujoco.pin.lodepng} $build/_deps/lodepng-src
ln -s ${mujoco.pin.eigen3} $build/_deps/eigen-src