about summary refs log tree commit diff
path: root/pkgs/development/interpreters/dhall
AgeCommit message (Collapse)AuthorFilesLines
2023-02-13treewide: use optionalStringFelix Buehler1-1/+1
2022-06-22buildDhallUrl: fix impure proxy variable passing (#178544)Johannes Maier1-1/+2
PR #177891 tried fixing a problem with `buildDhallUrl` in environments where proxy variables are necessary for internet access to work. The `impureEnvVars` should be set in `downloadEncodedFile` instead of the final `runCommand`, as the former is an FOD, the latter isn't.
2022-06-18buildDhallUrl: Respect proxy environment variablesGabriella Gonzalez1-1/+2
`buildDhallUrl` is a fixed output derivation, which means that we can (and should) inherit impure proxy-related environment variables for fetching URLs. The motivation for this change is: https://discourse.dhall-lang.org/t/cant-build-a-nixified-dhall-package-in-a-sandbox-depending-on-the-environment/ … where a `buildDhallUrl` derivation was failing in a restricted networking environment due to not inheriting proxy-related settings.
2022-03-01buildDhallDirectoryPackage: Stringify src for documentationRoot (#162401)Akshay Mankar1-2/+1
The `src` is supposed to be a path, but when `documentationRoot` is provided with a path, it errors with: generators.mkValueStringDefault: this value is not supported: "<nix-store-path>" Making it a string fixes this error.
2021-12-07dhallPackages.generateDhallDirectoryPackage: init(cdep)illabout1-0/+27
2021-11-09Merge master into haskell-updatesgithub-actions[bot]1-0/+96
2021-11-08dhallPackages.buildDhallUrl: change argument from dhall-hash to dhallHash(cdep)illabout1-3/+3
2021-11-07haskell: switch from haskell.lib to haskell.lib.composeEllie Hermaszewska1-1/+1
2021-11-01dhallPackages.buildDhallUrl: small formatting fixesDennis Gosnell1-3/+1
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-10-25dhallPackages.buildDhallUrl: add this function(cdep)illabout1-0/+98
`buildDhallUrl` is a function to download a Dhall remote import. It is introduced to `dhall-to-nixpkgs` in https://github.com/dhall-lang/dhall-haskell/pull/2318.
2021-06-29dhall: Use --base-import-url flag for documentation (#128588)Gabriel Gonzalez2-4/+19
This updates `pkgs.dhallPackages.buildDhallGitHubPackage` to use the newly added `--base-import-url` `dhall-docs` flag. This flag is used by the generated documentation so that paths copied to the clipboard represent complete URLs that can be imported instead of only the relative path to the import.
2021-01-15Incorporate revision in name for Dhall GitHub packagesGabriel Gonzalez1-2/+6
This is a small quality-of-life improvement so that the package version/revision can be inferred from the /nix/store path (which is the convention for most of the Nixpkgs ecosystem).
2021-01-14Fix header for generated Dhall documentationGabriel Gonzalez1-1/+1
By default, `dhall-docs` uses the name of the input directory as the initial component of the documentation header. However, since the input directory is built using Nix the header contains the Nix store hash in the name, which then appears in the generated documentation. The fix is to override this default behavior by supplying the `--package-name` flag to `dhall-docs`.
2020-12-01Add `buildDhall*Package` support for generating documentationGabriel Gonzalez3-30/+56
The `buildDhall{Directory,GitHub}Package` utilities now take an optional `document` argument for generating documentation using `dhall-docs`. The documentation is stored underneath the `./docs` subdirectory of the build product.
2020-11-11Change idiom for overriding Dhall package versionGabriel Gonzalez2-2/+2
Before this change, a Dhall package like the Prelude would be encoded as a record with one field per supported version. Then downstream packages would specify which package to override by selecting a different record field. The problem with that approach is that it did not provide an easy way to override a package to a version other than the default ones supplied by Nixpkgs. Normally you would use the `.override` method for this purpose, but the `override` method added by `buildDhall{Directory,GitHub}Package` is clobbered by the `override` method added by `callPackage` in `./pkgs/top-level/dhall-packages.nix`. The solution is to add a separate `.overridePackage` method which is essentially the exact same as `.override`, except that it is no longer clobbered by `callPackage`. This `.overridePackage` method allows one to override the arguments supplied to `buildDhall{Directory,GitHub}Package`, making it easier to specify package versions outside of the ones supported by Nixpkgs.. This also includes a change to only build one (preferred) version of each package (instead of multiple supported versions per package), in order to minimize the maintenance burden for the Dhall package set.
2020-06-17Nixpkgs support for `dhall-to-nixpkgs`Gabriel Gonzalez2-0/+75
The motivation for this change is to enable a new Dhall command-line utility called `dhall-to-nixpkgs` which converts Dhall packages to buildable Nix packages. You can think of `dhall-to-nixpkgs` as the Dhall analog of `cabal2nix`. You can find the matching pull request for `dhall-to-nixpkgs` here: https://github.com/dhall-lang/dhall-haskell/pull/1826 The two main changes required to support `dhall-to-nixpkgs` are: * Two new `buildDhall{Directory,GitHub}Package` utilities are added `dhall-to-nixpkgs` uses these in the generated output * `pkgs.dhallPackages` now selects a default version for each package using the `prefer` utility All other versions are still buildable via a `passthru` attribute
2020-04-11Upate `buildDhallPackage` to use default version of DhallGabriel Gonzalez1-14/+5
Now that the default version is sufficiently new we don't need to pin the Dhall version any longer in `buildDhallPackage`
2020-02-11Add Nixpkgs support for DhallGabriel Gonzalez2-18/+83
One of the motivations for this change is the following Discourse discussion: https://discourse.dhall-lang.org/t/offline-use-of-prelude/137 Many users have requested Dhall support for "offline" packages that can be fetched/built/installed using ordinary package management tools (like Nix) instead of using Dhall's HTTP import system. I will continue to use the term "offline" to mean Dhall package builds that do not use Dhall's language support for HTTP imports (and instead use the package manager's support for HTTP requests, such as `pkgs.fetchFromGitHub`) The goal of this change is to document what is the idiomatic way to implement "offline" Dhall builds by implementing Nixpkgs support for such builds. That way when other package management tools ask me how to package Dhall with their tools I can refer them to how it is done in Nixpkgs. This change contains a fully "offline" build for the largest Dhall package in existence, known as "dhall-packages" (not to be confused with `dhallPackages`, which is our Nix attribute set containing Dhall packages). The trick to implementing offline builds in Dhall is to take advantage of Dhall's support for semantic integrity checks. If an HTTP import is protected by an integrity check and a cached build product matches the integrity check then the HTTP import is never resolved and the expression is instead fetched from cache. By "installing" dependencies in a pre-seeded and isolated cache we can replace remote HTTP imports with dependencies that have been built and supplied by Nix instead. The offline nature of the builds are enforced by compiling the Haskell interpreter with the `-f-with-http` flag, which disables the interpreter's support for HTTP imports. If a user forgets to supply a necessary dependency as a Nix build product then the build fails informing them that HTTP imports are disabled. By default, built packages are "binary distributions", containing just a cache product and a Dhall expression which can be used to resolve the corresponding cache product. Users can also optionally enable a "source distribution" of a package which already includes the equivalent fully-evaluated Dhall code (for convenience), but this is disabled by default to keep `/nix/store` utilization as compact as possible.
2018-02-26dhall: passthru dhall preludeProfpatsch1-0/+18
Makes it possible to reference `dhall.prelude`, the same version that comes with the dhall exetutable’s source code.