Skip to content

Commit

Permalink
rust-bindgen: init at 0.19.1 (#19847)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith authored and zimbatm committed Nov 23, 2016
1 parent bbe5f99 commit 8df9697
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
34 changes: 34 additions & 0 deletions pkgs/development/tools/rust/bindgen/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{ stdenv, fetchFromGitHub, rustPlatform, llvmPackages }:

with rustPlatform;

# Future work: Automatically communicate NIX_CFLAGS_COMPILE to bindgen's tests and the bindgen executable itself.

buildRustPackage rec {
name = "rust-bindgen-${version}";
version = "0.19.1";

src = fetchFromGitHub {
owner = "Yamakaky";
repo = "rust-bindgen";
rev = "${version}";
sha256 = "0pv1vcgp455hys8hb0yj4vrh2k01zysayswkasxq4hca8s2p7qj9";
};

buildInputs = [ llvmPackages.clang-unwrapped ];

configurePhase = ''
export LIBCLANG_PATH="${llvmPackages.clang-unwrapped}/lib"
'';

depsSha256 = "0rlmdiqjg9ha9yzhcy33abvhrck6sphczc2gbab9zhfa95gxprv8";

doCheck = false; # A test fails because it can't find standard headers in NixOS

meta = with stdenv.lib; {
description = "C binding generator";
homepage = https://github.com/Yamakaky/rust-bindgen;
license = with licenses; [ bsd3 ];
maintainers = [ maintainers.ralith ];
};
}
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5221,6 +5221,7 @@ in
rustfmt = callPackage ../development/tools/rust/rustfmt { };
rustracer = callPackage ../development/tools/rust/racer { };
rustracerd = callPackage ../development/tools/rust/racerd { };
rust-bindgen = callPackage ../development/tools/rust/bindgen { };

sbclBootstrap = callPackage ../development/compilers/sbcl/bootstrap.nix {};
sbcl = callPackage ../development/compilers/sbcl {};
Expand Down

0 comments on commit 8df9697

Please sign in to comment.