diff --git a/pkgs/development/python-modules/fickling/default.nix b/pkgs/development/python-modules/fickling/default.nix new file mode 100644 index 000000000000..a5de0d913a2c --- /dev/null +++ b/pkgs/development/python-modules/fickling/default.nix @@ -0,0 +1,55 @@ +{ + lib, + astunparse, + buildPythonPackage, + distutils, + fetchFromGitHub, + fickling, + flit-core, + numpy, + pytestCheckHook, + pythonOlder, + torch, + torchvision, +}: + +buildPythonPackage rec { + pname = "fickling"; + version = "0.1.3"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "trailofbits"; + repo = "fickling"; + rev = "refs/tags/v${version}"; + hash = "sha256-/cV1XhJ8KMFby9nZ/qXEYxf+P6352Q2DZOLuvebyuHQ="; + }; + + build-system = [ + distutils + flit-core + ]; + + dependencies = [ astunparse ]; + + optional-dependencies = { + torch = [ + torch + torchvision + ]; + }; + + nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (builtins.attrValues optional-dependencies); + + pythonImportsCheck = [ "fickling" ]; + + meta = with lib; { + description = "A Python pickling decompiler and static analyzer"; + homepage = "https://github.com/trailofbits/fickling"; + changelog = "https://github.com/trailofbits/fickling/releases/tag/v${version}"; + license = licenses.lgpl3Plus; + maintainers = with maintainers; [ ]; + }; +} diff --git a/pkgs/development/python-modules/graphtage/default.nix b/pkgs/development/python-modules/graphtage/default.nix index 7ecdeb1adf84..5b3f70dcc1f3 100644 --- a/pkgs/development/python-modules/graphtage/default.nix +++ b/pkgs/development/python-modules/graphtage/default.nix @@ -1,14 +1,17 @@ { lib, buildPythonPackage, - fetchFromGitHub, - pytestCheckHook, - pythonOlder, colorama, + distutils, + fetchFromGitHub, + fickling, intervaltree, json5, + pytestCheckHook, + pythonOlder, pyyaml, scipy, + setuptools, tqdm, typing-extensions, }: @@ -16,24 +19,27 @@ buildPythonPackage rec { pname = "graphtage"; version = "0.3.1"; - format = "setuptools"; + pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "trailofbits"; - repo = pname; + repo = "graphtage"; rev = "refs/tags/v${version}"; hash = "sha256-Bz2T8tVdVOdXt23yPITkDNL46Y5LZPhY3SXZ5bF3CHw="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace "json5==0.9.5" "json5>=0.9.5" - ''; + pythonRelaxDeps = [ "json5" ]; - propagatedBuildInputs = [ + build-system = [ + distutils + setuptools + ]; + + dependencies = [ colorama + fickling intervaltree json5 pyyaml @@ -48,10 +54,10 @@ buildPythonPackage rec { meta = with lib; { description = "Utility to diff tree-like files such as JSON and XML"; - mainProgram = "graphtage"; homepage = "https://github.com/trailofbits/graphtage"; changelog = "https://github.com/trailofbits/graphtage/releases/tag/v${version}"; license = licenses.lgpl3Plus; maintainers = with maintainers; [ veehaitch ]; + mainProgram = "graphtage"; }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 65ee3f4163f0..b34b7abd25e7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4358,6 +4358,8 @@ self: super: with self; { fiblary3-fork = callPackage ../development/python-modules/fiblary3-fork { }; + fickling = callPackage ../development/python-modules/fickling { }; + fido2 = callPackage ../development/python-modules/fido2 { }; fields = callPackage ../development/python-modules/fields { };