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 {