1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 toml,
7 functiontrace-server,
8}:
9
10buildPythonPackage rec {
11 pname = "functiontrace";
12 version = "0.5.1";
13 format = "pyproject";
14
15 src = fetchPypi {
16 inherit pname version;
17 hash = "sha256-yRzcg8BDuwF74J2EYa/3GMkTaRGsx0WyDIQEWHwj12M=";
18 };
19
20 nativeBuildInputs = [
21 setuptools
22 toml
23 ];
24
25 pythonImportsCheck = [ "functiontrace" ];
26
27 # `functiontrace` needs `functiontrace-server` in its path.
28 # Technically we also need this when running via a Python import, such as for
29 # `python3 -m functiontrace`, but that's a less common use-case.
30 postFixup = ''
31 wrapProgram $out/bin/functiontrace \
32 --prefix PATH : ${lib.makeBinPath [ functiontrace-server ]}
33 '';
34
35 meta = with lib; {
36 homepage = "https://functiontrace.com";
37 description = "Python module for Functiontrace";
38 license = licenses.prosperity30;
39 maintainers = with maintainers; [
40 mathiassven
41 tehmatt
42 ];
43 };
44}