]> git.immae.eu Git - github/fretlink/ansible-kong-app.git/commitdiff
dhall(upgrade): upgrade code to be compatible with dhall 1.21.0 14/head
authorPaul Bonaud <paul.bonaud@fretlink.com>
Fri, 26 Apr 2019 16:06:35 +0000 (18:06 +0200)
committerPaul Bonaud <paul.bonaud@fretlink.com>
Fri, 26 Apr 2019 18:42:35 +0000 (20:42 +0200)
.travis.yml
dhall-1.18.0.nix [deleted file]
dhall-1.21.0.nix [new file with mode: 0644]
dhall/server/service/plugin/CorrelationId.dhall
dhall/server/service/plugin/mkIPRestriction.dhall
dhall/server/service/plugin/mkRequestTermination.dhall
dhall/server/service/plugin/mkRequestTransformer.dhall

index f18b9b37a952e4b5a3bdfb2387260174ef97c309..029c1a9375ef3b24897810fa781469267eb9920e 100644 (file)
@@ -7,7 +7,7 @@ sudo: false
 install:
   # Install ansible
   - nix-env -i python2.7-ansible python2.7-ansible-lint
-  - nix-env -if ./dhall-1.18.0.nix
+  - nix-env -if ./dhall-1.21.0.nix
 
   # Check ansible version
   - ansible --version
diff --git a/dhall-1.18.0.nix b/dhall-1.18.0.nix
deleted file mode 100644 (file)
index d6522bd..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-{ pkgs ? import <nixpkgs> {} }: with pkgs;
-
-stdenv.mkDerivation rec {
-  name = "dhall-${version}";
-  version = "1.18.0";
-  phases = [ "installPhase "];
-  src = fetchurl {
-    url = "https://github.com/dhall-lang/dhall-haskell/releases/download/${version}/dhall-${version}-x86_64-linux.tar.bz2";
-    sha256 = "0jvw6ss96xifb21mzpvfjzvaffcnpj0jhpc4rd36cl2r22800qgx";
-  };
-  installPhase = ''
-    mkdir -p $out/bin
-    tar -xjf $src
-    mv bin/dhall $out/bin/
-  '';
-}
diff --git a/dhall-1.21.0.nix b/dhall-1.21.0.nix
new file mode 100644 (file)
index 0000000..e53369b
--- /dev/null
@@ -0,0 +1,22 @@
+{ pkgs ? import <nixpkgs> {} }: with pkgs;
+
+let
+  mkVersion =
+    version: sha256:
+      stdenv.mkDerivation {
+        name = "dhall-${version}";
+        inherit version;
+        src = fetchurl {
+          url = "https://github.com/dhall-lang/dhall-haskell/releases/download/${version}/dhall-${version}-x86_64-linux.tar.bz2";
+          inherit sha256;
+        };
+        unpackPhase = ''
+          tar -xjf $src
+        '';
+        installPhase = ''
+          mkdir -p $out/bin
+          mv bin/dhall $out/bin/
+        '';
+      };
+in
+  mkVersion "1.21.0" "0x7q6v1y62fq6724kx1hcfp1fcqv3lbv33ji6jzfd5y316a31r77"
index d96bfc982a02c07c22782cb4daed066203430b52..655cd8d792a7b7db28bad5e91be900ce822f6b8c 100644 (file)
@@ -1,11 +1,11 @@
-    let Plugin = ./Plugin.dhall
+let Plugin = ./Plugin.dhall
 
-in  let config = constructors ./Config.dhall
+let config = ./Config.dhall
 
 in    { name =
-          "correlation-id"
-      , config =
-          config.CorrelationId
-          { header_name = "X-correl", echo_downstream = True }
-      }
-    : Plugin
+                 "correlation-id"
+         , config =
+                 config.CorrelationId
+                 { header_name = "X-correl", echo_downstream = True }
+         }
+       : Plugin
index f8037696d1c463bd374adea7893b755b3445347b..a27e5d9f8d21960639eb3411a10aa6bce3c0a365 100644 (file)
@@ -1,11 +1,11 @@
-    let Plugin = ./Plugin.dhall
+let Plugin = ./Plugin.dhall
 
-in  let config = constructors ./Config.dhall
+let config = ./Config.dhall
 
 in    λ(whiteList : Text)
-    →   { name =
-            "ip-restriction"
-        , config =
-            config.IPRestriction { whitelist = whiteList }
-        }
-      : Plugin
+       →   { name =
+                       "ip-restriction"
+               , config =
+                       config.IPRestriction { whitelist = whiteList }
+               }
+         : Plugin
index aff538f3819782fc17767e9f2e4d263f252df210..1d047d707c2f0872094c0b55a37eb78bc2b47dcf 100644 (file)
@@ -1,20 +1,20 @@
-    let Plugin = ./Plugin.dhall
+let Plugin = ./Plugin.dhall
 
-in  let config = constructors ./Config.dhall
+let config = ./Config.dhall
 
 in    λ(statusCode : Natural)
-    → λ(contentType : Text)
-    → λ(body : Text)
-    →   { name =
-            "request-termination"
-        , config =
-            config.RequestTermination
-            { status_code =
-                statusCode
-            , content_type =
-                contentType
-            , body =
-                body
-            }
-        }
-      : Plugin
+       → λ(contentType : Text)
+       → λ(body : Text)
+       →   { name =
+                       "request-termination"
+               , config =
+                       config.RequestTermination
+                       { status_code =
+                               statusCode
+                       , content_type =
+                               contentType
+                       , body =
+                               body
+                       }
+               }
+         : Plugin
index 1d8d608914a1fc74695c21abd0400bd9cdb28bf2..488ecdd8da640bee8d3210154127ef9ba769ba8f 100644 (file)
@@ -1,11 +1,11 @@
 let Plugin = ./Plugin.dhall
 
-in  let config = constructors ./Config.dhall
+let config = ./Config.dhall
 
-       in    λ(header : Text)
-               →   { name =
-                               "request-transformer"
-                       , config =
-                               config.RequestTransformer { add = { headers = [ header ] } }
-                       }
-                 : Plugin
\ No newline at end of file
+in    λ(header : Text)
+       →   { name =
+                       "request-transformer"
+               , config =
+                       config.RequestTransformer { add = { headers = [ header ] } }
+               }
+         : Plugin