From 7992efedf07bcb443c2bb885d992066475064772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Ga=C5=82kowski?= Date: Sun, 13 Jul 2025 21:27:07 +0200 Subject: [PATCH] lisp-modules: add nixfmt step Recently the imported.nix file was re-formatted using nixfmt. Adding that step to the QL import script, to keep up the spirit. Keeps diffs smaller. --- .../development/lisp-modules/import/main.lisp | 6 +++- pkgs/development/lisp-modules/shell.nix | 29 +++++++++++-------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/pkgs/development/lisp-modules/import/main.lisp b/pkgs/development/lisp-modules/import/main.lisp index 2ab754d05a4c..6671b8f22b4f 100644 --- a/pkgs/development/lisp-modules/import/main.lisp +++ b/pkgs/development/lisp-modules/import/main.lisp @@ -48,8 +48,12 @@ (format t "Dumped nix file to ~a~%" (truename "imported.nix"))) +(defun run-nix-formatter () + (uiop:run-program '("nixfmt" "imported.nix"))) + (defun main () (format t "~%") (init-quicklisp) (run-importers) - (gen-nix-file)) + (gen-nix-file) + (run-nix-formatter)) diff --git a/pkgs/development/lisp-modules/shell.nix b/pkgs/development/lisp-modules/shell.nix index 85b79bcbff6f..811e8d3c1d28 100644 --- a/pkgs/development/lisp-modules/shell.nix +++ b/pkgs/development/lisp-modules/shell.nix @@ -1,18 +1,23 @@ let pkgs = import ../../../. { }; + inherit (pkgs) mkShellNoCC sbcl nixfmt-rfc-style; in -pkgs.mkShell { - nativeBuildInputs = [ - (pkgs.sbcl.withPackages ( - ps: with ps; [ - alexandria - str - dexador - cl-ppcre - sqlite - arrow-macros - jzon - ] +mkShellNoCC { + packages = [ + nixfmt-rfc-style + (sbcl.withPackages ( + ps: + builtins.attrValues { + inherit (ps) + alexandria + str + dexador + cl-ppcre + sqlite + arrow-macros + jzon + ; + } )) ]; }