about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorStig <stig@stig.io>2024-04-29 18:10:02 +0100
committerGitHub <noreply@github.com>2024-04-29 18:10:02 +0100
commit13e08a15d93c9482c6a668a006f42bb733397300 (patch)
treeae6c93df2dfc5c1a7d8175c1ec8f76b5033d926f /pkgs/tools
parentf81fb75083b97cc40c455c4a4d61d3acefdf4882 (diff)
parentf8c0830b18983f91b1a7532ef7288c7728343ebe (diff)
Merge pull request #304091 from marcusramberg/marcus/warp
cloudflare-warp: 2023.3.470 -> 2024.4.133
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/networking/cloudflare-warp/default.nix33
1 files changed, 25 insertions, 8 deletions
diff --git a/pkgs/tools/networking/cloudflare-warp/default.nix b/pkgs/tools/networking/cloudflare-warp/default.nix
index ee7070d06ddad..7f5c9b18438c9 100644
--- a/pkgs/tools/networking/cloudflare-warp/default.nix
+++ b/pkgs/tools/networking/cloudflare-warp/default.nix
@@ -1,22 +1,32 @@
 { stdenv
 , lib
-, fetchurl
-, dpkg
 , autoPatchelfHook
-, makeWrapper
 , copyDesktopItems
-, makeDesktopItem
 , dbus
+, dpkg
+, fetchurl
+, gtk3
+, libpcap
+, makeDesktopItem
+, makeWrapper
 , nftables
 }:
 
 stdenv.mkDerivation rec {
   pname = "cloudflare-warp";
-  version = "2023.3.470";
+  version = "2024.4.133";
+
+  suffix = {
+    aarch64-linux = "arm64";
+    x86_64-linux = "amd64";
+  }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
 
   src = fetchurl {
-    url = "https://pkg.cloudflareclient.com/pool/jammy/main/c/cloudflare-warp/cloudflare-warp_2023.3.470-1_amd64.deb";
-    hash = "sha256-AYnmisEQKFiEB2iRJifEqRbdzAyBcfrU0ITeUokKLag=";
+    url = "https://pkg.cloudflareclient.com/pool/jammy/main/c/cloudflare-warp/cloudflare-warp_${version}-1_${suffix}.deb";
+    hash = {
+      aarch64-linux = "sha256-qua+aL4+yvpTBGCVUS1rzJX1KZ3DeaW9Bce9lYWvWOM=";
+      x86_64-linux = "sha256-xZhyYDMjcv8SLfYwclvWBqPDETbeaxiA6jFCg3Nv5gc=";
+    }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
   };
 
   nativeBuildInputs = [
@@ -28,6 +38,8 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     dbus
+    gtk3
+    libpcap
     stdenv.cc.cc.lib
   ];
 
@@ -44,12 +56,17 @@ stdenv.mkDerivation rec {
     })
   ];
 
+  autoPatchelfIgnoreMissingDeps = [
+    "libpcap.so.0.8"
+  ];
+
   installPhase = ''
     runHook preInstall
 
     mv usr $out
     mv bin $out
     mv etc $out
+    patchelf --replace-needed libpcap.so.0.8 ${libpcap}/lib/libpcap.so $out/bin/warp-dex
     mv lib/systemd/system $out/lib/systemd/
     substituteInPlace $out/lib/systemd/system/warp-svc.service \
       --replace "ExecStart=" "ExecStart=$out"
@@ -72,6 +89,6 @@ stdenv.mkDerivation rec {
       wolfangaukang
       devpikachu
     ];
-    platforms = [ "x86_64-linux" ];
+    platforms = [ "x86_64-linux" "aarch64-linux" ];
   };
 }