Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
60 lines
1.2 KiB
Nix
60 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cargo,
|
|
cmake,
|
|
rustc,
|
|
libiconv,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "corrosion";
|
|
version = "0.5.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "corrosion-rs";
|
|
repo = "corrosion";
|
|
rev = "v${version}";
|
|
hash = "sha256-sO2U0llrDOWYYjnfoRZE+/ofg3kb+ajFmqvaweRvT7c=";
|
|
};
|
|
|
|
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv;
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
cargo
|
|
rustc
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase =
|
|
let
|
|
excludedTests = [
|
|
"cbindgen_rust2cpp_build"
|
|
"cbindgen_rust2cpp_run_cpp-exe"
|
|
"hostbuild_build"
|
|
"hostbuild_run_rust-host-program"
|
|
"parse_target_triple_build"
|
|
"rustup_proxy_build"
|
|
];
|
|
excludedTestsRegex = lib.concatStringsSep "|" excludedTests;
|
|
in
|
|
''
|
|
runHook preCheck
|
|
|
|
ctest -E "${excludedTestsRegex}"
|
|
|
|
runHook postCheck
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Tool for integrating Rust into an existing CMake project";
|
|
homepage = "https://github.com/corrosion-rs/corrosion";
|
|
changelog = "https://github.com/corrosion-rs/corrosion/blob/${src.rev}/RELEASES.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
};
|
|
}
|