Skip to content

Commit 78adb2f

Browse files
authored
Merge pull request #578 from onekey-sec/ugrade-jefferson
chore(deps): upgrade jefferson to 0.4.3
2 parents 065aaf7 + 11a074f commit 78adb2f

File tree

7 files changed

+151
-41
lines changed

7 files changed

+151
-41
lines changed

flake.lock

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/jefferson/default.nix

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{ lib
2+
, buildPythonPackage
3+
, fetchPypi
4+
, python3
5+
, click
6+
, cstruct
7+
, lzallright
8+
}:
9+
10+
buildPythonPackage rec {
11+
pname = "jefferson";
12+
version = "0.4.4";
13+
format = "pyproject";
14+
15+
src = fetchPypi {
16+
inherit pname version;
17+
sha256 = "sha256-RHEXbKRQWTyPWIzSRLwW82u/TsDgiL7L5o+cUWgLLk0=";
18+
};
19+
20+
nativeBuildInputs = with python3.pkgs; [
21+
poetry-core
22+
];
23+
24+
propagatedBuildInputs = [
25+
click
26+
cstruct
27+
lzallright
28+
];
29+
30+
pythonImportsCheck = [ "jefferson" ];
31+
32+
}

nix/lzallright/default.nix

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{ lib
2+
, stdenv
3+
, buildPythonPackage
4+
, callPackage
5+
, fetchFromGitHub
6+
, rustPlatform
7+
, libiconv
8+
}:
9+
10+
buildPythonPackage rec {
11+
pname = "lzallright";
12+
version = "0.2.2";
13+
14+
src = fetchFromGitHub {
15+
owner = "vlaci";
16+
repo = pname;
17+
rev = "v${version}";
18+
sha256 = "sha256-MOTIUC/G92tB2ZOp3OzgKq3d9zGN6bfv83vXOK3deFI=";
19+
};
20+
21+
cargoDeps = rustPlatform.fetchCargoTarball {
22+
inherit src;
23+
name = "${pname}-${version}";
24+
hash = "sha256-WSwIKJBtyorKg7hZgxwPd/ORujjyY0x/1R+TBbIxyWQ=";
25+
};
26+
27+
format = "pyproject";
28+
29+
nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ];
30+
31+
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
32+
33+
pythonImportsCheck = [ "lzallright" ];
34+
35+
doCheck = false;
36+
37+
passthru.tests = {
38+
pytest = callPackage ./tests.nix { };
39+
};
40+
41+
}

nix/python/default.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ let
77
pyperscan = pyperscan.packages.${system}.default.vectorscan;
88
unblob-native = unblob-native.packages.${system}.default;
99
treelib = final.callPackage ../treelib { };
10+
lzallright = final.callPackage ../lzallright { };
11+
ubi_reader = final.callPackage ../ubi_reader { };
12+
jefferson = final.callPackage ../jefferson { };
1013
};
1114
};
1215
in

nix/ubi_reader/default.nix

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{ lib
2+
, buildPythonPackage
3+
, fetchPypi
4+
, python3
5+
, lzallright
6+
}:
7+
8+
buildPythonPackage rec {
9+
pname = "ubi_reader";
10+
version = "0.8.9";
11+
format = "pyproject";
12+
13+
src = fetchPypi {
14+
inherit pname version;
15+
sha256 = "sha256-b6Jp8xB6jie35F/oLEea1RF+F8J64AiiQE3/ufwu1mE=";
16+
};
17+
18+
nativeBuildInputs = with python3.pkgs; [ poetry-core ];
19+
propagatedBuildInputs = with python3.pkgs; [ lzallright ];
20+
21+
}

poetry.lock

Lines changed: 33 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ attrs = "^22.2.0"
1616
structlog = "^21.2.0"
1717
arpy = "^2.2.0"
1818
rarfile = "^4.0"
19-
ubi-reader = "^0.8.5"
19+
ubi-reader = "^0.8.9"
2020
plotext = ">=4.2.0,<6.0"
2121
pluggy = "^1.0.0"
2222
python-magic = "^0.4.27"
2323
pyperscan = "^0.2.2"
2424
lark = "^1.1.2"
2525
lz4 = "^4.0.0"
2626
lief = "^0.12.3"
27-
jefferson = "^0.4.2"
2827
cryptography = ">=39.0,<41.0"
2928
treelib = "^1.6.1"
3029
unblob-native = "^0.1.0"
30+
jefferson = "^0.4.3"
3131

3232
[tool.poetry.group.dev]
3333
optional = true

0 commit comments

Comments
 (0)