summary refs log tree commit diff
path: root/pkgs/applications/audio/sidplayfp/default.nix
blob: 4f7e43ca004b2852addefdea0136072c92fc16d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ stdenv
, lib
, fetchFromGitHub
, autoreconfHook
, perl
, pkg-config
, libsidplayfp
, alsaSupport ? stdenv.hostPlatform.isLinux
, alsa-lib
, pulseSupport ? stdenv.hostPlatform.isLinux
, libpulseaudio
, out123Support ? stdenv.hostPlatform.isDarwin
, mpg123
}:

stdenv.mkDerivation rec {
  pname = "sidplayfp";
  version = "2.1.1";

  src = fetchFromGitHub {
    owner = "libsidplayfp";
    repo = "sidplayfp";
    rev = "v${version}";
    sha256 = "0s3xmg3yzfqbsnlh2y46w7b5jim5zq7mshs6hx03q8wdr75cvwh4";
  };

  nativeBuildInputs = [ autoreconfHook perl pkg-config ];

  buildInputs = [ libsidplayfp ]
    ++ lib.optional alsaSupport alsa-lib
    ++ lib.optional pulseSupport libpulseaudio
    ++ lib.optional out123Support mpg123;

  configureFlags = lib.optionals out123Support [
    "--with-out123"
  ];

  enableParallelBuilding = true;

  meta = with lib; {
    description = "A SID player using libsidplayfp";
    homepage = "https://github.com/libsidplayfp/sidplayfp";
    license = with licenses; [ gpl2Plus ];
    maintainers = with maintainers; [ dezgeg OPNA2608 ];
    platforms = platforms.all;
  };
}