about summary refs log tree commit diff
path: root/pkgs/profpatsch
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2021-05-13 13:45:33 +0200
committerProfpatsch <mail@profpatsch.de>2021-05-13 13:45:33 +0200
commit853de0c1f0c84bd4231d08cb4f893ffb70b9c294 (patch)
treec050f4d4ec65e5441266c42bbfd138b927a43267 /pkgs/profpatsch
parent986330f5162b308e63d8ae228d54240c1e73ad90 (diff)
pkgs/profpatsch/importDhall: allow referencing files in the type
The type string would blow up too much if you can’t reference any
dhall file in the sources list. This all feels a bit hacky, but at
least semantically it seems to work out?
Diffstat (limited to 'pkgs/profpatsch')
-rw-r--r--pkgs/profpatsch/importDhall.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/profpatsch/importDhall.nix b/pkgs/profpatsch/importDhall.nix
index 6d4e5575..d1028c41 100644
--- a/pkgs/profpatsch/importDhall.nix
+++ b/pkgs/profpatsch/importDhall.nix
@@ -35,7 +35,10 @@ let
           ${pkgs.xorg.lndir}/bin/lndir -silent $dep/${cacheDhall} ${cacheDhall}
         done
 
-        export XDG_CACHE_HOME=./${cache}
+        export XDG_CACHE_HOME=$(pwd)/${cache}
+        # go into the source directory, so that the type can import files.
+        # TODO: This is a bit of a hack hrm.
+        cd "${src}"
         printf '%s' ${pkgs.lib.escapeShellArg "${src}/${main} : ${type}"} \
           | ${dhall-nix}/bin/dhall-to-nix \
           > $out