From e3e66c8054cc195828a388ffcf969be21fa6683c Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Fri, 5 Jun 2020 13:51:39 +0200 Subject: [PATCH] rust-cbindgen_0_14_1: init This is requires for newer Firefox releases that have a dependency on at least this version of rust-cbindgen. --- .../tools/rust/cbindgen/0_14_1.nix | 29 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 ++++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/tools/rust/cbindgen/0_14_1.nix diff --git a/pkgs/development/tools/rust/cbindgen/0_14_1.nix b/pkgs/development/tools/rust/cbindgen/0_14_1.nix new file mode 100644 index 0000000000000..d96c4148ae738 --- /dev/null +++ b/pkgs/development/tools/rust/cbindgen/0_14_1.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, rustPlatform, Security }: + +rustPlatform.buildRustPackage rec { + pname = "rust-cbindgen"; + version = "0.14.1"; + + src = fetchFromGitHub { + owner = "eqrion"; + repo = "cbindgen"; + rev = "v${version}"; + sha256 = "0dphy7w4lgyjmj1rbj99pdql1dnfkmic78iz1jglyy6z6p3za3qj"; + }; + + cargoSha256 = "13fb8cdg6r0g5jb3vaznvv5aaywrnsl2yp00h4k8028vl8jwwr79"; + + buildInputs = stdenv.lib.optional stdenv.isDarwin Security; + + checkFlags = [ + # https://github.com/eqrion/cbindgen/issues/338 + "--skip test_expand" + ]; + + meta = with stdenv.lib; { + description = "A project for generating C bindings from Rust code"; + homepage = https://github.com/eqrion/cbindgen; + license = licenses.mpl20; + maintainers = with maintainers; [ andir ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ef1b1ec84bb2f..7404cd425b3fa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8878,6 +8878,11 @@ in rust-cbindgen = callPackage ../development/tools/rust/cbindgen { inherit (darwin.apple_sdk.frameworks) Security; }; + + rust-cbindgen_0_14_1 = callPackage ../development/tools/rust/cbindgen/0_14_1.nix { + inherit (darwin.apple_sdk.frameworks) Security; + }; + rustup = callPackage ../development/tools/rust/rustup { inherit (darwin.apple_sdk.frameworks) CoreServices Security; };