depot/third_party/nixpkgs/pkgs/tools/networking/cloudflare-warp/default.nix
Default email 889482aab3 Project import generated by Copybara.
GitOrigin-RevId: f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5
2022-06-26 12:26:21 +02:00

49 lines
1.2 KiB
Nix

{ stdenv, lib, fetchurl, dpkg, autoPatchelfHook, dbus }:
stdenv.mkDerivation rec {
pname = "cloudflare-warp";
version = "2022.02.24";
src = fetchurl {
url = "https://pkg.cloudflareclient.com/uploads/cloudflare_warp_2022_2_288_1_amd64_a0be7b47b3.deb";
sha256 = "sha256-gBXF0EfFMT6BC6ts/6PQYJH3AAQSDsFoZGK3RZIqmOA=";
};
nativeBuildInputs = [
dpkg
autoPatchelfHook
];
buildInputs = [ dbus ];
dontBuild = true;
dontConfigure = true;
unpackPhase = ''
dpkg-deb -x ${src} ./
'';
installPhase = ''
runHook preInstall
mv usr $out
mv lib $out
mv bin $out
runHook postInstall
'';
postInstall = ''
substituteInPlace $out/lib/systemd/system/warp-svc.service \
--replace "ExecStart=" "ExecStart=$out"
'';
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";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ wolfangaukang ];
platforms = [ "x86_64-linux" ];
};
}