From 37806f222de558bbe0aade853339ad07df68ba49 Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Mon, 16 Jan 2023 20:15:40 -0800 Subject: [PATCH] shell.nix: add a quick-test script, qt (#314) --- shell.nix | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/shell.nix b/shell.nix index 35ba51a..f1c5931 100644 --- a/shell.nix +++ b/shell.nix @@ -1,8 +1,18 @@ -with import {}; -stdenv.mkDerivation rec { - name = "env"; - env = buildEnv { name = name; paths = buildInputs; }; - buildInputs = [ +{ pkgs ? import { } }: +let + scripts = { + # Quick test script. + qt = pkgs.writeScriptBin "qt" '' + # Builds & starts inbucket, then sends it some test mail. + + make build test inbucket || exit + (sleep 3; etc/swaks-tests/run-tests.sh >/dev/null) & + env INBUCKET_LOGLEVEL=debug ./inbucket + ''; + }; +in +pkgs.mkShell { + buildInputs = with pkgs; [ act dpkg elmPackages.elm @@ -18,5 +28,7 @@ stdenv.mkDerivation rec { nodePackages.yarn rpm swaks + + scripts.qt ]; }