From 55259329a3c0371f63c74dae95982664b5699814 Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Wed, 1 May 2024 12:08:42 -0700 Subject: [PATCH] make it easy to configure cargo profiles from nix This way you can easily build in debug mode with Nix. --- nix/pkgs/default/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nix/pkgs/default/default.nix b/nix/pkgs/default/default.nix index 38771517..79510f50 100644 --- a/nix/pkgs/default/default.nix +++ b/nix/pkgs/default/default.nix @@ -10,6 +10,7 @@ # Options (keep sorted) , default-features ? true , features ? [] +, profile ? "release" }: let @@ -73,6 +74,8 @@ craneLib.buildPackage rec { pkgsBuildHost.rustPlatform.bindgenHook ]; + CARGO_PROFILE = profile; + inherit env; passthru = {