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
70 lines
1.5 KiB
Nix
70 lines
1.5 KiB
Nix
{
|
|
stdenv,
|
|
fetchurl,
|
|
writeScript,
|
|
autoPatchelfHook,
|
|
dpkg,
|
|
libz,
|
|
lib,
|
|
}:
|
|
stdenv.mkDerivation rec {
|
|
pname = "cato-client";
|
|
version = "5.5.0.2620";
|
|
|
|
src = fetchurl {
|
|
url = "https://clients.catonetworks.com/linux/${version}/cato-client-install.deb";
|
|
sha256 = "sha256-V1BhgLOHP/pGlwvjVFdNslKupjHBVSTDVIRtZ6amwbk=";
|
|
};
|
|
|
|
passthru.updateScript = writeScript "update-cato-client" ''
|
|
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p curl pcre2 common-updater-scripts
|
|
|
|
set -eu -o pipefail
|
|
|
|
version="$(curl -sI https://clientdownload.catonetworks.com/public/clients/cato-client-install.deb | grep -Fi 'Location:' | pcre2grep -o1 '/(([0-9]\.?)+)/')"
|
|
update-source-version cato-client "$version"
|
|
'';
|
|
|
|
dontConfigure = true;
|
|
|
|
nativeBuildInputs = [
|
|
autoPatchelfHook
|
|
dpkg
|
|
];
|
|
|
|
buildInputs = [
|
|
libz
|
|
stdenv.cc.cc
|
|
];
|
|
|
|
unpackPhase = ''
|
|
runHook preUnpack
|
|
dpkg -x $src source
|
|
cd source
|
|
runHook postUnpack
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir $out
|
|
|
|
mv usr/lib $out/lib
|
|
|
|
mkdir -p $out/bin
|
|
mv usr/sbin/* $out/bin
|
|
mv usr/bin/* $out/bin
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Lightweight agent that provides secure zero-trust access to resources everywhere";
|
|
homepage = "https://www.catonetworks.com/platform/cato-client/";
|
|
mainProgram = "cato-sdp";
|
|
license = lib.licenses.unfree;
|
|
maintainers = with lib.maintainers; [ yarekt ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|