nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 61 lines 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 hatchling, 7 numpy, 8 pytestCheckHook, 9 stdlib-list, 10 torch, 11 torchvision, 12}: 13 14buildPythonPackage (finalAttrs: { 15 pname = "fickling"; 16 version = "0.1.7"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "trailofbits"; 21 repo = "fickling"; 22 tag = "v${finalAttrs.version}"; 23 hash = "sha256-uirVOJ6CI7gBu9lOoPtpjUZeBmIhBMI0tjSDI/ASy7w="; 24 }; 25 26 build-system = [ 27 hatchling 28 ]; 29 30 dependencies = [ 31 stdlib-list 32 ]; 33 34 pythonRelaxDeps = [ "stdlib-list" ]; 35 36 optional-dependencies = { 37 torch = [ 38 numpy 39 torch 40 torchvision 41 ]; 42 }; 43 44 nativeCheckInputs = [ 45 pytestCheckHook 46 ] 47 ++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies; 48 49 # Tests fail upstream in pytorch under python 3.14 50 doCheck = pythonOlder "3.14"; 51 52 pythonImportsCheck = [ "fickling" ]; 53 54 meta = { 55 description = "Python pickling decompiler and static analyzer"; 56 homepage = "https://github.com/trailofbits/fickling"; 57 changelog = "https://github.com/trailofbits/fickling/releases/tag/${finalAttrs.src.tag}"; 58 license = lib.licenses.lgpl3Plus; 59 maintainers = with lib.maintainers; [ sarahec ]; 60 }; 61})