From b25d06db7e924effcb304645ab6121aad4b18ce5 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 23 Jan 2020 18:25:10 +0000 Subject: [PATCH] Attempt to inject dependencies into blog/server - We need the markdown files, to be in the /nix/store and the server needs to be aware of there location. - Since we're dependending on `pandoc`, our server needs to know about it too. For both of these cases -- especially for the latter case -- I imagine there may be a more idiomatic way of doing this. --- blog/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/blog/default.nix b/blog/default.nix index 7005cc648..ed1e405dd 100644 --- a/blog/default.nix +++ b/blog/default.nix @@ -1,15 +1,27 @@ { + pkgs ? import {}, depot ? import {}, universe ? import {}, ... }: -depot.nix.buildLisp.program { +let + injectedPosts = pkgs.writeText "posts.lisp" '' + (in-package #:server) + (setq *path-to-posts* "${./posts}") + ''; + injectedExecutables = pkgs.writeText "executables.lisp" '' + (in-package #:server) + (setq *pandoc-bin* "${pkgs.pandoc}/bin/pandoc") + ''; +in depot.nix.buildLisp.program { name = "server"; deps = with depot.third_party.lisp; [ hunchentoot ]; srcs = [ ./src/server.lisp + injectedPosts + injectedExecutables ]; }