depot/third_party/nixpkgs/pkgs/development/python-modules/fickling/default.nix
Default email 7e47f3658e Project import generated by Copybara.
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
2024-09-26 11:04:55 +00:00

53 lines
1.1 KiB
Nix

{
lib,
astunparse,
buildPythonPackage,
distutils,
fetchFromGitHub,
flit-core,
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; [ ];
};
}