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 { lib 2 , stdenv 3 , buildPythonApplication 4 - , cepa 5 , colorama 6 , fetchFromGitHub 7 , flask 8 , flask-compress 9 - , flask-httpauth 10 , flask-socketio 11 - , gevent-socketio 12 , gevent-websocket 13 , obfs4 14 , psutil 15 , pycrypto 16 , pynacl 17 - , pyqt5 18 , pyside6 19 , pysocks 20 , pytestCheckHook ··· 22 , qt5 23 , requests 24 , snowflake 25 , substituteAll 26 , tor 27 , unidecode 28 , waitress 29 }: 30 31 let ··· 79 }) 80 ]; 81 propagatedBuildInputs = [ 82 - cepa 83 colorama 84 flask 85 flask-compress 86 - flask-httpauth 87 flask-socketio 88 - gevent-socketio 89 gevent-websocket 90 psutil 91 pycrypto 92 pynacl 93 pyside6 94 qrcode 95 requests 96 unidecode 97 waitress 98 - ]; 99 100 buildInputs = [ 101 obfs4 ··· 138 inherit tor meek obfs4 snowflake; 139 inherit (tor) geoip; 140 }) 141 ]; 142 143 propagatedBuildInputs = [ 144 onionshare 145 - psutil 146 - pyqt5 147 pyside6 148 - pysocks 149 qrcode 150 ]; 151 152 nativeBuildInputs = [ qt5.wrapQtAppsHook ]; 153 154 postInstall = '' 155 mkdir -p $out/share/{appdata,applications,icons}
··· 1 { lib 2 , stdenv 3 , buildPythonApplication 4 , colorama 5 , fetchFromGitHub 6 + , fetchpatch 7 , flask 8 , flask-compress 9 , flask-socketio 10 , gevent-websocket 11 , obfs4 12 , psutil 13 + , packaging 14 , pycrypto 15 , pynacl 16 , pyside6 17 , pysocks 18 , pytestCheckHook ··· 20 , qt5 21 , requests 22 , snowflake 23 + , stem 24 , substituteAll 25 , tor 26 , unidecode 27 , waitress 28 + , werkzeug 29 }: 30 31 let ··· 79 }) 80 ]; 81 propagatedBuildInputs = [ 82 colorama 83 flask 84 flask-compress 85 flask-socketio 86 gevent-websocket 87 + packaging 88 psutil 89 pycrypto 90 pynacl 91 pyside6 92 + pysocks 93 + qrcode 94 qrcode 95 requests 96 + stem 97 unidecode 98 waitress 99 + werkzeug 100 + ] ++ requests.optional-dependencies.socks; 101 102 buildInputs = [ 103 obfs4 ··· 140 inherit tor meek obfs4 snowflake; 141 inherit (tor) geoip; 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 + }) 150 ]; 151 152 propagatedBuildInputs = [ 153 onionshare 154 pyside6 155 qrcode 156 ]; 157 158 nativeBuildInputs = [ qt5.wrapQtAppsHook ]; 159 + 160 + buildInputs = [ qt5.qtwayland ]; 161 162 postInstall = '' 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 cacheyou = throw "cacheyou has been removed, as it was no longer used for the only consumer pdm"; # added 2023-12-21 83 carrot = throw "carrot has been removed, as its development was discontinued in 2012"; # added 2022-01-18 84 cchardet = faust-cchardet; # added 2023-03-02 85 class-registry = phx-class-registry; # added 2021-10-05 86 cntk = throw "cntk has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-10-09 87 codespell = throw "codespell has been promoted to a top-level attribute name: `pkgs.codespell`"; # Added 2022-10-02
··· 82 cacheyou = throw "cacheyou has been removed, as it was no longer used for the only consumer pdm"; # added 2023-12-21 83 carrot = throw "carrot has been removed, as its development was discontinued in 2012"; # added 2022-01-18 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 86 class-registry = phx-class-registry; # added 2021-10-05 87 cntk = throw "cntk has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-10-09 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 2005 coqpit = callPackage ../development/python-modules/coqpit { }; 2006 2007 - cepa = callPackage ../development/python-modules/cepa { }; 2008 - 2009 cerberus = callPackage ../development/python-modules/cerberus { }; 2010 2011 cert-chain-resolver = callPackage ../development/python-modules/cert-chain-resolver { };
··· 2004 2005 coqpit = callPackage ../development/python-modules/coqpit { }; 2006 2007 cerberus = callPackage ../development/python-modules/cerberus { }; 2008 2009 cert-chain-resolver = callPackage ../development/python-modules/cert-chain-resolver { };