1{ stdenv
2, autoconf
3, automake
4, fetchFromGitHub
5, fetchpatch
6, lib
7, libimobiledevice
8, libusb1
9, libplist
10, libtool
11, openssl
12, pkg-config
13}:
14
15stdenv.mkDerivation rec {
16 pname = "ios-webkit-debug-proxy";
17 version = "1.9.0";
18
19 src = fetchFromGitHub {
20 owner = "google";
21 repo = pname;
22 rev = "v${version}";
23 hash = "sha256-cZ/p/aWET/BXKDrD+qgR+rfTISd+4jPNQFuV8klSLUo=";
24 };
25
26 patches = [
27 # OpenSSL 3.0 compatibility
28 (fetchpatch {
29 url = "https://github.com/google/ios-webkit-debug-proxy/commit/5ba30a2a67f39d25025cadf37c0eafb2e2d2d0a8.patch";
30 hash = "sha256-2b9BjG9wkqO+ZfoBYYJvD2Db5Kr0F/MxKMTRsI0ea3s=";
31 })
32 (fetchpatch {
33 name = "libplist-2.3.0-compatibility.patch";
34 url = "https://github.com/google/ios-webkit-debug-proxy/commit/94e4625ea648ece730d33d13224881ab06ad0fce.patch";
35 hash = "sha256-2deFAKIcNPDd1loOSe8pWZWs9idIE5Q2+pLkoVQrTLg=";
36 })
37 # Examples compilation breaks with --disable-static, see https://github.com/google/ios-webkit-debug-proxy/issues/399
38 ./0001-Don-t-compile-examples.patch
39 ];
40
41 outputs = [ "out" "dev" ];
42
43 nativeBuildInputs = [ autoconf automake libtool pkg-config ];
44 buildInputs = [ libimobiledevice libusb1 libplist openssl ];
45
46 preConfigure = ''
47 NOCONFIGURE=1 ./autogen.sh
48 '';
49
50 enableParallelBuilding = true;
51
52 meta = with lib; {
53 description = "A DevTools proxy (Chrome Remote Debugging Protocol) for iOS devices (Safari Remote Web Inspector)";
54 longDescription = ''
55 The ios_webkit_debug_proxy (aka iwdp) proxies requests from usbmuxd
56 daemon over a websocket connection, allowing developers to send commands
57 to MobileSafari and UIWebViews on real and simulated iOS devices.
58 '';
59 homepage = "https://github.com/google/ios-webkit-debug-proxy";
60 license = licenses.bsd3;
61 maintainers = [ maintainers.abustany ];
62 };
63}