Browse Source

Add dhallPackages and add current Prelude

Dhall is a non-turing complete programming language.
nixos-19.03
Profpatsch 2 years ago
parent
commit
34bf218b16

+ 4
- 0
.github/CODEOWNERS View File

@@ -113,3 +113,7 @@
113 113
 /nixos/modules/services/databases/postgresql.xml @thoughtpolice
114 114
 /nixos/modules/services/databases/postgresql.nix @thoughtpolice
115 115
 /nixos/tests/postgresql.nix @thoughtpolice
116
+
117
+# Dhall
118
+/pkgs/development/dhall-modules      @Gabriel439 @Profpatsch
119
+/pkgs/development/interpreters/dhall @Gabriel439 @Profpatsch

+ 9
- 0
pkgs/development/dhall-modules/default.nix View File

@@ -0,0 +1,9 @@
1
+{ pkgs }:
2
+
3
+# TODO: add into the toplevel fixpoint instead of using rec
4
+rec {
5
+
6
+  prelude = prelude_3_0_0;
7
+  prelude_3_0_0 = pkgs.callPackage ./prelude/v3.nix {};
8
+
9
+}

+ 25
- 0
pkgs/development/dhall-modules/prelude/v3.nix View File

@@ -0,0 +1,25 @@
1
+{ stdenv, lib, fetchFromGitHub }:
2
+
3
+stdenv.mkDerivation {
4
+  name = "dhall-prelude";
5
+
6
+  src = fetchFromGitHub {
7
+    owner = "dhall-lang";
8
+    repo = "dhall-lang";
9
+    # Commit where the v3.0.0 prelude folder was merged into dhall-lang
10
+    # and a LICENSE file has been added.
11
+    rev = "f6aa9399f1ac831d66c34104abe6856023c5b2df";
12
+    sha256 = "0kqjgh3y1l3cb3rj381j7c09547g1vh2dsfzpm08y1qajhhf9vgf";
13
+  };
14
+
15
+  phases = [ "unpackPhase" "installPhase" ];
16
+
17
+  installPhase = ''
18
+    cp -r Prelude $out
19
+  '';
20
+
21
+  meta = {
22
+    license = lib.licenses.bsd3;
23
+    maintainers = with lib.maintainers; [ Profpatsch ];
24
+  };
25
+}

+ 2
- 0
pkgs/top-level/all-packages.nix View File

@@ -7549,6 +7549,8 @@ with pkgs;
7549 7549
 
7550 7550
   dhall-text = haskell.lib.justStaticExecutables haskellPackages.dhall-text;
7551 7551
 
7552
+  dhallPackages = import ../development/dhall-modules { inherit pkgs; };
7553
+
7552 7554
   duktape = callPackage ../development/interpreters/duktape { };
7553 7555
 
7554 7556
   beam = callPackage ./beam-packages.nix { };

Loading…
Cancel
Save