From f646dbac1d92ef8b6a824b45dc254c336cebf78d Mon Sep 17 00:00:00 2001 From: "DavidCrompton1192@gmail.com" Date: Thu, 9 Mar 2023 00:39:21 -0500 Subject: [PATCH] Needs to be in hydraJobs --- flake.nix | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index 25bd2ca..bb17e91 100644 --- a/flake.nix +++ b/flake.nix @@ -67,8 +67,7 @@ newalan = craneLib.buildPackage (commonArgs // { inherit cargoArtifacts; }); - in - { + in rec { checks = pkgs.lib.optionalAttrs (system == "x86_64-linux") { # Build the crate as part of `nix flake check` for convenience inherit newalan; @@ -106,13 +105,6 @@ partitions = 1; partitionType = "count"; }); - runCommandHook = { - newalan = pkgs.writeScript "run-me" '' - #!${pkgs.runtimeShell} - - ${pkgs.jq}/bin/jq . "$HYDRA_JSON" - ''; - }; } // lib.optionalAttrs (system == "x86_64-linux") { # NB: cargo-tarpaulin only supports x86_64 systems # Check code coverage (note: this will not upload coverage anywhere) @@ -120,7 +112,17 @@ inherit cargoArtifacts; }); }; - + + hydraJobs = checks // { + runCommandHook = { + newalan = pkgs.writeScript "run-me" '' + #!${pkgs.runtimeShell} + + ${pkgs.jq}/bin/jq . "$HYDRA_JSON" + ''; + }; + }; + packages.default = newalan; apps.default = flake-utils.lib.mkApp {