forked from mirrors/nixpkgs
argocd: 2.2.5 -> 2.3.1
Drop packr (3f32a750a0
), helm and kustomize as it does not seem necessary to use cli only
maintain commit and add todo for updatescript
add cmd to subpackage per https://github.com/argoproj/argo-cd/blob/master/Makefile\#L222
since it builds only cmd, doCheck = false is not needed anymore, also the fix for it is only in master at the current time
note, we only build the cli from now on as i think the other componentes are a bit irelevant to nixos
drop makewrapper
reorganize phases based on https://nixos.org/manual/nixpkgs/stable/\#ssec-controlling-phases
This commit is contained in:
parent
55102a3972
commit
5e06fb8879
|
@ -1,26 +1,25 @@
|
||||||
{ lib, buildGoModule, fetchFromGitHub, packr, makeWrapper, installShellFiles, helm, kustomize }:
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "argocd";
|
pname = "argocd";
|
||||||
version = "2.2.5";
|
version = "2.3.1";
|
||||||
commit = "8f981ccfcf942a9eb00bc466649f8499ba0455f5";
|
|
||||||
tag = "v${version}";
|
tag = "v${version}";
|
||||||
|
# Update commit to match the tag above
|
||||||
|
# TODO make updadeScript
|
||||||
|
commit = "b65c1699fa2a2daa031483a3890e6911eac69068";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "argoproj";
|
owner = "argoproj";
|
||||||
repo = "argo-cd";
|
repo = "argo-cd";
|
||||||
rev = tag;
|
rev = tag;
|
||||||
sha256 = "sha256-wSvDoRHV4BObRL8lEpHt9oGXNB06LXdIYasRYqmM5QA=";
|
sha256 = "sha256-YijhJz7m5wy8kR9V6IHSNYjiWh7H2ph6il9nMsrePOE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "sha256-BVhts+gOM6nhcR1lkFzy7OJnainLXw5YdeseBBRF2xE=";
|
vendorSha256 = "sha256-uA9sOMuVHKRRhSGoLyoKcUYU6NxtprVUITvVC+tot1g=";
|
||||||
|
|
||||||
nativeBuildInputs = [ packr makeWrapper installShellFiles ];
|
# Set target as ./cmd per release-cli
|
||||||
|
# https://github.com/argoproj/argo-cd/blob/master/Makefile#L222
|
||||||
# run packr to embed assets
|
subPackages = [ "cmd" ];
|
||||||
preBuild = ''
|
|
||||||
packr
|
|
||||||
'';
|
|
||||||
|
|
||||||
ldflags =
|
ldflags =
|
||||||
let package_url = "github.com/argoproj/argo-cd/v2/common"; in
|
let package_url = "github.com/argoproj/argo-cd/v2/common"; in
|
||||||
|
@ -33,20 +32,7 @@ buildGoModule rec {
|
||||||
"-X ${package_url}.gitTreeState=clean"
|
"-X ${package_url}.gitTreeState=clean"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Test is disabled because ksonnet is missing from nixpkgs.
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
# Log: https://gist.github.com/superherointj/79cbdc869dfd44d28a10dc6746ecb3f9
|
|
||||||
doCheck = false;
|
|
||||||
checkInputs = [
|
|
||||||
helm
|
|
||||||
kustomize
|
|
||||||
#ksonnet
|
|
||||||
];
|
|
||||||
|
|
||||||
doInstallCheck = true;
|
|
||||||
installCheckPhase = ''
|
|
||||||
$out/bin/argocd version --client | grep ${tag} > /dev/null
|
|
||||||
$out/bin/argocd-util version --client | grep ${tag} > /dev/null
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
@ -55,10 +41,12 @@ buildGoModule rec {
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
doInstallCheck = true;
|
||||||
|
installCheckPhase = ''
|
||||||
|
$out/bin/argocd version --client | grep ${tag} > /dev/null
|
||||||
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
for appname in argocd-util argocd-server argocd-repo-server argocd-application-controller argocd-dex ; do
|
|
||||||
makeWrapper $out/bin/argocd $out/bin/$appname --set ARGOCD_BINARY_NAME $appname
|
|
||||||
done
|
|
||||||
installShellCompletion --cmd argocd \
|
installShellCompletion --cmd argocd \
|
||||||
--bash <($out/bin/argocd completion bash) \
|
--bash <($out/bin/argocd completion bash) \
|
||||||
--zsh <($out/bin/argocd completion zsh)
|
--zsh <($out/bin/argocd completion zsh)
|
||||||
|
|
Loading…
Reference in a new issue