about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/dsdcc/default.nix
blob: e97b36c033ff8fc4352f3a4c2c9241be9d227be5 (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
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
, mbelib, serialdv
}:

stdenv.mkDerivation rec {
  pname = "dsdcc";
  version = "1.9.4";

  src = fetchFromGitHub {
    owner = "f4exb";
    repo = "dsdcc";
    rev = "v${version}";
    sha256 = "sha256-EsjmU0LQOXnOoTFrnn63hAbvqbE6NVlSQTngot5Zuf4=";
  };

  nativeBuildInputs = [ cmake pkg-config ];
  buildInputs = [ mbelib serialdv ];

  cmakeFlags = [
    "-DUSE_MBELIB=ON"
  ];

  postFixup = ''
    substituteInPlace "$out"/lib/pkgconfig/libdsdcc.pc \
      --replace '=''${exec_prefix}//' '=/'
  '';

  meta = with lib; {
    description = "Digital Speech Decoder (DSD) rewritten as a C++ library";
    homepage = "https://github.com/f4exb/dsdcc";
    license = licenses.gpl3;
    maintainers = with maintainers; [ alexwinter ];
    platforms = platforms.unix;
  };
}