From 8f8565e07d111e7a694c7fcda4beed52ab5c83d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vili=20Sinerv=C3=A4?= Date: Wed, 15 Jan 2025 15:47:46 +0200 Subject: [PATCH] Add command for building local nix package --- shell.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/shell.nix b/shell.nix index 76e9b9f..7a32e7a 100644 --- a/shell.nix +++ b/shell.nix @@ -4,12 +4,17 @@ let config = { }; overlays = [ ]; }; + build-command = pkgs.writeScriptBin "build-nix-package" '' + nix-build -E 'with import {}; callPackage ./default.nix {}' + ''; in pkgs.mkShell { - packages = with pkgs; [ - cargo - rustc - rustfmt - clippy - ]; + packages = + (with pkgs; [ + cargo + rustc + rustfmt + clippy + ]) + ++ [ build-command ]; }