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
68 lines
1.6 KiB
Nix
68 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchzip,
|
|
}:
|
|
|
|
let
|
|
inherit (stdenv.hostPlatform) system;
|
|
throwSystem = throw "Unsupported system: ${system}";
|
|
|
|
plat =
|
|
{
|
|
x86_64-linux = "linux_amd64";
|
|
aarch64-linux = "linux_arm64";
|
|
armv7l-linux = "linux_armv7";
|
|
}
|
|
.${system} or throwSystem;
|
|
|
|
hash =
|
|
{
|
|
x86_64-linux = "sha256-Ewez2QUsIAmxyjxR8wvt7UJpXVHjIb8s6gGF1YNgrec=";
|
|
aarch64-linux = "sha256-5hZaOqnTYWeUJXGObzUZMqE62ZgNvJ9Wi8shVng10l8=";
|
|
armv7l-linux = "sha256-MOM0OS2/mhYaxowsBVnZH0poR+wXsbjsJKldU/nAfjU=";
|
|
}
|
|
.${system} or throwSystem;
|
|
in
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "zrok";
|
|
version = "1.0.4";
|
|
|
|
src = fetchzip {
|
|
url = "https://github.com/openziti/zrok/releases/download/v${finalAttrs.version}/zrok_${finalAttrs.version}_${plat}.tar.gz";
|
|
stripRoot = false;
|
|
inherit hash;
|
|
};
|
|
|
|
updateScript = ./update.sh;
|
|
|
|
installPhase =
|
|
let
|
|
interpreter = "$(< \"$NIX_CC/nix-support/dynamic-linker\")";
|
|
in
|
|
''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
cp zrok $out/bin/
|
|
chmod +x $out/bin/zrok
|
|
patchelf --set-interpreter "${interpreter}" "$out/bin/zrok"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Geo-scale, next-generation sharing platform built on top of OpenZiti";
|
|
homepage = "https://zrok.io";
|
|
license = lib.licenses.asl20;
|
|
mainProgram = "zrok";
|
|
maintainers = [ lib.maintainers.bandresen ];
|
|
platforms = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
"armv7l-linux"
|
|
];
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
|
};
|
|
})
|