Skip to content

Commit 465d5a5

Browse files
authored
Merge pull request #283939 from fabaff/dissect-target-fix
python311Packages.dissect-target: relax flow-record
2 parents 1c4593f + 1f4fea5 commit 465d5a5

File tree

7 files changed

+160
-14
lines changed

7 files changed

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

pkgs/development/python-modules/dissect-clfs/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
buildPythonPackage rec {
1212
pname = "dissect-clfs";
1313
version = "1.6";
14-
format = "pyproject";
14+
pyproject = true;
1515

16-
disabled = pythonOlder "3.7";
16+
disabled = pythonOlder "3.9";
1717

1818
src = fetchFromGitHub {
1919
owner = "fox-it";
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{ lib
2+
, buildPythonPackage
3+
, dissect-cstruct
4+
, dissect-util
5+
, fetchFromGitHub
6+
, pythonOlder
7+
, setuptools
8+
, setuptools-scm
9+
}:
10+
11+
buildPythonPackage rec {
12+
pname = "dissect-jffs";
13+
version = "1.0";
14+
pyproject = true;
15+
16+
disabled = pythonOlder "3.9";
17+
18+
src = fetchFromGitHub {
19+
owner = "fox-it";
20+
repo = "dissect.jffs";
21+
rev = "refs/tags/${version}";
22+
hash = "sha256-Rj8/WRHNl2IQ6zwvLhqEIEMzk8BH1fv7KQkw1NzoDjI=";
23+
};
24+
25+
nativeBuildInputs = [
26+
setuptools
27+
setuptools-scm
28+
];
29+
30+
propagatedBuildInputs = [
31+
dissect-cstruct
32+
dissect-util
33+
];
34+
35+
# Test file handling fails
36+
doCheck = true;
37+
38+
pythonImportsCheck = [
39+
"dissect.jffs"
40+
];
41+
42+
meta = with lib; {
43+
description = "Dissect module implementing a parser for the JFFS2 file system";
44+
homepage = "https://github.com/fox-it/dissect.jffs";
45+
changelog = "https://github.com/fox-it/dissect.jffs/releases/tag/${version}";
46+
license = licenses.agpl3Only;
47+
maintainers = with maintainers; [ fab ];
48+
};
49+
}

pkgs/development/python-modules/dissect-target/default.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ buildPythonPackage rec {
5151
hash = "sha256-vp1upVwohMXFKxlHy5lWmigdq9MUk1UknSsPpCXt50s=";
5252
};
5353

54+
postPatch = ''
55+
substituteInPlace pyproject.toml \
56+
--replace "flow.record~=" "flow.record>="
57+
'';
58+
5459
nativeBuildInputs = [
5560
setuptools
5661
setuptools-scm

pkgs/development/python-modules/dissect/default.nix

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{ lib
22
, buildPythonPackage
3+
, dissect-btrfs
34
, dissect-cim
45
, dissect-clfs
56
, dissect-cobaltstrike
@@ -8,11 +9,12 @@
89
, dissect-etl
910
, dissect-eventlog
1011
, dissect-evidence
12+
, dissect-executable
1113
, dissect-extfs
1214
, dissect-fat
1315
, dissect-ffs
14-
, dissect-executable
1516
, dissect-hypervisor
17+
, dissect-jffs
1618
, dissect-ntfs
1719
, dissect-ole
1820
, dissect-regf
@@ -26,14 +28,15 @@
2628
, dissect-xfs
2729
, fetchFromGitHub
2830
, pythonOlder
31+
, pythonRelaxDepsHook
2932
, setuptools
3033
, setuptools-scm
3134
}:
3235

3336
buildPythonPackage rec {
3437
pname = "dissect";
3538
version = "3.11";
36-
format = "pyproject";
39+
pyproject = true;
3740

3841
disabled = pythonOlder "3.9";
3942

@@ -44,12 +47,16 @@ buildPythonPackage rec {
4447
hash = "sha256-6y+p+Ulc1Viu5s1AL/ecVtO4YRnmem/ZleY8xC4CJrU=";
4548
};
4649

50+
pythonRelaxDeps = true;
51+
4752
nativeBuildInputs = [
53+
pythonRelaxDepsHook
4854
setuptools
4955
setuptools-scm
5056
];
5157

5258
propagatedBuildInputs = [
59+
dissect-btrfs
5360
dissect-cim
5461
dissect-clfs
5562
dissect-cobaltstrike
@@ -63,6 +70,7 @@ buildPythonPackage rec {
6370
dissect-fat
6471
dissect-ffs
6572
dissect-hypervisor
73+
dissect-jffs
6674
dissect-ntfs
6775
dissect-ole
6876
dissect-regf
Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,50 @@
1-
{ lib, fetchPypi, buildPythonPackage, lzo, pytestCheckHook, setuptools, wheel }:
1+
{ lib
2+
, buildPythonPackage
3+
, fetchFromGitHub
4+
, lzo
5+
, pytestCheckHook
6+
, pythonOlder
7+
, setuptools
8+
, wheel
9+
}:
210

311
buildPythonPackage rec {
412
pname = "python-lzo";
5-
version = "1.15";
6-
format = "pyproject";
13+
version = "1.16";
14+
pyproject = true;
715

8-
src = fetchPypi {
9-
inherit pname version;
10-
hash = "sha256-pXqqAMXDoFFd2fdCa6LPYBdn3BncAj2LmdShOwoye0k=";
16+
disabled = pythonOlder "3.9";
17+
18+
src = fetchFromGitHub {
19+
owner = "jd-boyd";
20+
repo = "python-lzo";
21+
rev = "refs/tags/v${version}";
22+
hash = "sha256-iXAvOCzHPvNERMkE5y4QTHi4ZieW1wrYWYScs7zyb2c=";
1123
};
1224

25+
1326
nativeBuildInputs = [
1427
setuptools
1528
wheel
1629
];
1730

18-
buildInputs = [ lzo ];
31+
buildInputs = [
32+
lzo
33+
];
1934

20-
nativeCheckInputs = [ pytestCheckHook ];
35+
nativeCheckInputs = [
36+
pytestCheckHook
37+
];
2138

2239
pythonImportsCheck = [
2340
"lzo"
2441
];
2542

2643
meta = with lib; {
27-
homepage = "https://github.com/jd-boyd/python-lzo";
2844
description = "Python bindings for the LZO data compression library";
45+
homepage = "https://github.com/jd-boyd/python-lzo";
46+
changelog = "https://github.com/jd-boyd/python-lzo/releases/tag/v${version}";
2947
license = licenses.gpl2Only;
30-
maintainers = [ maintainers.jbedo ];
48+
maintainers = with maintainers; [ jbedo ];
3149
};
3250
}

pkgs/top-level/python-packages.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2904,6 +2904,8 @@ self: super: with self; {
29042904

29052905
dissect = callPackage ../development/python-modules/dissect { };
29062906

2907+
dissect-btrfs = callPackage ../development/python-modules/dissect-btrfs { };
2908+
29072909
dissect-cim = callPackage ../development/python-modules/dissect-cim { };
29082910

29092911
dissect-clfs = callPackage ../development/python-modules/dissect-clfs { };
@@ -2930,6 +2932,8 @@ self: super: with self; {
29302932

29312933
dissect-hypervisor = callPackage ../development/python-modules/dissect-hypervisor { };
29322934

2935+
dissect-jffs = callPackage ../development/python-modules/dissect-jffs { };
2936+
29332937
dissect-ntfs = callPackage ../development/python-modules/dissect-ntfs { };
29342938

29352939
dissect-ole = callPackage ../development/python-modules/dissect-ole { };

0 commit comments

Comments
 (0)