about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/eduvpn-common/default.nix
blob: 8dfce8d9ebb28f3c5c13fc493e2b33d5dd921b5a (plain) (blame)
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
{ lib
, buildPythonPackage
, callPackage
, fetchurl
, libeduvpn-common
, selenium
, setuptools
}:

buildPythonPackage rec {
  inherit (libeduvpn-common) version src;
  pname = "eduvpn-common";

  sourceRoot = "${pname}-${version}/wrappers/python";

  patches = [ ./use-nix-lib.patch ];

  postPatch = ''
    substituteInPlace eduvpn_common/loader.py \
                      --subst-var-by libeduvpn-common ${libeduvpn-common.out}/lib/lib${pname}-${version}.so
  '';

  format = "pyproject";

  propagatedBuildInputs = [
    libeduvpn-common
    setuptools
  ];

  nativeCheckInputs = [
    selenium
  ];

  pythonImportsCheck = [ "eduvpn_common" ];

  meta = libeduvpn-common.meta // {
    description = "Python wrapper for libeduvpn-common";
  };
}