]> git.immae.eu Git - github/fretlink/ansible-clever.git/commitdiff
dhall(upgrade): upgrade code to be compatible with dhall 1.21.0 41/head
authorPaul Bonaud <paul.bonaud@fretlink.com>
Fri, 26 Apr 2019 16:19:05 +0000 (18:19 +0200)
committerPaul Bonaud <paul.bonaud@fretlink.com>
Fri, 26 Apr 2019 18:41:38 +0000 (20:41 +0200)
.travis.yml
dhall-1.18.nix [deleted file]
dhall-1.21.0.nix [new file with mode: 0644]
dhall/addon/Postgresql.dhall

index ef53f71de7ed9fd351075580f81190f9127a2a3a..720eade94f5248aa1cf8355158fddc550f748aba 100644 (file)
@@ -4,9 +4,8 @@ language: nix
 sudo: false
 
 install:
-  - nix-env -i python2.7-ansible
-  - nix-env -i python2.7-ansible-lint
-  - nix-env -if ./dhall-1.18.nix
+  - nix-env -i python2.7-ansible python2.7-ansible-lint
+  - nix-env -if ./dhall-1.21.0.nix
 
   # Check ansible version
   - ansible --version
diff --git a/dhall-1.18.nix b/dhall-1.18.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 9dd97440c94b077a72ac3c35b8e853e200b2a719..ed6b41143b8f3208e511f2067e5ec4fe35b7c6a6 100644 (file)
@@ -1,3 +1,3 @@
-    let addon = constructors ./Addon.dhall
+let addon = ./Addon.dhall
 
 in  addon.Postgresql { name = "pg", env_prefix = "POSTGRESQL_ADDON" }