diff options
-rw-r--r-- | .envrc | 9 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | README | 13 | ||||
-rw-r--r-- | shell.nix | 19 | ||||
-rwxr-xr-x | start-repl.sh | 5 |
5 files changed, 47 insertions, 0 deletions
@@ -0,0 +1,9 @@ +# setup dev environment using direnv +# + if ! has nix_direnv_version || ! nix_direnv_version 1.5.1; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/1.5.1/direnvrc" "sha256-p4CDMJjuBmEh9pkn2aoJrZqr0DlPZHPU7eXOSDzzcuo=" + fi +# +# if direnv doesn't detect changes to the nix environment, just touch .envrc and +# it will refresh + use nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..29963da --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.direnv/ @@ -0,0 +1,13 @@ +Development +=========== + +You can start a dev shell with Nix. First run: + + direnv allow + +Assuming you have nix installed, this will tell direnv to load the nix-shell +environment by default. Or just run `nix-shell`. + +Now, to start a repl, just do `sbcl`, or run `start-repl.sh`. + +Then in emacs, `M-x slime-connect`. diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..b5c4f45 --- /dev/null +++ b/shell.nix @@ -0,0 +1,19 @@ +{ pkgs ? import <nixpkgs> {} }: + +pkgs.mkShell { + + packages = with pkgs; [ + lolcat + (lispPackages_new.sbclWithPackages (p: with p; [ + asdf + swank + quickproject + alexandria + ])) + ]; + + shellHook = '' + echo cl-gemini | figlet | lolcat + ''; + +} diff --git a/start-repl.sh b/start-repl.sh new file mode 100755 index 0000000..5cc17bb --- /dev/null +++ b/start-repl.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +sbcl \ + --eval '(require :asdf)' \ + --eval '(require :swank)' \ + --eval '(swank:create-server)' |