Hi Bas, > I have a Haskell library that contains a test-suite. The test > requires a data file of the package. When building the package with > nix-build the test is run but fails because the path to the data file > is wrong.
"cabal test" executes test suites with the current working directory set to the top-level directory of your source code, i.e. the same place where the "myLib.cabal" file is. Therefore, your test code can refer to the data file reliably as "data/Lenna.png". If you ever want to release that project on Hackage, make sure to add an attribute like extra-source-files: data/* in your Cabal file, otherwise those data files will not be included in the generated release tarball. If you're fine with those files being *installed*, then the attribute data-files: data/* is preferable, of course. Best regards, Peter _______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
