2016-04-02 16:58:48 +00:00
|
|
|
|
{ stdenv, fetchurl
|
|
|
|
|
, alsaLib, atk, cairo, cups, dbus, expat, fontconfig, freetype, gdk_pixbuf
|
2016-09-11 21:24:51 +00:00
|
|
|
|
, glib, gnome2, gtk2, libnotify, libX11, libXcomposite, libXcursor, libXdamage
|
2016-04-02 16:58:48 +00:00
|
|
|
|
, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst, nspr, nss, pango
|
2016-09-05 16:59:00 +00:00
|
|
|
|
, systemd, libXScrnSaver }:
|
2016-04-02 16:58:48 +00:00
|
|
|
|
|
2016-11-06 09:02:31 +00:00
|
|
|
|
let version = "0.0.10"; in
|
2016-04-02 16:58:48 +00:00
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
|
|
|
|
|
|
name = "discord-${version}";
|
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2016-04-24 14:45:09 +00:00
|
|
|
|
url = "https://cdn-canary.discordapp.com/apps/linux/${version}/discord-canary-${version}.tar.gz";
|
2016-11-06 09:02:31 +00:00
|
|
|
|
sha256 = "1wkbbnbqbwgixdbm69dlirhgjnn8llqyzil01nqwpknh1qwd06pr";
|
2016-04-02 16:58:48 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
libPath = stdenv.lib.makeLibraryPath [
|
|
|
|
|
stdenv.cc.cc alsaLib atk cairo cups dbus expat fontconfig freetype
|
2016-09-11 21:24:51 +00:00
|
|
|
|
gdk_pixbuf glib gnome2.GConf gtk2 libnotify libX11 libXcomposite
|
2016-04-02 16:58:48 +00:00
|
|
|
|
libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender
|
2016-09-05 16:59:00 +00:00
|
|
|
|
libXtst nspr nss pango systemd libXScrnSaver
|
2016-04-02 16:58:48 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
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 :(
|
2016-09-05 16:59:00 +00:00
|
|
|
|
ln -s ${systemd.lib}/lib/libudev.so.1 $out
|
2016-04-02 16:58:48 +00:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
|
description = "All-in-one voice and text chat for gamers that’s free, secure, and works on both your desktop and phone";
|
|
|
|
|
homepage = "https://discordapp.com/";
|
2016-04-24 14:45:09 +00:00
|
|
|
|
downloadPage = "https://github.com/crmarsh/discord-linux-bugs";
|
2016-04-02 16:58:48 +00:00
|
|
|
|
license = licenses.unfree;
|
|
|
|
|
maintainers = [ maintainers.ldesgoui ];
|
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
|
};
|
|
|
|
|
}
|