mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 09:33:41 +00:00
28efedc639
Add the SystemConfiguration framework as a `buildInput`. Otherwise, symbolicator fails to link on Darwin.
67 lines
1.5 KiB
Nix
67 lines
1.5 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, bzip2
|
|
, openssl
|
|
, zstd
|
|
, stdenv
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "symbolicator";
|
|
version = "23.11.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "getsentry";
|
|
repo = "symbolicator";
|
|
rev = version;
|
|
hash = "sha256-pPzm57ZtsLLD7P0xIi+egKcQ3dcOGH6JV+C9u4uGGRM=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
outputHashes = {
|
|
"cpp_demangle-0.4.1" = "sha256-9QopX2TOJc8bZ+UlSOFdjoe8NTJLVGrykyFL732tE3A=";
|
|
"reqwest-0.11.22" = "sha256-0IPpirvQSpwaF3bc5jh67UdJtKen3uumNgz5L4iqmYg=";
|
|
};
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
rustPlatform.bindgenHook
|
|
];
|
|
|
|
buildInputs = [
|
|
bzip2
|
|
openssl
|
|
zstd
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
darwin.apple_sdk.frameworks.Security
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
|
];
|
|
|
|
env = {
|
|
SYMBOLICATOR_GIT_VERSION = src.rev;
|
|
SYMBOLICATOR_RELEASE = version;
|
|
ZSTD_SYS_USE_PKG_CONFIG = true;
|
|
} // lib.optionalAttrs stdenv.cc.isClang {
|
|
# Work around https://github.com/NixOS/nixpkgs/issues/166205.
|
|
NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
|
|
};
|
|
|
|
# tests require network access
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
description = "Native Symbolication as a Service";
|
|
homepage = "https://getsentry.github.io/symbolicator/";
|
|
changelog = "https://github.com/getsentry/symbolicator/blob/${src.rev}/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ figsoda ];
|
|
mainProgram = "symbolicator";
|
|
};
|
|
}
|