1 { buildDhallPackage, lib }:
3 # This is a minor variation on `buildDhallPackage` that splits the `code`
4 # argument into `src` and `file` in such a way that you can easily override
7 # This function is used by `dhall-to-nixpkgs` when given a directory
8 lib.makePackageOverridable
9 ( { # Arguments passed through to `buildDhallPackage`
15 , # The file to import, relative to the root directory
16 file ? "package.dhall"
17 # Set to `true` to generate documentation for the package
22 ( { inherit name dependencies source;
24 code = "${src}/${file}";
27 // lib.optionalAttrs document { documentationRoot = "${src}"; }