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