at master 1.1 kB view raw
1{ 2 lib, 3 astunparse, 4 buildPythonPackage, 5 distutils, 6 fetchFromGitHub, 7 flit-core, 8 pytestCheckHook, 9 pythonOlder, 10 torch, 11 torchvision, 12}: 13 14buildPythonPackage rec { 15 pname = "fickling"; 16 version = "0.1.3"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "trailofbits"; 23 repo = "fickling"; 24 tag = "v${version}"; 25 hash = "sha256-/cV1XhJ8KMFby9nZ/qXEYxf+P6352Q2DZOLuvebyuHQ="; 26 }; 27 28 build-system = [ 29 distutils 30 flit-core 31 ]; 32 33 dependencies = [ astunparse ]; 34 35 optional-dependencies = { 36 torch = [ 37 torch 38 torchvision 39 ]; 40 }; 41 42 nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (builtins.attrValues optional-dependencies); 43 44 pythonImportsCheck = [ "fickling" ]; 45 46 meta = with lib; { 47 description = "Python pickling decompiler and static analyzer"; 48 homepage = "https://github.com/trailofbits/fickling"; 49 changelog = "https://github.com/trailofbits/fickling/releases/tag/v${version}"; 50 license = licenses.lgpl3Plus; 51 maintainers = with maintainers; [ ]; 52 }; 53}