Merge pull request #268565 from WolfangAukang/opendrop-openssl

opendrop: cleanup, add openssl to PATH

authored by Rick van Schijndel and committed by GitHub 08b4f838 a4032901

+32 -9
+32 -9
pkgs/tools/networking/opendrop/default.nix
··· 1 1 { lib 2 2 , buildPythonApplication 3 - , fetchPypi 3 + , fetchFromGitHub 4 4 , fleep 5 + , ifaddr 5 6 , libarchive-c 6 7 , pillow 7 8 , requests-toolbelt 8 9 , setuptools 9 - , zeroconf }: 10 + , zeroconf 11 + , pytestCheckHook 12 + , openssl 13 + }: 10 14 11 15 buildPythonApplication rec { 12 16 pname = "opendrop"; 13 17 version = "0.13.0"; 18 + format = "setuptools"; 14 19 15 - src = fetchPypi { 16 - inherit version pname; 17 - sha256 = "sha256-FE1oGpL6C9iBhI8Zj71Pm9qkObJvSeU2gaBZwK1bTQc="; 20 + src = fetchFromGitHub { 21 + owner = "seemoo-lab"; 22 + repo = "opendrop"; 23 + rev = "v${version}"; 24 + hash = "sha256-4FeVQO7Z6t9mjIgesdjKx4Mi+Ro5EVGJpEFjCvB2SlA="; 18 25 }; 19 26 27 + nativeBuildInputs = [ 28 + # Tests fail if I put it on buildInputs 29 + openssl 30 + ]; 31 + 20 32 propagatedBuildInputs = [ 21 33 fleep 34 + ifaddr 22 35 libarchive-c 23 36 pillow 24 37 requests-toolbelt ··· 26 39 zeroconf 27 40 ]; 28 41 29 - # There are tests, but getting the following error: 30 - # nix_run_setup: error: argument action: invalid choice: 'test' (choose from 'receive', 'find', 'send') 31 - # Opendrop works as intended though 32 - doCheck = false; 42 + makeWrapperArgs = [ 43 + "--prefix PATH : ${lib.makeBinPath nativeBuildInputs}" 44 + ]; 45 + 46 + checkInputs = [ 47 + pytestCheckHook 48 + ]; 49 + 50 + preCheck = '' 51 + # Solves PermissionError: [Errno 13] Permission denied: '/homeless-shelter' 52 + export HOME=$(mktemp -d) 53 + ''; 33 54 34 55 meta = with lib; { 35 56 description = "An open Apple AirDrop implementation written in Python"; 36 57 homepage = "https://owlink.org/"; 58 + changelog = "https://github.com/seemoo-lab/opendrop/releases/tag/${src.rev}"; 37 59 license = licenses.gpl3Only; 38 60 maintainers = with maintainers; [ wolfangaukang ]; 61 + mainProgram = "opendrop"; 39 62 platforms = [ "x86_64-linux" ]; 40 63 }; 41 64 }