2022-05-11 21:38:15 +00:00
|
|
|
{ lib
|
2022-05-17 12:40:13 +00:00
|
|
|
, stdenv
|
2022-05-11 21:38:15 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
2022-05-17 12:40:13 +00:00
|
|
|
|
|
|
|
# darwin
|
|
|
|
, Security
|
2022-11-18 21:25:52 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
, firefox-esr-unwrapped
|
|
|
|
, firefox-unwrapped
|
|
|
|
, thunderbird-unwrapped
|
2022-05-11 21:38:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "dump_syms";
|
2023-09-13 15:40:05 +00:00
|
|
|
version = "2.2.2";
|
2022-05-11 21:38:15 +00:00
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mozilla";
|
|
|
|
repo = pname;
|
2022-05-24 20:31:00 +00:00
|
|
|
rev = "v${version}";
|
2023-09-13 15:40:05 +00:00
|
|
|
hash = "sha256-8kyicTtY7h1CDM4UGOHsppRRTraU6JLe24MKtoduiz0=";
|
2022-05-11 21:38:15 +00:00
|
|
|
};
|
|
|
|
|
2023-09-13 15:40:05 +00:00
|
|
|
cargoSha256 = "sha256-5WiGckh/jq7AHH3JWZL8tIsj1Gqr8iLX7IyppKsW96k=";
|
2022-05-11 21:38:15 +00:00
|
|
|
|
2023-12-11 18:26:17 +00:00
|
|
|
# Workaround for https://github.com/nixos/nixpkgs/issues/166205
|
|
|
|
env = lib.optionalAttrs stdenv.cc.isClang {
|
|
|
|
NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
|
|
|
|
};
|
|
|
|
|
2022-05-11 21:38:15 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
2022-05-17 12:40:13 +00:00
|
|
|
] ++ lib.optionals (stdenv.isDarwin) [
|
|
|
|
Security
|
2022-05-11 21:38:15 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkFlags = [
|
|
|
|
# Disable tests that require network access
|
|
|
|
# ConnectError("dns error", Custom { kind: Uncategorized, error: "failed to lookup address information: Temporary failure in name resolution" })) }', src/windows/pdb.rs:725:56
|
|
|
|
"--skip windows::pdb::tests::test_ntdll"
|
|
|
|
"--skip windows::pdb::tests::test_oleaut32"
|
|
|
|
];
|
|
|
|
|
2022-11-18 21:25:52 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit firefox-esr-unwrapped firefox-unwrapped thunderbird-unwrapped;
|
|
|
|
};
|
|
|
|
|
2022-05-11 21:38:15 +00:00
|
|
|
meta = with lib; {
|
|
|
|
changelog = "https://github.com/mozilla/dump_syms/releases/tag/v${version}";
|
|
|
|
description = "Command-line utility for parsing the debugging information the compiler provides in ELF or stand-alone PDB files";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = "https://github.com/mozilla/dump_syms/";
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|