Skip to content

Commit 160d866

Browse files
authored
python3Package.depyf: init at 0.18.0 (NixOS#379198)
2 parents 15b06f8 + d4e655c commit 160d866

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchPypi,
5+
astor,
6+
dill,
7+
filelock,
8+
}:
9+
10+
buildPythonPackage rec {
11+
pname = "depyf";
12+
version = "0.18.0";
13+
14+
src = fetchPypi {
15+
inherit pname version;
16+
hash = "sha256-uZ8MODvpSa5F1dYG/kRMcfN1tVpXuNayDnhWZw1SEw0=";
17+
};
18+
19+
# don't try to read git commit
20+
postPatch = ''
21+
substituteInPlace setup.py \
22+
--replace-fail 'commit_id = get_git_commit_id()' 'commit_id = None'
23+
'';
24+
25+
propagatedBuildInputs = [
26+
astor
27+
dill
28+
filelock
29+
];
30+
31+
pythonImportCheck = [ "depyf" ];
32+
33+
meta = with lib; {
34+
description = "Decompile python functions, from bytecode to source code";
35+
homepage = "https://github.com/thuml/depyf";
36+
license = licenses.mit;
37+
};
38+
}

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3214,6 +3214,8 @@ self: super: with self; {
32143214

32153215
deprecation-alias = callPackage ../development/python-modules/deprecation-alias { };
32163216

3217+
depyf = callPackage ../development/python-modules/depyf { };
3218+
32173219
derpconf = callPackage ../development/python-modules/derpconf { };
32183220

32193221
desktop-entry-lib = callPackage ../development/python-modules/desktop-entry-lib { };

0 commit comments

Comments
 (0)