2022-10-06 18:32:54 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, dpkg
|
|
|
|
, autoPatchelfHook
|
|
|
|
, makeWrapper
|
|
|
|
, dbus
|
|
|
|
, nftables
|
|
|
|
}:
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cloudflare-warp";
|
2022-10-06 18:32:54 +00:00
|
|
|
version = "2022.8.936";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-10-06 18:32:54 +00:00
|
|
|
url = "https://pkg.cloudflareclient.com/uploads/cloudflare_warp_2022_8_936_1_amd64_1923bb9dba.deb";
|
|
|
|
sha256 = "sha256-ZuJyMl6g8KDwxc9UipH63naJ4dl/84Vhk7ini/VNPno=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
dpkg
|
|
|
|
autoPatchelfHook
|
2022-10-06 18:32:54 +00:00
|
|
|
makeWrapper
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ dbus ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
dpkg-deb -x ${src} ./
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mv usr $out
|
|
|
|
mv bin $out
|
2022-10-06 18:32:54 +00:00
|
|
|
mv etc $out
|
|
|
|
mv lib/systemd/system $out/lib/systemd/
|
|
|
|
substituteInPlace $out/lib/systemd/system/warp-svc.service \
|
|
|
|
--replace "ExecStart=" "ExecStart=$out"
|
|
|
|
substituteInPlace $out/lib/systemd/user/warp-taskbar.service \
|
|
|
|
--replace "ExecStart=" "ExecStart=$out"
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2022-10-06 18:32:54 +00:00
|
|
|
wrapProgram $out/bin/warp-svc --prefix PATH : ${lib.makeBinPath [ nftables ]}
|
2022-03-30 09:31:56 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Replaces the connection between your device and the Internet with a modern, optimized, protocol";
|
|
|
|
homepage = "https://pkg.cloudflareclient.com/packages/cloudflare-warp";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2022-03-30 09:31:56 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|