nixpkgs/pkgs/tools/networking/opendrop/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
1.3 KiB
Nix
Raw Normal View History

2022-02-25 19:54:28 +00:00
{ lib
, buildPythonApplication
2023-11-19 22:48:35 +00:00
, fetchFromGitHub
2022-02-25 19:54:28 +00:00
, fleep
2023-11-19 22:48:35 +00:00
, ifaddr
2022-02-25 19:54:28 +00:00
, libarchive-c
, pillow
, requests-toolbelt
, setuptools
2023-11-19 22:48:35 +00:00
, zeroconf
, pytestCheckHook
, openssl
}:
2022-02-25 19:54:28 +00:00
buildPythonApplication rec {
pname = "opendrop";
version = "0.13.0";
2023-11-19 22:48:35 +00:00
format = "setuptools";
2022-02-25 19:54:28 +00:00
2023-11-19 22:48:35 +00:00
src = fetchFromGitHub {
owner = "seemoo-lab";
repo = "opendrop";
rev = "v${version}";
hash = "sha256-4FeVQO7Z6t9mjIgesdjKx4Mi+Ro5EVGJpEFjCvB2SlA=";
2022-02-25 19:54:28 +00:00
};
2023-11-19 22:48:35 +00:00
nativeBuildInputs = [
# Tests fail if I put it on buildInputs
openssl
];
2022-02-25 19:54:28 +00:00
propagatedBuildInputs = [
fleep
2023-11-19 22:48:35 +00:00
ifaddr
2022-02-25 19:54:28 +00:00
libarchive-c
pillow
requests-toolbelt
setuptools
zeroconf
];
2023-11-19 22:48:35 +00:00
makeWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath nativeBuildInputs}"
];
checkInputs = [
pytestCheckHook
];
preCheck = ''
# Solves PermissionError: [Errno 13] Permission denied: '/homeless-shelter'
export HOME=$(mktemp -d)
'';
2022-02-25 19:54:28 +00:00
meta = with lib; {
description = "An open Apple AirDrop implementation written in Python";
homepage = "https://owlink.org/";
2023-11-19 22:48:35 +00:00
changelog = "https://github.com/seemoo-lab/opendrop/releases/tag/${src.rev}";
2022-02-25 19:54:28 +00:00
license = licenses.gpl3Only;
maintainers = with maintainers; [ wolfangaukang ];
2023-11-19 22:48:35 +00:00
mainProgram = "opendrop";
2022-02-25 19:54:28 +00:00
platforms = [ "x86_64-linux" ];
};
}