lol
at 22.05-pre 38 lines 1.0 kB view raw
1{ lib, stdenv, fetchFromGitHub, rustPlatform, python3Packages, Security }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "rust-cbindgen"; 5 version = "0.20.0"; 6 7 src = fetchFromGitHub { 8 owner = "eqrion"; 9 repo = "cbindgen"; 10 rev = "v${version}"; 11 sha256 = "sha256-BLiAFYkqVJSpeNPW7UF2PpAttd6ADGeQ9yneiVfNi4g="; 12 }; 13 14 cargoSha256 = "sha256-P58qANcl0mYqJDP1QnSx560y8BLH+ePTZ+uHuix89R4="; 15 16 buildInputs = lib.optional stdenv.isDarwin Security; 17 18 checkInputs = [ 19 python3Packages.cython 20 ]; 21 22 checkFlags = [ 23 # Disable tests that require rust unstable features 24 # https://github.com/eqrion/cbindgen/issues/338 25 "--skip test_expand" 26 "--skip test_bitfield" 27 "--skip lib_default_uses_debug_build" 28 "--skip lib_explicit_debug_build" 29 "--skip lib_explicit_release_build" 30 ]; 31 32 meta = with lib; { 33 description = "A project for generating C bindings from Rust code"; 34 homepage = "https://github.com/eqrion/cbindgen"; 35 license = licenses.mpl20; 36 maintainers = with maintainers; [ jtojnar ]; 37 }; 38}