2013-10-10 03:36:43 +00:00
|
|
|
{ stdenv, fetchurl, readline, patchelf, ncurses, qt48, libidn, expat, flac
|
|
|
|
, libvorbis }:
|
|
|
|
|
|
|
|
assert stdenv.system == "x86_64-linux" || stdenv.system == "1686-linux";
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-09-23 11:46:43 +00:00
|
|
|
debversion = "beta_1.0.55.7425-r0";
|
|
|
|
version = "beta_1.0.55.7425-r0"; # friendly to nix-env version sorting algo
|
2013-10-10 03:36:43 +00:00
|
|
|
product = "google-musicmanager";
|
|
|
|
name = "${product}-${version}";
|
|
|
|
|
|
|
|
# When looking for newer versions, since google doesn't let you list their repo dirs,
|
|
|
|
# curl http://dl.google.com/linux/musicmanager/deb/dists/stable/Release
|
|
|
|
# fetch an appropriate packages file eg main/binary-amd64/Packages
|
|
|
|
# which will contain the links to all available *.debs for the arch.
|
|
|
|
|
|
|
|
src = if stdenv.system == "x86_64-linux"
|
|
|
|
then fetchurl {
|
2014-09-23 11:46:43 +00:00
|
|
|
url = "http://dl.google.com/linux/musicmanager/deb/pool/main/g/google-musicmanager-beta/google-musicmanager-${version}_amd64.deb";
|
2014-11-29 23:25:41 +00:00
|
|
|
sha256 = "10nr7qlrn5af4g0l6n4xzximmhc216vhzgpy7cpxs662zpli3v1a";
|
2013-10-10 03:36:43 +00:00
|
|
|
}
|
|
|
|
else fetchurl {
|
2014-09-23 11:46:43 +00:00
|
|
|
url = "http://dl.google.com/linux/musicmanager/deb/pool/main/g/google-musicmanager-beta/google-musicmanager-${version}_i386.deb";
|
2014-09-22 13:25:47 +00:00
|
|
|
sha256 = "4cc8822ab90af97195c2edfa74cc8b4a736e763cc3382f741aa1de0f72ac211e";
|
2013-10-10 03:36:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
ar vx ${src}
|
|
|
|
tar -xvf data.tar.lzma
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ patchelf ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
patchelf \
|
2014-12-17 18:11:30 +00:00
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "$out/opt/google/musicmanager:${readline}/lib:${ncurses}/lib:${stdenv.cc.libc}/lib:${qt48}/lib:${stdenv.cc.gcc}/lib:${libidn}/lib:${expat}/lib:${flac}/lib:${libvorbis}/lib" opt/google/musicmanager/MusicManager
|
2013-10-10 03:36:43 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
dontPatchELF = true;
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out"
|
|
|
|
cp -r opt "$out"
|
|
|
|
mkdir "$out/bin"
|
|
|
|
ln -s "$out/opt/google/musicmanager/google-musicmanager" "$out/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Uploads music from your computer to Google Play";
|
|
|
|
homepage = "https://support.google.com/googleplay/answer/1229970";
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|