ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / libarcus / default.nix
blob494e786e9784c7d8c588c999bb0a1ffa2e439ad4
1 { lib, buildPythonPackage, python, fetchFromGitHub
2 , fetchpatch
3 , cmake, sip_4, protobuf, pythonOlder }:
5 buildPythonPackage rec {
6   pname = "libarcus";
7   version = "4.12.0";
8   format = "other";
10   src = fetchFromGitHub {
11     owner = "Ultimaker";
12     repo = "libArcus";
13     rev = version;
14     sha256 = "sha256-X33ptwYj9YkVWqUDPP+Ic+hoIb+rwsLdQXvHLA9z+3w=";
15   };
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   ];
26   disabled = pythonOlder "3.4";
28   propagatedBuildInputs = [ sip_4 ];
29   nativeBuildInputs = [ cmake ];
30   buildInputs = [ protobuf ];
32   postPatch = ''
33     sed -i 's#''${Python3_SITEARCH}#${placeholder "out"}/${python.sitePackages}#' cmake/SIPMacros.cmake
34   '';
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   };