biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / awesomeversion / default.nix
blobf3bdfdfd22011210a8096804252188471359875a
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pythonOlder,
6   poetry-core,
7   pytest-snapshot,
8   pytestCheckHook,
9 }:
11 buildPythonPackage rec {
12   pname = "awesomeversion";
13   version = "24.6.0";
14   pyproject = true;
16   disabled = pythonOlder "3.8";
18   src = fetchFromGitHub {
19     owner = "ludeeus";
20     repo = "awesomeversion";
21     rev = "refs/tags/${version}";
22     hash = "sha256-lpG42Be0MVinWX5MyDvBPdoZFx66l6tpUxpAJRqEf88=";
23   };
25   postPatch = ''
26     # Upstream doesn't set a version
27     substituteInPlace pyproject.toml \
28       --replace-fail 'version = "0"' 'version = "${version}"'
29   '';
31   nativeBuildInputs = [ poetry-core ];
33   pythonImportsCheck = [ "awesomeversion" ];
35   nativeCheckInputs = [
36     pytest-snapshot
37     pytestCheckHook
38   ];
40   meta = with lib; {
41     description = "Python module to deal with versions";
42     homepage = "https://github.com/ludeeus/awesomeversion";
43     changelog = "https://github.com/ludeeus/awesomeversion/releases/tag/${version}";
44     license = with licenses; [ mit ];
45     maintainers = with maintainers; [ fab ];
46   };