Advertisement
Guest User

Nix Wire

a guest
Jun 29th, 2017
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. { stdenv, fetchurl, dpkg
  2. , alsaLib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, glib
  3. , gnome2, libnotify, libxcb, nspr, nss, systemd, xorg }:
  4.  
  5. let
  6.  
  7. version = "2.13.2741";
  8.  
  9. rpath = stdenv.lib.makeLibraryPath [
  10. alsaLib
  11. atk
  12. cairo
  13. cups
  14. curl
  15. dbus
  16. expat
  17. fontconfig
  18. freetype
  19. glib
  20. gnome2.GConf
  21. gnome2.gdk_pixbuf
  22. gnome2.gtk
  23. gnome2.pango
  24. libnotify
  25. libxcb
  26. nspr
  27. nss
  28. stdenv.cc.cc
  29. systemd
  30.  
  31. xorg.libxkbfile
  32. xorg.libX11
  33. xorg.libXcomposite
  34. xorg.libXcursor
  35. xorg.libXdamage
  36. xorg.libXext
  37. xorg.libXfixes
  38. xorg.libXi
  39. xorg.libXrandr
  40. xorg.libXrender
  41. xorg.libXtst
  42. xorg.libXScrnSaver
  43. ] + ":${stdenv.cc.cc.lib}/lib64";
  44.  
  45. src =
  46. if stdenv.system == "x86_64-linux" then
  47. fetchurl {
  48. url = "https://wire-app.wire.com/linux/wire_${version}_amd64.deb";
  49. sha256 = "fa17278b9c9ebd9b66464b5230dc9c1187e7c7b34050ac5b2a756725d6836d8f";
  50. }
  51. else
  52. throw "Wire is not supported on ${stdenv.system}";
  53.  
  54. in stdenv.mkDerivation {
  55. name = "wire-${version}";
  56.  
  57. inherit src;
  58.  
  59. buildInputs = [ dpkg ];
  60. unpackPhase = "true";
  61. buildCommand = ''
  62. mkdir -p $out/opt
  63. mkdir -p $out/bin
  64. dpkg -x $src $out
  65. cp -av $out/usr/* $out
  66. rm -rf $out/usr
  67.  
  68. # Otherwise it looks "suspicious"
  69. # chmod -R g-w $out
  70.  
  71. # Fix the desktop link
  72. substituteInPlace $out/share/applications/wire-desktop.desktop \
  73. --replace /opt/ $out/
  74.  
  75. ln -s $out/opt/wire-desktop/wire-desktop $out/bin/wire
  76. '';
  77.  
  78. meta = with stdenv.lib; {
  79. description = "Desktop client for the Wire instant messenger";
  80. homepage = "https://wire.com";
  81. license = licenses.unfree;
  82. platforms = [ "x86_64-linux" ];
  83. };
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement