From 56dd40cd1c1699d7961be52a6323b12191e614d9 Mon Sep 17 00:00:00 2001 From: guochao Date: Thu, 2 Nov 2023 11:01:31 +0800 Subject: [PATCH] add tracing-mode in nix --- flake.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 69c9e6a..e155139 100644 --- a/flake.nix +++ b/flake.nix @@ -26,13 +26,15 @@ rustc = toolchain; }; - buildWithPackages = pkgs: pkgsStatic: (buildRustPlatform pkgsStatic).buildRustPackage rec { + buildWithPackages = pkgs: pkgsStatic: features: (buildRustPlatform pkgsStatic).buildRustPackage rec { pname = "x2t-sandbox"; version = "1.0.0"; nativeBuildInputs = buildTools pkgs; buildInputs = libraries pkgsStatic; + buildFeatures = features; + src = ./.; cargoLock = { @@ -53,8 +55,10 @@ pkgs = import nixpkgs { inherit system; }; in rec { - x2t-sandbox-static = buildWithPackages pkgs pkgs.pkgsStatic; - x2t-sandbox = buildWithPackages pkgs pkgs; + x2t-sandbox-static = buildWithPackages pkgs pkgs.pkgsStatic []; + x2t-sandbox-static-tracing-mode = buildWithPackages pkgs pkgs.pkgsStatic ["tracing-mode"]; + + x2t-sandbox = buildWithPackages pkgs pkgs []; default = x2t-sandbox-static; });