3
0
Fork 0
forked from mirrors/nixpkgs

fluxcd: 0.8.2 -> 0.10.0

This commit is contained in:
Thomaz Leite 2021-03-18 19:45:03 -03:00
parent 9fb26cf0c8
commit 4173963818

View file

@ -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