From 95d62e78e3730404c79805411f5bc6917fd1ef05 Mon Sep 17 00:00:00 2001 From: Spencer Whitt Date: Mon, 14 Dec 2015 21:07:22 -0500 Subject: [PATCH 01/10] mopidy: improve gstreamer plugin support --- pkgs/applications/audio/mopidy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/mopidy/default.nix b/pkgs/applications/audio/mopidy/default.nix index 39889973430..91fc9d6f3fc 100644 --- a/pkgs/applications/audio/mopidy/default.nix +++ b/pkgs/applications/audio/mopidy/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pythonPackages, pygobject, gst_python -, gst_plugins_good, gst_plugins_base +, gst_plugins_good, gst_plugins_base, gst_plugins_ugly }: pythonPackages.buildPythonPackage rec { @@ -13,7 +13,7 @@ pythonPackages.buildPythonPackage rec { }; propagatedBuildInputs = with pythonPackages; [ - gst_python pygobject pykka tornado requests2 gst_plugins_base gst_plugins_good + gst_python pygobject pykka tornado requests2 gst_plugins_base gst_plugins_good gst_plugins_ugly ]; # There are no tests From d6def2620162703a4a2c95dffb07316a0f500beb Mon Sep 17 00:00:00 2001 From: Spencer Whitt Date: Mon, 14 Dec 2015 21:10:07 -0500 Subject: [PATCH 02/10] gst-plugins-good: add icecast support --- .../libraries/gstreamer/legacy/gst-plugins-good/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-good/default.nix b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-good/default.nix index deca854008a..dc39bddc232 100644 --- a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-good/default.nix +++ b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-good/default.nix @@ -1,7 +1,7 @@ { fetchurl, stdenv, pkgconfig, gst_plugins_base, aalib, cairo , flac, libjpeg, zlib, speex, libpng, libdv, libcaca, libvpx , libiec61883, libavc1394, taglib, libpulseaudio, gdk_pixbuf, orc -, glib, gstreamer, bzip2, libsoup, libintlOrEmpty +, glib, gstreamer, bzip2, libsoup, libshout, libintlOrEmpty , # Whether to build no plugins that have external dependencies # (except the PulseAudio plugin). minimalDeps ? false @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { ++ libintlOrEmpty ++ stdenv.lib.optionals (!minimalDeps) [ aalib libcaca cairo libdv flac libjpeg libpng speex - taglib bzip2 libvpx gdk_pixbuf orc libsoup ]; + taglib bzip2 libvpx gdk_pixbuf orc libsoup libshout ]; NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null; From 89c690039a950ae1fa63d41263dab048270cdebc Mon Sep 17 00:00:00 2001 From: Spencer Whitt Date: Mon, 14 Dec 2015 21:12:52 -0500 Subject: [PATCH 03/10] gst-plugins-ugly: add LAME mp3 encoder support --- .../libraries/gstreamer/legacy/gst-plugins-ugly/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-ugly/default.nix b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-ugly/default.nix index 99ac5a5ec54..8e4e662dc3b 100644 --- a/pkgs/development/libraries/gstreamer/legacy/gst-plugins-ugly/default.nix +++ b/pkgs/development/libraries/gstreamer/legacy/gst-plugins-ugly/default.nix @@ -1,5 +1,5 @@ { fetchurl, stdenv, pkgconfig, glib, gstreamer, gst_plugins_base -, libmad, libdvdread, libmpeg2, libcdio, a52dec, x264, orc, libintlOrEmpty }: +, libmad, libdvdread, libmpeg2, libcdio, a52dec, x264, orc, lame, libintlOrEmpty }: stdenv.mkDerivation rec { name = "gst-plugins-ugly-0.10.19"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { }; buildInputs = - [ pkgconfig glib gstreamer gst_plugins_base libmad libdvdread a52dec x264 orc ] ++ libintlOrEmpty; + [ pkgconfig glib gstreamer gst_plugins_base libmad libdvdread a52dec x264 orc lame ] ++ libintlOrEmpty; NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null; From 514b7b932808223d0e99adc1ca4f6461b105272c Mon Sep 17 00:00:00 2001 From: Spencer Whitt Date: Mon, 14 Dec 2015 21:13:52 -0500 Subject: [PATCH 04/10] mopidy-mopify: 1.5.1->1.5.8 --- pkgs/applications/audio/mopidy-mopify/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/mopidy-mopify/default.nix b/pkgs/applications/audio/mopidy-mopify/default.nix index 4792a02f341..b7a1fbf2f08 100644 --- a/pkgs/applications/audio/mopidy-mopify/default.nix +++ b/pkgs/applications/audio/mopidy-mopify/default.nix @@ -3,11 +3,11 @@ pythonPackages.buildPythonPackage rec { name = "mopidy-mopify-${version}"; - version = "1.5.1"; + version = "1.5.8"; src = fetchurl { url = "https://github.com/dirkgroenen/mopidy-mopify/archive/${version}.tar.gz"; - sha256 = "0hhdss4i5436dj37pndxk81a4g3g8f6zqjyv04lhpqcww01290as"; + sha256 = "1gq88i5hbyskwhqf51myndqgmrndkyy6gs022sc387fy3dwxmvn0"; }; propagatedBuildInputs = with pythonPackages; [ mopidy configobj ]; From 47cbbc3abe73b0e30ba89c88e484dccf9601b5a6 Mon Sep 17 00:00:00 2001 From: Spencer Whitt Date: Mon, 14 Dec 2015 21:19:58 -0500 Subject: [PATCH 05/10] mopidy-youtube: init at 2.0.1 --- .../audio/mopidy-youtube/default.nix | 24 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/applications/audio/mopidy-youtube/default.nix diff --git a/pkgs/applications/audio/mopidy-youtube/default.nix b/pkgs/applications/audio/mopidy-youtube/default.nix new file mode 100644 index 00000000000..efd1425e255 --- /dev/null +++ b/pkgs/applications/audio/mopidy-youtube/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, pythonPackages, mopidy }: + +pythonPackages.buildPythonPackage rec { + name = "mopidy-youtube-${version}"; + + version = "2.0.1"; + + src = fetchFromGitHub { + owner = "mopidy"; + repo = "mopidy-youtube"; + rev = "v${version}"; + sha256 = "1si7j7m5kg0cxlhkw8s2mbnpmc9mb3l69n5sgklb1yv1s55iia6z"; + }; + + propagatedBuildInputs = with pythonPackages; [ mopidy pafy ]; + + doCheck = false; + + meta = with stdenv.lib; { + description = "Mopidy extension for playing music from YouTube"; + license = licenses.asl20; + maintainers = [ maintainers.spwhitt ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5917e715c14..802385fff48 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12507,6 +12507,8 @@ let mopidy-mopify = callPackage ../applications/audio/mopidy-mopify { }; + mopidy-youtube = callPackage ../applications/audio/mopidy-youtube { }; + mozplugger = callPackage ../applications/networking/browsers/mozilla-plugins/mozplugger {}; easytag = callPackage ../applications/audio/easytag { }; From 7e7106851086577cc0109bc734a755ec520fb8cd Mon Sep 17 00:00:00 2001 From: Spencer Whitt Date: Mon, 14 Dec 2015 21:20:41 -0500 Subject: [PATCH 06/10] mopidy-soundcloud: init at 2.0.1 --- .../audio/mopidy-soundcloud/default.nix | 24 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/applications/audio/mopidy-soundcloud/default.nix diff --git a/pkgs/applications/audio/mopidy-soundcloud/default.nix b/pkgs/applications/audio/mopidy-soundcloud/default.nix new file mode 100644 index 00000000000..c10bb00909a --- /dev/null +++ b/pkgs/applications/audio/mopidy-soundcloud/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, pythonPackages, mopidy }: + +pythonPackages.buildPythonPackage rec { + name = "mopidy-soundcloud-${version}"; + + version = "2.0.1"; + + src = fetchFromGitHub { + owner = "mopidy"; + repo = "mopidy-soundcloud"; + rev = "v${version}"; + sha256 = "05yvjnivj26wjish7x1xrd9l5z8i14b610a8pbifnq3cq7y2m22r"; + }; + + propagatedBuildInputs = [ mopidy ]; + + doCheck = false; + + meta = with stdenv.lib; { + description = "Mopidy extension for playing music from SoundCloud"; + license = licenses.mit; + maintainers = [ maintainers.spwhitt ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 802385fff48..45bbd5927aa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12509,6 +12509,8 @@ let mopidy-youtube = callPackage ../applications/audio/mopidy-youtube { }; + mopidy-soundcloud = callPackage ../applications/audio/mopidy-soundcloud { }; + mozplugger = callPackage ../applications/networking/browsers/mozilla-plugins/mozplugger {}; easytag = callPackage ../applications/audio/easytag { }; From a03b98271a7c1ac8e7f82d6808e739d7afe80df3 Mon Sep 17 00:00:00 2001 From: Spencer Whitt Date: Mon, 14 Dec 2015 21:21:26 -0500 Subject: [PATCH 07/10] mopidy-musicbox-webclient: init at 2.0.0 --- .../mopidy-musicbox-webclient/default.nix | 24 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/applications/audio/mopidy-musicbox-webclient/default.nix diff --git a/pkgs/applications/audio/mopidy-musicbox-webclient/default.nix b/pkgs/applications/audio/mopidy-musicbox-webclient/default.nix new file mode 100644 index 00000000000..e13a1a978fd --- /dev/null +++ b/pkgs/applications/audio/mopidy-musicbox-webclient/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, pythonPackages, mopidy }: + +pythonPackages.buildPythonPackage rec { + name = "mopidy-musicbox-webclient-${version}"; + + version = "2.0.0"; + + src = fetchFromGitHub { + owner = "pimusicbox"; + repo = "mopidy-musicbox-webclient"; + rev = "v${version}"; + sha256 = "0gnw6jn55jr6q7bdp70mk3cm5f6jy8lm3s7ayfmisihhjbl3rnaq"; + }; + + propagatedBuildInputs = [ mopidy ]; + + doCheck = false; + + meta = with stdenv.lib; { + description = "Mopidy extension for playing music from SoundCloud"; + license = licenses.mit; + maintainers = [ maintainers.spwhitt ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 45bbd5927aa..3b584491b4f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12511,6 +12511,8 @@ let mopidy-soundcloud = callPackage ../applications/audio/mopidy-soundcloud { }; + mopidy-musicbox-webclient = callPackage ../applications/audio/mopidy-musicbox-webclient { }; + mozplugger = callPackage ../applications/networking/browsers/mozilla-plugins/mozplugger {}; easytag = callPackage ../applications/audio/easytag { }; From 1f644d127a50553c55d06399280d65a976f28ca7 Mon Sep 17 00:00:00 2001 From: Spencer Whitt Date: Tue, 15 Dec 2015 22:29:02 -0500 Subject: [PATCH 08/10] tunigo: init at 0.1.3 --- pkgs/top-level/python-packages.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fd8590e3e91..972d0d59493 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -20824,6 +20824,25 @@ in modules // { }; }; + tunigo = buildPythonPackage rec { + name = "tunigo-${version}"; + version = "0.1.3"; + propagatedBuildInputs = with self; [ requests2 ]; + + src = pkgs.fetchFromGitHub { + owner = "trygveaa"; + repo = "python-tunigo"; + rev = "v${version}"; + sha256 = "02ili37dbs5mk5f6v3fmi1sji39ymc4zyq44x0abxzr88nc8nh97"; + }; + + meta = { + description = "Python API for the browse feature of Spotify"; + homepage = https://github.com/trygveaa/python-tunigo; + license = licenses.asl20; + }; + }; + screenkey = buildPythonPackage rec { version = "0.2-b3634a2c6eb6d6936c3b2c1ef5078bf3a84c40c6"; name = "screenkey-${version}"; From 4446b078fcb75d6cae991350d8c8008c2b92251e Mon Sep 17 00:00:00 2001 From: Spencer Whitt Date: Mon, 14 Dec 2015 21:22:04 -0500 Subject: [PATCH 09/10] mopidy-spotify-tunigo: init at 0.2.1 --- .../audio/mopidy-spotify-tunigo/default.nix | 24 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/applications/audio/mopidy-spotify-tunigo/default.nix diff --git a/pkgs/applications/audio/mopidy-spotify-tunigo/default.nix b/pkgs/applications/audio/mopidy-spotify-tunigo/default.nix new file mode 100644 index 00000000000..ab07b0f1f68 --- /dev/null +++ b/pkgs/applications/audio/mopidy-spotify-tunigo/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, pythonPackages, mopidy, mopidy-spotify }: + +pythonPackages.buildPythonPackage rec { + name = "mopidy-spotify-tunigo-${version}"; + + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "trygveaa"; + repo = "mopidy-spotify-tunigo"; + rev = "v${version}"; + sha256 = "0827wghbgrscncnshz30l97hgg0g5bsnm0ad8596zh7cai0ibss0"; + }; + + propagatedBuildInputs = [ mopidy mopidy-spotify pythonPackages.tunigo ]; + + doCheck = false; + + meta = with stdenv.lib; { + description = "Mopidy extension for providing the browse feature of Spotify"; + license = licenses.asl20; + maintainers = [ maintainers.spwhitt ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3b584491b4f..b729d6ef2a8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12507,6 +12507,8 @@ let mopidy-mopify = callPackage ../applications/audio/mopidy-mopify { }; + mopidy-spotify-tunigo = callPackage ../applications/audio/mopidy-spotify-tunigo { }; + mopidy-youtube = callPackage ../applications/audio/mopidy-youtube { }; mopidy-soundcloud = callPackage ../applications/audio/mopidy-soundcloud { }; From 3bc477e2f2c608dcc623690e378aa588a15b4c5c Mon Sep 17 00:00:00 2001 From: Spencer Whitt Date: Tue, 15 Dec 2015 22:31:42 -0500 Subject: [PATCH 10/10] mopidy module: use buildEnv fixes #11706 --- nixos/modules/services/audio/mopidy.nix | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/nixos/modules/services/audio/mopidy.nix b/nixos/modules/services/audio/mopidy.nix index a7a7e8ae688..9981b065f28 100644 --- a/nixos/modules/services/audio/mopidy.nix +++ b/nixos/modules/services/audio/mopidy.nix @@ -11,17 +11,8 @@ let mopidyConf = writeText "mopidy.conf" cfg.configuration; - mopidyLauncher = stdenv.mkDerivation { - name = "mopidy-launcher"; - phases = [ "installPhase" ]; - buildInputs = [ makeWrapper python ]; - installPhase = '' - mkdir -p $out/bin - ln -s ${mopidy}/bin/mopidy $out/bin/mopidy - wrapProgram $out/bin/mopidy \ - --prefix PYTHONPATH : \ - "${concatStringsSep ":" (map (p: "$(toPythonPath ${p})") cfg.extensionPackages)}" - ''; + mopidyEnv = python.buildEnv.override { + extraLibs = [ mopidy ] ++ cfg.extensionPackages; }; in { @@ -86,7 +77,7 @@ in { description = "mopidy music player daemon"; preStart = "mkdir -p ${cfg.dataDir} && chown -R mopidy:mopidy ${cfg.dataDir}"; serviceConfig = { - ExecStart = "${mopidyLauncher}/bin/mopidy --config ${concatStringsSep ":" ([mopidyConf] ++ cfg.extraConfigFiles)}"; + ExecStart = "${mopidyEnv}/bin/mopidy --config ${concatStringsSep ":" ([mopidyConf] ++ cfg.extraConfigFiles)}"; User = "mopidy"; PermissionsStartOnly = true; }; @@ -96,7 +87,7 @@ in { description = "mopidy local files scanner"; preStart = "mkdir -p ${cfg.dataDir} && chown -R mopidy:mopidy ${cfg.dataDir}"; serviceConfig = { - ExecStart = "${mopidyLauncher}/bin/mopidy --config ${concatStringsSep ":" ([mopidyConf] ++ cfg.extraConfigFiles)} local scan"; + ExecStart = "${mopidyEnv}/bin/mopidy --config ${concatStringsSep ":" ([mopidyConf] ++ cfg.extraConfigFiles)} local scan"; User = "mopidy"; PermissionsStartOnly = true; Type = "oneshot";