1{
2 lib,
3 fetchPypi,
4 buildPythonPackage,
5 aenum,
6 pythonOlder,
7 python,
8}:
9
10buildPythonPackage rec {
11 pname = "dbf";
12 version = "0.99.11";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-IWnAUlLA776JfzRvBoMybsJYVL6rHQxkMN9ukDpXsxU=";
20 };
21
22 # Workaround for https://github.com/ethanfurman/dbf/issues/48
23 patches = lib.optional python.stdenv.hostPlatform.isDarwin ./darwin.patch;
24
25 propagatedBuildInputs = [ aenum ];
26
27 checkPhase = ''
28 runHook preCheck
29 ${python.interpreter} -m dbf.test
30 runHook postCheck
31 '';
32
33 pythonImportsCheck = [ "dbf" ];
34
35 meta = with lib; {
36 description = "Module for reading/writing dBase, FoxPro, and Visual FoxPro .dbf files";
37 homepage = "https://github.com/ethanfurman/dbf";
38 license = licenses.bsd2;
39 maintainers = [ ];
40 };
41}