From 853de0c1f0c84bd4231d08cb4f893ffb70b9c294 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Thu, 13 May 2021 13:45:33 +0200 Subject: pkgs/profpatsch/importDhall: allow referencing files in the type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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? --- pkgs/profpatsch/importDhall.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkgs/profpatsch') 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 -- cgit 1.4.1