1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, gettext
5, mock
6, pytestCheckHook
7, setuptools-scm
8}:
9
10buildPythonPackage rec {
11 pname = "bagit";
12 version = "1.8.1";
13
14 src = fetchFromGitHub {
15 owner = "LibraryOfCongress";
16 repo = "bagit-python";
17 rev = "v${version}";
18 hash = "sha256-t01P7MPWgOrktuW2zF0TIzt6u/jkLmrpD2OnqawhJaI=";
19 };
20
21 nativeBuildInputs = [ gettext setuptools-scm ];
22
23 SETUPTOOLS_SCM_PRETEND_VERSION = version;
24
25 checkInputs = [
26 mock
27 pytestCheckHook
28 ];
29 pytestFlagsArray = [ "test.py" ];
30 pythonImportsCheck = [ "bagit" ];
31
32 meta = with lib; {
33 description = "Python library and command line utility for working with BagIt style packages";
34 homepage = "https://libraryofcongress.github.io/bagit-python/";
35 license = with licenses; [ publicDomain ];
36 maintainers = with maintainers; [ veprbl ];
37 };
38}