diff --git a/pkgs/by-name/un/unblob/package.nix b/pkgs/by-name/un/unblob/package.nix index fd682ee27366..47a22f5b1761 100644 --- a/pkgs/by-name/un/unblob/package.nix +++ b/pkgs/by-name/un/unblob/package.nix @@ -1,10 +1,14 @@ { lib, + libiconv, python3, fetchFromGitHub, gitUpdater, makeWrapper, + rustPlatform, + stdenvNoCC, e2fsprogs, + erofs-utils, jefferson, lz4, lziprecover, @@ -23,6 +27,7 @@ let # These dependencies are only added to PATH runtimeDeps = [ e2fsprogs + erofs-utils jefferson lziprecover lzop @@ -38,7 +43,7 @@ let in python3.pkgs.buildPythonApplication rec { pname = "unblob"; - version = "25.1.8"; + version = "25.4.14"; pyproject = true; disabled = python3.pkgs.pythonOlder "3.9"; @@ -46,15 +51,22 @@ python3.pkgs.buildPythonApplication rec { owner = "onekey-sec"; repo = "unblob"; tag = version; - hash = "sha256-PGpJPAo9q52gQ3EGusYtDA2e0MG5kFClqCYPB2DvuMs="; + hash = "sha256-kWZGQX8uSKdFW+uauunHcruXhJ5XpBfyDY7gPyWGK90="; forceFetchGit = true; fetchLFS = true; }; + cargoDeps = rustPlatform.fetchCargoVendor { + inherit pname version src; + hash = "sha256-lGsDax7+CUACeYChDqdPsVbKE/hH94CPek6UBVz1eqs="; + }; + strictDeps = true; build-system = with python3.pkgs; [ poetry-core ]; + buildInputs = lib.optionals stdenvNoCC.hostPlatform.isDarwin [ libiconv ]; + dependencies = with python3.pkgs; [ arpy attrs @@ -69,15 +81,17 @@ python3.pkgs.buildPythonApplication rec { pyfatfs pyperscan python-magic + pyzstd rarfile rich structlog treelib - unblob-native ]; - nativeBuildInputs = [ + nativeBuildInputs = with rustPlatform; [ makeWrapper + maturinBuildHook + cargoSetupHook ]; # These are runtime-only CLI dependencies, which are used through @@ -87,7 +101,7 @@ python3.pkgs.buildPythonApplication rec { "ubi-reader" ]; - pythonRelaxDeps = [ "rich" ]; + pythonRelaxDeps = [ "lz4" ]; pythonImportsCheck = [ "unblob" ]; @@ -112,13 +126,6 @@ python3.pkgs.buildPythonApplication rec { disabled = [ # https://github.com/tytso/e2fsprogs/issues/152 "test_all_handlers[filesystem.extfs]" - - # Should be dropped after upgrading to next version - # Needs https://github.com/onekey-sec/unblob/pull/1128/commits/c6af67f0c6f32fa01d7abbf495eb0293e9184438 - # Unfortunately patches touching LFS stored assets cannot be applied - "test_all_handlers[filesystem.ubi.ubi]" - "test_all_handlers[archive.dlink.encrpted_img]" - "test_all_handlers[archive.dlink.shrs]" ]; in [ diff --git a/pkgs/development/python-modules/unblob-native/default.nix b/pkgs/development/python-modules/unblob-native/default.nix deleted file mode 100644 index ac1f7035ac31..000000000000 --- a/pkgs/development/python-modules/unblob-native/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - lib, - stdenvNoCC, - buildPythonPackage, - fetchFromGitHub, - nix-update-script, - rustPlatform, - libiconv, -}: - -buildPythonPackage rec { - pname = "unblob-native"; - version = "0.1.6"; - pyproject = true; - - src = fetchFromGitHub { - owner = "onekey-sec"; - repo = "unblob-native"; - tag = "v${version}"; - hash = "sha256-11eMU7eplvZS1OS34fhbD8g1dOwOUCc8Xk1dEZI8dyU="; - }; - - cargoDeps = rustPlatform.fetchCargoVendor { - inherit pname version src; - hash = "sha256-NjyxAZH4A46llIjEQO0X+IiwpS74RPY9wLujsDr7OxA="; - }; - - nativeBuildInputs = with rustPlatform; [ - maturinBuildHook - cargoSetupHook - ]; - - buildInputs = lib.optionals stdenvNoCC.hostPlatform.isDarwin [ libiconv ]; - - pythonImportsCheck = [ "unblob_native" ]; - - passthru.updateScript = nix-update-script { }; - - meta = { - description = "Performance sensitive parts of Unblob"; - homepage = "https://unblob.org"; - license = lib.licenses.mit; - platforms = lib.platforms.unix; - maintainers = with lib.maintainers; [ vlaci ]; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index ba96df2c36e6..4d1a941a6b64 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -772,6 +772,7 @@ mapAliases ({ types-paramiko = throw "types-paramiko has been removed because it was unused."; # added 2022-05-30 ufoLib2 = ufolib2; # added 2024-01-07 ukrainealarm = throw "ukrainealarm has been removed, as it has been replaced as a home-assistant dependency by uasiren."; # added 2024-01-05 + unblob-native = throw "unblob-native has been removed because its functionality is merged into unblob 25.4.14."; # Added 2025-05-02 unittest2 = throw "unittest2 has been removed as it's a backport of unittest that's unmaintained and not needed beyond Python 3.4."; # added 2022-12-01 update_checker = update-checker; # added 2024-01-07 uproot3 = throw "uproot3 has been removed, use uproot instead"; # added 2022-12-13 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 464cfed57f71..3b8d08e16e47 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -18367,8 +18367,6 @@ self: super: with self; { unasync = callPackage ../development/python-modules/unasync { }; - unblob-native = callPackage ../development/python-modules/unblob-native { }; - uncertainties = callPackage ../development/python-modules/uncertainties { }; uncompyle6 = callPackage ../development/python-modules/uncompyle6 { };