about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/single-version/default.nix
blob: 39cd92f5f67e1264081b15b76eb9d902d3157d7d (plain) (blame)
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
{ lib, buildPythonPackage, fetchFromGitHub, poetry-core, pytestCheckHook }:

buildPythonPackage rec {
  pname = "single-version";
  version = "1.5.1";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "hongquan";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-I8ATQzPRH9FVjqPoqrNjYMBU5azpmkLjRmHcz943C10=";
  };

  patches = [
    ./0001-set-poetry-core.patch
  ];

  nativeBuildInputs = [ poetry-core ];

  checkInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "single_version" ];

  meta = with lib; {
    description = "Utility to let you have a single source of version in your code base";
    homepage = "https://github.com/hongquan/single-version";
    license = licenses.mit;
    maintainers = with maintainers; [ wolfangaukang ];
  };
}