Thanks to https://github.com/devusb/sentinelone-nix
This commit is contained in:
2025-11-17 09:26:08 +00:00
parent a8518a360c
commit 679c3f4354
4 changed files with 251 additions and 2 deletions

View File

@@ -0,0 +1,58 @@
{
stdenv,
fetchurl,
dpkg,
autoPatchelfHook,
zlib,
elfutils,
dmidecode,
jq,
gcc-unwrapped,
}:
let
sentinelOnePackage = "SentinelAgent_linux_x86_64_v25_2_2_14.deb";
in
stdenv.mkDerivation {
pname = "sentinelone";
version = "25.2.2.14";
src = fetchurl {
url = "http://hdd.jakstys.lt/Motiejaus/${sentinelOnePackage}";
hash = "sha256-ZWtuJ/ua2roIz2I/4CicnVXlc1Sj5w/r412pS5KfmOA=";
};
unpackPhase = ''
runHook preUnpack
dpkg-deb -x $src .
runHook postUnpack
'';
nativeBuildInputs = [
dpkg
autoPatchelfHook
zlib
elfutils
dmidecode
jq
gcc-unwrapped
];
installPhase = ''
mkdir -p $out/opt/
mkdir -p $out/cfg/
mkdir -p $out/bin/
cp -r opt/* $out/opt
ln -s $out/opt/sentinelone/bin/sentinelctl $out/bin/sentinelctl
ln -s $out/opt/sentinelone/bin/sentinelone-agent $out/bin/sentinelone-agent
ln -s $out/opt/sentinelone/bin/sentinelone-watchdog $out/bin/sentinelone-watchdog
ln -s $out/opt/sentinelone/lib $out/lib
'';
preFixup = ''
patchelf --replace-needed libelf.so.0 libelf.so $out/opt/sentinelone/lib/libbpf.so
'';
}