From 909c704f1bfd3ed1564ca706d66cb6f00783eca4 Mon Sep 17 00:00:00 2001 From: 25huizengek1 <50515369+25huizengek1@users.noreply.github.com> Date: Sun, 11 May 2025 23:15:49 +0200 Subject: [PATCH] mpd: 0.24.2 -> 0.24.3 --- pkgs/servers/mpd/default.nix | 53 ++++++++++++++---------------------- 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/pkgs/servers/mpd/default.nix b/pkgs/servers/mpd/default.nix index 07102e05e42d..b80a481a3113 100644 --- a/pkgs/servers/mpd/default.nix +++ b/pkgs/servers/mpd/default.nix @@ -50,8 +50,9 @@ pcre2, libgcrypt, expat, - # Services - yajl, + nlohmann_json, + zlib, + libupnp, # Client support libmpdclient, # Tag support @@ -116,16 +117,15 @@ let qobuz = [ curl libgcrypt - yajl - ]; - soundcloud = [ - curl - yajl + nlohmann_json ]; # Client support libmpdclient = [ libmpdclient ]; # Tag support - id3tag = [ libid3tag ]; + id3tag = [ + libid3tag + zlib + ]; # Misc dbus = [ dbus ]; expat = [ expat ]; @@ -134,7 +134,6 @@ let sqlite = [ sqlite ]; syslog = [ ]; systemd = [ systemd ]; - yajl = [ yajl ]; zeroconf = [ avahi dbus @@ -197,13 +196,13 @@ let in stdenv.mkDerivation rec { pname = "mpd"; - version = "0.24.2"; + version = "0.24.3"; src = fetchFromGitHub { owner = "MusicPlayerDaemon"; repo = "MPD"; rev = "v${version}"; - sha256 = "sha256-6wEFgiMsEoWvmfH609d+UZY7jzqDoNmXalpHBipqTN0="; + sha256 = "sha256-lbYQ3fHq1Z6i3zVdLiO9q+3t2BkREwvgOHUVfTJniNg="; }; buildInputs = [ @@ -214,6 +213,7 @@ let # # Run-time dependency GTest found: YES 1.10.0 gtest + libupnp ] ++ concatAttrVals features_ featureDependencies; nativeBuildInputs = [ @@ -225,25 +225,13 @@ let depsBuildBuild = [ buildPackages.stdenv.cc ]; postPatch = - '' - # Basically a revert of https://github.com/MusicPlayerDaemon/MPD/commit/0aeda01ba6d22a8d9fc583faa67ffc6473869a43 - # We use a yajl fork that fixed this issue in the pkg-config manifest - substituteInPlace \ - src/lib/yajl/Callbacks.hxx \ - src/lib/yajl/Handle.hxx \ - --replace-fail "" "" - substituteInPlace \ - src/lib/yajl/Gen.hxx \ - --replace-fail "" "" - '' - + - lib.optionalString - (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "12.0") - '' - substituteInPlace src/output/plugins/OSXOutputPlugin.cxx \ - --replace kAudioObjectPropertyElement{Main,Master} \ - --replace kAudioHardwareServiceDeviceProperty_Virtual{Main,Master}Volume - ''; + lib.optionalString + (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "12.0") + '' + substituteInPlace src/output/plugins/OSXOutputPlugin.cxx \ + --replace kAudioObjectPropertyElement{Main,Master} \ + --replace kAudioHardwareServiceDeviceProperty_Virtual{Main,Master}Volume + ''; # Otherwise, the meson log says: # @@ -272,7 +260,8 @@ let ++ map (x: "-D${x}=enabled") features_ ++ map (x: "-D${x}=disabled") (lib.subtractLists features_ knownFeatures) ++ lib.optional (builtins.elem "zeroconf" features_) "-Dzeroconf=avahi" - ++ lib.optional (builtins.elem "systemd" features_) "-Dsystemd_system_unit_dir=etc/systemd/system"; + ++ lib.optional (builtins.elem "systemd" features_) "-Dsystemd_system_unit_dir=etc/systemd/system" + ++ lib.optional (builtins.elem "qobuz" features_) "-Dnlohmann_json=enabled"; passthru.tests.nixos = nixosTests.mpd; @@ -321,9 +310,7 @@ in "id3tag" "expat" "pcre" - "yajl" "sqlite" - "soundcloud" "qobuz" ] ++ lib.optionals stdenv.hostPlatform.isLinux [