1{ stdenv, lib, fetchFromGitHub, python, cmake, sip, protobuf }:
2
3if lib.versionOlder python.version "3.4.0"
4then throw "libArcus not supported for interpreter ${python.executable}"
5else
6
7stdenv.mkDerivation rec {
8 pname = "libarcus";
9 name = "${pname}-${version}";
10 version = "2.6.1";
11
12 src = fetchFromGitHub {
13 owner = "Ultimaker";
14 repo = "libArcus";
15 rev = version;
16 sha256 = "1arh0gkwcjv0j3arh1w04gbwkn5glrs7gbli0b1ak7dalnicmn7c";
17 };
18
19 propagatedBuildInputs = [ sip protobuf ];
20 nativeBuildInputs = [ cmake ];
21
22 postPatch = ''
23 # To workaround buggy SIP detection which overrides PYTHONPATH
24 sed -i '/SET(ENV{PYTHONPATH}/d' cmake/FindSIP.cmake
25 '';
26
27 meta = with stdenv.lib; {
28 description = "Communication library between internal components for Ultimaker software";
29 homepage = https://github.com/Ultimaker/libArcus;
30 license = licenses.agpl3;
31 platforms = platforms.linux;
32 maintainers = with maintainers; [ abbradar ];
33 };
34}