webtorrent_desktop: init at 0.19.0 (#35840)

* webtorrent_desktop: init at 0.19.0

* webtorrent_desktop: fix meta attributes

authored by Florian Klink and committed by Jörg Thalheim 168faeec 97c06d58

+90
+88
pkgs/applications/video/webtorrent_desktop/default.nix
··· 1 + { 2 + alsaLib, atk, cairo, cups, dbus, dpkg, expat, fetchurl, fontconfig, freetype, 3 + gdk_pixbuf, glib, gnome2, libX11, libXScrnSaver, libXcomposite, libXcursor, 4 + libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst, 5 + libxcb, nspr, nss, stdenv, udev 6 + }: 7 + 8 + let 9 + rpath = stdenv.lib.makeLibraryPath ([ 10 + alsaLib 11 + atk 12 + cairo 13 + cups 14 + dbus 15 + expat 16 + fontconfig 17 + freetype 18 + gdk_pixbuf 19 + glib 20 + gnome2.GConf 21 + gnome2.gtk 22 + gnome2.pango 23 + libX11 24 + libXScrnSaver 25 + libXcomposite 26 + libXcursor 27 + libXdamage 28 + libXext 29 + libXfixes 30 + libXi 31 + libXrandr 32 + libXrender 33 + libXtst 34 + libxcb 35 + nspr 36 + nss 37 + stdenv.cc.cc 38 + udev 39 + ]); 40 + in stdenv.mkDerivation rec { 41 + name = "webtorrent-desktop-${version}"; 42 + version = "0.19.0"; 43 + 44 + src = 45 + if stdenv.system == "x86_64-linux" then 46 + fetchurl { 47 + url = "https://github.com/webtorrent/webtorrent-desktop/releases/download/v0.19.0/webtorrent-desktop_${version}-1_amd64.deb"; 48 + sha256 = "0v4fgvf8qgxjwg5kz30pcxl71pi9rri0l3cy20pid07rdd6r4sgd"; 49 + } 50 + else 51 + throw "Webtorrent is not currently supported on ${stdenv.system}"; 52 + phases = [ "unpackPhase" "installPhase" ]; 53 + nativeBuildInputs = [ dpkg ]; 54 + unpackPhase = "dpkg-deb -x $src ."; 55 + installPhase = '' 56 + mkdir -p $out 57 + cp -R opt $out 58 + 59 + mv ./usr/share $out/share 60 + mv $out/opt/webtorrent-desktop $out/libexec 61 + chmod +x $out/libexec/WebTorrent 62 + rmdir $out/opt 63 + 64 + chmod -R g-w $out 65 + 66 + # Patch WebTorrent 67 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 68 + --set-rpath ${rpath}:$out/libexec $out/libexec/WebTorrent 69 + 70 + # Symlink to bin 71 + mkdir -p $out/bin 72 + ln -s $out/libexec/WebTorrent $out/bin/WebTorrent 73 + 74 + # Fix the desktop link 75 + substituteInPlace $out/share/applications/webtorrent-desktop.desktop \ 76 + --replace /opt/webtorrent-desktop/WebTorrent $out/bin/WebTorrent 77 + ''; 78 + 79 + meta = with stdenv.lib; { 80 + description = "Streaming torrent app for Mac, Windows, and Linux."; 81 + homepage = https://webtorrent.io/desktop; 82 + license = licenses.mit; 83 + maintainers = [ maintainers.flokli ]; 84 + platforms = [ 85 + "x86_64-linux" 86 + ]; 87 + }; 88 + }
+2
pkgs/top-level/all-packages.nix
··· 18002 18002 18003 18003 wayv = callPackage ../tools/X11/wayv {}; 18004 18004 18005 + webtorrent_desktop = callPackage ../applications/video/webtorrent_desktop {}; 18006 + 18005 18007 weechat = callPackage ../applications/networking/irc/weechat { 18006 18008 inherit (darwin) libobjc; 18007 18009 inherit (darwin) libresolv;