1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

webtorrent_desktop: init at 0.19.0 (#35840)

* webtorrent_desktop: init at 0.19.0

* webtorrent_desktop: fix meta attributes
This commit is contained in:
Florian Klink 2018-02-27 12:27:46 +01:00 committed by Jörg Thalheim
parent 97c06d5887
commit 168faeec7d
2 changed files with 90 additions and 0 deletions

View file

@ -0,0 +1,88 @@
{
alsaLib, atk, cairo, cups, dbus, dpkg, expat, fetchurl, fontconfig, freetype,
gdk_pixbuf, glib, gnome2, libX11, libXScrnSaver, libXcomposite, libXcursor,
libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst,
libxcb, nspr, nss, stdenv, udev
}:
let
rpath = stdenv.lib.makeLibraryPath ([
alsaLib
atk
cairo
cups
dbus
expat
fontconfig
freetype
gdk_pixbuf
glib
gnome2.GConf
gnome2.gtk
gnome2.pango
libX11
libXScrnSaver
libXcomposite
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libXrender
libXtst
libxcb
nspr
nss
stdenv.cc.cc
udev
]);
in stdenv.mkDerivation rec {
name = "webtorrent-desktop-${version}";
version = "0.19.0";
src =
if stdenv.system == "x86_64-linux" then
fetchurl {
url = "https://github.com/webtorrent/webtorrent-desktop/releases/download/v0.19.0/webtorrent-desktop_${version}-1_amd64.deb";
sha256 = "0v4fgvf8qgxjwg5kz30pcxl71pi9rri0l3cy20pid07rdd6r4sgd";
}
else
throw "Webtorrent is not currently supported on ${stdenv.system}";
phases = [ "unpackPhase" "installPhase" ];
nativeBuildInputs = [ dpkg ];
unpackPhase = "dpkg-deb -x $src .";
installPhase = ''
mkdir -p $out
cp -R opt $out
mv ./usr/share $out/share
mv $out/opt/webtorrent-desktop $out/libexec
chmod +x $out/libexec/WebTorrent
rmdir $out/opt
chmod -R g-w $out
# Patch WebTorrent
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${rpath}:$out/libexec $out/libexec/WebTorrent
# Symlink to bin
mkdir -p $out/bin
ln -s $out/libexec/WebTorrent $out/bin/WebTorrent
# Fix the desktop link
substituteInPlace $out/share/applications/webtorrent-desktop.desktop \
--replace /opt/webtorrent-desktop/WebTorrent $out/bin/WebTorrent
'';
meta = with stdenv.lib; {
description = "Streaming torrent app for Mac, Windows, and Linux.";
homepage = https://webtorrent.io/desktop;
license = licenses.mit;
maintainers = [ maintainers.flokli ];
platforms = [
"x86_64-linux"
];
};
}

View file

@ -18002,6 +18002,8 @@ with pkgs;
wayv = callPackage ../tools/X11/wayv {};
webtorrent_desktop = callPackage ../applications/video/webtorrent_desktop {};
weechat = callPackage ../applications/networking/irc/weechat {
inherit (darwin) libobjc;
inherit (darwin) libresolv;