summary refs log tree commit diff
path: root/pkgs/applications/audio
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/audio')
-rw-r--r--pkgs/applications/audio/google-musicmanager/default.nix57
-rw-r--r--pkgs/applications/audio/mixxx/default.nix51
2 files changed, 108 insertions, 0 deletions
diff --git a/pkgs/applications/audio/google-musicmanager/default.nix b/pkgs/applications/audio/google-musicmanager/default.nix
new file mode 100644
index 000000000000..8cff94c25d93
--- /dev/null
+++ b/pkgs/applications/audio/google-musicmanager/default.nix
@@ -0,0 +1,57 @@
+{ stdenv, fetchurl, readline, patchelf, ncurses, qt48, libidn, expat, flac
+, libvorbis }:
+
+assert stdenv.system == "x86_64-linux" || stdenv.system == "1686-linux";
+
+stdenv.mkDerivation rec {
+  debversion = "beta_1.0.84.1107-r0";
+  version = "1.0.84.1107-beta-r0"; # friendly to nix-env version sorting algo
+  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 {
+      url    = "http://dl.google.com/linux/musicmanager/deb/pool/main/g/${product}-beta/${product}-${debversion}_amd64.deb";
+      sha256 = "0irlrspw508b1s9i5d1mddpp2x9w1ny3svf27gxf8pmwbiyd1cyi";
+    }
+    else fetchurl {
+       url    = "http://dl.google.com/linux/musicmanager/deb/pool/main/g/${product}-beta/${product}-${debversion}_i386.deb";
+       sha256 = "13pfsjvaygap6axrlbfhyk1h8377xmwi47x4af6j57qq6z7329rg";
+    };
+
+  unpackPhase = ''
+    ar vx ${src}
+    tar -xvf data.tar.lzma
+  '';
+
+  buildInputs = [ patchelf ];
+
+  buildPhase = ''
+    patchelf \
+      --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+      --set-rpath "$out/opt/google/musicmanager:${readline}/lib:${ncurses}/lib:${stdenv.gcc.libc}/lib:${qt48}/lib:${stdenv.gcc.gcc}/lib:${libidn}/lib:${expat}/lib:${flac}/lib:${libvorbis}/lib" opt/google/musicmanager/MusicManager
+  '';
+
+  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;
+  };
+}
diff --git a/pkgs/applications/audio/mixxx/default.nix b/pkgs/applications/audio/mixxx/default.nix
new file mode 100644
index 000000000000..b76eecc9e4ad
--- /dev/null
+++ b/pkgs/applications/audio/mixxx/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchurl, scons, pkgconfig, qt4, portaudio, portmidi, libusb1
+, libmad, protobuf, libvorbis, taglib, libid3tag, flac, libsndfile, libshout
+, fftw, vampSDK
+}:
+
+stdenv.mkDerivation rec {
+  name = "mixxx-${version}";
+  version = "1.11.0";
+
+  src = fetchurl {
+    url = "http://downloads.mixxx.org/${name}/${name}-src.tar.gz";
+    sha256 = "0c833gf4169xvpfn7car9vzvwfwl9d3xwmbfsy36cv8ydifip5h0";
+  };
+
+  buildInputs = [
+    scons pkgconfig qt4 portaudio portmidi libusb1 libmad protobuf libvorbis
+    taglib libid3tag flac libsndfile libshout fftw vampSDK
+  ];
+
+  sconsFlags = [
+    "build=release"
+    "qtdir=${qt4}"
+  ];
+
+  postPatch = ''
+    sed -i -e 's/"which /"type -P /' build/depends.py
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+    ensureDir "$out"
+    scons \
+      -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES \
+      $sconsFlags "prefix=$out"
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    scons $sconsFlags "prefix=$out" install
+    runHook postInstall
+  '';
+
+  meta = {
+    homepage = "http://mixxx.org/";
+    description = "Digital DJ mixing software";
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = [ stdenv.lib.maintainers.aszlig ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}