2017-12-17 02:56:32 +00:00
|
|
|
{ stdenv, lib, fetchurl, makeDesktopItem, makeWrapper
|
2020-06-07 12:39:09 +00:00
|
|
|
, alsaLib, atk, cairo, cups, curl, dbus, expat, ffmpeg_3, fontconfig, freetype
|
2019-05-22 11:03:39 +00:00
|
|
|
, gdk-pixbuf, glib, glibc, gnome2, gtk2, libX11, libXScrnSaver, libXcomposite
|
2017-12-17 02:56:32 +00:00
|
|
|
, libXcursor, libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender
|
|
|
|
, libXtst, libopus, libpulseaudio, libxcb, nspr, nss, pango, udev, x264
|
2017-12-15 01:28:39 +00:00
|
|
|
}:
|
|
|
|
|
2017-12-17 02:56:32 +00:00
|
|
|
let libPath = lib.makeLibraryPath [
|
2020-06-07 12:39:09 +00:00
|
|
|
alsaLib atk cairo cups curl dbus expat ffmpeg_3 fontconfig freetype gdk-pixbuf
|
2018-10-24 09:42:04 +00:00
|
|
|
glib glibc gnome2.GConf gtk2 libopus nspr nss pango stdenv.cc.cc udev x264
|
|
|
|
libX11 libXScrnSaver libXcomposite libXcursor libXdamage libXext libXfixes
|
|
|
|
libXi libXrandr libXrender libXtst libpulseaudio libxcb
|
2017-12-17 02:56:32 +00:00
|
|
|
];
|
|
|
|
in stdenv.mkDerivation rec {
|
2017-12-15 01:28:39 +00:00
|
|
|
pname = "airtame";
|
2018-10-24 09:42:04 +00:00
|
|
|
version = "3.3.0";
|
2017-12-15 01:28:39 +00:00
|
|
|
longName = "${pname}-application";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://downloads.airtame.com/application/ga/lin_x64/releases/${longName}-${version}.tar.gz";
|
2018-10-24 09:42:04 +00:00
|
|
|
sha256 = "16ca1vcxpka26jcrfbxpq74kcizgrm138j94bby6kzqp2swhrl76";
|
2017-12-15 01:28:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem rec {
|
|
|
|
name = "airtame";
|
|
|
|
exec = longName;
|
|
|
|
comment = "Airtame Streaming Client";
|
|
|
|
desktopName = "Airtame";
|
|
|
|
icon = name;
|
|
|
|
genericName = comment;
|
2020-06-25 02:18:37 +00:00
|
|
|
categories = "Network;";
|
2017-12-15 01:28:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
opt="$out/opt/airtame"
|
|
|
|
mkdir -p "$opt"
|
|
|
|
cp -R . "$opt"
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
ln -s "$opt/${longName}" "$out/bin/"
|
|
|
|
mkdir -p "$out/share"
|
|
|
|
cp -r "${desktopItem}/share/applications" "$out/share/"
|
|
|
|
mkdir -p "$out/share/icons"
|
|
|
|
ln -s "$opt/icon.png" "$out/share/icons/airtame.png"
|
|
|
|
|
2017-12-17 02:56:32 +00:00
|
|
|
# Flags and rpath are copied from launch-airtame.sh.
|
2018-10-24 09:42:04 +00:00
|
|
|
vendorlib="\
|
|
|
|
$opt/resources/app.asar.unpacked/modules/streamer/dist/deps/airtame-modules:\
|
|
|
|
$opt/resources/app.asar.unpacked/encryption/out/lib:\
|
|
|
|
$opt/resources/deps/airtame-core/lib:\
|
|
|
|
$opt/resources/deps/airtame-encryption/lib"
|
|
|
|
|
|
|
|
echo $vendorlib
|
|
|
|
|
|
|
|
rpath="${libPath}:$opt:$vendorlib"
|
|
|
|
|
2017-12-17 02:56:32 +00:00
|
|
|
find "$opt" \( -type f -executable -o -name "*.so" -o -name "*.so.*" \) \
|
|
|
|
-exec patchelf --set-rpath "$rpath" {} \;
|
2018-10-24 09:42:04 +00:00
|
|
|
|
2017-12-17 02:56:32 +00:00
|
|
|
# The main binary also needs libudev which was removed by --shrink-rpath.
|
2018-10-24 09:42:04 +00:00
|
|
|
interp="$(< $NIX_CC/nix-support/dynamic-linker)"
|
2017-12-17 02:56:32 +00:00
|
|
|
patchelf --set-interpreter "$interp" $opt/${longName}
|
2018-10-24 09:42:04 +00:00
|
|
|
|
|
|
|
wrapProgram $opt/${longName} \
|
|
|
|
--prefix LD_LIBRARY_PATH=$rpath \
|
|
|
|
--add-flags "--disable-gpu --enable-transparent-visuals"
|
2017-12-15 01:28:39 +00:00
|
|
|
'';
|
|
|
|
|
2017-12-17 02:56:32 +00:00
|
|
|
dontPatchELF = true;
|
2017-12-15 01:28:39 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://airtame.com/download";
|
2017-12-15 01:28:39 +00:00
|
|
|
description = "Wireless streaming client for Airtame devices";
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ thanegill ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|