nixpkgs/pkgs/applications/networking/instant-messengers/discord/default.nix
2016-11-06 10:02:31 +01:00

50 lines
1.8 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ stdenv, fetchurl
, alsaLib, atk, cairo, cups, dbus, expat, fontconfig, freetype, gdk_pixbuf
, glib, gnome2, gtk2, libnotify, libX11, libXcomposite, libXcursor, libXdamage
, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst, nspr, nss, pango
, systemd, libXScrnSaver }:
let version = "0.0.10"; in
stdenv.mkDerivation {
name = "discord-${version}";
src = fetchurl {
url = "https://cdn-canary.discordapp.com/apps/linux/${version}/discord-canary-${version}.tar.gz";
sha256 = "1wkbbnbqbwgixdbm69dlirhgjnn8llqyzil01nqwpknh1qwd06pr";
};
libPath = stdenv.lib.makeLibraryPath [
stdenv.cc.cc alsaLib atk cairo cups dbus expat fontconfig freetype
gdk_pixbuf glib gnome2.GConf gtk2 libnotify libX11 libXcomposite
libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender
libXtst nspr nss pango systemd libXScrnSaver
];
installPhase = ''
mkdir -p $out/bin
mv * $out
# Copying how adobe-reader does it,
# see pkgs/applications/misc/adobe-reader/builder.sh
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$out:$libPath" \
$out/DiscordCanary
ln -s $out/DiscordCanary $out/bin/
# Putting udev in the path won't work :(
ln -s ${systemd.lib}/lib/libudev.so.1 $out
'';
meta = with stdenv.lib; {
description = "All-in-one voice and text chat for gamers thats free, secure, and works on both your desktop and phone";
homepage = "https://discordapp.com/";
downloadPage = "https://github.com/crmarsh/discord-linux-bugs";
license = licenses.unfree;
maintainers = [ maintainers.ldesgoui ];
platforms = [ "x86_64-linux" ];
};
}