nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, fetchurl
4, fetchpatch
5, pkg-config
6, meson
7, ninja
8, boost
9, curl
10, libgcrypt
11, libmpdclient
12, systemd
13}:
14
15stdenv.mkDerivation rec {
16 pname = "mpdscribble";
17 version = "0.24";
18
19 src = fetchurl {
20 url = "https://www.musicpd.org/download/mpdscribble/${version}/mpdscribble-${version}.tar.xz";
21 sha256 = "sha256-9rTLp0izuH5wUnC0kjyOI+lMLgD+3VC+sUaNvi+yqOc=";
22 };
23
24 # Fix build issue on darwin; to be removed after the next release
25 patches = [(fetchpatch {
26 name = "remove-empty-static-lib.patch";
27 url = "https://github.com/MusicPlayerDaemon/mpdscribble/commit/0dbcea25c81f3fdc608f71ef71a9784679fee17f.patch";
28 sha256 = "sha256-3wLfQvbwx+OFrCl5vMV7Zps4e4iEYFhqPiVCo5hDqgw=";
29 })];
30
31 postPatch = ''
32 sed '1i#include <ctime>' -i src/Log.cxx # gcc12
33 '';
34
35 nativeBuildInputs = [ pkg-config meson ninja ];
36 buildInputs = [
37 libmpdclient
38 curl
39 boost
40 libgcrypt
41 ] ++ lib.optional stdenv.isLinux systemd;
42
43 meta = with lib; {
44 description = "A MPD client which submits info about tracks being played to a scrobbler";
45 homepage = "https://www.musicpd.org/clients/mpdscribble/";
46 license = licenses.gpl2Plus;
47 maintainers = [ maintainers.sohalt ];
48 platforms = platforms.unix;
49 };
50}