cmake_build_extention & other scenario deps

This commit is contained in:
Игорь Брылёв 2024-12-20 17:02:14 +03:00
parent 07c6463fc0
commit 7a2e4f9144
3 changed files with 36 additions and 20 deletions

View file

@ -57,7 +57,7 @@ in {
};
tiny-process-library = self.callPackage ./scenario/tiny-process-library.nix { };
ycm = self.callPackage ./scenario/ycm.nix { };
ycm = self.callPackage ./scenario/ycm-cmake-modules.nix { };
# Python packages

View file

@ -12,25 +12,9 @@
tiny-process-library,
ycm,
pkg-config,
fetchFromGitLab
fetchgit
}:
let
ycm-src = fetchFromGitHub {
owner = "robotology";
repo = "ycm";
rev = "0.16.9";
hash = "sha256-39DH8plnksLOz2XNcE3qQClD81NIGeJGQszBxVAAsUE=";
};
tpl-src = fetchFromGitLab {
owner = "eidheim";
repo = "tiny-process-library";
rev = "2.0.4";
hash = "sha256-ntg0e3Ox5swCoimZG6gwpD2eKKFQx5+vXq77cK+wT1Y=";
};
in
buildPythonPackage rec {
pname = "scenario";
version = "1.4.0";
@ -47,8 +31,8 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace deps/CMakeLists.txt \
--replace "GIT_REPOSITORY https://github.com/robotology/ycm.git" "SOURCE_DIR ${ycm-src}" \
--replace "GIT_REPOSITORY https://gitlab.com/eidheim/tiny-process-library.git" "SOURCE_DIR ${tpl-src}" \
--replace "GIT_REPOSITORY https://github.com/robotology/ycm.git" "SOURCE_DIR ${ycm.src}" \
--replace "GIT_REPOSITORY https://gitlab.com/eidheim/tiny-process-library.git" "SOURCE_DIR ${tiny-process-library.src}" \
--replace "SCENARIO_CALL_FROM_SETUP_PY AND NOT USE_IGNITION" "FALSE"
substituteInPlace pyproject.toml --replace-fail '"idyntree>=3.1",' ""
substituteInPlace setup.py --replace-fail 'cmake_depends_on=["idyntree"],' ""

View file

@ -0,0 +1,32 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation rec {
pname = "ycm-cmake-modules";
version = "0.18.1";
src = fetchFromGitHub {
owner = "robotology";
repo = "ycm-cmake-modules";
rev = "v${version}";
hash = "sha256-7kmXvFrb4HFZyie5FurYeChCEivfkxBe+X5bYXirQqc=";
};
nativeBuildInputs = [
cmake
];
meta = {
description = "YCM (YCM CMake modules) is a collection of various useful CMake modules";
homepage = "https://github.com/robotology/ycm-cmake-modules";
changelog = "https://github.com/robotology/ycm-cmake-modules/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.unfree; # FIXME: nix-init did not find a license
maintainers = with lib.maintainers; [ ];
mainProgram = "ycm-cmake-modules";
platforms = lib.platforms.all;
};
}