Only check formating on stable channel
else
[];
- buildNickel = { system, isShell ? false, channel ? "stable" }:
+ buildNickel = { system, isShell ? false, channel ? "stable", checkFmt ? false }:
let
pkgs = mkPkgs {inherit system;};
checkPhase =
''
cargo test --release --frozen --offline
+ '' + (if checkFmt then ''
+
cargo fmt --all -- --check
- '';
+ '' else "");
installPhase =
''
} //
(builtins.listToAttrs
(map (channel:
+ let checkFmt = channel == "stable"; in
{ name = "nickel-against-${channel}-rust-channel";
- value = buildNickel { inherit system channel; };
+ value = buildNickel { inherit system channel checkFmt; };
}
)
(builtins.attrNames RUST_CHANNELS))
