diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 25 |
1 files changed, 15 insertions, 10 deletions
@@ -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; }; } |