1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00

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 // {