1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools-rust,
6 rustPlatform,
7 rustc,
8 cargo,
9 milksnake,
10 cffi,
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "symbolic";
16 version = "12.14.1";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "getsentry";
21 repo = "symbolic";
22 tag = version;
23 hash = "sha256-u3nEYvnt2P+W/0zYctikMgdkalej86eCYhfWj9LW4pU=";
24 # the `py` directory is not included in the tarball, so we fetch the source via git instead
25 forceFetchGit = true;
26 };
27
28 cargoDeps = rustPlatform.fetchCargoVendor {
29 inherit pname version src;
30 hash = "sha256-X8IjmSQD32bougiUFyuk8OOGIzIQgk/TjVM5bgUey5M=";
31 };
32
33 nativeBuildInputs = [
34 setuptools-rust
35 rustPlatform.cargoSetupHook
36 rustc
37 cargo
38 milksnake
39 ];
40
41 dependencies = [ cffi ];
42
43 preBuild = ''
44 cd py
45 '';
46
47 preCheck = ''
48 cd ..
49 '';
50
51 nativeCheckInputs = [ pytestCheckHook ];
52
53 pytestFlagsArray = [ "py" ];
54
55 pythonImportsCheck = [ "symbolic" ];
56
57 meta = {
58 description = "Python library for dealing with symbol files and more";
59 homepage = "https://github.com/getsentry/symbolic";
60 changelog = "https://github.com/getsentry/symbolic/blob/${version}/CHANGELOG.md";
61 license = lib.licenses.mit;
62 maintainers = with lib.maintainers; [ defelo ];
63 };
64}