My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/python-modules/pywayland/default.nix

43 lines
904 B

{ lib
, buildPythonPackage
, fetchPypi
, python
, cffi
, pkg-config
, wayland
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pywayland";
version = "0.4.12";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-IAwBzV+wvQYgoJK1+GjAHm2aXWE2iVaMV2cduMtCkx8=";
};
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 ];
};
}