summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/im/img4tool/package.nix
blob: a43159f2ad3edb3a6ee236a3acf3072f0a6a538d (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
53
54
{
  lib,
  clangStdenv,
  fetchFromGitHub,
  autoreconfHook,
  pkg-config,
  libgeneral,
  libplist,
  openssl,
  lzfse,
  git,
}:
clangStdenv.mkDerivation (finalAttrs: {
  pname = "img4tool";
  version = "218";

  src = fetchFromGitHub {
    owner = "tihmstar";
    repo = "img4tool";
    tag = finalAttrs.version;
    hash = "sha256-s2pX+svCINI3EQsAlDKHm8P03/5C4MVA63wAwAH1lEs=";
  };

  # Do not depend on git to calculate version, instead
  # pass version via configureFlag
  patches = [ ./configure-version.patch ];

  nativeBuildInputs = [
    autoreconfHook
    pkg-config
  ];

  buildInputs = [
    libgeneral
    libplist
    lzfse
    openssl
  ];

  configureFlags = [
    "--with-version-commit-count=${finalAttrs.version}"
  ];

  strictDeps = true;

  meta = {
    description = "Socket daemon to multiplex connections from and to iOS devices";
    homepage = "https://github.com/tihmstar/img4tool";
    license = lib.licenses.lgpl3;
    platforms = lib.platforms.linux;
    maintainers = with lib.maintainers; [ onny ];
    mainProgram = "img4tool";
  };
})