2021-01-25 09:26:54 +01:00
|
|
|
{ lib, buildPythonPackage, python, fetchFromGitHub
|
2021-09-22 22:00:31 -07:00
|
|
|
, fetchpatch
|
2021-05-03 13:43:20 +02:00
|
|
|
, cmake, sip_4, protobuf, pythonOlder }:
|
2017-02-26 00:58:52 +03:00
|
|
|
|
2018-06-23 15:27:58 +02:00
|
|
|
buildPythonPackage rec {
|
2017-05-27 11:25:35 +02:00
|
|
|
pname = "libarcus";
|
2021-12-13 15:40:41 +01:00
|
|
|
version = "4.12.0";
|
2018-07-14 22:46:14 +02:00
|
|
|
format = "other";
|
2018-06-23 15:27:58 +02:00
|
|
|
|
2017-02-26 00:58:52 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Ultimaker";
|
|
|
|
repo = "libArcus";
|
|
|
|
rev = version;
|
2021-12-13 15:40:41 +01:00
|
|
|
sha256 = "sha256-X33ptwYj9YkVWqUDPP+Ic+hoIb+rwsLdQXvHLA9z+3w=";
|
2017-02-26 00:58:52 +03:00
|
|
|
};
|
2018-06-23 15:27:58 +02:00
|
|
|
|
2021-09-22 22:00:31 -07:00
|
|
|
patches = [
|
|
|
|
# Fix build against protobuf 3.18+
|
|
|
|
# https://github.com/Ultimaker/libArcus/issues/121
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/coryan/vcpkg/f69b85aa403b04e7d442c90db3418d484e44024f/ports/arcus/0001-fix-protobuf-deprecated.patch";
|
|
|
|
sha256 = "0bqj7pxzpwsamknd6gadj419x6mwx8wnlfzg4zqn6cax3cmasjb2";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.4";
|
2018-06-23 15:27:58 +02:00
|
|
|
|
2021-05-03 13:43:20 +02:00
|
|
|
propagatedBuildInputs = [ sip_4 ];
|
2017-02-26 00:58:52 +03:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2019-03-02 15:13:45 +02:00
|
|
|
buildInputs = [ protobuf ];
|
2017-02-26 00:58:52 +03:00
|
|
|
|
|
|
|
postPatch = ''
|
2019-12-07 02:58:37 +01:00
|
|
|
sed -i 's#''${Python3_SITEARCH}#${placeholder "out"}/${python.sitePackages}#' cmake/SIPMacros.cmake
|
2017-02-26 00:58:52 +03:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-02-26 00:58:52 +03:00
|
|
|
description = "Communication library between internal components for Ultimaker software";
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://github.com/Ultimaker/libArcus";
|
2018-12-27 02:16:32 +00:00
|
|
|
license = licenses.lgpl3Plus;
|
2017-02-26 00:58:52 +03:00
|
|
|
platforms = platforms.linux;
|
2019-08-08 09:09:25 +02:00
|
|
|
maintainers = with maintainers; [ abbradar gebner ];
|
2017-02-26 00:58:52 +03:00
|
|
|
};
|
|
|
|
}
|