uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
8
pkgs/applications/networking/cluster/linkerd/default.nix
Normal file
8
pkgs/applications/networking/cluster/linkerd/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ callPackage }:
|
||||
|
||||
(callPackage ./generic.nix { }) {
|
||||
channel = "stable";
|
||||
version = "2.11.1";
|
||||
sha256 = "09zwxcaqn537ls737js7rcsqarapw5k25gv41d844k73yvxm882c";
|
||||
vendorSha256 = "sha256-RayboJdjkmCiUsUBab9ntIH+koOCgp3gmVqXZEUWK88=";
|
||||
}
|
||||
8
pkgs/applications/networking/cluster/linkerd/edge.nix
Normal file
8
pkgs/applications/networking/cluster/linkerd/edge.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ callPackage }:
|
||||
|
||||
(callPackage ./generic.nix { }) {
|
||||
channel = "edge";
|
||||
version = "22.2.4";
|
||||
sha256 = "1s53zlb7f0xp2vqa5fnsjdhjq203bsksrmdbrxkkm1yi3nc3p369";
|
||||
vendorSha256 = "sha256-cN19kKa4Ieweta95/4bKlAYn/Bq8j27H408za3OoJoI=";
|
||||
}
|
||||
58
pkgs/applications/networking/cluster/linkerd/generic.nix
Normal file
58
pkgs/applications/networking/cluster/linkerd/generic.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:
|
||||
|
||||
{ channel, version, sha256, vendorSha256 }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "linkerd-${channel}";
|
||||
inherit version vendorSha256;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linkerd";
|
||||
repo = "linkerd2";
|
||||
rev = "${channel}-${version}";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
subPackages = [ "cli" ];
|
||||
|
||||
preBuild = ''
|
||||
env GOFLAGS="" go generate ./pkg/charts/static
|
||||
env GOFLAGS="" go generate ./jaeger/static
|
||||
env GOFLAGS="" go generate ./multicluster/static
|
||||
env GOFLAGS="" go generate ./viz/static
|
||||
'';
|
||||
|
||||
tags = [
|
||||
"prod"
|
||||
];
|
||||
|
||||
ldflags = [
|
||||
"-s" "-w"
|
||||
"-X github.com/linkerd/linkerd2/pkg/version.Version=${src.rev}"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
mv $out/bin/cli $out/bin/linkerd
|
||||
installShellCompletion --cmd linkerd \
|
||||
--bash <($out/bin/linkerd completion bash) \
|
||||
--zsh <($out/bin/linkerd completion zsh) \
|
||||
--fish <($out/bin/linkerd completion fish)
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
$out/bin/linkerd version --client | grep ${src.rev} > /dev/null
|
||||
'';
|
||||
|
||||
passthru.updateScript = (./. + "/update-${channel}.sh");
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple Kubernetes service mesh that improves security, observability and reliability";
|
||||
downloadPage = "https://github.com/linkerd/linkerd2/";
|
||||
homepage = "https://linkerd.io/";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ Gonzih bryanasdev000 ];
|
||||
};
|
||||
}
|
||||
33
pkgs/applications/networking/cluster/linkerd/update-edge.sh
Executable file
33
pkgs/applications/networking/cluster/linkerd/update-edge.sh
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl gnugrep gnused jq
|
||||
|
||||
set -x -eu -o pipefail
|
||||
|
||||
cd $(dirname "$0")
|
||||
|
||||
VERSION=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} \
|
||||
--silent https://api.github.com/repos/linkerd/linkerd2/releases | \
|
||||
jq 'map(.tag_name)' | grep edge | sed 's/["|,| ]//g' | sed 's/edge-//' | sort -V -r | head -n1)
|
||||
|
||||
SHA256=$(nix-prefetch-url --quiet --unpack https://github.com/linkerd/linkerd2/archive/refs/tags/edge-${VERSION}.tar.gz)
|
||||
|
||||
setKV () {
|
||||
sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" ./edge.nix
|
||||
}
|
||||
|
||||
setKV version ${VERSION}
|
||||
setKV sha256 ${SHA256}
|
||||
setKV vendorSha256 "0000000000000000000000000000000000000000000000000000" # Necessary to force clean build.
|
||||
|
||||
cd ../../../../../
|
||||
set +e
|
||||
VENDOR_SHA256=$(nix-build --no-out-link -A linkerd_edge 2>&1 >/dev/null | grep "got:" | cut -d':' -f2 | sed 's| ||g')
|
||||
set -e
|
||||
cd - > /dev/null
|
||||
|
||||
if [ -n "${VENDOR_SHA256:-}" ]; then
|
||||
setKV vendorSha256 ${VENDOR_SHA256}
|
||||
else
|
||||
echo "Update failed. VENDOR_SHA256 is empty."
|
||||
exit 1
|
||||
fi
|
||||
33
pkgs/applications/networking/cluster/linkerd/update-stable.sh
Executable file
33
pkgs/applications/networking/cluster/linkerd/update-stable.sh
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl gnugrep gnused jq
|
||||
|
||||
set -x -eu -o pipefail
|
||||
|
||||
cd $(dirname "$0")
|
||||
|
||||
VERSION=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} \
|
||||
--silent https://api.github.com/repos/linkerd/linkerd2/releases | \
|
||||
jq 'map(.tag_name)' | grep stable | sed 's/["|,| ]//g' | sed 's/stable-//' | sort -V -r | head -n1)
|
||||
|
||||
SHA256=$(nix-prefetch-url --quiet --unpack https://github.com/linkerd/linkerd2/archive/refs/tags/stable-${VERSION}.tar.gz)
|
||||
|
||||
setKV () {
|
||||
sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" ./default.nix
|
||||
}
|
||||
|
||||
setKV version ${VERSION}
|
||||
setKV sha256 ${SHA256}
|
||||
setKV vendorSha256 "0000000000000000000000000000000000000000000000000000" # Necessary to force clean build.
|
||||
|
||||
cd ../../../../../
|
||||
set +e
|
||||
VENDOR_SHA256=$(nix-build --no-out-link -A linkerd 2>&1 >/dev/null | grep "got:" | cut -d':' -f2 | sed 's| ||g')
|
||||
set -e
|
||||
cd - > /dev/null
|
||||
|
||||
if [ -n "${VENDOR_SHA256:-}" ]; then
|
||||
setKV vendorSha256 ${VENDOR_SHA256}
|
||||
else
|
||||
echo "Update failed. VENDOR_SHA256 is empty."
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue