It won't be enough to fix cross in all cases, but it is in at least one: pywayland. I've only made the change in cases I'm confident it's correct, as it would be wrong to change this when python.interpreter is used in wrappers, and possibly when it's used for running tests.
44 lines
923 B
Nix
44 lines
923 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, python
|
|
, cffi
|
|
, pkg-config
|
|
, wayland
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pywayland";
|
|
version = "0.4.15";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-vz7Sjd8KT7UgOBI5AN5q6CS7jl+WL87w91cgm0bXRGw=";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
propagatedNativeBuildInputs = [ cffi ];
|
|
buildInputs = [ wayland ];
|
|
propagatedBuildInputs = [ cffi ];
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
postBuild = ''
|
|
${python.pythonForBuild.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 ];
|
|
};
|
|
}
|