From 6d02782ebf32989005ef097263379a9408c1dfe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 6 Apr 2024 19:46:14 -0700 Subject: [PATCH 1/4] corrosion: 0.4.7 -> 0.4.8 Diff: https://github.com/corrosion-rs/corrosion/compare/v0.4.7...v0.4.8 Changelog: https://github.com/corrosion-rs/corrosion/blob/v0.4.8/RELEASES.md --- .../build-managers/corrosion/default.nix | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/pkgs/development/tools/build-managers/corrosion/default.nix b/pkgs/development/tools/build-managers/corrosion/default.nix index 22222a8f88cf..c452e9aa4f5b 100644 --- a/pkgs/development/tools/build-managers/corrosion/default.nix +++ b/pkgs/development/tools/build-managers/corrosion/default.nix @@ -3,40 +3,49 @@ , fetchFromGitHub , cargo , cmake -, rustPlatform , rustc , libiconv }: stdenv.mkDerivation rec { pname = "corrosion"; - version = "0.4.7"; + version = "0.4.8"; src = fetchFromGitHub { owner = "corrosion-rs"; repo = "corrosion"; rev = "v${version}"; - hash = "sha256-6jjcBBc1gtMG2sYppOIRa/tYjmUgW4kFxAuoGj7Tpgw="; - }; - - cargoRoot = "generator"; - - cargoDeps = rustPlatform.fetchCargoTarball { - inherit src; - sourceRoot = "${src.name}/${cargoRoot}"; - name = "${pname}-${version}"; - hash = "sha256-M5Wnx+SfVvdhC5bHVZa0Di2up3Qt5z1jog8yxIKvG/Y="; + hash = "sha256-ChoeN7qQRR1YmYYvPdJVJ2SVGTDGlM7PsN9jzFjQEyU="; }; buildInputs = lib.optional stdenv.isDarwin libiconv; nativeBuildInputs = [ cmake - rustPlatform.cargoSetupHook 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"; From 448d90fc1306cd5d18c5f69b449571952091c048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 6 Apr 2024 19:52:39 -0700 Subject: [PATCH 2/4] kdePackages.akonadi-search: move corrosion to nativeBuildInputs --- pkgs/kde/gear/akonadi-search/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/kde/gear/akonadi-search/default.nix b/pkgs/kde/gear/akonadi-search/default.nix index 3cc1a01bd878..7e3527f9e41f 100644 --- a/pkgs/kde/gear/akonadi-search/default.nix +++ b/pkgs/kde/gear/akonadi-search/default.nix @@ -26,8 +26,9 @@ mkKdeDerivation rec { extraNativeBuildInputs = [ rustPlatform.cargoSetupHook cargo + corrosion rustc ]; - extraBuildInputs = [corrosion xapian]; + extraBuildInputs = [xapian]; } From 1be87b820ab81eb54a5b82bb874ecce51a53056a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 6 Apr 2024 19:53:11 -0700 Subject: [PATCH 3/4] kdePackages.angelfish: move corrosion to nativeBuildInputs --- pkgs/kde/gear/angelfish/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/kde/gear/angelfish/default.nix b/pkgs/kde/gear/angelfish/default.nix index 2a5f3fed9b3f..a682d3589540 100644 --- a/pkgs/kde/gear/angelfish/default.nix +++ b/pkgs/kde/gear/angelfish/default.nix @@ -25,8 +25,9 @@ mkKdeDerivation rec { extraNativeBuildInputs = [ rustPlatform.cargoSetupHook cargo + corrosion rustc ]; - extraBuildInputs = [corrosion qtsvg qtwebengine qcoro]; + extraBuildInputs = [qtsvg qtwebengine qcoro]; } From 87a15554af74d2dd32e62aa558875946503058d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 6 Apr 2024 19:53:54 -0700 Subject: [PATCH 4/4] kdePackages.kdepim-addons: move corrosion to nativeBuildInputs --- pkgs/kde/gear/kdepim-addons/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/kde/gear/kdepim-addons/default.nix b/pkgs/kde/gear/kdepim-addons/default.nix index 9861da5879cd..781d71671446 100644 --- a/pkgs/kde/gear/kdepim-addons/default.nix +++ b/pkgs/kde/gear/kdepim-addons/default.nix @@ -28,8 +28,9 @@ mkKdeDerivation rec { extraNativeBuildInputs = [ rustPlatform.cargoSetupHook cargo + corrosion rustc ]; - extraBuildInputs = [corrosion discount alpaka]; + extraBuildInputs = [discount alpaka]; }