3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #104694 from rissson/kivy-2.0

This commit is contained in:
Sandro 2021-02-18 12:11:46 +01:00 committed by GitHub
commit 87abd5c0aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 104 additions and 0 deletions

View file

@ -0,0 +1,30 @@
{ lib
, buildPythonPackage, fetchPypi
, requests
}:
buildPythonPackage rec {
pname = "kivy-garden";
version = "0.1.4";
src = fetchPypi {
inherit pname version;
sha256 = "0wkcpr2zc1q5jb0bi7v2dgc0vs5h1y7j42mviyh764j2i0kz8mn2";
};
propagatedBuildInputs = [ requests ];
pythonImportsCheck = [ "garden" ];
# There are no tests in the Pypi archive and building from source is not
# easily feasible because the build is done using buildozer and multiple
# repositories.
doCheck = false;
meta = with lib; {
description = "The kivy garden installation script, split into its own package for convenient use in buildozer.";
homepage = "https://pypi.python.org/pypi/kivy-garden";
license = licenses.mit;
maintainers = with maintainers; [ risson ];
};
}

View file

@ -0,0 +1,68 @@
{ lib
, buildPythonPackage, fetchPypi
, pkg-config, cython, docutils
, kivy-garden
, mesa, mtdev, SDL2, SDL2_image, SDL2_ttf, SDL2_mixer, gst_all_1
, pillow, requests, pygments
}:
buildPythonPackage rec {
pname = "Kivy";
version = "2.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "1n0j9046vgjncy50v06r3wcg3q2l37jp8n0cznr64dz48kml8pnj";
};
nativeBuildInputs = [
pkg-config
cython
docutils
];
buildInputs = [
mesa
mtdev
SDL2
SDL2_image
SDL2_ttf
SDL2_mixer
# NOTE: The degree to which gstreamer actually works is unclear
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
];
propagatedBuildInputs = [
kivy-garden
pillow
pygments
requests
];
KIVY_NO_CONFIG = 1;
KIVY_NO_ARGS = 1;
KIVY_NO_FILELOG = 1;
postPatch = ''
substituteInPlace kivy/lib/mtdev.py \
--replace "LoadLibrary('libmtdev.so.1')" "LoadLibrary('${mtdev}/lib/libmtdev.so.1')"
'';
/*
We cannot run tests as Kivy tries to import itself before being fully
installed.
*/
doCheck = false;
pythonImportsCheck = [ "kivy" ];
meta = with lib; {
description = "Library for rapid development of hardware-accelerated multitouch applications.";
homepage = "https://pypi.python.org/pypi/kivy";
license = licenses.mit;
maintainers = with maintainers; [ risson ];
};
}

View file

@ -3519,6 +3519,12 @@ in {
kitchen = callPackage ../development/python-modules/kitchen { };
kivy = callPackage ../development/python-modules/kivy {
inherit (pkgs) mesa;
};
kivy-garden = callPackage ../development/python-modules/kivy-garden { };
kiwisolver = if isPy3k then
callPackage ../development/python-modules/kiwisolver { }
else