1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 gettext,
6 mock,
7 pytestCheckHook,
8 setuptools,
9 setuptools-scm,
10}:
11
12buildPythonPackage rec {
13 pname = "bagit";
14 version = "1.9.0";
15 pyproject = true;
16 build-system = [
17 setuptools
18 setuptools-scm
19 ];
20
21 src = fetchFromGitHub {
22 owner = "LibraryOfCongress";
23 repo = "bagit-python";
24 tag = "v${version}";
25 hash = "sha256-gHilCG07BXL28vBOaqvKhEQw+9l/AkzZRQxucBTEDos=";
26 };
27
28 nativeBuildInputs = [
29 gettext
30 ];
31
32 nativeCheckInputs = [
33 mock
34 pytestCheckHook
35 ];
36 enabledTestPaths = [ "test.py" ];
37 pythonImportsCheck = [ "bagit" ];
38
39 meta = with lib; {
40 description = "Python library and command line utility for working with BagIt style packages";
41 mainProgram = "bagit.py";
42 homepage = "https://libraryofcongress.github.io/bagit-python/";
43 license = with licenses; [ publicDomain ];
44 maintainers = with maintainers; [ veprbl ];
45 };
46}