Merge pull request #310187 from drawbu/fix-pyrad
python3Packages.pyrad: fix build failing
This commit is contained in:
commit
82fcfd975c
2 changed files with 38 additions and 34 deletions
|
@ -5383,6 +5383,12 @@
|
||||||
githubId = 472846;
|
githubId = 472846;
|
||||||
name = "Sebastian Krohn";
|
name = "Sebastian Krohn";
|
||||||
};
|
};
|
||||||
|
drawbu = {
|
||||||
|
email = "clement21.boillot@gmail.com";
|
||||||
|
github = "drawbu";
|
||||||
|
githubId = 69208565;
|
||||||
|
name = "Clément Boillot";
|
||||||
|
};
|
||||||
drets = {
|
drets = {
|
||||||
email = "dmitryrets@gmail.com";
|
email = "dmitryrets@gmail.com";
|
||||||
github = "drets";
|
github = "drets";
|
||||||
|
|
|
@ -1,60 +1,58 @@
|
||||||
{ buildPythonPackage
|
{
|
||||||
, fetchFromGitHub
|
buildPythonPackage,
|
||||||
, fetchpatch
|
fetchFromGitHub,
|
||||||
, lib
|
lib,
|
||||||
, poetry-core
|
poetry-core,
|
||||||
, netaddr
|
netaddr,
|
||||||
, six
|
six,
|
||||||
, unittestCheckHook
|
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 {
|
buildPythonPackage rec {
|
||||||
pname = "pyrad";
|
pname = "pyrad";
|
||||||
version = "2.4";
|
version = "2.4-unstable-2023-06-13";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "pyradius";
|
owner = "pyradius";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = "dd34c5a29b46d83b0bea841e85fd72b79f315b87";
|
||||||
hash = "sha256-oqgkE0xG/8cmLeRZdGoHkaHbjtByeJwzBJwEdxH8oNY=";
|
hash = "sha256-U4VVGkDDyN4J/tRDaDGSr2TSA4JmqIoQj5qn9qBAvQU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
nativeBuildInputs = [ poetry-core ];
|
||||||
(fetchpatch {
|
|
||||||
# Migrate to poetry-core
|
|
||||||
url = "https://github.com/pyradius/pyrad/commit/a4b70067dd6269e14a2f9530d820390a8a454231.patch";
|
|
||||||
hash = "sha256-1We9wrVY3Or3GLIKK6hZvEjVYv6JOaahgP9zOMvgErE=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
poetry-core
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
netaddr
|
netaddr_0_8_0
|
||||||
six
|
six
|
||||||
];
|
];
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
substituteInPlace tests/testServer.py \
|
substituteInPlace tests/testServer.py \
|
||||||
--replace "def testBind(self):" "def dontTestBind(self):" \
|
--replace-warn "def testBind(self):" "def dontTestBind(self):" \
|
||||||
--replace "def testBindv6(self):" "def dontTestBindv6(self):"
|
--replace-warn "def testBindv6(self):" "def dontTestBindv6(self):" \
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [ unittestCheckHook ];
|
||||||
unittestCheckHook
|
|
||||||
];
|
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [ "pyrad" ];
|
||||||
"pyrad"
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
description = "Python RADIUS Implementation";
|
description = "Python RADIUS Implementation";
|
||||||
homepage = "https://github.com/pyradius/pyrad";
|
homepage = "https://github.com/pyradius/pyrad";
|
||||||
license = licenses.bsd3;
|
license = lib.licenses.bsd3;
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with lib.maintainers; [ drawbu ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue