aboutsummaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-07-25 18:10:34 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-07-26 18:27:52 +0200
commitfcb04843f7619d767c3c865e4795fb3468653e28 (patch)
tree29e4741955338aaf8cd32ee4175ae42194b2803c /default.nix
parent5fb858424793de8dc35dce8deaa8981a384e064f (diff)
downloadgarage-fcb04843f7619d767c3c865e4795fb3468653e28.tar.gz
garage-fcb04843f7619d767c3c865e4795fb3468653e28.zip
Run clippy in nix, leveraging nix caching ability
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix17
1 files changed, 9 insertions, 8 deletions
diff --git a/default.nix b/default.nix
index 5634f0af..4d7558c5 100644
--- a/default.nix
+++ b/default.nix
@@ -6,11 +6,16 @@
with import ./nix/common.nix;
let
+ pkgs = import pkgsSrc { };
compile = import ./nix/compile.nix;
build_debug_and_release = (target: {
debug = (compile { inherit target; release = false; }).workspace.garage { compileMode = "build"; };
release = (compile { inherit target; release = true; }).workspace.garage { compileMode = "build"; };
});
+ test = (rustPkgs: pkgs.symlinkJoin {
+ name ="garage-tests";
+ paths = builtins.map (key: rustPkgs.workspace.${key} { compileMode = "test"; }) (builtins.attrNames rustPkgs.workspace);
+ });
in {
pkgs = {
@@ -20,13 +25,9 @@ in {
arm = build_debug_and_release "armv6l-unknown-linux-musleabihf";
};
test = {
- amd64 = let
- pkgs = import pkgsSrc { };
- rustPkgs = compile { target = "x86_64-unknown-linux-musl"; };
- in
- pkgs.symlinkJoin {
- name ="garage-tests";
- paths = builtins.map (key: rustPkgs.workspace.${key} { compileMode = "test"; }) (builtins.attrNames rustPkgs.workspace);
- };
+ amd64 = test (compile { target = "x86_64-unknown-linux-musl"; });
+ };
+ clippy = {
+ amd64 = (compile { compiler = "clippy"; }).workspace.garage { compileMode = "build"; } ;
};
}