about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2024-05-12 20:41:29 +0200
committerGitHub <noreply@github.com>2024-05-12 20:41:29 +0200
commitea75c38b31e648684e4781598637fd1865f91bd4 (patch)
treefd34c8608b3d964cb76c564bfc3a9f2c9b001045 /pkgs
parenta08f9c05e74fceb982e66c06018447cf1bfb8107 (diff)
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
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/onionshare/default.nix30
-rw-r--r--pkgs/development/python-modules/cepa/default.nix48
-rw-r--r--pkgs/top-level/python-aliases.nix1
-rw-r--r--pkgs/top-level/python-packages.nix2
4 files changed, 20 insertions, 61 deletions
diff --git a/pkgs/applications/networking/onionshare/default.nix b/pkgs/applications/networking/onionshare/default.nix
index 3d675d04d58f7..49ce4fae12173 100644
--- a/pkgs/applications/networking/onionshare/default.nix
+++ b/pkgs/applications/networking/onionshare/default.nix
@@ -1,20 +1,18 @@
 { lib
 , stdenv
 , buildPythonApplication
-, cepa
 , colorama
 , fetchFromGitHub
+, fetchpatch
 , flask
 , flask-compress
-, flask-httpauth
 , flask-socketio
-, gevent-socketio
 , gevent-websocket
 , obfs4
 , psutil
+, packaging
 , pycrypto
 , pynacl
-, pyqt5
 , pyside6
 , pysocks
 , pytestCheckHook
@@ -22,10 +20,12 @@
 , qt5
 , requests
 , snowflake
+, stem
 , substituteAll
 , tor
 , unidecode
 , waitress
+, werkzeug
 }:
 
 let
@@ -79,23 +79,25 @@ rec {
       })
     ];
     propagatedBuildInputs = [
-      cepa
       colorama
       flask
       flask-compress
-      flask-httpauth
       flask-socketio
-      gevent-socketio
       gevent-websocket
+      packaging
       psutil
       pycrypto
       pynacl
       pyside6
+      pysocks
+      qrcode
       qrcode
       requests
+      stem
       unidecode
       waitress
-    ];
+      werkzeug
+    ] ++ requests.optional-dependencies.socks;
 
     buildInputs = [
       obfs4
@@ -138,19 +140,25 @@ rec {
         inherit tor meek obfs4 snowflake;
         inherit (tor) geoip;
       })
+
+      # https://github.com/onionshare/onionshare/pull/1903
+      (fetchpatch {
+        url = "https://github.com/onionshare/onionshare/pull/1903/commits/f20db8fcbd18e51b58814ae8f98f3a7502b4f456.patch";
+        stripLen = 1;
+        hash = "sha256-wfIjdPhdUYAvbK5XyE1o2OtFOlJRj0X5mh7QQRjdyP0=";
+      })
     ];
 
     propagatedBuildInputs = [
       onionshare
-      psutil
-      pyqt5
       pyside6
-      pysocks
       qrcode
     ];
 
     nativeBuildInputs = [ qt5.wrapQtAppsHook ];
 
+    buildInputs = [ qt5.qtwayland ];
+
     postInstall = ''
       mkdir -p $out/share/{appdata,applications,icons}
       cp $src/org.onionshare.OnionShare.desktop $out/share/applications
diff --git a/pkgs/development/python-modules/cepa/default.nix b/pkgs/development/python-modules/cepa/default.nix
deleted file mode 100644
index 1b12ea1e5efbd..0000000000000
--- a/pkgs/development/python-modules/cepa/default.nix
+++ /dev/null
@@ -1,48 +0,0 @@
-{ lib
-, buildPythonPackage
-, fetchpatch
-, fetchPypi
-, python
-, mock
-}:
-
-buildPythonPackage rec {
-  pname = "cepa";
-  version = "1.8.4";
-  format = "setuptools";
-
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-P7xwGsP8ic1/abxYptDXNbAU+kC2Hiwu/Tge0g21ipY=";
-  };
-
-  patches = [
-    (fetchpatch {
-      name = "python-3.11-compatibility.patch";
-      url = "https://github.com/onionshare/cepa/commit/0bf9aee7151e65594c532826bb04636e1d80fb6f.patch";
-      hash = "sha256-roSt9N5OvnOOxKZUee86zGXt0AsZCcbBdV2cLz1MB2k=";
-    })
-  ];
-
-  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
-  '';
-
-  nativeCheckInputs = [ mock ];
-
-  checkPhase = ''
-    touch .gitignore
-    ${python.interpreter} run_tests.py -u
-  '';
-
-  meta = with lib; {
-    description = "Controller library that allows applications to interact with Tor";
-    mainProgram = "tor-prompt";
-    homepage = "https://github.com/onionshare/cepa";
-    license = licenses.lgpl3Only;
-    maintainers = with maintainers; [ bbjubjub ];
-  };
-}
diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix
index 6e544c12d213a..71dafa9a9c43a 100644
--- a/pkgs/top-level/python-aliases.nix
+++ b/pkgs/top-level/python-aliases.nix
@@ -82,6 +82,7 @@ mapAliases ({
   cacheyou = throw "cacheyou has been removed, as it was no longer used for the only consumer pdm"; # added 2023-12-21
   carrot = throw "carrot has been removed, as its development was discontinued in 2012"; # added 2022-01-18
   cchardet = faust-cchardet; # added 2023-03-02
+  cepa = throw "cepa has been removed, as onionshare switched back to stem"; # added 2024-05-07
   class-registry = phx-class-registry; # added 2021-10-05
   cntk = throw "cntk has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-10-09
   codespell = throw "codespell has been promoted to a top-level attribute name: `pkgs.codespell`"; # Added 2022-10-02
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 9eddf6ccd3349..309eeda103159 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -2004,8 +2004,6 @@ self: super: with self; {
 
   coqpit = callPackage ../development/python-modules/coqpit { };
 
-  cepa = callPackage ../development/python-modules/cepa { };
-
   cerberus = callPackage ../development/python-modules/cerberus { };
 
   cert-chain-resolver = callPackage ../development/python-modules/cert-chain-resolver { };