mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 01:04:25 +00:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
65 lines
1.5 KiB
Nix
65 lines
1.5 KiB
Nix
{ lib
|
|
, stdenv
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, openssl
|
|
|
|
# darwin
|
|
, Security
|
|
, SystemConfiguration
|
|
|
|
# tests
|
|
, firefox-esr-unwrapped
|
|
, firefox-unwrapped
|
|
, thunderbird-unwrapped
|
|
}:
|
|
|
|
let
|
|
pname = "dump_syms";
|
|
version = "2.3.4";
|
|
in
|
|
rustPlatform.buildRustPackage {
|
|
inherit pname version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mozilla";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-6VDuZ5rw2N4z6wOVbaOKO6TNaq8QA5RstsIzmuE3QrI=";
|
|
};
|
|
|
|
cargoHash = "sha256-ndRw5z4CfuX0KNqNgpA4yohG8p/cUR/Op2fIunuO6GM=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
|
|
Security
|
|
SystemConfiguration
|
|
];
|
|
|
|
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"
|
|
];
|
|
|
|
passthru.tests = {
|
|
inherit firefox-esr-unwrapped firefox-unwrapped thunderbird-unwrapped;
|
|
};
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/mozilla/dump_syms/blob/v${version}/CHANGELOG.md";
|
|
description = "Command-line utility for parsing the debugging information the compiler provides in ELF or stand-alone PDB files";
|
|
mainProgram = "dump_syms";
|
|
license = licenses.asl20;
|
|
homepage = "https://github.com/mozilla/dump_syms/";
|
|
maintainers = with maintainers; [ hexa ];
|
|
};
|
|
}
|