summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/miasm/default.nix
blob: beba82cc72a1ac2bb8f01df741f98c9c1b7bc2de (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
{
  buildPythonPackage,
  fetchFromGitHub,
  lib,
  future,
  gcc,
  llvmlite,
  parameterized,
  pycparser,
  pyparsing,
  z3-solver,
  setuptools,
}:
let
  commit = "cbc722eed8dc807955bd46f84886ae74d161dd0c";
in
buildPythonPackage {
  pname = "miasm";
  version = "0.1.5-unstable-2024-08-20";

  pyproject = true;
  build-system = [ setuptools ];

  src = fetchFromGitHub {
    owner = "cea-sec";
    repo = "miasm";
    rev = commit;
    hash = "sha256-Ot11QuMtaJ8OQDAUgV3zVxTNp0kKc0Y9EXRZD96Caow=";
  };

  patches = [
    #  Use a valid semver as now required by setuptools
    ./0001-setup.py-use-valid-semver.patch

    # Removes the (unfree) IDAPython dependency
    ./0002-core-remove-IDAPython-dependency.patch
  ];

  dependencies = [
    future
    llvmlite
    parameterized
    pycparser
    pyparsing
    z3-solver
  ];

  buildInputs = [ gcc ];

  pythonImportsCheck = [ "miasm" ];

  meta = {
    description = "Reverse engineering framework in Python";
    homepage = "https://github.com/cea-sec/miasm";
    changelog = "https://github.com/cea-sec/miasm/blob/${commit}/CHANGELOG.md";
    license = lib.licenses.gpl2Plus;
    maintainers = with lib.maintainers; [ msanft ];
  };
}