Unverified Commit c60d22d5 authored by Doron Behar's avatar Doron Behar Committed by GitHub
Browse files

mpd: move to pkgs/by-name (#430697)

parents a6289f60 0d602602
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  mpd,
}:

mpd.override {
  features = [
    "webdav"
    "curl"
    "mms"
    "bzip2"
    "zzip"
    "nfs"
    "audiofile"
    "faad"
    "flac"
    "gme"
    "mpg123"
    "opus"
    "vorbis"
    "vorbisenc"
    "lame"
    "libsamplerate"
    "shout"
    "libmpdclient"
    "id3tag"
    "expat"
    "pcre"
    "sqlite"
    "qobuz"
  ]
  ++ lib.optionals stdenv.hostPlatform.isLinux [
    "alsa"
    "systemd"
    "syslog"
    "io_uring"
  ]
  ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
    "mad"
    "jack"
  ];
}
+289 −0
Original line number Diff line number Diff line
@@ -65,6 +65,8 @@
  # For tests
  gtest,
  zip,
  # Features list
  features ? null,
}:

let
@@ -152,11 +154,6 @@ let
    ];
  };

  run =
    {
      features ? null,
    }:
    let
  # Disable platform specific features if needed
  # using libmad to decode mp3 files on darwin is causing a segfault -- there
  # is probably a solution, but I'm disabling it for now
@@ -198,14 +195,14 @@ let
          features;

in
    stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "mpd";
  version = "0.24.5";

  src = fetchFromGitHub {
    owner = "MusicPlayerDaemon";
    repo = "MPD";
        rev = "v${version}";
    rev = "v${finalAttrs.version}";
    sha256 = "sha256-MgepOQeOl+n65+7b8zXe2u0fCHFAviSqL1aNu2iSXiM=";
  };

@@ -273,14 +270,14 @@ let

  passthru.tests.nixos = nixosTests.mpd;

      meta = with lib; {
  meta = {
    description = "Flexible, powerful daemon for playing music";
    homepage = "https://www.musicpd.org/";
        license = licenses.gpl2Only;
        maintainers = with maintainers; [
    license = lib.licenses.gpl2Only;
    maintainers = with lib.maintainers; [
      tobim
    ];
        platforms = platforms.unix;
    platforms = lib.platforms.unix;
    mainProgram = "mpd";

    longDescription = ''
@@ -289,46 +286,4 @@ let
      files while being controlled by its network protocol.
    '';
  };
    };
in
{
  mpd = run { };
  mpd-small = run {
    features = [
      "webdav"
      "curl"
      "mms"
      "bzip2"
      "zzip"
      "nfs"
      "audiofile"
      "faad"
      "flac"
      "gme"
      "mpg123"
      "opus"
      "vorbis"
      "vorbisenc"
      "lame"
      "libsamplerate"
      "shout"
      "libmpdclient"
      "id3tag"
      "expat"
      "pcre"
      "sqlite"
      "qobuz"
    ]
    ++ lib.optionals stdenv.hostPlatform.isLinux [
      "alsa"
      "systemd"
      "syslog"
      "io_uring"
    ]
    ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
      "mad"
      "jack"
    ];
  };
  mpdWithFeatures = run;
}
})
+1 −0
Original line number Diff line number Diff line
@@ -1333,6 +1333,7 @@ mapAliases {
  mpc-cli = mpc; # Added 2024-10-14
  mpc_cli = mpc; # Added 2024-10-14
  mpd_clientlib = throw "'mpd_clientlib' has been renamed to/replaced by 'libmpdclient'"; # Converted to throw 2024-10-17
  mpdWithFeatures = lib.warnOnInstantiate "mpdWithFeatures has been replaced by mpd.override" mpd.override; # Added 2025-08-08
  mpdevil = plattenalbum; # Added 2024-05-22
  mpg321 = throw "'mpg321' has been removed due to it being unmaintained by upstream. Consider using mpg123 instead."; # Added 2024-05-10
  mq-cli = throw "'mq-cli' has been removed due to lack of upstream maintenance"; # Added 2025-01-25
+0 −8
Original line number Diff line number Diff line
@@ -10220,14 +10220,6 @@ with pkgs;

  mkchromecast = libsForQt5.callPackage ../applications/networking/mkchromecast { };

  inherit
    (callPackages ../servers/mpd {
    })
    mpd
    mpd-small
    mpdWithFeatures
    ;

  mtprotoproxy = python3.pkgs.callPackage ../servers/mtprotoproxy { };

  moodle = callPackage ../servers/web-apps/moodle { };