at 23.05-pre 34 lines 1.1 kB view raw
1{ rustPlatform, fetchFromGitHub, rust, lib, stdenv }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "rustc-demangle"; 5 version = "0.1.20"; 6 7 src = fetchFromGitHub { 8 owner = "alexcrichton"; 9 repo = pname; 10 rev = version; 11 sha256 = "sha256-elxclyuLmr3N66s+pR4/6OU98k1oXI2wKVJtzWPY8FI="; 12 }; 13 14 cargoPatches = [ 15 # generated using `cargo generate-lockfile` since repo is missing lockfile 16 ./add-Cargo.lock.patch 17 ]; 18 cargoSha256 = "sha256-1tW5TOap5MstxTXAFij3IB8TIpI+FryEX9TXlVXjRl4="; 19 cargoBuildFlags = [ "-p" "rustc-demangle-capi" ]; 20 postInstall = '' 21 mkdir -p $out/lib 22 cp target/${rust.toRustTargetSpec stdenv.hostPlatform}/release/librustc_demangle.so $out/lib 23 cp -R crates/capi/include $out 24 ''; 25 26 meta = with lib; { 27 description = "Rust symbol demangling"; 28 homepage = "https://github.com/alexcrichton/rustc-demangle"; 29 license = with licenses; [ asl20 mit ]; 30 # upstream supports other platforms, but maintainer can only test on linux 31 platforms = platforms.linux; 32 maintainers = with maintainers; [ _1000teslas ]; 33 }; 34}