Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
lib,
|
|
stdenv,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "rustc-demangle";
|
|
version = "0.1.26";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rust-lang";
|
|
repo = "rustc-demangle";
|
|
tag = "rustc-demangle-v${version}";
|
|
hash = "sha256-4/x3kUIKi3xnDRznr+6xmPeWHmhlpbuwSNH3Ej6+Ifc=";
|
|
};
|
|
|
|
cargoLock = {
|
|
# generated using `cargo generate-lockfile` since repo is missing lockfile
|
|
lockFile = ./Cargo.lock;
|
|
};
|
|
|
|
cargoBuildFlags = [
|
|
"-p"
|
|
"rustc-demangle-capi"
|
|
];
|
|
|
|
postPatch = ''
|
|
ln -s ${./Cargo.lock} Cargo.lock
|
|
'';
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/lib
|
|
cp target/${stdenv.hostPlatform.rust.rustcTargetSpec}/release/librustc_demangle${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib
|
|
cp -R crates/capi/include $out
|
|
'';
|
|
|
|
meta = {
|
|
description = "Rust symbol demangling";
|
|
homepage = "https://github.com/rust-lang/rustc-demangle";
|
|
license = with lib.licenses; [
|
|
asl20
|
|
mit
|
|
];
|
|
platforms = lib.platforms.unix;
|
|
maintainers = with lib.maintainers; [ _1000teslas ];
|
|
};
|
|
}
|