1{
2 lib,
3 buildPythonPackage,
4 dissect-cstruct,
5 dissect-util,
6 fetchFromGitHub,
7 google-crc32c,
8 python-lzo,
9 pythonOlder,
10 setuptools,
11 setuptools-scm,
12 zstandard,
13}:
14
15buildPythonPackage rec {
16 pname = "dissect-btrfs";
17 version = "1.7";
18 pyproject = true;
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchFromGitHub {
23 owner = "fox-it";
24 repo = "dissect.btrfs";
25 tag = version;
26 hash = "sha256-BREkGrQ1khz+uPahHeMwD0V8JytQY1K/oYa7nxP+bR0=";
27 };
28
29 nativeBuildInputs = [
30 setuptools
31 setuptools-scm
32 ];
33
34 propagatedBuildInputs = [
35 dissect-cstruct
36 dissect-util
37 ];
38
39 optional-dependencies = {
40 full = [
41 python-lzo
42 zstandard
43 ];
44 gcrc32 = [ google-crc32c ];
45 };
46
47 # Issue with the test file handling
48 doCheck = false;
49
50 pythonImportsCheck = [ "dissect.btrfs" ];
51
52 meta = with lib; {
53 description = "Dissect module implementing a parser for the BTRFS file system";
54 homepage = "https://github.com/fox-it/dissect.btrfs";
55 changelog = "https://github.com/fox-it/dissect.btrfs/releases/tag/${src.tag}";
56 license = licenses.agpl3Only;
57 maintainers = with maintainers; [ fab ];
58 };
59}