Merge pull request #326049 from dotlambda/onionshare

This commit is contained in:
Sandro 2024-07-15 16:33:28 +02:00 committed by GitHub
commit 5e9079f0c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 27 additions and 27 deletions

View File

@ -1,41 +1,25 @@
{ lib
, stdenv
, buildPythonApplication
, colorama
, fetchFromGitHub
, fetchpatch
, flask
, flask-compress
, flask-socketio
, gevent-websocket
, obfs4
, psutil
, packaging
, pycrypto
, pynacl
, pyside6
, pysocks
, pytestCheckHook
, qrcode
, python3
, qt5
, requests
, snowflake
, stem
, substituteAll
, tor
, unidecode
, waitress
, werkzeug
}:
let
version = "2.6.2";
src = fetchFromGitHub {
owner = "onionshare";
repo = "onionshare";
rev = "v${version}";
hash = "sha256-J8Hdriy8eWpHuMCI87a9a/zCR6xafM3A/Tkyom0Ktko=";
};
meta = with lib; {
description = "Securely and anonymously send and receive files";
longDescription = ''
@ -63,10 +47,9 @@ let
# TODO: package meek https://support.torproject.org/glossary/meek/
meek = "/meek-not-available";
in
rec {
onionshare = buildPythonApplication {
onionshare = python3.pkgs.buildPythonApplication {
pname = "onionshare-cli";
inherit version;
src = "${src}/cli";
@ -77,8 +60,17 @@ rec {
inherit tor meek obfs4 snowflake;
inherit (tor) geoip;
})
# Remove distutils for Python 3.12 compatibility
# https://github.com/onionshare/onionshare/pull/1907
(fetchpatch {
url = "https://github.com/onionshare/onionshare/commit/1fb1a470df20d8a7576c8cf51213e5928528d59a.patch";
includes = [ "onionshare_cli/onion.py" ];
stripLen = 1;
hash = "sha256-4XkqaEhMhvj6PyMssnLfXRazdP4k+c9mMDveho7pWg8=";
})
];
propagatedBuildInputs = [
dependencies = with python3.pkgs; [
colorama
flask
flask-compress
@ -91,7 +83,6 @@ rec {
pyside6
pysocks
qrcode
qrcode
requests
stem
unidecode
@ -104,7 +95,7 @@ rec {
tor
];
nativeCheckInputs = [
nativeCheckInputs = with python3.pkgs; [
pytestCheckHook
];
@ -129,7 +120,7 @@ rec {
};
};
onionshare-gui = buildPythonApplication {
onionshare-gui = python3.pkgs.buildPythonApplication {
pname = "onionshare";
inherit version;
src = "${src}/desktop";
@ -147,9 +138,18 @@ rec {
stripLen = 1;
hash = "sha256-wfIjdPhdUYAvbK5XyE1o2OtFOlJRj0X5mh7QQRjdyP0=";
})
# Remove distutils for Python 3.12 compatibility
# https://github.com/onionshare/onionshare/pull/1907
(fetchpatch {
url = "https://github.com/onionshare/onionshare/commit/1fb1a470df20d8a7576c8cf51213e5928528d59a.patch";
includes = [ "onionshare/update_checker.py" ];
stripLen = 1;
hash = "sha256-mRRj9cALZVHw86CgU17sp9EglKhkRRcGfROyQpsXVfU=";
})
];
propagatedBuildInputs = [
dependencies = with python3.pkgs; [
onionshare
pyside6
qrcode

View File

@ -33042,7 +33042,7 @@ with pkgs;
omxplayer = callPackage ../applications/video/omxplayer { };
inherit (python3Packages.callPackage ../applications/networking/onionshare { }) onionshare onionshare-gui;
inherit (callPackage ../applications/networking/onionshare { }) onionshare onionshare-gui;
openambit = qt5.callPackage ../applications/misc/openambit { };