Ranjit Jhala
Ranjit Jhala

Reputation: 1242

Cabal "Data Files" Not Being Copied

I'm trying to use the "data-files" mechanism, and stuff works fine except that the relevant files are not copied into the share/ directory. e.g. my .cabal file looks like:

name:                nano-js
version:             0.1.0.0
data-files:          include/prelude.js

but after building and installing the directory

.hsenv/cabal/share/nano-js-0.1.0.0

does not exist. So queries of the form

getDataFileName "include/prelude.js" 

yield a FilePath that does not exist

nanojs: /home/rjhala/research/liquid/.hsenv/cabal/share/nano-js-0.1.0.0/include/prelude.js: openFile: does not exist (No such file or directory)

Are some extra keywords required to populate share/?

Or could this be an issue with hsenv?

Thanks!

Upvotes: 8

Views: 903

Answers (1)

Ranjit Jhala
Ranjit Jhala

Reputation: 1242

I was being silly -- the data-files clause needs to be at the top while I had it buried in the executable section...!

Upvotes: 3

Related Questions