Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchFromGitHub, 4 installShellFiles, 5 libiconv, 6 libmpdclient, 7 meson, 8 ninja, 9 pkg-config, 10 python3Packages, 11 stdenv, 12}: 13 14stdenv.mkDerivation (finalAttrs: { 15 pname = "mpc"; 16 version = "0.35"; 17 18 src = fetchFromGitHub { 19 owner = "MusicPlayerDaemon"; 20 repo = "mpc"; 21 rev = "v${finalAttrs.version}"; 22 hash = "sha256-oVdnj3nsYvOHcIOgoamLamriuWu9lucWUQtxVmXZabs="; 23 }; 24 25 buildInputs = [ 26 libmpdclient 27 ] 28 ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; 29 30 nativeBuildInputs = [ 31 installShellFiles 32 meson 33 ninja 34 pkg-config 35 python3Packages.sphinx 36 ]; 37 38 env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_LDFLAGS = "-liconv"; }; 39 40 postInstall = '' 41 installShellCompletion --cmd mpc --bash $out/share/doc/mpc/contrib/mpc-completion.bash 42 ''; 43 44 postFixup = '' 45 rm $out/share/doc/mpc/contrib/mpc-completion.bash 46 ''; 47 48 meta = { 49 homepage = "https://www.musicpd.org/clients/mpc/"; 50 description = "Minimalist command line interface to MPD"; 51 changelog = "https://raw.githubusercontent.com/MusicPlayerDaemon/mpc/refs/heads/master/NEWS"; 52 license = lib.licenses.gpl2Plus; 53 mainProgram = "mpc"; 54 maintainers = with lib.maintainers; [ ]; 55 platforms = lib.platforms.unix; 56 }; 57})