summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/binary/default.nix
blob: 55b8e3018c02cb1f2069f12bc2f44630ac40f42e (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  hatch-vcs,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "binary";
  version = "1.0.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "ofek";
    repo = "binary";
    tag = "v${version}";
    hash = "sha256-dU+E6MxAmH8AEGTW2/lZmtgRTinKCv9gDiVeb4n78U4=";
  };

  build-system = [
    hatchling
    hatch-vcs
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [
    "binary"
    "binary.core"
  ];

  meta = {
    changelog = "https://github.com/ofek/binary/releases/tag/${src.tag}";
    description = "Easily convert between binary and SI units (kibibyte, kilobyte, etc.)";
    homepage = "https://github.com/ofek/binary";
    license = with lib.licenses; [
      asl20
      mit
    ];
    maintainers = [ ];
  };
}