nixpkgs-suyu/pkgs/development/interpreters
Gabriel Gonzalez 38f1d70c01 Add Nixpkgs support for Dhall
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.
2020-02-11 22:02:53 -08:00
..
acl2
angelscript angelscript: 2.33.0 -> 2.34.0 2019-10-06 17:46:34 -07:00
bats
ceptre
chibi
clips
clisp
clojure clojure: 1.10.1.489 -> 1.10.1.492 2019-12-11 13:33:35 +01:00
clojurescript/lumo
dart
dhall Add Nixpkgs support for Dhall 2020-02-11 22:02:53 -08:00
duktape duktape: 2.4.0 -> 2.5.0 2019-12-08 21:47:09 +01:00
eff Treewide: fix more URL permanent redirects 2019-11-21 15:37:34 -08:00
elixir elixir: add filalex77 to maintainers 2020-02-10 16:07:07 +02:00
erlang treewide: installTargets is a list 2019-12-31 00:25:26 +01:00
evcxr evcxr: 0.4.6 -> 0.5.0 2020-01-23 13:16:58 +01:00
falcon
gauche gauche: 0.9.8 -> 0.9.9 2019-12-16 20:20:20 -05:00
gnu-apl treewide: NIX_*_FLAGS -> string 2019-12-31 00:15:46 +01:00
groovy groovy: 2.5.8 -> 2.5.9 2020-01-21 15:34:14 +00:00
gtk-server gtk-server: 2.3.1 -> 2.4.5 2019-12-15 13:31:53 -08:00
guile guile: fix unbound variable in setup-hook 2019-11-20 05:12:13 +01:00
hugs
hy hy: use python2, build fails with 3 2019-11-13 16:27:38 +01:00
icon-lang
io treewide: Get rid of libGLU_combined 2019-11-18 20:10:43 +00:00
j
janet janet: 1.6.0 -> 1.7.0 2020-02-07 10:54:34 +00:00
jimtcl treewide: NIX_*_FLAGS -> string 2019-12-31 00:15:46 +01:00
joker joker: 0.14.0 -> 0.14.1 2020-02-08 10:07:45 +00:00
jruby jruby: 9.2.8.0 -> 9.2.9.0 2019-11-01 21:49:48 -07:00
jython jython: 2.7.1 -> 2.7.2b2 2020-01-21 17:04:55 +00:00
kona treewide: replace make/build/configure/patchFlags with nix lists 2019-12-30 12:58:11 +01:00
lfe lfe: 1.2.1 -> 1.3 2020-02-10 20:03:47 +01:00
lolcode
love treewide: NIX_*_FLAGS -> string 2019-12-31 00:15:46 +01:00
lua-5 lua5: Fix src URLs 2020-01-31 18:00:45 -08:00
luajit luajit_2_0: fix the platforms/extraMeta 2019-10-13 14:07:01 +02:00
lush treewide: Get rid of libGLU_combined 2019-11-18 20:10:43 +00:00
maude maude: update from version 2.7.1 to 3.0 (including full-maude) 2020-01-31 16:25:40 +01:00
metamath treewide: installTargets is a list 2019-12-30 13:29:27 +01:00
micropython micropython: init at 1.12 2020-01-03 10:57:55 +01:00
mujs
nix-exec
octave octaveHg: drop 2020-02-09 19:24:18 +01:00
perl perl.withPackages: respect $PERL5LIB 2020-01-20 18:11:00 +00:00
php treewide: *inputs are lists 2019-12-31 01:09:25 +01:00
picoc
picolisp picolisp: 19.6 -> 19.12 2020-01-06 22:25:42 -08:00
pixie treewide: remove redundant quotes 2019-09-08 23:38:31 +00:00
proglodyte-wasm treewide: mark some broken packages as broken 2019-10-08 17:14:26 +02:00
pure pure: mark as broken 2020-01-30 18:35:30 -05:00
pyrex treewide: name -> pname (#67513) 2019-08-31 07:41:22 -04:00
python Merge master into staging-next 2020-02-06 19:43:36 +01:00
qnial
quickjs treewide: Remove myself from maintainers on some packages (#78027) 2020-01-19 12:18:34 -05:00
racket treewide: fix redirected urls 2020-01-22 11:26:22 +01:00
rakudo rakudo: 2017.01 -> 2020.01 2020-02-10 20:34:04 +01:00
rascal
rebol
red
regina
renpy treewide: Get rid of libGLU_combined 2019-11-18 20:10:43 +00:00
ruby ruby: remove references to CC by default 2020-01-09 15:54:59 +00:00
scheme48
scsh
self
spidermonkey treewide: replace make/build/configure/patchFlags with nix lists 2019-12-30 12:58:11 +01:00
supercollider supercollider: 3.10.3 -> 3.10.4 2020-01-30 11:03:45 +00:00
tcl tcl: fix dangling symlink 2019-12-19 09:46:36 -05:00
tinyscheme
unicon-lang
wasm-gc treewide: name -> pname (#67513) 2019-08-31 07:41:22 -04:00
wasmer wasmer: init at 0.13.0 2020-01-16 12:29:04 -08:00
wasmtime wasmtime: 20191111 -> v0.8.0 2020-01-07 17:36:29 +01:00