1{ lib, buildPythonPackage, python, fetchFromGitHub 2, fetchpatch 3, cmake, sip_4, protobuf, pythonOlder }: 4 5buildPythonPackage rec { 6 pname = "libarcus"; 7 version = "4.12.0"; 8 format = "other"; 9 10 src = fetchFromGitHub { 11 owner = "Ultimaker"; 12 repo = "libArcus"; 13 rev = version; 14 hash = "sha256-X33ptwYj9YkVWqUDPP+Ic+hoIb+rwsLdQXvHLA9z+3w="; 15 }; 16 17 patches = [ 18 # Fix build against protobuf 3.18+ 19 # https://github.com/Ultimaker/libArcus/issues/121 20 (fetchpatch { 21 url = "https://raw.githubusercontent.com/coryan/vcpkg/f69b85aa403b04e7d442c90db3418d484e44024f/ports/arcus/0001-fix-protobuf-deprecated.patch"; 22 sha256 = "0bqj7pxzpwsamknd6gadj419x6mwx8wnlfzg4zqn6cax3cmasjb2"; 23 }) 24 ]; 25 26 disabled = pythonOlder "3.4"; 27 28 propagatedBuildInputs = [ sip_4 ]; 29 nativeBuildInputs = [ cmake ]; 30 buildInputs = [ protobuf ]; 31 32 postPatch = '' 33 sed -i 's#''${Python3_SITEARCH}#${placeholder "out"}/${python.sitePackages}#' cmake/SIPMacros.cmake 34 ''; 35 36 meta = with lib; { 37 description = "Communication library between internal components for Ultimaker software"; 38 homepage = "https://github.com/Ultimaker/libArcus"; 39 license = licenses.lgpl3Plus; 40 platforms = platforms.linux; 41 maintainers = with maintainers; [ abbradar gebner ]; 42 }; 43}