From db307701013b73f51a544116b9ec1ff37ab0f8df Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 20 Dec 2019 22:19:52 +0000 Subject: [PATCH] fix(kontemplate): Make build compatible with readTree The kontemplate build will keep using `buildGoPackage` for now until I've had the time to add tests to //nix/buildGo --- ci-builds.nix | 1 + ops/kontemplate/README.md | 2 -- ops/kontemplate/default.nix | 4 ++-- overrides/kontemplate/default.nix | 18 ++++++------------ third_party/default.nix | 1 + 5 files changed, 10 insertions(+), 16 deletions(-) diff --git a/ci-builds.nix b/ci-builds.nix index 5f3ae9bcf..fe4c8477a 100644 --- a/ci-builds.nix +++ b/ci-builds.nix @@ -10,6 +10,7 @@ in with pkgs; [ nix.yants.tests ops.journaldriver ops.kms_pass + ops.kontemplate ops.sync-gcsr tools.blog_cli tools.emacs diff --git a/ops/kontemplate/README.md b/ops/kontemplate/README.md index f95c9a1e0..e959e1b64 100644 --- a/ops/kontemplate/README.md +++ b/ops/kontemplate/README.md @@ -1,8 +1,6 @@ Kontemplate - A simple Kubernetes templater =========================================== -[![Build Status](https://travis-ci.org/tazjin/kontemplate.svg?branch=master)](https://travis-ci.org/tazjin/kontemplate) - [Kontemplate][] is a simple CLI tool that can take sets of Kubernetes resource files with placeholders and insert values per environment. diff --git a/ops/kontemplate/default.nix b/ops/kontemplate/default.nix index afec560fb..8a56bba7f 100644 --- a/ops/kontemplate/default.nix +++ b/ops/kontemplate/default.nix @@ -10,9 +10,9 @@ # This file is the Nix derivation used to install Kontemplate on # Nix-based systems. -{ pkgs ? import {} }: +{ pkgs, ... }: -with pkgs; buildGoPackage rec { +with pkgs.third_party; buildGoPackage rec { name = "kontemplate-${version}"; version = "master"; src = ./.; diff --git a/overrides/kontemplate/default.nix b/overrides/kontemplate/default.nix index 74693c383..52da1ba32 100644 --- a/overrides/kontemplate/default.nix +++ b/overrides/kontemplate/default.nix @@ -1,19 +1,13 @@ { pkgs, ... }: -let master = pkgs.third_party.kontemplate.overrideAttrs(_: { - src = pkgs.third_party.fetchFromGitHub { - owner = "tazjin"; - repo = "kontemplate"; - rev = "v1.8.0"; - sha256 = "123mjmmm4hynraq1fpn3j5i0a1i87l265kkjraxxxbl0zacv74i1"; - }; -}); -in pkgs.third_party.writeShellScriptBin "kontemplate" '' - export PATH="${pkgs.ops.kms_pass}/bin:$PATH" +with pkgs; + +third_party.writeShellScriptBin "kontemplate" '' + export PATH="${ops.kms_pass}/bin:$PATH" if [[ -z $1 ]]; then - exec ${master}/bin/kontemplate + exec ${ops.kontemplate}/bin/kontemplate fi - exec ${master}/bin/kontemplate $1 ${./../..}/ops/infra/kubernetes/primary-cluster.yaml ''${@:2} + exec ${ops.kontemplate}/bin/kontemplate $1 ${./../..}/ops/infra/kubernetes/primary-cluster.yaml ''${@:2} '' diff --git a/third_party/default.nix b/third_party/default.nix index 61ad62bf2..94954f960 100644 --- a/third_party/default.nix +++ b/third_party/default.nix @@ -59,6 +59,7 @@ let notmuch openssh openssl + parallel pkgconfig protobuf remarshal