webtorrent_desktop: 0.20.0 -> 0.21.0
Fix build This reverts commit c255b0fa45adfde495931fae3d44515fae11c715.
This commit is contained in:
parent
3518436b92
commit
9efcb767da
@ -1,14 +1,16 @@
|
|||||||
{
|
{
|
||||||
alsaLib, atk, cairo, cups, dbus, dpkg, expat, fetchurl, fontconfig, freetype,
|
alsaLib, atk, cairo, cups, dbus, dpkg, expat, fetchurl, fetchzip, fontconfig, freetype,
|
||||||
gdk-pixbuf, glib, gnome2, libX11, libXScrnSaver, libXcomposite, libXcursor,
|
gdk-pixbuf, glib, gnome3, libX11, libXScrnSaver, libXcomposite, libXcursor,
|
||||||
libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst,
|
libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst,
|
||||||
libxcb, nspr, nss, stdenv, udev
|
libxcb, nspr, nss, stdenv, udev, libuuid, pango, at-spi2-atk, at-spi2-core
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
rpath = stdenv.lib.makeLibraryPath ([
|
rpath = stdenv.lib.makeLibraryPath ([
|
||||||
alsaLib
|
alsaLib
|
||||||
atk
|
atk
|
||||||
|
at-spi2-core
|
||||||
|
at-spi2-atk
|
||||||
cairo
|
cairo
|
||||||
cups
|
cups
|
||||||
dbus
|
dbus
|
||||||
@ -17,9 +19,9 @@
|
|||||||
freetype
|
freetype
|
||||||
gdk-pixbuf
|
gdk-pixbuf
|
||||||
glib
|
glib
|
||||||
gnome2.GConf
|
gnome3.gtk
|
||||||
gnome2.gtk
|
pango
|
||||||
gnome2.pango
|
libuuid
|
||||||
libX11
|
libX11
|
||||||
libXScrnSaver
|
libXScrnSaver
|
||||||
libXcomposite
|
libXcomposite
|
||||||
@ -39,29 +41,33 @@
|
|||||||
]);
|
]);
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "webtorrent-desktop";
|
pname = "webtorrent-desktop";
|
||||||
version = "0.20.0";
|
version = "0.21.0";
|
||||||
|
|
||||||
src =
|
src =
|
||||||
if stdenv.hostPlatform.system == "x86_64-linux" then
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||||
fetchurl {
|
fetchzip {
|
||||||
url = "https://github.com/webtorrent/webtorrent-desktop/releases/download/v0.20.0/webtorrent-desktop_${version}-1_amd64.deb";
|
url = "https://github.com/webtorrent/webtorrent-desktop/releases/download/v${version}/WebTorrent-v${version}-linux.zip";
|
||||||
sha256 = "1kkrnbimiip5pn2nwpln35bbdda9gc3cgrjwphq4fqasbjf2781k";
|
sha256 = "13gd8isq2l10kibsc1bsc15dbgpnwa7nw4cwcamycgx6pfz9a852";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw "Webtorrent is not currently supported on ${stdenv.hostPlatform.system}";
|
throw "Webtorrent is not currently supported on ${stdenv.hostPlatform.system}";
|
||||||
|
desktopFile = fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/webtorrent/webtorrent-desktop/v${version}/static/linux/share/applications/webtorrent-desktop.desktop";
|
||||||
|
sha256 = "1v16dqbxqds3cqg3xkzxsa5fyd8ssddvjhy9g3i3lz90n47916ca";
|
||||||
|
};
|
||||||
|
icon256File = fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/webtorrent/webtorrent-desktop/v${version}/static/linux/share/icons/hicolor/256x256/apps/webtorrent-desktop.png";
|
||||||
|
sha256 = "1dapxvvp7cx52zhyaby4bxm4rll9xc7x3wk8k0il4g3mc7zzn3yk";
|
||||||
|
};
|
||||||
|
icon48File = fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/webtorrent/webtorrent-desktop/v${version}/static/linux/share/icons/hicolor/48x48/apps/webtorrent-desktop.png";
|
||||||
|
sha256 = "00y96w9shbbrdbf6xcjlahqd08154kkrxmqraik7qshiwcqpw7p4";
|
||||||
|
};
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
phases = [ "unpackPhase" "installPhase" ];
|
||||||
nativeBuildInputs = [ dpkg ];
|
nativeBuildInputs = [ dpkg ];
|
||||||
unpackPhase = "dpkg-deb -x $src .";
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out
|
mkdir -p $out/share/{applications,icons/hicolor/{48x48,256x256}/apps}
|
||||||
cp -R opt $out
|
cp -R . $out/libexec
|
||||||
|
|
||||||
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
|
# Patch WebTorrent
|
||||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||||
@ -71,9 +77,11 @@
|
|||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
ln -s $out/libexec/WebTorrent $out/bin/WebTorrent
|
ln -s $out/libexec/WebTorrent $out/bin/WebTorrent
|
||||||
|
|
||||||
# Fix the desktop link
|
cp $icon48File $out/share/icons/hicolor/48x48/apps/webtorrent-desktop.png
|
||||||
substituteInPlace $out/share/applications/webtorrent-desktop.desktop \
|
cp $icon256File $out/share/icons/hicolor/256x256/apps/webtorrent-desktop.png
|
||||||
--replace /opt/webtorrent-desktop $out/bin
|
## Fix the desktop link
|
||||||
|
substitute $desktopFile $out/share/applications/webtorrent-desktop.desktop \
|
||||||
|
--replace /opt/webtorrent-desktop $out/libexec
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user