Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 59 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch, 6 cmake, 7 pkg-config, 8 libuuid, 9 openssl, 10 libossp_uuid, 11 freeswitch, 12 nix-update-script, 13}: 14 15stdenv.mkDerivation rec { 16 pname = "libks"; 17 version = "2.0.7"; 18 19 src = fetchFromGitHub { 20 owner = "signalwire"; 21 repo = "libks"; 22 rev = "v${version}"; 23 sha256 = "sha256-fiBemt71UJgN0RryGmGiK7sob1xbdmSOArEGt5Pg5YM="; 24 }; 25 26 patches = [ 27 (fetchpatch { 28 url = "https://raw.githubusercontent.com/openwrt/telephony/5ced7ea4fc9bd746273d564bf3c102f253d2182e/libs/libks/patches/01-find-libm.patch"; 29 sha256 = "1hyrsdxg69d08qzvf3mbrx2363lw52jcybw8i3ynzqcl228gcg8a"; 30 }) 31 ]; 32 33 dontUseCmakeBuildDir = true; 34 35 nativeBuildInputs = [ 36 cmake 37 pkg-config 38 ]; 39 40 buildInputs = [ 41 openssl 42 ] 43 ++ lib.optional stdenv.hostPlatform.isLinux libuuid 44 ++ lib.optional stdenv.hostPlatform.isDarwin libossp_uuid; 45 46 passthru = { 47 tests.freeswitch = freeswitch; 48 updateScript = nix-update-script { }; 49 }; 50 51 meta = with lib; { 52 broken = stdenv.hostPlatform.isDarwin; 53 description = "Foundational support for signalwire C products"; 54 homepage = "https://github.com/signalwire/libks"; 55 maintainers = with lib.maintainers; [ misuzu ]; 56 platforms = platforms.unix; 57 license = licenses.mit; 58 }; 59}