68 lines
1.4 KiB
Nix
68 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
setuptools-rust,
|
|
rustPlatform,
|
|
rustc,
|
|
cargo,
|
|
milksnake,
|
|
cffi,
|
|
pytestCheckHook,
|
|
nix-update-script,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "symbolic";
|
|
version = "12.16.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "getsentry";
|
|
repo = "symbolic";
|
|
tag = version;
|
|
# the `py` directory is not included in the tarball, so we fetch the source via git instead
|
|
forceFetchGit = true;
|
|
hash = "sha256-1auaIvm9y6iIhRC+mU6PX7vsPok0CDVJHLd4nx5j5wU=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit pname version src;
|
|
hash = "sha256-uHRgV+wcdOsFqcYBMCJqy4CADN8XpXeKuVAsjI54Y9I=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools-rust
|
|
rustPlatform.cargoSetupHook
|
|
rustc
|
|
cargo
|
|
milksnake
|
|
];
|
|
|
|
dependencies = [ cffi ];
|
|
|
|
preBuild = ''
|
|
cd py
|
|
'';
|
|
|
|
preCheck = ''
|
|
cd ..
|
|
'';
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
enabledTestPaths = [ "py" ];
|
|
|
|
pythonImportsCheck = [ "symbolic" ];
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Python library for dealing with symbol files and more";
|
|
homepage = "https://github.com/getsentry/symbolic";
|
|
changelog = "https://github.com/getsentry/symbolic/blob/${version}/CHANGELOG.md";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ defelo ];
|
|
};
|
|
}
|