soulseekqt: fix build
- Previous url returned a 404 - Updated expression to use new Qt utilities - Cleaned up expression
This commit is contained in:
parent
5edb20533d
commit
c83aaba739
@ -1,53 +1,47 @@
|
|||||||
{ stdenv
|
{ stdenv, lib, fetchurl, mkDerivation
|
||||||
, fetchurl
|
, autoPatchelfHook
|
||||||
, dbus
|
, dbus
|
||||||
, zlib, fontconfig
|
, desktop-file-utils
|
||||||
, qtbase, qtmultimedia
|
, fontconfig
|
||||||
, libjson, libgpgerror
|
, libjson
|
||||||
, libX11, libxcb, libXau, libXdmcp, freetype, libbsd
|
, pythonPackages
|
||||||
, pythonPackages, squashfsTools, desktop-file-utils
|
, qtmultimedia
|
||||||
|
, squashfsTools
|
||||||
|
, zlib
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
mkDerivation rec {
|
||||||
let
|
pname = "soulseekqt";
|
||||||
libPath = makeLibraryPath
|
|
||||||
[ stdenv.cc.cc qtbase qtmultimedia dbus libX11 zlib libX11 libxcb libXau libXdmcp freetype fontconfig libbsd libjson libgpgerror];
|
|
||||||
|
|
||||||
version = "2018-1-30";
|
version = "2018-1-30";
|
||||||
|
|
||||||
mainbin = "SoulseekQt-" + (version) +"-"+ (if stdenv.is64bit then "64bit" else "32bit");
|
src = fetchurl {
|
||||||
srcs = {
|
urls = [
|
||||||
x86_64-linux = fetchurl {
|
"https://www.dropbox.com/s/0vi87eef3ooh7iy/SoulseekQt-${version}.tgz"
|
||||||
url = "https://www.dropbox.com/s/0vi87eef3ooh7iy/${mainbin}.tgz";
|
"https://www.slsknet.org/SoulseekQt/Linux/SoulseekQt-${version}-64bit-appimage.tgz"
|
||||||
|
];
|
||||||
sha256 = "0d1cayxr1a4j19bc5a3qp9pg22ggzmd55b6f5av3lc6lvwqqg4w6";
|
sha256 = "0d1cayxr1a4j19bc5a3qp9pg22ggzmd55b6f5av3lc6lvwqqg4w6";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
|
||||||
|
|
||||||
pname = "soulseekqt";
|
|
||||||
inherit version;
|
|
||||||
src = srcs.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}");
|
|
||||||
|
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
|
||||||
buildInputs = [ pythonPackages.binwalk squashfsTools desktop-file-utils ];
|
nativeBuildInputs = [ autoPatchelfHook pythonPackages.binwalk squashfsTools desktop-file-utils ];
|
||||||
|
buildInputs = [ qtmultimedia stdenv.cc.cc ];
|
||||||
|
|
||||||
# avoid usage of appimage's runner option --appimage-extract
|
# avoid usage of appimage's runner option --appimage-extract
|
||||||
unpackCmd = ''
|
unpackCmd = ''
|
||||||
export HOME=$(pwd) # workaround for binwalk
|
export HOME=$(pwd) # workaround for binwalk
|
||||||
appimage=$(tar xvf $curSrc) && binwalk --quiet \
|
appimage=$(tar xvf $curSrc) && binwalk --quiet \
|
||||||
$appimage -D 'squashfs:squashfs:unsquashfs %e'
|
$appimage -D 'squashfs:squashfs:unsquashfs %e'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
cd squashfs-root/
|
cd squashfs-root/
|
||||||
binary="$(readlink AppRun)"
|
binary="$(readlink AppRun)"
|
||||||
|
|
||||||
# fixup desktop file
|
# fixup desktop file
|
||||||
desktop-file-edit --set-key Exec --set-value $binary default.desktop
|
desktop-file-edit --set-key Exec --set-value $binary default.desktop
|
||||||
desktop-file-edit --set-key Comment --set-value "${meta.description}" default.desktop
|
desktop-file-edit --set-key Comment --set-value "${meta.description}" default.desktop
|
||||||
desktop-file-edit --set-key Categories --set-value Network default.desktop
|
desktop-file-edit --set-key Categories --set-value Network default.desktop
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
@ -57,13 +51,7 @@ in stdenv.mkDerivation rec {
|
|||||||
cp $binary $out/bin/
|
cp $binary $out/bin/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fixupPhase = ''
|
meta = with lib; {
|
||||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
||||||
--set-rpath ${libPath} \
|
|
||||||
$out/bin/$binary
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
description = "Official Qt SoulSeek client";
|
description = "Official Qt SoulSeek client";
|
||||||
homepage = http://www.soulseekqt.net;
|
homepage = http://www.soulseekqt.net;
|
||||||
license = licenses.unfree;
|
license = licenses.unfree;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user