From 3e4511b933820f1e90072e6873f973024788ea07 Mon Sep 17 00:00:00 2001 From: Dries Van Daele Date: Mon, 23 Sep 2013 15:41:04 +0200 Subject: [PATCH 1/5] add the mpc (mpd cli client) package --- pkgs/applications/audio/mpc/default.nix | 26 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100755 pkgs/applications/audio/mpc/default.nix diff --git a/pkgs/applications/audio/mpc/default.nix b/pkgs/applications/audio/mpc/default.nix new file mode 100755 index 000000000000..3a7571e38073 --- /dev/null +++ b/pkgs/applications/audio/mpc/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, mpd_clientlib }: + +stdenv.mkDerivation rec { + version = "0.23"; + name = "mpc-${version}"; + + src = fetchurl { + url = "http://www.musicpd.org/download/mpc/0/${name}.tar.bz2"; + sha256 = "1ir96wfgq5qfdd2s06zfycv38g3bhn3bpndwx9hwf1w507rvifi9"; + }; + + buildInputs = [ mpd_clientlib ]; + + preConfigure = + '' + export LIBMPDCLIENT_LIBS=${mpd_clientlib}/lib/libmpdclient.so.2.0.8 + export LIBMPDCLIENT_CFLAGS=${mpd_clientlib} + ''; + + meta = { + description = "A minimalist command line interface to MPD"; + homepage = http://www.musicpd.org/clients/mpc/; + license = "GPL2"; + platforms = stdenv.lib.platforms.linux; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 38dd85a22527..d577267fa6e5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8181,6 +8181,8 @@ let mpg123 = callPackage ../applications/audio/mpg123 { }; mpg321 = callPackage ../applications/audio/mpg321 { }; + + mpc_cli = callPackage ../applications/audio/mpc { }; ncmpcpp = callPackage ../applications/audio/ncmpcpp { }; From 6b5cbfb310c967c71a2b2aed8de1e66199d7b325 Mon Sep 17 00:00:00 2001 From: Dries Van Daele Date: Mon, 23 Sep 2013 15:41:04 +0200 Subject: [PATCH 2/5] add the mpc (mpd cli client) package --- pkgs/applications/audio/mpc/default.nix | 26 +++++++++++++++++++++++++ pkgs/servers/mpd/clientlib.nix | 10 +++++++++- pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100755 pkgs/applications/audio/mpc/default.nix diff --git a/pkgs/applications/audio/mpc/default.nix b/pkgs/applications/audio/mpc/default.nix new file mode 100755 index 000000000000..3a7571e38073 --- /dev/null +++ b/pkgs/applications/audio/mpc/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, mpd_clientlib }: + +stdenv.mkDerivation rec { + version = "0.23"; + name = "mpc-${version}"; + + src = fetchurl { + url = "http://www.musicpd.org/download/mpc/0/${name}.tar.bz2"; + sha256 = "1ir96wfgq5qfdd2s06zfycv38g3bhn3bpndwx9hwf1w507rvifi9"; + }; + + buildInputs = [ mpd_clientlib ]; + + preConfigure = + '' + export LIBMPDCLIENT_LIBS=${mpd_clientlib}/lib/libmpdclient.so.2.0.8 + export LIBMPDCLIENT_CFLAGS=${mpd_clientlib} + ''; + + meta = { + description = "A minimalist command line interface to MPD"; + homepage = http://www.musicpd.org/clients/mpc/; + license = "GPL2"; + platforms = stdenv.lib.platforms.linux; + }; +} \ No newline at end of file diff --git a/pkgs/servers/mpd/clientlib.nix b/pkgs/servers/mpd/clientlib.nix index b10239e1b772..36d8a73df511 100644 --- a/pkgs/servers/mpd/clientlib.nix +++ b/pkgs/servers/mpd/clientlib.nix @@ -1,8 +1,11 @@ { stdenv, fetchurl, doxygen }: stdenv.mkDerivation rec { - version = "2.8"; + + + version = "${passthru.majorVersion}.${passthru.minorVersion}"; name = "libmpdclient-${version}"; + src = fetchurl { url = "http://www.musicpd.org/download/libmpdclient/2/${name}.tar.bz2"; sha256 = "1qwjkb56rsbk0hwhg7fl15d6sf580a19gh778zcdg374j4yym3hh"; @@ -10,6 +13,11 @@ stdenv.mkDerivation rec { buildInputs = [ doxygen ]; + passthru = { + majorVersion = "2"; + minorVersion = "8"; + }; + meta = { description = "Client library for MPD (music player daemon)"; homepage = http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 38dd85a22527..d577267fa6e5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8181,6 +8181,8 @@ let mpg123 = callPackage ../applications/audio/mpg123 { }; mpg321 = callPackage ../applications/audio/mpg321 { }; + + mpc_cli = callPackage ../applications/audio/mpc { }; ncmpcpp = callPackage ../applications/audio/ncmpcpp { }; From 6acf0f1f4894b8a401ee7790d948f9aa82b68c4c Mon Sep 17 00:00:00 2001 From: Dries Van Daele Date: Mon, 23 Sep 2013 21:14:50 +0200 Subject: [PATCH 3/5] add algorith as maintainer --- pkgs/lib/maintainers.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/lib/maintainers.nix b/pkgs/lib/maintainers.nix index a6ef3b9c07f3..f5a8c5bce989 100644 --- a/pkgs/lib/maintainers.nix +++ b/pkgs/lib/maintainers.nix @@ -5,6 +5,7 @@ alphabetically sorted. */ aforemny = "Alexander Foremny "; + algorith = "Dries Van Daele "; all = "Nix Committers "; amiddelk = "Arie Middelkoop "; amorsillo = "Andrew Morsillo "; From f93daff6a3cf88d47544a710ee0dda8a79afd0dd Mon Sep 17 00:00:00 2001 From: Dries Van Daele Date: Mon, 23 Sep 2013 21:16:14 +0200 Subject: [PATCH 4/5] remove some whitelines --- pkgs/servers/mpd/clientlib.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/servers/mpd/clientlib.nix b/pkgs/servers/mpd/clientlib.nix index 36d8a73df511..612ec0456f2a 100644 --- a/pkgs/servers/mpd/clientlib.nix +++ b/pkgs/servers/mpd/clientlib.nix @@ -1,8 +1,6 @@ { stdenv, fetchurl, doxygen }: stdenv.mkDerivation rec { - - version = "${passthru.majorVersion}.${passthru.minorVersion}"; name = "libmpdclient-${version}"; From 7b60802599a39dcb769005faac401574f56cebf9 Mon Sep 17 00:00:00 2001 From: Dries Van Daele Date: Mon, 23 Sep 2013 21:20:51 +0200 Subject: [PATCH 5/5] added maintainer and enabled dynamic loading of lib --- pkgs/applications/audio/mpc/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/audio/mpc/default.nix b/pkgs/applications/audio/mpc/default.nix index 3a7571e38073..bd21550a64cf 100755 --- a/pkgs/applications/audio/mpc/default.nix +++ b/pkgs/applications/audio/mpc/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { preConfigure = '' - export LIBMPDCLIENT_LIBS=${mpd_clientlib}/lib/libmpdclient.so.2.0.8 + export LIBMPDCLIENT_LIBS=${mpd_clientlib}/lib/libmpdclient.so.${mpd_clientlib.majorVersion}.0.${mpd_clientlib.minorVersion} export LIBMPDCLIENT_CFLAGS=${mpd_clientlib} ''; @@ -21,6 +21,7 @@ stdenv.mkDerivation rec { description = "A minimalist command line interface to MPD"; homepage = http://www.musicpd.org/clients/mpc/; license = "GPL2"; + maintainers = [ stdenv.lib.maintainers.algorith ]; platforms = stdenv.lib.platforms.linux; }; } \ No newline at end of file