diff options
author | Rick van Schijndel <Mindavi@users.noreply.github.com> | 2023-11-21 07:45:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-21 07:45:44 +0100 |
commit | 08b4f838124f895b1979c7dfd7363944f945c6bd (patch) | |
tree | 5b3c44179eeab99eb7efe71f6a13a7ba0b8d49e0 /pkgs/tools | |
parent | a403290190e47ceb0873fe32301645ad00662e4c (diff) | |
parent | deb32e08a2b57c536d4f5d4ff3abab3f49fe233e (diff) | |
download | nixlib-08b4f838124f895b1979c7dfd7363944f945c6bd.tar nixlib-08b4f838124f895b1979c7dfd7363944f945c6bd.tar.gz nixlib-08b4f838124f895b1979c7dfd7363944f945c6bd.tar.bz2 nixlib-08b4f838124f895b1979c7dfd7363944f945c6bd.tar.lz nixlib-08b4f838124f895b1979c7dfd7363944f945c6bd.tar.xz nixlib-08b4f838124f895b1979c7dfd7363944f945c6bd.tar.zst nixlib-08b4f838124f895b1979c7dfd7363944f945c6bd.zip |
Merge pull request #268565 from WolfangAukang/opendrop-openssl
opendrop: cleanup, add openssl to PATH
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/networking/opendrop/default.nix | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/pkgs/tools/networking/opendrop/default.nix b/pkgs/tools/networking/opendrop/default.nix index 6a8937215105..a617eadfc410 100644 --- a/pkgs/tools/networking/opendrop/default.nix +++ b/pkgs/tools/networking/opendrop/default.nix @@ -1,24 +1,37 @@ { lib , buildPythonApplication -, fetchPypi +, fetchFromGitHub , fleep +, ifaddr , libarchive-c , pillow , requests-toolbelt , setuptools -, zeroconf }: +, zeroconf +, pytestCheckHook +, openssl +}: buildPythonApplication rec { pname = "opendrop"; version = "0.13.0"; + format = "setuptools"; - src = fetchPypi { - inherit version pname; - sha256 = "sha256-FE1oGpL6C9iBhI8Zj71Pm9qkObJvSeU2gaBZwK1bTQc="; + src = fetchFromGitHub { + owner = "seemoo-lab"; + repo = "opendrop"; + rev = "v${version}"; + hash = "sha256-4FeVQO7Z6t9mjIgesdjKx4Mi+Ro5EVGJpEFjCvB2SlA="; }; + nativeBuildInputs = [ + # Tests fail if I put it on buildInputs + openssl + ]; + propagatedBuildInputs = [ fleep + ifaddr libarchive-c pillow requests-toolbelt @@ -26,16 +39,26 @@ buildPythonApplication rec { zeroconf ]; - # There are tests, but getting the following error: - # nix_run_setup: error: argument action: invalid choice: 'test' (choose from 'receive', 'find', 'send') - # Opendrop works as intended though - doCheck = false; + makeWrapperArgs = [ + "--prefix PATH : ${lib.makeBinPath nativeBuildInputs}" + ]; + + checkInputs = [ + pytestCheckHook + ]; + + preCheck = '' + # Solves PermissionError: [Errno 13] Permission denied: '/homeless-shelter' + export HOME=$(mktemp -d) + ''; meta = with lib; { description = "An open Apple AirDrop implementation written in Python"; homepage = "https://owlink.org/"; + changelog = "https://github.com/seemoo-lab/opendrop/releases/tag/${src.rev}"; license = licenses.gpl3Only; maintainers = with maintainers; [ wolfangaukang ]; + mainProgram = "opendrop"; platforms = [ "x86_64-linux" ]; }; } |