lol

Merge pull request #310646 from nyabinary/goofcord

goofcord: init at 1.4.2

authored by

Raghav Sood and committed by
GitHub
77ae5be1 b223ef04

+151
+151
pkgs/by-name/go/goofcord/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchurl, 5 + autoPatchelfHook, 6 + dpkg, 7 + makeBinaryWrapper, 8 + wrapGAppsHook3, 9 + alsa-lib, 10 + at-spi2-atk, 11 + at-spi2-core, 12 + atk, 13 + cairo, 14 + cups, 15 + dbus, 16 + expat, 17 + ffmpeg, 18 + fontconfig, 19 + freetype, 20 + gdk-pixbuf, 21 + glib, 22 + gtk3, 23 + libappindicator-gtk3, 24 + libdrm, 25 + libnotify, 26 + libpulseaudio, 27 + libsecret, 28 + libuuid, 29 + libxkbcommon, 30 + mesa, 31 + nss, 32 + pango, 33 + systemd, 34 + xdg-utils, 35 + xorg, 36 + wayland, 37 + pipewire, 38 + }: 39 + 40 + stdenv.mkDerivation (finalAttrs: { 41 + pname = "goofcord"; 42 + version = "1.4.2"; 43 + 44 + src = 45 + let 46 + base = "https://github.com/Milkshiift/GoofCord/releases/download"; 47 + in 48 + { 49 + x86_64-linux = fetchurl { 50 + url = "${base}/v${finalAttrs.version}/GoofCord-${finalAttrs.version}-linux-amd64.deb"; 51 + hash = "sha256-fUP/se3hOhs+aAoew25YhRyxnodYPrgqN68RIg1A1Kw="; 52 + }; 53 + aarch64-linux = fetchurl { 54 + url = "${base}/v${finalAttrs.version}/GoofCord-${finalAttrs.version}-linux-arm64.deb"; 55 + hash = "sha256-hVpXmBSIgoON683f/sRtmpHwqxcO6IrFCCRPZjsUqjw="; 56 + }; 57 + } 58 + .${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 59 + 60 + nativeBuildInputs = [ 61 + autoPatchelfHook 62 + dpkg 63 + makeBinaryWrapper 64 + wrapGAppsHook3 65 + ]; 66 + 67 + dontWrapGApps = true; 68 + 69 + buildInputs = [ 70 + alsa-lib 71 + at-spi2-atk 72 + at-spi2-core 73 + atk 74 + cairo 75 + cups 76 + dbus 77 + expat 78 + ffmpeg 79 + fontconfig 80 + freetype 81 + gdk-pixbuf 82 + glib 83 + gtk3 84 + pango 85 + systemd 86 + mesa # for libgbm 87 + nss 88 + libuuid 89 + libdrm 90 + libnotify 91 + libsecret 92 + libpulseaudio 93 + libxkbcommon 94 + libappindicator-gtk3 95 + xorg.libX11 96 + xorg.libxcb 97 + xorg.libXcomposite 98 + xorg.libXcursor 99 + xorg.libXdamage 100 + xorg.libXext 101 + xorg.libXfixes 102 + xorg.libXi 103 + xorg.libXrandr 104 + xorg.libXrender 105 + xorg.libXScrnSaver 106 + xorg.libxshmfence 107 + xorg.libXtst 108 + wayland 109 + pipewire 110 + ]; 111 + 112 + sourceRoot = "."; 113 + unpackCmd = "dpkg-deb -x $src ."; 114 + 115 + installPhase = '' 116 + runHook preInstall 117 + 118 + mkdir -p "$out/bin" 119 + cp -R "opt" "$out" 120 + cp -R "usr/share" "$out/share" 121 + chmod -R g-w "$out" 122 + 123 + # Wrap the startup command 124 + makeBinaryWrapper $out/opt/GoofCord/goofcord $out/bin/goofcord \ 125 + "''${gappsWrapperArgs[@]}" \ 126 + --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \ 127 + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations,WebRTCPipeWireCapturer}}" \ 128 + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath finalAttrs.buildInputs}" \ 129 + --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} 130 + 131 + # Fix desktop link 132 + substituteInPlace $out/share/applications/goofcord.desktop \ 133 + --replace /opt/GoofCord/ "" 134 + 135 + runHook postInstall 136 + ''; 137 + 138 + meta = with lib; { 139 + description = "Highly configurable and privacy-focused Discord client"; 140 + homepage = "https://github.com/Milkshiift/GoofCord"; 141 + downloadPage = "https://github.com/Milkshiift/GoofCord"; 142 + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 143 + license = licenses.osl3; 144 + maintainers = with maintainers; [ nyanbinary ]; 145 + platforms = [ 146 + "x86_64-linux" 147 + "aarch64-linux" 148 + ]; 149 + mainProgram = "goofcord"; 150 + }; 151 + })