about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/instant-messengers/discord/base.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/instant-messengers/discord/base.nix')
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/discord/base.nix19
1 files changed, 11 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/discord/base.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/discord/base.nix
index b649fd20d512..a8b2b02f0bfd 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/discord/base.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/discord/base.nix
@@ -1,9 +1,9 @@
 { pname, version, src, binaryName, desktopName
 , autoPatchelfHook, makeDesktopItem, lib, stdenv, wrapGAppsHook
-, alsaLib, at-spi2-atk, at-spi2-core, atk, cairo, cups, dbus, expat, fontconfig
+, alsa-lib, at-spi2-atk, at-spi2-core, atk, cairo, cups, dbus, expat, fontconfig
 , freetype, gdk-pixbuf, glib, gtk3, libcxx, libdrm, libnotify, libpulseaudio, libuuid
 , libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext
-, libXfixes, libXi, libXrandr, libXrender, libXtst, libxcb
+, libXfixes, libXi, libXrandr, libXrender, libXtst, libxcb, libxshmfence
 , mesa, nspr, nss, pango, systemd, libappindicator-gtk3, libdbusmenu
 }:
 
@@ -13,7 +13,7 @@ in stdenv.mkDerivation rec {
   inherit pname version src;
 
   nativeBuildInputs = [
-    alsaLib
+    alsa-lib
     autoPatchelfHook
     cups
     libdrm
@@ -23,7 +23,8 @@ in stdenv.mkDerivation rec {
     libXScrnSaver
     libXtst
     libxcb
-    mesa.drivers
+    libxshmfence
+    mesa
     nss
     wrapGAppsHook
   ];
@@ -31,8 +32,8 @@ in stdenv.mkDerivation rec {
   dontWrapGApps = true;
 
   libPath = lib.makeLibraryPath [
-    libcxx systemd libpulseaudio
-    stdenv.cc.cc alsaLib atk at-spi2-atk at-spi2-core cairo cups dbus expat fontconfig freetype
+    libcxx systemd libpulseaudio libdrm mesa
+    stdenv.cc.cc alsa-lib atk at-spi2-atk at-spi2-core cairo cups dbus expat fontconfig freetype
     gdk-pixbuf glib gtk3 libnotify libX11 libXcomposite libuuid
     libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender
     libXtst nspr nss libxcb pango systemd libXScrnSaver
@@ -50,9 +51,11 @@ in stdenv.mkDerivation rec {
     wrapProgram $out/opt/${binaryName}/${binaryName} \
         "''${gappsWrapperArgs[@]}" \
         --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
-        --prefix LD_LIBRARY_PATH : ${libPath}
+        --prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/${binaryName}
 
     ln -s $out/opt/${binaryName}/${binaryName} $out/bin/
+    # Without || true the install would fail on case-insensitive filesystems
+    ln -s $out/opt/${binaryName}/${binaryName} $out/bin/${lib.strings.toLower binaryName} || true
     ln -s $out/opt/${binaryName}/discord.png $out/share/pixmaps/${pname}.png
 
     ln -s "${desktopItem}/share/applications" $out/share/
@@ -75,7 +78,7 @@ in stdenv.mkDerivation rec {
     homepage = "https://discordapp.com/";
     downloadPage = "https://discordapp.com/download";
     license = licenses.unfree;
-    maintainers = with maintainers; [ ldesgoui MP2E tadeokondrak ];
+    maintainers = with maintainers; [ ldesgoui MP2E ];
     platforms = [ "x86_64-linux" ];
   };
 }