mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
boundary: 0.15.4 -> 0.17.1 (#331913)
This commit is contained in:
commit
516e84444d
@ -1,8 +1,12 @@
|
||||
{ stdenv, lib, fetchzip }:
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchzip,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "boundary";
|
||||
version = "0.15.4";
|
||||
version = "0.17.1";
|
||||
|
||||
src =
|
||||
let
|
||||
@ -14,16 +18,17 @@ stdenv.mkDerivation rec {
|
||||
x86_64-darwin = "darwin_amd64";
|
||||
aarch64-darwin = "darwin_arm64";
|
||||
};
|
||||
sha256 = selectSystem {
|
||||
x86_64-linux = "sha256-43Q69Pp5NLB4fITy2X8d0XHp5EX+gFLnwtHOontISoU=";
|
||||
aarch64-linux = "sha256-z87peCBv50eJr/kiFWPZUOeb0WCN4X+0JnxCvn3lCXo=";
|
||||
x86_64-darwin = "sha256-SAhlZNGq5rkNitKVd+EjLOeeTErhWg14tHFG4Bsexv8=";
|
||||
aarch64-darwin = "sha256-2DJgOdgJY6eUR2sqWS47vNjdkQGXOEEsSXhZeUBZxxs=";
|
||||
hash = selectSystem {
|
||||
x86_64-linux = "sha256-U7ZCmpmcZpgLkf2jwc35Q9jezxUzaKp85WX2Tqs5IFI=";
|
||||
aarch64-linux = "sha256-gYbeC+f/EXfhzUtwojjvyEATri1XpHpu+JPQtj4oRb4=";
|
||||
x86_64-darwin = "sha256-N6Uy5JiU9mW1/muHYF6Rf1KLX1iXYt/5ct1IHeFUgds=";
|
||||
aarch64-darwin = "sha256-Oxfzy/9ggcJXS+tXiYmJXSiqbMKw4vv9RMquUuOlJ08=";
|
||||
};
|
||||
in
|
||||
fetchzip {
|
||||
url = "https://releases.hashicorp.com/boundary/${version}/boundary_${version}_${suffix}.zip";
|
||||
inherit sha256;
|
||||
inherit hash;
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
@ -64,7 +69,10 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||
license = licenses.bsl11;
|
||||
maintainers = with maintainers; [ jk techknowlogick ];
|
||||
maintainers = with maintainers; [
|
||||
jk
|
||||
techknowlogick
|
||||
];
|
||||
platforms = platforms.unix;
|
||||
mainProgram = "boundary";
|
||||
};
|
27
pkgs/tools/networking/boundary/update.sh → pkgs/by-name/bo/boundary/update.sh
Executable file → Normal file
27
pkgs/tools/networking/boundary/update.sh → pkgs/by-name/bo/boundary/update.sh
Executable file → Normal file
@ -4,21 +4,18 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(dirname "$(readlink -f "$0")")"
|
||||
NIX_DRV="$ROOT/default.nix"
|
||||
NIX_DRV="$ROOT/package.nix"
|
||||
if [ ! -f "$NIX_DRV" ]; then
|
||||
echo "ERROR: cannot find default.nix in $ROOT"
|
||||
echo "ERROR: cannot find package.nix in $ROOT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fetch_arch() {
|
||||
VER="$1"; ARCH="$2"
|
||||
URL="https://releases.hashicorp.com/boundary/${VER}/boundary_${VER}_${ARCH}.zip"
|
||||
nix-prefetch "{ stdenv, fetchzip }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = \"boundary\"; version = \"${VER}\";
|
||||
src = fetchzip { url = \"$URL\"; };
|
||||
}
|
||||
"
|
||||
function calc_hash () {
|
||||
local version=$1
|
||||
local arch=$2
|
||||
url="https://releases.hashicorp.com/boundary/${version}/boundary_${version}_${arch}.zip"
|
||||
zip_hash=$(nix-prefetch-url --unpack $url)
|
||||
nix hash to-sri --type sha256 "$zip_hash"
|
||||
}
|
||||
|
||||
replace_sha() {
|
||||
@ -28,10 +25,10 @@ replace_sha() {
|
||||
# https://releases.hashicorp.com/boundary/0.1.4/boundary_0.1.4_linux_amd64.zip
|
||||
BOUNDARY_VER=$(curl -Ls -w "%{url_effective}" -o /dev/null https://github.com/hashicorp/boundary/releases/latest | awk -F'/' '{print $NF}' | sed 's/v//')
|
||||
|
||||
BOUNDARY_LINUX_X64_SHA256=$(fetch_arch "$BOUNDARY_VER" "linux_amd64")
|
||||
BOUNDARY_DARWIN_X64_SHA256=$(fetch_arch "$BOUNDARY_VER" "darwin_amd64")
|
||||
BOUNDARY_LINUX_AARCH64_SHA256=$(fetch_arch "$BOUNDARY_VER" "linux_arm64")
|
||||
BOUNDARY_DARWIN_AARCH64_SHA256=$(fetch_arch "$BOUNDARY_VER" "darwin_arm64")
|
||||
BOUNDARY_LINUX_X64_SHA256=$(calc_hash "$BOUNDARY_VER" "linux_amd64")
|
||||
BOUNDARY_DARWIN_X64_SHA256=$(calc_hash "$BOUNDARY_VER" "darwin_amd64")
|
||||
BOUNDARY_LINUX_AARCH64_SHA256=$(calc_hash "$BOUNDARY_VER" "linux_arm64")
|
||||
BOUNDARY_DARWIN_AARCH64_SHA256=$(calc_hash "$BOUNDARY_VER" "darwin_arm64")
|
||||
|
||||
sed -i "s/version = \".*\"/version = \"$BOUNDARY_VER\"/" "$NIX_DRV"
|
||||
|
@ -3218,8 +3218,6 @@ with pkgs;
|
||||
|
||||
boxxy = callPackage ../tools/misc/boxxy { };
|
||||
|
||||
boundary = callPackage ../tools/networking/boundary { };
|
||||
|
||||
chamber = callPackage ../tools/admin/chamber { };
|
||||
|
||||
chaos = callPackage ../tools/networking/chaos { };
|
||||
|
Loading…
Reference in New Issue
Block a user