buildRustCrateTests: add test case for rlib linking

This commit is contained in:
Andreas Rammhold 2020-01-21 17:33:01 +01:00
parent 406e0c9d51
commit 78faab1be0

View File

@ -185,7 +185,20 @@ let
"test tests_bar ... ok"
];
};
linkAgainstRlibCrate = {
crateName = "foo";
src = mkFile "src/main.rs" ''
extern crate somerlib;
fn main() {}
'';
dependencies = [
(mkCrate {
crateName = "somerlib";
type = [ "rlib" ];
src = mkLib "src/lib.rs";
})
];
};
};
brotliCrates = (callPackage ./brotli-crates.nix {});
in lib.mapAttrs (key: value: mkTest (value // lib.optionalAttrs (!value?crateName) { crateName = key; })) cases // {