summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/hexdump/default.nix
blob: 1009169bd5b72f4645a6820bf393c3137e41ada1 (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
{
  lib,
  buildPythonPackage,
  fetchPypi,
}:

buildPythonPackage rec {
  pname = "hexdump";
  version = "3.3";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-14GkOwwWrOP5Nmqt5z6K06e9UTfVjwtFqy0/VIdvINs=";
    extension = "zip";
  };

  # the source zip has no prefix, so everything gets unpacked to /build otherwise
  unpackPhase = ''
    runHook preUnpack
    mkdir source
    pushd source
    unzip $src
    popd
    runHook postUnpack
  '';

  sourceRoot = "source";

  pythonImportsCheck = [ "hexdump" ];

  meta = {
    description = "Library to dump binary data to hex format and restore from there";
    homepage = "https://pypi.org/project/hexdump/"; # BitBucket site returns 404
    license = lib.licenses.publicDomain;
    maintainers = with lib.maintainers; [
      frogamic
      sbruder
    ];
  };
}