2018-07-21 01:44:44 +01:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub }:
|
2017-09-01 15:49:24 +01:00
|
|
|
let
|
|
|
|
list = import ./data.nix;
|
2017-09-08 19:36:43 +01:00
|
|
|
|
|
|
|
toDrv = data:
|
2017-09-01 15:49:24 +01:00
|
|
|
buildGoPackage rec {
|
2017-09-08 19:36:43 +01:00
|
|
|
inherit (data) owner repo version sha256;
|
|
|
|
name = "${repo}-${version}";
|
|
|
|
goPackagePath = "github.com/${owner}/${repo}";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
inherit owner repo sha256;
|
|
|
|
rev = "v${version}";
|
|
|
|
};
|
2018-02-06 21:09:22 +00:00
|
|
|
|
|
|
|
# Terraform allow checking the provider versions, but this breaks
|
|
|
|
# if the versions are not provided via file paths.
|
|
|
|
postBuild = "mv go/bin/${repo}{,_v${version}}";
|
2017-09-01 15:49:24 +01:00
|
|
|
};
|
|
|
|
in
|
2018-08-03 21:39:12 +01:00
|
|
|
lib.mapAttrs (n: v: toDrv v) list
|