1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
53 lines
1.1 KiB
Nix
53 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
pyopenssl,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "aiosasl";
|
|
version = "0.5.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "horazont";
|
|
repo = "aiosasl";
|
|
tag = "v${version}";
|
|
hash = "sha256-JIuNPb/l4QURMQc905H2iNGCfMz+zM/QJhDQOR8LPdc=";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
name = "python311-compat.patch";
|
|
url = "https://github.com/horazont/aiosasl/commit/44c48d36b416bd635d970dba2607a31b2167ea1b.patch";
|
|
hash = "sha256-u6PJKV54dU2MA9hXa/9hJ3eLVds1DuLHGbt8y/OakWs=";
|
|
})
|
|
];
|
|
|
|
postPatch = ''
|
|
# https://github.com/horazont/aiosasl/issues/28
|
|
substituteInPlace tests/test_aiosasl.py \
|
|
--replace-fail "assertRaisesRegexp" "assertRaisesRegex"
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
nativeCheckInputs = [
|
|
pyopenssl
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "aiosasl" ];
|
|
|
|
meta = {
|
|
description = "Asyncio SASL library";
|
|
homepage = "https://github.com/horazont/aiosasl";
|
|
license = lib.licenses.lgpl3Plus;
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
};
|
|
}
|