Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pyrad / default.nix
blob8a707488871628028b8cea5fbb46ea0d862d94d7
1 { buildPythonPackage
2 , fetchFromGitHub
3 , fetchpatch
4 , lib
5 , poetry-core
6 , netaddr
7 , six
8 , unittestCheckHook
9 }:
11 buildPythonPackage rec {
12   pname = "pyrad";
13   version = "2.4";
14   format = "pyproject";
16   src = fetchFromGitHub {
17     owner = "pyradius";
18     repo = pname;
19     rev = version;
20     hash = "sha256-oqgkE0xG/8cmLeRZdGoHkaHbjtByeJwzBJwEdxH8oNY=";
21   };
23   patches = [
24     (fetchpatch {
25       # Migrate to poetry-core
26       url = "https://github.com/pyradius/pyrad/commit/a4b70067dd6269e14a2f9530d820390a8a454231.patch";
27       hash = "sha256-1We9wrVY3Or3GLIKK6hZvEjVYv6JOaahgP9zOMvgErE=";
28     })
29   ];
31   nativeBuildInputs = [
32     poetry-core
33   ];
35   propagatedBuildInputs = [
36     netaddr
37     six
38   ];
40   preCheck = ''
41     substituteInPlace tests/testServer.py \
42       --replace "def testBind(self):" "def dontTestBind(self):" \
43       --replace "def testBindv6(self):" "def dontTestBindv6(self):"
44   '';
46   nativeCheckInputs = [
47     unittestCheckHook
48   ];
50   pythonImportsCheck = [
51     "pyrad"
52   ];
54   meta = with lib; {
55     description = "Python RADIUS Implementation";
56     homepage = "https://github.com/pyradius/pyrad";
57     license = licenses.bsd3;
58     maintainers = with maintainers; [ ];
59   };