btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / li / libshout / package.nix
blob8f97b09a3138d2f3563ece68560638e3e1753428
1 { lib, stdenv, fetchurl, fetchpatch, pkg-config
2 , openssl, libvorbis, libtheora, speex }:
4 # need pkg-config so that libshout installs ${out}/lib/pkgconfig/shout.pc
6 stdenv.mkDerivation rec {
7   pname = "libshout";
8   version = "2.4.6";
10   src = fetchurl {
11     url = "https://downloads.xiph.org/releases/libshout/${pname}-${version}.tar.gz";
12     sha256 = "sha256-OcvU8O/f3cl1XYghfkf48tcQj6dn+dWKK6JqFtj3yRA=";
13   };
15   patches = [
16     # Fixes building libshout with clang. Can be dropped once the following MR is merged:
17     # https://gitlab.xiph.org/xiph/icecast-libshout/-/merge_requests/4.
18     (fetchpatch {
19       url = "https://gitlab.xiph.org/xiph/icecast-libshout/-/commit/600fa105a799986efcccddfedfdfd3e9a1988cd0.patch";
20       hash = "sha256-XjogfcQJBPZX9MPAbNJyXaFZNekL1pabvtTT7N+cz+s=";
21     })
22     (fetchpatch {
23       url = "https://gitlab.xiph.org/xiph/icecast-libshout/-/commit/8ab2de318d55c9d0987ffae7d9b94b365af732c1.patch";
24       hash = "sha256-0+Wp2Xu59ESCJfoDcwAJHuAJyzMsaBe7f8Js3/ren2g=";
25     })
26   ];
28   outputs = [ "out" "dev" "doc" ];
30   depsBuildBuild = [ pkg-config ];
31   nativeBuildInputs = [ pkg-config ];
32   propagatedBuildInputs = [ openssl libvorbis libtheora speex ];
34   meta = {
35     description = "icecast 'c' language bindings";
37     longDescription = ''
38       Libshout is a library for communicating with and sending data to an icecast
39       server.  It handles the socket connection, the timing of the data, and prevents
40       bad data from getting to the icecast server.
41     '';
43     homepage = "https://www.icecast.org";
44     license = lib.licenses.gpl2;
45     maintainers = with lib.maintainers; [ jcumming ];
46     mainProgram = "shout";
47     platforms = with lib.platforms; unix;
48   };