3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/rust/bindgen/default.nix

33 lines
951 B
Nix
Raw Normal View History

2016-11-23 17:09:29 +00:00
{ stdenv, fetchFromGitHub, rustPlatform, llvmPackages }:
# Future work: Automatically communicate NIX_CFLAGS_COMPILE to bindgen's tests and the bindgen executable itself.
2017-03-22 02:00:11 +00:00
rustPlatform.buildRustPackage rec {
2016-11-23 17:09:29 +00:00
name = "rust-bindgen-${version}";
2017-04-15 20:47:20 +01:00
version = "0.23.0";
2016-11-23 17:09:29 +00:00
src = fetchFromGitHub {
2017-03-22 02:00:11 +00:00
owner = "servo";
2016-11-23 17:09:29 +00:00
repo = "rust-bindgen";
2017-03-22 02:00:11 +00:00
rev = "v${version}";
2017-04-15 20:47:20 +01:00
sha256 = "1cr7wgb13pavjpv2glq02wf5sqigcl1k0qgf3cqi9c5mjca2cg5y";
2016-11-23 17:09:29 +00:00
};
buildInputs = [ llvmPackages.clang-unwrapped ];
configurePhase = ''
export LIBCLANG_PATH="${llvmPackages.clang-unwrapped}/lib"
'';
2017-04-15 20:47:20 +01:00
depsSha256 = "1qrnd9a73vxr7572byjjlhwbax3z4slc7qmwjx3aiwjix3r250dh";
2016-11-23 17:09:29 +00:00
doCheck = false; # A test fails because it can't find standard headers in NixOS
meta = with stdenv.lib; {
description = "C binding generator";
2017-03-22 02:00:11 +00:00
homepage = https://github.com/servo/rust-bindgen;
2016-11-23 17:09:29 +00:00
license = with licenses; [ bsd3 ];
maintainers = [ maintainers.ralith ];
};
}