mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
0106dfcbeb
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/rust-bindgen/versions. These checks were done: - built on NixOS - /nix/store/y7lbrcpy05c1br43257fj056p6vf269l-rust-bindgen-0.37.0/bin/bindgen passed the binary check. - Warning: no invocation of /nix/store/y7lbrcpy05c1br43257fj056p6vf269l-rust-bindgen-0.37.0/bin/.bindgen-wrapped had a zero exit code or showed the expected version - 1 of 2 passed binary check by having a zero exit code. - 1 of 2 passed binary check by having the new version present in output. - found 0.37.0 with grep in /nix/store/y7lbrcpy05c1br43257fj056p6vf269l-rust-bindgen-0.37.0 - directory tree listing: https://gist.github.com/dab90e1565932370211bc1cb47b526d9 - du listing: https://gist.github.com/1ea884a58cb25990e712703124f8a6da
38 lines
1.1 KiB
Nix
38 lines
1.1 KiB
Nix
{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper, llvmPackages }:
|
|
|
|
# Future work: Automatically communicate NIX_CFLAGS_COMPILE to bindgen's tests and the bindgen executable itself.
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
name = "rust-bindgen-${version}";
|
|
version = "0.37.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rust-lang-nursery";
|
|
repo = "rust-bindgen";
|
|
rev = "v${version}";
|
|
sha256 = "0cqjr7qspjrfgqcp4nqxljmhhbqyijb2jpw3lajgjj48y6wrnw93";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = [ llvmPackages.clang-unwrapped.lib ];
|
|
|
|
configurePhase = ''
|
|
export LIBCLANG_PATH="${llvmPackages.clang-unwrapped.lib}/lib"
|
|
'';
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/bindgen --set LIBCLANG_PATH "${llvmPackages.clang-unwrapped.lib}/lib"
|
|
'';
|
|
|
|
cargoSha256 = "0b8v6c7q1abibzygrigldpd31lyd5ngmj4vq5d7zni96m20mm85w";
|
|
|
|
doCheck = false; # A test fails because it can't find standard headers in NixOS
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "C and C++ binding generator";
|
|
homepage = https://github.com/rust-lang-nursery/rust-bindgen;
|
|
license = with licenses; [ bsd3 ];
|
|
maintainers = [ maintainers.ralith ];
|
|
};
|
|
}
|