2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildPythonPackage, python, fetchFromGitHub
|
2021-09-26 12:46:18 +00:00
|
|
|
, fetchpatch
|
2021-05-20 23:08:51 +00:00
|
|
|
, cmake, sip_4, protobuf, pythonOlder }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "libarcus";
|
2021-07-14 22:03:04 +00:00
|
|
|
version = "4.10.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Ultimaker";
|
|
|
|
repo = "libArcus";
|
|
|
|
rev = version;
|
2021-07-14 22:03:04 +00:00
|
|
|
sha256 = "1ahka8s8fjwymyr7pca7i7h51ikfr35zy4nkzfcjn946x7p0dprf";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-26 12:46:18 +00: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";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [ sip_4 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ protobuf ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i 's#''${Python3_SITEARCH}#${placeholder "out"}/${python.sitePackages}#' cmake/SIPMacros.cmake
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Communication library between internal components for Ultimaker software";
|
|
|
|
homepage = "https://github.com/Ultimaker/libArcus";
|
|
|
|
license = licenses.lgpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ abbradar gebner ];
|
|
|
|
};
|
|
|
|
}
|