From 004975b3add96b77bca929c51d1c071eef632ca0 Mon Sep 17 00:00:00 2001 From: "D. Moonfire" Date: Sun, 28 Jan 2024 16:33:58 -0600 Subject: [PATCH] fix: emitting packages --- flake.nix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index 0d601af..9f4090f 100644 --- a/flake.nix +++ b/flake.nix @@ -24,7 +24,7 @@ { # Expose the configuration information. lib = { - mkShellHook = + mkConfig = { system , pkgs , conform ? { } @@ -40,17 +40,22 @@ rust = rustDefaults // rust; }; in - '' - echo '**************' yes - ${configs.shellHook} - ${pkgs.lefthook}/bin/lefthook install - ''; + { + packages = [ pkgs.lefthook ]; + + shellHook = '' + ${configs.shellHook} + ${pkgs.lefthook}/bin/lefthook install + + alias lefthook="${pkgs.lefthook}/bin/lefthook" + ''; + }; }; # Set up the developer shell. devShells = forEachSupportedSystem ({ system, pkgs }: let - configShellHook = lib.mkShellHook { + config = lib.mkConfig { inherit system pkgs; #rust.enable = false; }; @@ -58,7 +63,8 @@ { # Shell default = pkgs.mkShell { - shellHook = configShellHook; + packages = [ ] ++ config.packages; + shellHook = config.shellHook; }; });