I would like to build a monorepo with a subpackage using Yesod, but can't get that package to build, because of file embedding errors
$ nix build .\#yesodpackage
src/StaticFiles.hs:1:1: error: [GHC-87897]
> Exception when trying to run compile-time code:
> config/settings.yml: getDirectoryContents:openDirStream: does not exist (No such file or directory)
> Code: staticFiles "config/settings.yml"
and
> src/Fetcher.hs:85:32: error: [GHC-87897]
> • Exception when trying to run compile-time code:
> /build/yesodpackage-0.1.0.0/embedded_file.json withBinaryFile: does not exist (No such file or directory)
> Code: (embedFileRelative "embedded_file.json")
I'm not sure if it has to do with Template Haskell (used for the file embedding) or that these files are not added into the nix build sandbox.
Do you have an idea?
I'm using the default project root (let haskell-flake manage everything)
haskellProjects.default = {
# To avoid unnecessary rebuilds, we filter projectRoot:
# https://community.flake.parts/haskell-flake/local#rebuild
# projectRoot = builtins.toString (lib.fileset.toSource { ... commented out
I would like to explicitly add those files to ./src (but have no idea how). Or could it be that this subpackage is called from a different working directoy?
I would like to build a monorepo with a subpackage using Yesod, but can't get that package to build, because of file embedding errors
and
I'm not sure if it has to do with Template Haskell (used for the file embedding) or that these files are not added into the nix build sandbox.
Do you have an idea?
I'm using the default project root (let haskell-flake manage everything)
I would like to explicitly add those files to ./src (but have no idea how). Or could it be that this subpackage is called from a different working directoy?