1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 cython,
6 pkg-config,
7 libgbinder,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "gbinder-python";
13 version = "1.1.2";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "erfanoabdi";
18 repo = "gbinder-python";
19 tag = version;
20 hash = "sha256-up1EDuR05a7TlCErd2BXkp01oqi6hEskt7xVxsJqquM=";
21 };
22
23 build-system = [
24 cython
25 setuptools
26 ];
27
28 buildInputs = [ libgbinder ];
29
30 nativeBuildInputs = [
31 pkg-config
32 ];
33
34 postPatch = ''
35 # Fix pkg-config name for cross-compilation
36 substituteInPlace setup.py \
37 --replace-fail "pkg-config" "$PKG_CONFIG" \
38 --replace-fail "USE_CYTHON = False" "USE_CYTHON = True"
39 '';
40
41 meta = {
42 description = "Python bindings for libgbinder";
43 homepage = "https://github.com/erfanoabdi/gbinder-python";
44 license = lib.licenses.gpl3;
45 platforms = lib.platforms.linux;
46 maintainers = with lib.maintainers; [ ];
47 };
48}