summary refs log tree commit diff
path: root/pkgs/applications/networking/p2p/soulseekqt/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/p2p/soulseekqt/default.nix')
-rw-r--r--pkgs/applications/networking/p2p/soulseekqt/default.nix46
1 files changed, 32 insertions, 14 deletions
diff --git a/pkgs/applications/networking/p2p/soulseekqt/default.nix b/pkgs/applications/networking/p2p/soulseekqt/default.nix
index e525c564c50..44e434aa8ee 100644
--- a/pkgs/applications/networking/p2p/soulseekqt/default.nix
+++ b/pkgs/applications/networking/p2p/soulseekqt/default.nix
@@ -2,41 +2,59 @@
 , fetchurl
 , dbus
 , zlib, fontconfig
+, qtbase, qtmultimedia
+, libjson, libgpgerror
 , libX11, libxcb, libXau, libXdmcp, freetype, libbsd
+, pythonPackages, squashfsTools, makeDesktopItem
 }:
 
 with stdenv.lib;
 let
   libPath = makeLibraryPath
-    [ stdenv.cc.cc dbus libX11 zlib libX11 libxcb libXau libXdmcp freetype fontconfig libbsd ];
+    [ stdenv.cc.cc qtbase qtmultimedia dbus libX11 zlib libX11 libxcb libXau libXdmcp freetype fontconfig libbsd libjson libgpgerror];
 
-  version = "2016-1-17";
+  version = "2018-1-30";
 
   mainbin = "SoulseekQt-" + (version) +"-"+ (if stdenv.is64bit then "64bit" else "32bit");
   srcs = {
-    "i686-linux" = fetchurl {
-      url = "https://www.dropbox.com/s/kebk1b5ib1m3xxw/${mainbin}.tgz";
-      sha256 = "0r9rhnfslkgbw3l7fnc0rcfqjh58amgh5p33kwam0qvn1h1frnir";
-    };
-
     "x86_64-linux" = fetchurl {
-      url = "https://www.dropbox.com/s/7qh902qv2sxyp6p/${mainbin}.tgz";
-      sha256 = "05l3smpdvw8xdhv4v8a28j0yi1kvzhrha2ck23g4bl7x9wkay4cc";
+      url = "https://www.dropbox.com/s/0vi87eef3ooh7iy/${mainbin}.tgz";
+      sha256 = "0d1cayxr1a4j19bc5a3qp9pg22ggzmd55b6f5av3lc6lvwqqg4w6";
     };
   };
 
+  desktopItem = makeDesktopItem {
+    name = "SoulseekQt";
+    exec = "soulseekqt";
+    icon = "$out/share/soulseekqt/";
+    comment = "Official Qt SoulSeek client"; 
+    desktopName = "SoulseekQt";
+    genericName = "SoulseekQt";
+    categories = "Network;";
+  };
+
 in stdenv.mkDerivation rec {
 
   name = "soulseekqt-${version}";
   inherit version;
   src = srcs."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}");
 
-  sourceRoot = ".";
-  buildPhase = ":";   # nothing to build
+  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'
+    '';
 
   installPhase = ''
-    mkdir -p $out/bin
-    cp ${mainbin} $out/bin/soulseekqt
+    mkdir -p $out/{bin,share/soulseekqt}
+    cd squashfs-root/
+    cp -R soulseek.png translations $out/share/soulseekqt
+    cp SoulseekQt $out/bin/soulseekqt
   '';
 
   fixupPhase = ''
@@ -50,6 +68,6 @@ in stdenv.mkDerivation rec {
     homepage = http://www.soulseekqt.net;
     license = licenses.unfree;
     maintainers = [ maintainers.genesis ];
-    platforms = [ "i686-linux" "x86_64-linux" ];
+    platforms = [ "x86_64-linux" ];
   };
 }