From f2a88f89c62944ccf3560cb55bfb3c3bfc22ad12 Mon Sep 17 00:00:00 2001 From: ldesgoui Date: Sat, 2 Apr 2016 18:58:48 +0200 Subject: [PATCH] discord: init at 0.0.1 --- lib/maintainers.nix | 1 + .../instant-messengers/discord/default.nix | 48 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 3 files changed, 50 insertions(+) create mode 100644 pkgs/applications/networking/instant-messengers/discord/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index ae97005c6550..d00e84140a8e 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -186,6 +186,7 @@ ktosiek = "Tomasz Kontusz "; lassulus = "Lassulus "; layus = "Guillaume Maudoux "; + ldesgoui = "Lucas Desgouilles "; lebastr = "Alexander Lebedev "; leenaars = "Michiel Leenaars "; leonardoce = "Leonardo Cecchi "; diff --git a/pkgs/applications/networking/instant-messengers/discord/default.nix b/pkgs/applications/networking/instant-messengers/discord/default.nix new file mode 100644 index 000000000000..a072c4a5d767 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/discord/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchurl +, alsaLib, atk, cairo, cups, dbus, expat, fontconfig, freetype, gdk_pixbuf +, glib, gnome, gtk, libnotify, libX11, libXcomposite, libXcursor, libXdamage +, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst, nspr, nss, pango +, udev }: + +let version = "0.0.1"; in + +stdenv.mkDerivation { + + name = "discord-${version}"; + + src = fetchurl { + url = "https://storage.googleapis.com/discord-developer/test/discord-canary-${version}.tar.gz"; + sha256 = "1skmwc84s4xqyc167qrplhy5ah06kwfa3d3rxiwi4c8rc55vdd0g"; + }; + + libPath = stdenv.lib.makeLibraryPath [ + stdenv.cc.cc alsaLib atk cairo cups dbus expat fontconfig freetype + gdk_pixbuf glib gnome.GConf gtk libnotify libX11 libXcomposite + libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender + libXtst nspr nss pango udev + ]; + + 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 ${udev}/lib/libudev.so.1 $out + ''; + + 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/"; + license = licenses.unfree; + maintainers = [ maintainers.ldesgoui ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7b336c9f1a87..2977f1bc07b8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16471,4 +16471,5 @@ in togglesg-download = callPackage ../tools/misc/togglesg-download { }; + discord = callPackage ../applications/networking/instant-messengers/discord { }; }