summaryrefslogtreecommitdiff
path: root/pkgs/by-name/us/usbfluxd/package.nix
blob: db2d9490f68c265f2dfdca5065cd09bc73dbdd31 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
  lib,
  stdenv,
  fetchFromGitHub,
  autoreconfHook,
  pkg-config,
  libimobiledevice,
  libusb1,
  libusbmuxd,
  usbmuxd,
  libplist,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "usbfluxd";
  version = "1.0";

  src = fetchFromGitHub {
    owner = "corellium";
    repo = "usbfluxd";
    tag = "v${finalAttrs.version}";
    hash = "sha256-tfAy3e2UssPlRB/8uReLS5f8N/xUUzbjs8sKNlr40T0=";
  };

  nativeBuildInputs = [
    autoreconfHook
    pkg-config
  ];

  buildInputs = [
    libimobiledevice
    libusb1
    libusbmuxd
    usbmuxd
    libplist
  ];

  postPatch = ''
    substituteInPlace configure.ac \
      --replace-fail 'with_static_libplist=yes' 'with_static_libplist=no'
    substituteInPlace usbfluxd/utils.h \
      --replace-fail PLIST_FORMAT_BINARY //PLIST_FORMAT_BINARY \
      --replace-fail PLIST_FORMAT_XML, NOT_PLIST_FORMAT_XML
  '';

  meta = {
    homepage = "https://github.com/corellium/usbfluxd";
    description = "Redirects the standard usbmuxd socket to allow connections to local and remote usbmuxd instances so remote devices appear connected locally";
    license = lib.licenses.gpl2Plus;
    mainProgram = "usbfluxctl";
    maintainers = with lib.maintainers; [ x807x ];
  };
})