Nix configuration to build convert_db

This commit is contained in:
Alex Auvolat 2022-09-28 10:25:45 +02:00
parent 2197753dfd
commit 0d8cb29780
No known key found for this signature in database
GPG key ID: 0E496D15096376BE
2 changed files with 11 additions and 1 deletions

View file

@ -16,6 +16,7 @@ let
name ="garage-tests"; name ="garage-tests";
paths = builtins.map (key: rustPkgs.workspace.${key} { compileMode = "test"; }) (builtins.attrNames rustPkgs.workspace); paths = builtins.map (key: rustPkgs.workspace.${key} { compileMode = "test"; }) (builtins.attrNames rustPkgs.workspace);
}); });
build_convert_db = (target: (compile { inherit target git_version; release = true; }).workspace.garage_db { compileMode = "build"; });
in { in {
pkgs = { pkgs = {
@ -23,6 +24,12 @@ in {
i386 = build_debug_and_release "i686-unknown-linux-musl"; i386 = build_debug_and_release "i686-unknown-linux-musl";
arm64 = build_debug_and_release "aarch64-unknown-linux-musl"; arm64 = build_debug_and_release "aarch64-unknown-linux-musl";
arm = build_debug_and_release "armv6l-unknown-linux-musleabihf"; arm = build_debug_and_release "armv6l-unknown-linux-musleabihf";
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";
};
}; };
test = { test = {
amd64 = test (compile { inherit git_version; target = "x86_64-unknown-linux-musl"; }); amd64 = test (compile { inherit git_version; target = "x86_64-unknown-linux-musl"; });

View file

@ -149,7 +149,10 @@ let
(pkgs.rustBuilder.rustLib.makeOverride { (pkgs.rustBuilder.rustLib.makeOverride {
name = "garage_db"; name = "garage_db";
overrideAttrs = drv: { /* [1] */ setBuildEnv = (buildEnv drv); }; overrideAttrs = drv: {
/* [1] */ setBuildEnv = (buildEnv drv);
/* [2] */ hardeningDisable = [ "pie" ];
};
}) })
(pkgs.rustBuilder.rustLib.makeOverride { (pkgs.rustBuilder.rustLib.makeOverride {