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
+++ /dev/null
-{ 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/
- '';
-}
--- /dev/null
+{ 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"
- let addon = constructors ./Addon.dhall
+let addon = ./Addon.dhall
in addon.Postgresql { name = "pg", env_prefix = "POSTGRESQL_ADDON" }