Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / libks / default.nix
blob56a8e59433cd7a673e71695bf8e3ce9480049db5
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , fetchpatch
5 , cmake
6 , pkg-config
7 , libuuid
8 , openssl
9 , libossp_uuid
12 stdenv.mkDerivation rec {
13   pname = "libks";
14   version = "1.8.2";
16   src = fetchFromGitHub {
17     owner = "signalwire";
18     repo = pname;
19     rev = "v${version}";
20     sha256 = "sha256-TJ3q97K3m3zYGB1D5lLVyrh61L3vtnP5I64lP/DYzW4=";
21   };
23   patches = [
24     (fetchpatch {
25       url = "https://raw.githubusercontent.com/openwrt/telephony/5ced7ea4fc9bd746273d564bf3c102f253d2182e/libs/libks/patches/01-find-libm.patch";
26       sha256 = "1hyrsdxg69d08qzvf3mbrx2363lw52jcybw8i3ynzqcl228gcg8a";
27     })
28   ];
30   dontUseCmakeBuildDir = true;
32   nativeBuildInputs = [
33     cmake
34     pkg-config
35   ];
37   buildInputs = [ openssl ]
38     ++ lib.optional stdenv.isLinux libuuid
39     ++ lib.optional stdenv.isDarwin libossp_uuid;
41   meta = with lib; {
42     description = "Foundational support for signalwire C products";
43     homepage = "https://github.com/signalwire/libks";
44     maintainers = with lib.maintainers; [ misuzu ];
45     platforms = platforms.unix;
46     license = licenses.mit;
47   };