lol

Merge pull request #290731 from imadnyc/warp-terminal-initial-linux

warp-terminal: added initial linux support

authored by

a-n-n-a-l-e-e and committed by
GitHub
f3ed7ded 653954e0

+77 -13
+77 -13
pkgs/by-name/wa/warp-terminal/package.nix
··· 1 1 { lib 2 2 , stdenvNoCC 3 + , stdenv 3 4 , fetchurl 5 + , autoPatchelfHook 4 6 , undmg 7 + , zstd 8 + , curl 9 + , fontconfig 10 + , libglvnd 11 + , libxkbcommon 12 + , vulkan-loader 13 + , xdg-utils 14 + , xorg 15 + , zlib 5 16 }: 6 - stdenvNoCC.mkDerivation (finalAttrs: { 7 - pname = "warp-terminal"; 8 - version = "0.2023.12.05.08.02.stable_00"; 17 + 18 + let 19 + pname = "warp-terminal"; 20 + version = "0.2024.02.20.08.01.stable_01"; 9 21 22 + linux = stdenv.mkDerivation (finalAttrs: { 23 + inherit pname version meta; 24 + src = fetchurl { 25 + url = "https://releases.warp.dev/stable/v${finalAttrs.version}/warp-terminal-v${finalAttrs.version}-1-x86_64.pkg.tar.zst"; 26 + hash = "sha256-L8alnqSE4crrDozRfPaAAMkLc+5+8d9XBKd5ddsxmD0="; 27 + }; 28 + 29 + sourceRoot = "."; 30 + 31 + postPatch = '' 32 + substituteInPlace usr/bin/warp-terminal \ 33 + --replace-fail /opt/ $out/opt/ 34 + ''; 35 + 36 + nativeBuildInputs = [ autoPatchelfHook zstd ]; 37 + 38 + buildInputs = [ 39 + curl 40 + fontconfig 41 + stdenv.cc.cc.lib # libstdc++.so libgcc_s.so 42 + zlib 43 + ]; 44 + 45 + runtimeDependencies = [ 46 + libglvnd # for libegl 47 + libxkbcommon 48 + stdenv.cc.libc 49 + vulkan-loader 50 + xdg-utils 51 + xorg.libX11 52 + xorg.libxcb 53 + xorg.libXcursor 54 + xorg.libXi 55 + ]; 56 + 57 + installPhase = '' 58 + runHook preInstall 59 + 60 + mkdir $out 61 + cp -r opt usr/* $out 62 + 63 + runHook postInstall 64 + ''; 65 + }); 66 + 67 + darwin = stdenvNoCC.mkDerivation (finalAttrs: { 68 + inherit pname version meta; 10 69 src = fetchurl { 11 70 url = "https://releases.warp.dev/stable/v${finalAttrs.version}/Warp.dmg"; 12 - hash = "sha256-9olAmczIPRXV15NYCOYmwuEmJ7lMeaQRTTfukaYXMR0="; 71 + hash = "sha256-tFtoD8URMFfJ3HRkyKStuDStFkoRIV97y9kV4pbDPro="; 13 72 }; 14 73 15 74 sourceRoot = "."; ··· 24 83 25 84 runHook postInstall 26 85 ''; 86 + }); 27 87 28 - meta = with lib; { 29 - description = "Rust-based terminal"; 30 - homepage = "https://www.warp.dev"; 31 - license = licenses.unfree; 32 - sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 33 - maintainers = with maintainers; [ emilytrau Enzime ]; 34 - platforms = platforms.darwin; 35 - }; 36 - }) 88 + meta = with lib; { 89 + description = "Rust-based terminal"; 90 + homepage = "https://www.warp.dev"; 91 + license = licenses.unfree; 92 + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 93 + maintainers = with maintainers; [ emilytrau Enzime ]; 94 + platforms = platforms.darwin ++ [ "x86_64-linux" ]; 95 + }; 96 + 97 + in 98 + if stdenvNoCC.isDarwin 99 + then darwin 100 + else linux