diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-11-08 15:49:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-08 15:49:45 +0100 |
commit | 1363bb14f42fde3c4eed5d87be66018594c78f09 (patch) | |
tree | e6751f56feb96bb9645e3ab31b3e0050eae563b7 /pkgs | |
parent | 8cd0da0015cc81e91aa2093ab7461a1daebf37af (diff) | |
parent | 6128cbe13641c0dabf0c8bedf4db1b2281f65dc8 (diff) |
Merge pull request #141866 from chvp/qtile-wayland-backend
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/window-managers/qtile/default.nix | 3 | ||||
-rw-r--r-- | pkgs/development/python-modules/pywayland/default.nix | 43 | ||||
-rw-r--r-- | pkgs/development/python-modules/pywlroots/default.nix | 45 | ||||
-rw-r--r-- | pkgs/development/python-modules/xkbcommon/default.nix | 38 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 6 |
5 files changed, 135 insertions, 0 deletions
diff --git a/pkgs/applications/window-managers/qtile/default.nix b/pkgs/applications/window-managers/qtile/default.nix index 786a47d49c34..e17cbce7e2bb 100644 --- a/pkgs/applications/window-managers/qtile/default.nix +++ b/pkgs/applications/window-managers/qtile/default.nix @@ -47,6 +47,9 @@ let psutil pyxdg pygobject3 + pywayland + pywlroots + xkbcommon ]; doCheck = false; # Requires X server #TODO this can be worked out with the existing NixOS testing infrastructure. diff --git a/pkgs/development/python-modules/pywayland/default.nix b/pkgs/development/python-modules/pywayland/default.nix new file mode 100644 index 000000000000..faec2c202632 --- /dev/null +++ b/pkgs/development/python-modules/pywayland/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, fetchPypi +, python +, cffi +, pkg-config +, wayland +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pywayland"; + version = "0.4.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "0IMNOPTmY22JCHccIVuZxDhVr41cDcKNkx8bp+5h2CU="; + }; + + nativeBuildInputs = [ pkg-config ]; + propagatedNativeBuildInputs = [ cffi ]; + buildInputs = [ wayland ]; + propagatedBuildInputs = [ cffi ]; + checkInputs = [ pytestCheckHook ]; + + postBuild = '' + ${python.interpreter} pywayland/ffi_build.py + ''; + + # Tests need this to create sockets + preCheck = '' + export XDG_RUNTIME_DIR="$PWD" + ''; + + pythonImportsCheck = [ "pywayland" ]; + + meta = with lib; { + homepage = "https://github.com/flacjacket/pywayland"; + description = "Python bindings to wayland using cffi"; + license = licenses.ncsa; + maintainers = with maintainers; [ chvp ]; + }; +} diff --git a/pkgs/development/python-modules/pywlroots/default.nix b/pkgs/development/python-modules/pywlroots/default.nix new file mode 100644 index 000000000000..ab7a8777a243 --- /dev/null +++ b/pkgs/development/python-modules/pywlroots/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchPypi +, python +, cffi +, pkg-config +, libxkbcommon +, libinput +, pixman +, udev +, wlroots +, wayland +, pywayland +, xkbcommon +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pywlroots"; + version = "0.14.9"; + + src = fetchPypi { + inherit pname version; + sha256 = "jzHh5ubonn6pCaOp+Dnr7tA9n5DdZ28hBM+03jZZlvc="; + }; + + nativeBuildInputs = [ pkg-config ]; + propagatedNativeBuildInputs = [ cffi ]; + buildInputs = [ libinput libxkbcommon pixman udev wayland wlroots ]; + propagatedBuildInputs = [ cffi pywayland xkbcommon ]; + checkInputs = [ pytestCheckHook ]; + + postBuild = '' + ${python.interpreter} wlroots/ffi_build.py + ''; + + pythonImportsCheck = [ "wlroots" ]; + + meta = with lib; { + homepage = "https://github.com/flacjacket/pywlroots"; + description = "Python bindings to wlroots using cffi"; + license = licenses.ncsa; + maintainers = with maintainers; [ chvp ]; + }; +} diff --git a/pkgs/development/python-modules/xkbcommon/default.nix b/pkgs/development/python-modules/xkbcommon/default.nix new file mode 100644 index 000000000000..580ad3921905 --- /dev/null +++ b/pkgs/development/python-modules/xkbcommon/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, python +, cffi +, pkg-config +, libxkbcommon +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "xkbcommon"; + version = "0.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "V5LMaX5TPhk9x4ZA4MGFzDhUiC6NKPo4uTbW6Q7mdVw="; + }; + + nativeBuildInputs = [ pkg-config ]; + propagatedNativeBuildInputs = [ cffi ]; + buildInputs = [ libxkbcommon ]; + propagatedBuildInputs = [ cffi ]; + checkInputs = [ pytestCheckHook ]; + + postBuild = '' + ${python.interpreter} xkbcommon/ffi_build.py + ''; + + pythonImportsCheck = [ "xkbcommon" ]; + + meta = with lib; { + homepage = "https://github.com/sde1000/python-xkbcommon"; + description = "Python bindings for libxkbcommon using cffi"; + license = licenses.mit; + maintainers = with maintainers; [ chvp ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ff164908e448..3c919de09c27 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7820,6 +7820,8 @@ in { pywavelets = callPackage ../development/python-modules/pywavelets { }; + pywayland = callPackage ../development/python-modules/pywayland { }; + pywbem = callPackage ../development/python-modules/pywbem { inherit (pkgs) libxml2; }; @@ -7838,6 +7840,8 @@ in { pywizlight = callPackage ../development/python-modules/pywizlight { }; + pywlroots = callPackage ../development/python-modules/pywlroots { }; + pyxattr = callPackage ../development/python-modules/pyxattr { }; pyworld = callPackage ../development/python-modules/pyworld { }; @@ -9963,6 +9967,8 @@ in { xhtml2pdf = callPackage ../development/python-modules/xhtml2pdf { }; + xkbcommon = callPackage ../development/python-modules/xkbcommon { }; + xkcdpass = callPackage ../development/python-modules/xkcdpass { }; xknx = callPackage ../development/python-modules/xknx { }; |