diff options
author | Niko Cantero <97130632+nyabinary@users.noreply.github.com> | 2024-05-16 16:18:38 -0400 |
---|---|---|
committer | Niko Cantero <97130632+nyabinary@users.noreply.github.com> | 2024-05-16 16:18:38 -0400 |
commit | fcd9efc71834508c5d09c6ab714664d5b04f99dc (patch) | |
tree | 67b26e656a0e8672d6e967b02055bd4c0ee17aeb | |
parent | 2fc0586fd6ebaa597005fa33475263d872b0b7d9 (diff) |
goofcord: init at 1.4.2
-rw-r--r-- | pkgs/by-name/go/goofcord/package.nix | 151 |
1 files changed, 151 insertions, 0 deletions
diff --git a/pkgs/by-name/go/goofcord/package.nix b/pkgs/by-name/go/goofcord/package.nix new file mode 100644 index 0000000000000..dda5986272d6a --- /dev/null +++ b/pkgs/by-name/go/goofcord/package.nix @@ -0,0 +1,151 @@ +{ + lib, + stdenv, + fetchurl, + autoPatchelfHook, + dpkg, + makeBinaryWrapper, + wrapGAppsHook3, + alsa-lib, + at-spi2-atk, + at-spi2-core, + atk, + cairo, + cups, + dbus, + expat, + ffmpeg, + fontconfig, + freetype, + gdk-pixbuf, + glib, + gtk3, + libappindicator-gtk3, + libdrm, + libnotify, + libpulseaudio, + libsecret, + libuuid, + libxkbcommon, + mesa, + nss, + pango, + systemd, + xdg-utils, + xorg, + wayland, + pipewire, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "goofcord"; + version = "1.4.2"; + + src = + let + base = "https://github.com/Milkshiift/GoofCord/releases/download"; + in + { + x86_64-linux = fetchurl { + url = "${base}/v${finalAttrs.version}/GoofCord-${finalAttrs.version}-linux-amd64.deb"; + hash = "sha256-fUP/se3hOhs+aAoew25YhRyxnodYPrgqN68RIg1A1Kw="; + }; + aarch64-linux = fetchurl { + url = "${base}/v${finalAttrs.version}/GoofCord-${finalAttrs.version}-linux-arm64.deb"; + hash = "sha256-hVpXmBSIgoON683f/sRtmpHwqxcO6IrFCCRPZjsUqjw="; + }; + } + .${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); + + nativeBuildInputs = [ + autoPatchelfHook + dpkg + makeBinaryWrapper + wrapGAppsHook3 + ]; + + dontWrapGApps = true; + + buildInputs = [ + alsa-lib + at-spi2-atk + at-spi2-core + atk + cairo + cups + dbus + expat + ffmpeg + fontconfig + freetype + gdk-pixbuf + glib + gtk3 + pango + systemd + mesa # for libgbm + nss + libuuid + libdrm + libnotify + libsecret + libpulseaudio + libxkbcommon + libappindicator-gtk3 + xorg.libX11 + xorg.libxcb + xorg.libXcomposite + xorg.libXcursor + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXi + xorg.libXrandr + xorg.libXrender + xorg.libXScrnSaver + xorg.libxshmfence + xorg.libXtst + wayland + pipewire + ]; + + sourceRoot = "."; + unpackCmd = "dpkg-deb -x $src ."; + + installPhase = '' + runHook preInstall + + mkdir -p "$out/bin" + cp -R "opt" "$out" + cp -R "usr/share" "$out/share" + chmod -R g-w "$out" + + # Wrap the startup command + makeBinaryWrapper $out/opt/GoofCord/goofcord $out/bin/goofcord \ + "''${gappsWrapperArgs[@]}" \ + --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \ + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations,WebRTCPipeWireCapturer}}" \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath finalAttrs.buildInputs}" \ + --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} + + # Fix desktop link + substituteInPlace $out/share/applications/goofcord.desktop \ + --replace /opt/GoofCord/ "" + + runHook postInstall + ''; + + meta = with lib; { + description = "Highly configurable and privacy-focused Discord client"; + homepage = "https://github.com/Milkshiift/GoofCord"; + downloadPage = "https://github.com/Milkshiift/GoofCord"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + license = licenses.osl3; + maintainers = with maintainers; [ nyanbinary ]; + platforms = [ + "x86_64-linux" + "aarch64-linux" + ]; + mainProgram = "goofcord"; + }; +}) |