summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/ipsw-parser/default.nix
blob: 5c0673d1dddae2fcc02c293bd4b2a7909c173583 (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
55
56
57
58
59
60
61
62
63
{
  buildPythonPackage,
  cached-property,
  click,
  coloredlogs,
  construct,
  fetchFromGitHub,
  lib,
  plumbum,
  pyimg4,
  remotezip2,
  requests,
  setuptools,
  setuptools-scm,
}:

buildPythonPackage rec {
  pname = "ipsw-parser";
  version = "1.5.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "doronz88";
    repo = "ipsw_parser";
    tag = "v${version}";
    hash = "sha256-+lhrRlIuchWIezzxkpTv4gdxXbOpNPWOJrdOU/g1i68=";
  };

  build-system = [
    setuptools
    setuptools-scm
  ];

  dependencies = [
    cached-property
    click
    coloredlogs
    construct
    plumbum
    pyimg4
    remotezip2
    requests
  ];

  pythonImportsCheck = [ "ipsw_parser" ];

  checkPhase = ''
    runHook preCheck

    "$out"/bin/${meta.mainProgram} --help

    runHook postCheck
  '';

  meta = {
    changelog = "https://github.com/doronz88/ipsw_parser/releases/tag/${src.tag}";
    description = "Python3 utility for parsing and extracting data from IPSW";
    homepage = "https://github.com/doronz88/ipsw_parser";
    license = lib.licenses.gpl3Plus;
    mainProgram = "ipsw-parser";
    maintainers = [ lib.maintainers.dotlambda ];
  };
}