diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-05-09 18:06:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-09 18:06:09 +0200 |
commit | 82fcfd975cc2ebb88b4e0babc3d9525da88380b9 (patch) | |
tree | eb6bef074bcd732b1ea1d05304a1dfb74dd07b0f | |
parent | fe5ec4c141ed23d96a9e3cc0777ce5b7fb922627 (diff) | |
parent | 982fe358cae9f81585b4b68b6d80986cee542a74 (diff) |
Merge pull request #310187 from drawbu/fix-pyrad
python3Packages.pyrad: fix build failing
-rw-r--r-- | maintainers/maintainer-list.nix | 6 | ||||
-rw-r--r-- | pkgs/development/python-modules/pyrad/default.nix | 66 |
2 files changed, 38 insertions, 34 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index b2cded239a7bd..824866dd397a2 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5383,6 +5383,12 @@ githubId = 472846; name = "Sebastian Krohn"; }; + drawbu = { + email = "clement21.boillot@gmail.com"; + github = "drawbu"; + githubId = 69208565; + name = "Clément Boillot"; + }; drets = { email = "dmitryrets@gmail.com"; github = "drets"; diff --git a/pkgs/development/python-modules/pyrad/default.nix b/pkgs/development/python-modules/pyrad/default.nix index 8a70748887162..9e2cb672d95a0 100644 --- a/pkgs/development/python-modules/pyrad/default.nix +++ b/pkgs/development/python-modules/pyrad/default.nix @@ -1,60 +1,58 @@ -{ buildPythonPackage -, fetchFromGitHub -, fetchpatch -, lib -, poetry-core -, netaddr -, six -, unittestCheckHook +{ + buildPythonPackage, + fetchFromGitHub, + lib, + poetry-core, + netaddr, + six, + unittestCheckHook, + fetchPypi, }: +let + netaddr_0_8_0 = netaddr.overridePythonAttrs (oldAttrs: rec { + version = "0.8.0"; + + src = fetchPypi { + pname = "netaddr"; + inherit version; + hash = "sha256-1sxXx6B7HZ0ukXqos2rozmHDW6P80bg8oxxaDuK1okM="; + }; + }); +in buildPythonPackage rec { pname = "pyrad"; - version = "2.4"; + version = "2.4-unstable-2023-06-13"; format = "pyproject"; src = fetchFromGitHub { owner = "pyradius"; repo = pname; - rev = version; - hash = "sha256-oqgkE0xG/8cmLeRZdGoHkaHbjtByeJwzBJwEdxH8oNY="; + rev = "dd34c5a29b46d83b0bea841e85fd72b79f315b87"; + hash = "sha256-U4VVGkDDyN4J/tRDaDGSr2TSA4JmqIoQj5qn9qBAvQU="; }; - patches = [ - (fetchpatch { - # Migrate to poetry-core - url = "https://github.com/pyradius/pyrad/commit/a4b70067dd6269e14a2f9530d820390a8a454231.patch"; - hash = "sha256-1We9wrVY3Or3GLIKK6hZvEjVYv6JOaahgP9zOMvgErE="; - }) - ]; - - nativeBuildInputs = [ - poetry-core - ]; + nativeBuildInputs = [ poetry-core ]; propagatedBuildInputs = [ - netaddr + netaddr_0_8_0 six ]; preCheck = '' substituteInPlace tests/testServer.py \ - --replace "def testBind(self):" "def dontTestBind(self):" \ - --replace "def testBindv6(self):" "def dontTestBindv6(self):" + --replace-warn "def testBind(self):" "def dontTestBind(self):" \ + --replace-warn "def testBindv6(self):" "def dontTestBindv6(self):" \ ''; - nativeCheckInputs = [ - unittestCheckHook - ]; + nativeCheckInputs = [ unittestCheckHook ]; - pythonImportsCheck = [ - "pyrad" - ]; + pythonImportsCheck = [ "pyrad" ]; - meta = with lib; { + meta = { description = "Python RADIUS Implementation"; homepage = "https://github.com/pyradius/pyrad"; - license = licenses.bsd3; - maintainers = with maintainers; [ ]; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ drawbu ]; }; } |