garage/default.nix

41 lines
1.5 KiB
Nix
Raw Permalink Normal View History

2021-10-04 16:27:57 +00:00
{
system ? builtins.currentSystem,
git_version ? null,
}:
with import ./nix/common.nix;
let
pkgs = import pkgsSrc { };
compile = import ./nix/compile.nix;
build_debug_and_release = (target: {
debug = (compile { inherit target git_version; release = false; }).workspace.garage { compileMode = "build"; };
release = (compile { inherit target git_version; 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);
});
2022-09-28 08:25:45 +00:00
build_convert_db = (target: (compile { inherit target git_version; release = true; }).workspace.garage_db { compileMode = "build"; });
in {
pkgs = {
amd64 = build_debug_and_release "x86_64-unknown-linux-musl";
i386 = build_debug_and_release "i686-unknown-linux-musl";
arm64 = build_debug_and_release "aarch64-unknown-linux-musl";
arm = build_debug_and_release "armv6l-unknown-linux-musleabihf";
2022-09-28 08:25:45 +00:00
convert_db = {
amd64 = build_convert_db "x86_64-unknown-linux-musl";
i386 = build_convert_db "i686-unknown-linux-musl";
arm64 = build_convert_db "aarch64-unknown-linux-musl";
arm = build_convert_db "armv6l-unknown-linux-musleabihf";
};
2022-02-03 17:04:43 +00:00
};
test = {
amd64 = test (compile { inherit git_version; target = "x86_64-unknown-linux-musl"; });
};
clippy = {
amd64 = (compile { inherit git_version; compiler = "clippy"; }).workspace.garage { compileMode = "build"; } ;
2022-02-23 10:38:52 +00:00
};
}