nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 gitMinimal,
7 hatchling,
8 setuptools-scm,
9}:
10
11buildPythonPackage rec {
12 pname = "hatch-vcs";
13 version = "0.5.0";
14 pyproject = true;
15
16 src = fetchPypi {
17 pname = "hatch_vcs";
18 inherit version;
19 hash = "sha256-A5X6EmlANAIVCQw0Siv04qd7y+faqxb0Gze5jJWAn/k=";
20 };
21
22 build-system = [ hatchling ];
23
24 dependencies = [
25 hatchling
26 setuptools-scm
27 ];
28
29 nativeCheckInputs = [
30 gitMinimal
31 pytestCheckHook
32 ];
33
34 disabledTests = [
35 # reacts to our setup-hook pretending a version
36 "test_custom_tag_pattern_get_version"
37 ];
38
39 pythonImportsCheck = [ "hatch_vcs" ];
40
41 meta = {
42 changelog = "https://github.com/ofek/hatch-vcs/releases/tag/v${version}";
43 description = "Plugin for Hatch that uses your preferred version control system (like Git) to determine project versions";
44 homepage = "https://github.com/ofek/hatch-vcs";
45 license = lib.licenses.mit;
46 maintainers = with lib.maintainers; [ cpcloud ];
47 };
48}