aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-12-01 17:05:32 +0100
committerAlex Auvolat <alex@adnab.me>2022-12-01 17:05:32 +0100
commitee18ddcebcdd5744f7a5abaecfd1c4441ba69c35 (patch)
tree4e7cdfd3802eb6d50d73d61d61f549f24c7ceb8b /flake.nix
parent0ae7f5fbd924a293dcd3f1b6b61fc3cc46bd3876 (diff)
downloadtricot-ee18ddcebcdd5744f7a5abaecfd1c4441ba69c35.tar.gz
tricot-ee18ddcebcdd5744f7a5abaecfd1c4441ba69c35.zip
Add Drone CI
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix25
1 files changed, 15 insertions, 10 deletions
diff --git a/flake.nix b/flake.nix
index 450a5a1..351bd41 100644
--- a/flake.nix
+++ b/flake.nix
@@ -15,17 +15,22 @@
overlays = [ cargo2nix.overlays.default ];
};
packageFun = import ./Cargo.nix;
- packageSet = pkgs.rustBuilder.makePackageSet {
- inherit packageFun;
- release = true;
- rustVersion = "1.63.0";
- };
- tricot = packageSet.workspace.tricot {
- compileMode = "build";
- };
+ rustVersion = "1.63.0";
+
+ compile = args: compileMode:
+ let
+ packageSet = pkgs.rustBuilder.makePackageSet ({
+ inherit packageFun rustVersion;
+ } // args);
+ in
+ packageSet.workspace.tricot {
+ inherit compileMode;
+ };
in
{
- packages.x86_64-linux.tricot = tricot;
- packages.x86_64-linux.default = tricot;
+ test.x86_64-linux.tricot = compile { release = false; } "test";
+ debug.x86_64-linux.tricot = compile { release = false; } "build";
+ packages.x86_64-linux.tricot = compile { release = true; } "build";
+ packages.x86_64-linux.default = self.packages.x86_64-linux.tricot;
};
}