diff options
author | Profpatsch <mail@profpatsch.de> | 2021-05-13 13:45:33 +0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2021-05-13 13:45:33 +0200 |
commit | 853de0c1f0c84bd4231d08cb4f893ffb70b9c294 (patch) | |
tree | c050f4d4ec65e5441266c42bbfd138b927a43267 /pkgs/profpatsch/importDhall.nix | |
parent | 986330f5162b308e63d8ae228d54240c1e73ad90 (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/importDhall.nix')
-rw-r--r-- | pkgs/profpatsch/importDhall.nix | 5 |
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 |