19 waylandSupport ? false,
23 pname = "warp-terminal";
24 versions = lib.importJSON ./versions.json;
25 passthru.updateScript = ./update.sh;
27 linux_arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "aarch64";
29 linux = stdenv.mkDerivation (finalAttrs: {
30 inherit pname meta passthru;
31 inherit (versions."linux_${linux_arch}") version;
33 inherit (versions."linux_${linux_arch}") hash;
34 url = "https://releases.warp.dev/stable/v${finalAttrs.version}/warp-terminal-v${finalAttrs.version}-1-${linux_arch}.pkg.tar.zst";
40 substituteInPlace usr/bin/warp-terminal \
41 --replace-fail /opt/ $out/opt/
53 (lib.getLib stdenv.cc.cc) # libstdc++.so libgcc_s.so
57 runtimeDependencies = [
67 ] ++ lib.optionals waylandSupport [ wayland ];
77 + lib.optionalString waylandSupport ''
78 wrapProgram $out/bin/warp-terminal --set WARP_ENABLE_WAYLAND 1
85 darwin = stdenvNoCC.mkDerivation (finalAttrs: {
86 inherit pname meta passthru;
87 inherit (versions.darwin) version;
89 inherit (versions.darwin) hash;
90 url = "https://releases.warp.dev/stable/v${finalAttrs.version}/Warp.dmg";
95 nativeBuildInputs = [ undmg ];
100 mkdir -p $out/Applications
101 cp -r *.app $out/Applications
108 description = "Rust-based terminal";
109 homepage = "https://www.warp.dev";
110 license = licenses.unfree;
111 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
112 maintainers = with maintainers; [
118 platforms = platforms.darwin ++ [
125 if stdenvNoCC.hostPlatform.isDarwin then darwin else linux