1 { dhall-nixpkgs, lib, stdenv }:
3 # This function calls `dhall-to-nixpkgs directory --fixed-output-derivations`
4 # within a Nix derivation.
6 # This is possible because
7 # `dhall-to-nixpkgs directory --fixed-output-derivations` will turn remote
8 # Dhall imports protected with Dhall integrity checksinto fixed-output
9 # derivations (with the `buildDhallUrl` function), so no unrestricted network
10 # access is necessary.
11 lib.makePackageOverridable
13 , # The file to import, relative to the root directory
14 file ? "package.dhall"
15 , # Set to `true` to generate documentation for the package
19 name = "dhall-directory-package.nix";
22 dhall-to-nixpkgs directory --fixed-output-derivations --file "${file}" "${src}" ${if document then "--document" else ""} > $out
25 nativeBuildInputs = [ dhall-nixpkgs ];