1{
2 lib,
3 buildPythonPackage,
4 dissect-cstruct,
5 dissect-util,
6 fetchFromGitHub,
7 setuptools,
8 setuptools-scm,
9 pytestCheckHook,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "dissect-shellitem";
15 version = "3.10";
16 pyproject = true;
17
18 disabled = pythonOlder "3.9";
19
20 src = fetchFromGitHub {
21 owner = "fox-it";
22 repo = "dissect.shellitem";
23 tag = version;
24 hash = "sha256-BS+c9QbMMsaoZHyuv6jMxbQFQNJeLt3da8Fq/wwXesQ=";
25 };
26
27 build-system = [
28 setuptools
29 setuptools-scm
30 ];
31
32 dependencies = [
33 dissect-cstruct
34 dissect-util
35 ];
36
37 nativeCheckInputs = [ pytestCheckHook ];
38
39 pythonImportsCheck = [ "dissect.shellitem" ];
40
41 disabledTests = [
42 # Windows-specific tests
43 "test_xp_remote_lnk_file"
44 "test_xp_remote_lnk_dir"
45 "test_win7_local_lnk_dir"
46 ];
47
48 meta = with lib; {
49 description = "Dissect module implementing a parser for the Shellitem structures";
50 homepage = "https://github.com/fox-it/dissect.shellitem";
51 changelog = "https://github.com/fox-it/dissect.shellitem/releases/tag/${version}";
52 license = licenses.agpl3Only;
53 maintainers = with maintainers; [ fab ];
54 mainProgram = "parse-lnk";
55 };
56}