Skip to content

Commit f4542d5

Browse files
authored
Integrate dhall-nix into CI (#887)
1 parent 505bd92 commit f4542d5

38 files changed

+184
-283
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ the following packages:
1010
* [`dhall`](./dhall) - [![Hackage](https://img.shields.io/hackage/v/dhall.svg)](https://hackage.haskell.org/package/dhall)
1111
* [`dhall-bash`](./dhall-bash) - [![Hackage](https://img.shields.io/hackage/v/dhall-bash.svg)](https://hackage.haskell.org/package/dhall-bash)
1212
* [`dhall-json`](./dhall-json) - [![Hackage](https://img.shields.io/hackage/v/dhall-json.svg)](https://hackage.haskell.org/package/dhall-json)
13+
* [`dhall-nix`](./dhall-nix) - [![Hackage](https://img.shields.io/hackage/v/dhall-nix.svg)](https://hackage.haskell.org/package/dhall-nix)
1314
* [`dhall-text`](./dhall-text) - [![Hackage](https://img.shields.io/hackage/v/dhall-text.svg)](https://hackage.haskell.org/package/dhall-text)
1415

1516
Navigate to each package's directory for their respective `README`s
@@ -38,6 +39,7 @@ visit one of the following links:
3839
* [https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall/latest](https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall/latest)
3940
* [https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-bash/latest](https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-bash/latest)
4041
* [https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-json/latest](https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-json/latest)
42+
* [https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-nix/latest](https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-nix/latest)
4143
* [https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-lsp-server/latest](https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-lsp-server/latest)
4244
* [https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-text/latest](https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-text/latest)
4345

default.nix

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ in
1212
dhall-bash
1313
dhall-json
1414
dhall-lsp-server
15+
dhall-nix
1516
dhall-text
1617
;
1718

dhall-nix/README.md

+16-44
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
# `dhall-nix 1.1.6`
1+
# `dhall-nix`
2+
3+
For installation or development instructions, see:
4+
5+
* [`dhall-haskell` - `README`](https://github.com/dhall-lang/dhall-haskell/blob/master/README.md)
6+
7+
Full documentation here:
8+
9+
* [`dhall-nix` instructions](https://hackage.haskell.org/package/dhall-nix/docs/Dhall-Nix.html)
10+
11+
## Introduction
212

313
This `dhall-nix` package provides a Dhall to Nix compiler. You can use this
414
compiler to program Nix using the Dhall language. This package targets people
@@ -9,12 +19,11 @@ who wish Nix had a type system.
919
If you have Nix installed then you can build and run this package using:
1020

1121
```bash
12-
$ nix-build -A dhall-nix release.nix
13-
$ result/bin/dhall-to-nix <<< "λ(x : Bool) → x == False"
22+
$ dhall-to-nix <<< "λ(x : Bool) → x == False"
1423
x: x == false
15-
$ result/bin/dhall-to-nix <<< "{ foo = 1, bar = True }"
24+
$ dhall-to-nix <<< "{ foo = 1, bar = True }"
1625
{ bar = true; foo = 1; }
17-
$ result/bin/dhall-to-nix <<< "< Left = 2 | Right : Natural >"
26+
$ dhall-to-nix <<< "< Left = 2 | Right : Natural >"
1827
{ Left, Right }: Left 2
1928
```
2029
@@ -40,42 +49,5 @@ dhallToNix = code :
4049
import "${drv}";
4150
```
4251
43-
The above `dhallToNix` utility is now in `nixpkgs` so you can use `pkgs.dhallToNix`
44-
to transform Dhall expressions to Nix expressions
45-
46-
## Development status
47-
48-
[![Build Status](https://travis-ci.org/Gabriel439/Haskell-Dhall-Nix-Library.png)](https://travis-ci.org/Gabriel439/Haskell-Dhall-Nix-Library)
49-
50-
I don't expect this library to change unless:
51-
52-
* ... the Dhall language changes, which is possible but not very likely
53-
* ... there are bugs, but the test suite in [release.nix](./release.nix) should
54-
protect against this
55-
56-
## License (BSD 3-clause)
57-
58-
Copyright (c) 2017 Gabriel Gonzalez
59-
All rights reserved.
60-
61-
Redistribution and use in source and binary forms, with or without modification,
62-
are permitted provided that the following conditions are met:
63-
* Redistributions of source code must retain the above copyright notice,
64-
this list of conditions and the following disclaimer.
65-
* Redistributions in binary form must reproduce the above copyright notice,
66-
this list of conditions and the following disclaimer in the documentation
67-
and/or other materials provided with the distribution.
68-
* Neither the name of Gabriel Gonzalez nor the names of other contributors
69-
may be used to endorse or promote products derived from this software
70-
without specific prior written permission.
71-
72-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
73-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
74-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
75-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
76-
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
77-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
78-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
79-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
80-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
81-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
52+
The above `dhallToNix` utility is now in `nixpkgs` so you can use
53+
`pkgs.dhallToNix` to transform Dhall expressions to Nix expressions

dhall-nix/default.nix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(import ../nix/shared.nix {}).possibly-static.dhall-nix

dhall-nix/nix/base-orphans.nix

-14
This file was deleted.

dhall-nix/nix/cborg-json.nix

-15
This file was deleted.

dhall-nix/nix/contravariant.nix

-10
This file was deleted.

dhall-nix/nix/dhall-nix.nix

-18
This file was deleted.

dhall-nix/nix/dhall.nix

-41
This file was deleted.

dhall-nix/nix/fetchNixpkgs.nix

-49
This file was deleted.

dhall-nix/nix/megaparsec.nix

-25
This file was deleted.

dhall-nix/nix/neat-interpolation.nix

-15
This file was deleted.

dhall-nix/nix/repline.nix

-11
This file was deleted.

dhall-nix/nix/semigroupoids.nix

-20
This file was deleted.

dhall-nix/shell.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(import ./release.nix).shell
1+
(import ../nix/shared.nix {}).shell-dhall-nix
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

nix/hspec-core.nix

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{ mkDerivation, ansi-terminal, array, base, call-stack, clock
2+
, deepseq, directory, filepath, hspec-expectations, hspec-meta
3+
, HUnit, process, QuickCheck, quickcheck-io, random, setenv
4+
, silently, stdenv, stm, temporary, tf-random, transformers
5+
}:
6+
mkDerivation {
7+
pname = "hspec-core";
8+
version = "2.5.6";
9+
sha256 = "6f188cf2322d0bafca7a9a11feb80a66631bdf6911d236ed16e4f4a22c1e455e";
10+
libraryHaskellDepends = [
11+
ansi-terminal array base call-stack clock deepseq directory
12+
filepath hspec-expectations HUnit QuickCheck quickcheck-io random
13+
setenv stm tf-random transformers
14+
];
15+
testHaskellDepends = [
16+
ansi-terminal array base call-stack clock deepseq directory
17+
filepath hspec-expectations hspec-meta HUnit process QuickCheck
18+
quickcheck-io random setenv silently stm temporary tf-random
19+
transformers
20+
];
21+
testToolDepends = [ hspec-meta ];
22+
testTarget = "--test-option=--skip --test-option='Test.Hspec.Core.Runner.hspecResult runs specs in parallel'";
23+
homepage = "http://hspec.github.io/";
24+
description = "A Testing Framework for Haskell";
25+
license = stdenv.lib.licenses.mit;
26+
}

nix/hspec-discover.nix

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{ mkDerivation, base, directory, filepath, hspec-meta, QuickCheck
2+
, stdenv
3+
}:
4+
mkDerivation {
5+
pname = "hspec-discover";
6+
version = "2.5.6";
7+
sha256 = "8c9689b51aa44b8278a5ff3059e0e8a609dce077df3781aad977c647a8c18a46";
8+
isLibrary = true;
9+
isExecutable = true;
10+
libraryHaskellDepends = [ base directory filepath ];
11+
executableHaskellDepends = [ base directory filepath ];
12+
testHaskellDepends = [
13+
base directory filepath hspec-meta QuickCheck
14+
];
15+
testToolDepends = [ hspec-meta ];
16+
homepage = "http://hspec.github.io/";
17+
description = "Automatically discover and run Hspec tests";
18+
license = stdenv.lib.licenses.mit;
19+
}

nix/hspec.nix

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{ mkDerivation, base, hspec-core, hspec-discover
2+
, hspec-expectations, QuickCheck, stdenv
3+
}:
4+
mkDerivation {
5+
pname = "hspec";
6+
version = "2.5.6";
7+
sha256 = "9ea6eb6ac6b49e1593e272707b760e125d3bdca2d8845d76e116c1ea8112da59";
8+
libraryHaskellDepends = [
9+
base hspec-core hspec-discover hspec-expectations QuickCheck
10+
];
11+
homepage = "http://hspec.github.io/";
12+
description = "A Testing Framework for Haskell";
13+
license = stdenv.lib.licenses.mit;
14+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)