onionshare: cleanup, fix crash (#309950)

* onionshare: cleanup dependencies according to used upstream ones

* python3Packages.cepa: drop that it is now unused

* onionshare: fix starting under none qt desktops

* onionshare: fix crash with presumable newer pyside6

authored by Sandro and committed by GitHub ea75c38b a08f9c05

+20 -61
+19 -11
pkgs/applications/networking/onionshare/default.nix
··· 1 1 { lib 2 2 , stdenv 3 3 , buildPythonApplication 4 - , cepa 5 4 , colorama 6 5 , fetchFromGitHub 6 + , fetchpatch 7 7 , flask 8 8 , flask-compress 9 - , flask-httpauth 10 9 , flask-socketio 11 - , gevent-socketio 12 10 , gevent-websocket 13 11 , obfs4 14 12 , psutil 13 + , packaging 15 14 , pycrypto 16 15 , pynacl 17 - , pyqt5 18 16 , pyside6 19 17 , pysocks 20 18 , pytestCheckHook ··· 22 20 , qt5 23 21 , requests 24 22 , snowflake 23 + , stem 25 24 , substituteAll 26 25 , tor 27 26 , unidecode 28 27 , waitress 28 + , werkzeug 29 29 }: 30 30 31 31 let ··· 79 79 }) 80 80 ]; 81 81 propagatedBuildInputs = [ 82 - cepa 83 82 colorama 84 83 flask 85 84 flask-compress 86 - flask-httpauth 87 85 flask-socketio 88 - gevent-socketio 89 86 gevent-websocket 87 + packaging 90 88 psutil 91 89 pycrypto 92 90 pynacl 93 91 pyside6 92 + pysocks 93 + qrcode 94 94 qrcode 95 95 requests 96 + stem 96 97 unidecode 97 98 waitress 98 - ]; 99 + werkzeug 100 + ] ++ requests.optional-dependencies.socks; 99 101 100 102 buildInputs = [ 101 103 obfs4 ··· 138 140 inherit tor meek obfs4 snowflake; 139 141 inherit (tor) geoip; 140 142 }) 143 + 144 + # https://github.com/onionshare/onionshare/pull/1903 145 + (fetchpatch { 146 + url = "https://github.com/onionshare/onionshare/pull/1903/commits/f20db8fcbd18e51b58814ae8f98f3a7502b4f456.patch"; 147 + stripLen = 1; 148 + hash = "sha256-wfIjdPhdUYAvbK5XyE1o2OtFOlJRj0X5mh7QQRjdyP0="; 149 + }) 141 150 ]; 142 151 143 152 propagatedBuildInputs = [ 144 153 onionshare 145 - psutil 146 - pyqt5 147 154 pyside6 148 - pysocks 149 155 qrcode 150 156 ]; 151 157 152 158 nativeBuildInputs = [ qt5.wrapQtAppsHook ]; 159 + 160 + buildInputs = [ qt5.qtwayland ]; 153 161 154 162 postInstall = '' 155 163 mkdir -p $out/share/{appdata,applications,icons}
-48
pkgs/development/python-modules/cepa/default.nix
··· 1 - { lib 2 - , buildPythonPackage 3 - , fetchpatch 4 - , fetchPypi 5 - , python 6 - , mock 7 - }: 8 - 9 - buildPythonPackage rec { 10 - pname = "cepa"; 11 - version = "1.8.4"; 12 - format = "setuptools"; 13 - 14 - src = fetchPypi { 15 - inherit pname version; 16 - hash = "sha256-P7xwGsP8ic1/abxYptDXNbAU+kC2Hiwu/Tge0g21ipY="; 17 - }; 18 - 19 - patches = [ 20 - (fetchpatch { 21 - name = "python-3.11-compatibility.patch"; 22 - url = "https://github.com/onionshare/cepa/commit/0bf9aee7151e65594c532826bb04636e1d80fb6f.patch"; 23 - hash = "sha256-roSt9N5OvnOOxKZUee86zGXt0AsZCcbBdV2cLz1MB2k="; 24 - }) 25 - ]; 26 - 27 - postPatch = '' 28 - rm test/unit/installation.py 29 - sed -i "/test.unit.installation/d" test/settings.cfg 30 - # https://github.com/torproject/stem/issues/56 31 - sed -i '/MOCK_VERSION/d' run_tests.py 32 - ''; 33 - 34 - nativeCheckInputs = [ mock ]; 35 - 36 - checkPhase = '' 37 - touch .gitignore 38 - ${python.interpreter} run_tests.py -u 39 - ''; 40 - 41 - meta = with lib; { 42 - description = "Controller library that allows applications to interact with Tor"; 43 - mainProgram = "tor-prompt"; 44 - homepage = "https://github.com/onionshare/cepa"; 45 - license = licenses.lgpl3Only; 46 - maintainers = with maintainers; [ bbjubjub ]; 47 - }; 48 - }
+1
pkgs/top-level/python-aliases.nix
··· 82 82 cacheyou = throw "cacheyou has been removed, as it was no longer used for the only consumer pdm"; # added 2023-12-21 83 83 carrot = throw "carrot has been removed, as its development was discontinued in 2012"; # added 2022-01-18 84 84 cchardet = faust-cchardet; # added 2023-03-02 85 + cepa = throw "cepa has been removed, as onionshare switched back to stem"; # added 2024-05-07 85 86 class-registry = phx-class-registry; # added 2021-10-05 86 87 cntk = throw "cntk has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-10-09 87 88 codespell = throw "codespell has been promoted to a top-level attribute name: `pkgs.codespell`"; # Added 2022-10-02
-2
pkgs/top-level/python-packages.nix
··· 2004 2004 2005 2005 coqpit = callPackage ../development/python-modules/coqpit { }; 2006 2006 2007 - cepa = callPackage ../development/python-modules/cepa { }; 2008 - 2009 2007 cerberus = callPackage ../development/python-modules/cerberus { }; 2010 2008 2011 2009 cert-chain-resolver = callPackage ../development/python-modules/cert-chain-resolver { };