nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 49 lines 1.1 kB view raw
1{ 2 rustPlatform, 3 fetchFromGitHub, 4 lib, 5 stdenv, 6}: 7 8rustPlatform.buildRustPackage rec { 9 pname = "rustc-demangle"; 10 version = "0.1.26"; 11 12 src = fetchFromGitHub { 13 owner = "rust-lang"; 14 repo = "rustc-demangle"; 15 tag = "rustc-demangle-v${version}"; 16 hash = "sha256-4/x3kUIKi3xnDRznr+6xmPeWHmhlpbuwSNH3Ej6+Ifc="; 17 }; 18 19 cargoLock = { 20 # generated using `cargo generate-lockfile` since repo is missing lockfile 21 lockFile = ./Cargo.lock; 22 }; 23 24 cargoBuildFlags = [ 25 "-p" 26 "rustc-demangle-capi" 27 ]; 28 29 postPatch = '' 30 ln -s ${./Cargo.lock} Cargo.lock 31 ''; 32 33 postInstall = '' 34 mkdir -p $out/lib 35 cp target/${stdenv.hostPlatform.rust.rustcTargetSpec}/release/librustc_demangle${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib 36 cp -R crates/capi/include $out 37 ''; 38 39 meta = { 40 description = "Rust symbol demangling"; 41 homepage = "https://github.com/rust-lang/rustc-demangle"; 42 license = with lib.licenses; [ 43 asl20 44 mit 45 ]; 46 platforms = lib.platforms.unix; 47 maintainers = with lib.maintainers; [ _1000teslas ]; 48 }; 49}