29 lines
889 B
Nix
29 lines
889 B
Nix
{ stdenv, rustPlatform, fetchFromGitHub, llvmPackages, darwin }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "cargo-expand";
|
|
version = "0.4.15";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dtolnay";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "155b4azkrr0qfg52mk7934zavwsbl28i28hi1inb23d509hrr5ky";
|
|
};
|
|
|
|
cargoSha256 = "050q4rk1x3jghinxg6gszi993a6zbg41vg535dlvvsqi36l278qc";
|
|
|
|
buildInputs = [ llvmPackages.libclang ]
|
|
++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
|
|
|
|
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "A utility and Cargo subcommand designed to let people expand macros in their Rust source code";
|
|
homepage = https://github.com/dtolnay/cargo-expand;
|
|
license = with licenses; [ mit asl20 ];
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ xrelkd ];
|
|
};
|
|
}
|