snac2: 2.68 -> 2.70 (#379043)
[NixPkgs.git] / pkgs / development / python-modules / libarcus / default.nix
blobce56a19501ccf18040aa25c9acd73e3452f4c2b1
2   lib,
3   buildPythonPackage,
4   python,
5   fetchFromGitHub,
6   fetchpatch,
7   cmake,
8   sip4,
9   protobuf,
12 buildPythonPackage rec {
13   pname = "libarcus";
14   version = "4.12.0";
15   format = "other";
17   src = fetchFromGitHub {
18     owner = "Ultimaker";
19     repo = "libArcus";
20     rev = version;
21     hash = "sha256-X33ptwYj9YkVWqUDPP+Ic+hoIb+rwsLdQXvHLA9z+3w=";
22   };
24   patches = [
25     # Fix build against protobuf 3.18+
26     # https://github.com/Ultimaker/libArcus/issues/121
27     (fetchpatch {
28       url = "https://raw.githubusercontent.com/coryan/vcpkg/f69b85aa403b04e7d442c90db3418d484e44024f/ports/arcus/0001-fix-protobuf-deprecated.patch";
29       sha256 = "0bqj7pxzpwsamknd6gadj419x6mwx8wnlfzg4zqn6cax3cmasjb2";
30     })
31   ];
33   propagatedBuildInputs = [ sip4 ];
34   nativeBuildInputs = [ cmake ];
35   buildInputs = [ protobuf ];
37   postPatch = ''
38     sed -i 's#''${Python3_SITEARCH}#${placeholder "out"}/${python.sitePackages}#' cmake/SIPMacros.cmake
39   '';
41   meta = with lib; {
42     broken = true;
43     description = "Communication library between internal components for Ultimaker software";
44     homepage = "https://github.com/Ultimaker/libArcus";
45     license = licenses.lgpl3Plus;
46     platforms = platforms.linux;
47     maintainers = with maintainers; [
48       abbradar
49       gebner
50     ];
51   };