Created
June 16, 2021 00:23
-
-
Save superherointj/9aca8e43df64c9c41de1e67d3813c6ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib, fetchFromGitHub, buildGoModule }: | |
let | |
vfsgen = (fetchFromGitHub { | |
owner = "shurcooL"; | |
repo = "vfsgen"; | |
rev = "0d455de96546f756e8830efeec8dab0f489af135"; | |
sha256 = "sha256-8wobXCZHGHf7rIcyeiJ+aA/XkzbbaXt7laGXhNXboVU="; | |
}); | |
logrus = (fetchFromGitHub { | |
owner = "sirupsen"; | |
repo = "logrus"; | |
rev = "b50299cfaaa1bca85be76c8984070e846c7abfd2"; | |
sha256 = "sha256-/bWZ+tPtvEBEiM9mQuRFo0Eq1v6UZ5J4N71G1mFTJxI="; | |
}); | |
in | |
buildGoModule rec { | |
pname = "linkerd"; | |
version = "edge-21.6.2"; | |
src = fetchFromGitHub { | |
owner = "linkerd"; | |
repo = "linkerd2"; | |
rev = version; | |
sha256 = "sha256-kgdKH+cIYRg5A3+wrJJ7jcY6Xl206EwBYa37PT3xn1k="; | |
}; | |
buildInputs = [ | |
vfsgen | |
logrus | |
]; | |
preBuild = '' | |
mkdir -p $GOCACHE/github.com/shurcooL/vfsgen/ | |
mkdir -p $GOCACHE/github.com/sirupsen/logrus/ | |
cp -r ${vfsgen} $GOCACHE/github.com/shurcooL/vfsgen/ | |
cp -r ${logrus} $GOCACHE/github.com/sirupsen/logrus/ | |
go generate ./pkg/charts/static | |
go generate ./jaeger/static | |
go generate ./multicluster/static | |
go generate ./viz/static | |
''; | |
buildFlagsArray = [ | |
"-tags=prod" | |
"-ldflags=" | |
"-s -w" | |
"-X github.com/linkerd/linkerd2/pkg/version.Version=${version}" | |
]; | |
vendorSha256 = "sha256-QVLg1ZRsNQPM4lERVHpZLbd+I32JZ1pbGNSGIVTbseg="; | |
doCheck = true; | |
deleteVendor = true; | |
runVend = true; | |
subPackages = [ "cli" ]; | |
meta = with lib; { | |
description = "A service mesh for Kubernetes and beyond"; | |
downloadPage = "https://github.com/linkerd/linkerd2/"; | |
homepage = "https://linkerd.io/"; | |
license = licenses.asl20; | |
maintainers = with maintainers; [ Gonzih ]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment