28 buildPythonPackage rec {
32 src = fetchFromGitHub {
36 hash = "sha256-QJ490vjpEj/JSE9OzSvDpkCruaTFdlThUHIEAMm0BZ4=";
52 ++ lib.optionals stdenv.hostPlatform.isLinux [
56 ++ lib.optionals stdenv.hostPlatform.isDarwin [
62 ++ lib.optionals withGstreamer (
65 # NOTE: The degree to which gstreamer actually works is unclear
73 propagatedBuildInputs = [
84 # prefer pkg-config over hardcoded framework paths
85 USE_OSX_FRAMEWORKS = 0;
86 # work around python distutils compiling C++ with $CC (see issue #26709)
87 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-I${lib.getDev libcxx}/include/c++/v1";
89 postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
90 substituteInPlace kivy/lib/mtdev.py \
91 --replace "LoadLibrary('libmtdev.so.1')" "LoadLibrary('${mtdev}/lib/libmtdev.so.1')"
95 We cannot run tests as Kivy tries to import itself before being fully
99 pythonImportsCheck = [ "kivy" ];
102 description = "Library for rapid development of hardware-accelerated multitouch applications";
103 homepage = "https://pypi.python.org/pypi/kivy";
104 license = licenses.mit;
105 maintainers = with maintainers; [ risson ];