2022-12-05 14:21:01 +00:00
|
|
|
{ lib
|
|
|
|
, clangStdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
|
|
|
, libimobiledevice
|
|
|
|
, libusb1
|
|
|
|
, avahi
|
|
|
|
, clang
|
2023-12-12 08:35:54 +00:00
|
|
|
, git
|
2022-12-05 14:21:01 +00:00
|
|
|
}: let
|
|
|
|
|
|
|
|
libgeneral = clangStdenv.mkDerivation rec {
|
|
|
|
pname = "libgeneral";
|
2023-12-12 08:35:54 +00:00
|
|
|
version = "74";
|
2022-12-05 14:21:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tihmstar";
|
|
|
|
repo = pname;
|
2023-12-12 08:35:54 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-6aowcIYssc1xqH6kTi/cpH2F7rgc8+lGC8HgZWYH2w0=";
|
|
|
|
# Leave DotGit so that autoconfigure can read version from git tags
|
|
|
|
leaveDotGit = true;
|
2022-12-05 14:21:01 +00:00
|
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2023-12-12 08:35:54 +00:00
|
|
|
git
|
2022-12-05 14:21:01 +00:00
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Helper library used by usbmuxd2";
|
|
|
|
homepage = "https://github.com/tihmstar/libgeneral";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
clangStdenv.mkDerivation rec {
|
|
|
|
pname = "usbmuxd2";
|
2023-12-12 08:35:54 +00:00
|
|
|
version = "unstable-2023-12-12";
|
2022-12-05 14:21:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tihmstar";
|
|
|
|
repo = pname;
|
2023-12-12 08:35:54 +00:00
|
|
|
rev = "2ce399ddbacb110bd5a83a6b8232d42c9a9b6e84";
|
|
|
|
hash = "sha256-UVLLE73XuWTgGlpTMxUDykFmiBDqz6NCRO2rpRAYfow=";
|
|
|
|
# Leave DotGit so that autoconfigure can read version from git tags
|
|
|
|
leaveDotGit = true;
|
2022-12-05 14:21:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-12-12 08:35:54 +00:00
|
|
|
# Checking for libgeneral version still fails
|
|
|
|
sed -i 's/libgeneral >= $LIBGENERAL_MINVERS_STR/libgeneral/' configure.ac
|
2022-12-05 14:21:01 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
clang
|
2023-12-12 08:35:54 +00:00
|
|
|
git
|
2022-12-05 14:21:01 +00:00
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
avahi
|
|
|
|
libgeneral
|
|
|
|
libimobiledevice
|
|
|
|
libusb1
|
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-udevrulesdir=${placeholder "out"}/lib/udev/rules.d"
|
|
|
|
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
|
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"sbindir=${placeholder "out"}/bin"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/tihmstar/usbmuxd2";
|
|
|
|
description = "A socket daemon to multiplex connections from and to iOS devices";
|
|
|
|
license = licenses.lgpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ onny ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "usbmuxd";
|
2022-12-05 14:21:01 +00:00
|
|
|
};
|
|
|
|
}
|