summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/gbinder-python/default.nix
blob: 24bf6109e8aceb56094a04334a29883eb6facebb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
  lib,
  fetchFromGitHub,
  buildPythonPackage,
  cython_0,
  pkg-config,
  libgbinder,
}:

buildPythonPackage rec {
  pname = "gbinder-python";
  version = "1.1.1";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "erfanoabdi";
    repo = pname;
    rev = version;
    sha256 = "1X9gAux9w/mCEVmE3Yqvvq3kU7hu4iAFaZWNZZZxt3E=";
  };

  buildInputs = [ libgbinder ];

  nativeBuildInputs = [
    cython_0
    pkg-config
  ];

  postPatch = ''
    # Fix pkg-config name for cross-compilation
    substituteInPlace setup.py --replace "pkg-config" "$PKG_CONFIG"
  '';

  setupPyGlobalFlags = [ "--cython" ];

  meta = {
    description = "Python bindings for libgbinder";
    homepage = "https://github.com/erfanoabdi/gbinder-python";
    license = lib.licenses.gpl3;
    platforms = lib.platforms.linux;
    maintainers = with lib.maintainers; [ ];
  };
}