Files
nixpkgs/pkgs/by-name/en/envoy-bin/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

76 lines
1.7 KiB
Nix

{
lib,
stdenv,
autoPatchelfHook,
fetchurl,
makeWrapper,
nixosTests,
versionCheckHook,
}:
let
version = "1.35.3";
inherit (stdenv.hostPlatform) system;
throwSystem = throw "envoy-bin is not available for ${system}.";
plat =
{
aarch64-linux = "aarch_64";
x86_64-linux = "x86_64";
}
.${system} or throwSystem;
hash =
{
aarch64-linux = "sha256-NN5VDwIYLTHSYpVljAQQOdRjQavNGn5BLmpOK+Azg18=";
x86_64-linux = "sha256-JBwXAvDtHA26MTOauqtCKQakKVzJJkD1uDLBMe44V2c=";
}
.${system} or throwSystem;
in
stdenv.mkDerivation {
pname = "envoy-bin";
inherit version;
src = fetchurl {
url = "https://github.com/envoyproxy/envoy/releases/download/v${version}/envoy-${version}-linux-${plat}";
inherit hash;
};
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ makeWrapper ];
dontUnpack = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
install -m755 $src $out/bin/envoy
runHook postInstall
'';
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgram = "${placeholder "out"}/bin/envoy";
versionCheckProgramArg = "--version";
passthru = {
tests.envoy-bin = nixosTests.envoy-bin;
updateScript = ./update.sh;
};
meta = {
homepage = "https://envoyproxy.io";
changelog = "https://github.com/envoyproxy/envoy/releases/tag/v${version}";
description = "Cloud-native edge and service proxy";
license = lib.licenses.asl20;
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
maintainers = with lib.maintainers; [ katexochen ];
mainProgram = "envoy";
platforms = [
"x86_64-linux"
"aarch64-linux"
];
};
}