2023-08-30 05:34:28 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchpatch
|
|
|
|
, fetchPypi
|
|
|
|
, python
|
|
|
|
, mock
|
|
|
|
}:
|
2022-01-18 10:30:11 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cepa";
|
2022-12-30 20:13:00 +01:00
|
|
|
version = "1.8.4";
|
2023-12-07 04:53:02 +01:00
|
|
|
format = "setuptools";
|
2022-01-18 10:30:11 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-03 01:48:06 +01:00
|
|
|
hash = "sha256-P7xwGsP8ic1/abxYptDXNbAU+kC2Hiwu/Tge0g21ipY=";
|
2022-01-18 10:30:11 +01:00
|
|
|
};
|
|
|
|
|
2023-08-30 05:34:28 +02:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "python-3.11-compatibility.patch";
|
|
|
|
url = "https://github.com/onionshare/cepa/commit/0bf9aee7151e65594c532826bb04636e1d80fb6f.patch";
|
|
|
|
hash = "sha256-roSt9N5OvnOOxKZUee86zGXt0AsZCcbBdV2cLz1MB2k=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-01-18 10:30:11 +01:00
|
|
|
postPatch = ''
|
|
|
|
rm test/unit/installation.py
|
|
|
|
sed -i "/test.unit.installation/d" test/settings.cfg
|
|
|
|
# https://github.com/torproject/stem/issues/56
|
|
|
|
sed -i '/MOCK_VERSION/d' run_tests.py
|
|
|
|
'';
|
|
|
|
|
2023-01-21 13:00:00 +01:00
|
|
|
nativeCheckInputs = [ mock ];
|
2022-01-18 10:30:11 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
touch .gitignore
|
|
|
|
${python.interpreter} run_tests.py -u
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Controller library that allows applications to interact with Tor";
|
2024-03-19 03:14:51 +01:00
|
|
|
mainProgram = "tor-prompt";
|
2022-01-18 10:30:11 +01:00
|
|
|
homepage = "https://github.com/onionshare/cepa";
|
|
|
|
license = licenses.lgpl3Only;
|
2024-02-14 20:58:18 +01:00
|
|
|
maintainers = with maintainers; [ bbjubjub ];
|
2022-01-18 10:30:11 +01:00
|
|
|
};
|
|
|
|
}
|