about summary refs log tree commit diff
path: root/blog/default.nix
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-01-23T18·25+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-01-23T21·57+0000
commitb25d06db7e924effcb304645ab6121aad4b18ce5 (patch)
tree2b0cd22cdadcb4cfe268f5f391eceffb87448056 /blog/default.nix
parent336a1fdf9f72ef9559fa71c073d5e076e34466d5 (diff)
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.
Diffstat (limited to 'blog/default.nix')
-rw-r--r--blog/default.nix14
1 files changed, 13 insertions, 1 deletions
diff --git a/blog/default.nix b/blog/default.nix
index 7005cc648d00..ed1e405ddca4 100644
--- a/blog/default.nix
+++ b/blog/default.nix
@@ -1,15 +1,27 @@
 {
+  pkgs ? import <nixpkgs> {},
   depot ? import <depot> {},
   universe ? import <universe> {},
   ...
 }:
 
-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
   ];
 }