diff options
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 17 |
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"; } ; }; } |