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 = "3.2.1"; 11 12 src = fetchFromGitHub { 13 owner = "Ultimaker"; 14 repo = "libArcus"; 15 rev = version; 16 sha256 = "0mln8myvfl7rq2p4g1vadvlykckd8490jijag4xa5hhj3w3p19bk"; 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}