From 41739638187c15781c2fd82ace68f0ab78987291 Mon Sep 17 00:00:00 2001 From: Thomaz Leite <1@thomazleite.com> Date: Thu, 18 Mar 2021 19:45:03 -0300 Subject: [PATCH] fluxcd: 0.8.2 -> 0.10.0 --- .../networking/cluster/fluxcd/default.nix | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/cluster/fluxcd/default.nix b/pkgs/applications/networking/cluster/fluxcd/default.nix index d82c6b45742d..eb2e5e049cf2 100644 --- a/pkgs/applications/networking/cluster/fluxcd/default.nix +++ b/pkgs/applications/networking/cluster/fluxcd/default.nix @@ -1,26 +1,39 @@ -{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: +{ lib, buildGoModule, fetchFromGitHub, fetchzip, installShellFiles }: + +let + version = "0.10.0"; + + manifests = fetchzip { + url = "https://github.com/fluxcd/flux2/releases/download/v${version}/manifests.tar.gz"; + sha256 = "Der1Ud27eIV450KkxDTF2frmeKEHKsg6vJgdXE+3548="; + stripRoot = false; + }; +in buildGoModule rec { + inherit version; + pname = "fluxcd"; - version = "0.8.2"; src = fetchFromGitHub { owner = "fluxcd"; repo = "flux2"; rev = "v${version}"; - sha256 = "1yrjgjagh7jfzgvnj9wr71mk34x7yf66fwyby73f1pfi2cg49nhp"; + sha256 = "iJ6UyHbF4+RvfNoOuHt6X2R6XhpBe+t76deldwY5P2c="; }; - vendorSha256 = "0acxbmc4j1fcdja0s9g04f0kd34x54yfqismibfi40m2gzbg6ljr"; + vendorSha256 = "Z0keCr+KZ593c6a/56lYJwOgXu5hrUSn6N3NFf2LDUM="; nativeBuildInputs = [ installShellFiles ]; - doCheck = false; - subPackages = [ "cmd/flux" ]; buildFlagsArray = [ "-ldflags=-s -w -X main.VERSION=${version}" ]; + postUnpack = '' + cp -r ${manifests} source/cmd/flux/manifests + ''; + doInstallCheck = true; installCheckPhase = '' $out/bin/flux --version | grep ${version} > /dev/null