2018-03-05 14:13:15 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, dbus
|
2018-07-21 01:44:44 +01:00
|
|
|
, zlib, fontconfig
|
2018-08-04 16:24:52 +01:00
|
|
|
, qtbase, qtmultimedia
|
|
|
|
, libjson, libgpgerror
|
2018-07-21 01:44:44 +01:00
|
|
|
, libX11, libxcb, libXau, libXdmcp, freetype, libbsd
|
2018-08-04 16:24:52 +01:00
|
|
|
, pythonPackages, squashfsTools, makeDesktopItem
|
2018-03-05 14:13:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
let
|
|
|
|
libPath = makeLibraryPath
|
2018-08-04 16:24:52 +01:00
|
|
|
[ stdenv.cc.cc qtbase qtmultimedia dbus libX11 zlib libX11 libxcb libXau libXdmcp freetype fontconfig libbsd libjson libgpgerror];
|
2018-03-05 14:13:15 +00:00
|
|
|
|
2018-08-04 16:24:52 +01:00
|
|
|
version = "2018-1-30";
|
2018-03-05 14:13:15 +00:00
|
|
|
|
|
|
|
mainbin = "SoulseekQt-" + (version) +"-"+ (if stdenv.is64bit then "64bit" else "32bit");
|
|
|
|
srcs = {
|
|
|
|
"x86_64-linux" = fetchurl {
|
2018-08-04 16:24:52 +01:00
|
|
|
url = "https://www.dropbox.com/s/0vi87eef3ooh7iy/${mainbin}.tgz";
|
|
|
|
sha256 = "0d1cayxr1a4j19bc5a3qp9pg22ggzmd55b6f5av3lc6lvwqqg4w6";
|
2018-03-05 14:13:15 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-08-04 16:24:52 +01:00
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "SoulseekQt";
|
|
|
|
exec = "soulseekqt";
|
|
|
|
icon = "$out/share/soulseekqt/";
|
|
|
|
comment = "Official Qt SoulSeek client";
|
|
|
|
desktopName = "SoulseekQt";
|
|
|
|
genericName = "SoulseekQt";
|
|
|
|
categories = "Network;";
|
|
|
|
};
|
|
|
|
|
2018-03-05 14:13:15 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
name = "soulseekqt-${version}";
|
|
|
|
inherit version;
|
|
|
|
src = srcs."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}");
|
|
|
|
|
2018-08-04 16:24:52 +01:00
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
buildInputs = [ pythonPackages.binwalk squashfsTools ];
|
|
|
|
|
|
|
|
# avoid usage of appimagetool
|
|
|
|
unpackCmd = ''
|
|
|
|
export HOME=$(pwd) # workaround for binwalk
|
|
|
|
tar xvf $curSrc && binwalk --quiet \
|
|
|
|
${mainbin}.AppImage -D 'squashfs:.squashfs:unsquashfs %e'
|
|
|
|
'';
|
2018-03-05 14:13:15 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2018-08-04 16:24:52 +01:00
|
|
|
mkdir -p $out/{bin,share/soulseekqt}
|
|
|
|
cd squashfs-root/
|
|
|
|
cp -R soulseek.png translations $out/share/soulseekqt
|
|
|
|
cp SoulseekQt $out/bin/soulseekqt
|
2018-03-05 14:13:15 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
fixupPhase = ''
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath ${libPath} \
|
|
|
|
$out/bin/soulseekqt
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Official Qt SoulSeek client";
|
|
|
|
homepage = http://www.soulseekqt.net;
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = [ maintainers.genesis ];
|
2018-08-04 16:24:52 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2018-03-05 14:13:15 +00:00
|
|
|
};
|
|
|
|
}
|