mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
python312Packages.graphtage: refactor (#339785)
This commit is contained in:
commit
de8e3a03ab
55
pkgs/development/python-modules/fickling/default.nix
Normal file
55
pkgs/development/python-modules/fickling/default.nix
Normal file
@ -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; [ ];
|
||||
};
|
||||
}
|
@ -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";
|
||||
};
|
||||
}
|
||||
|
@ -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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user