lol
1{ stdenv, fetchFromGitHub, cmake, libsodium, ncurses, libopus, libmsgpack
2, libvpx, check, libconfig, pkgconfig }:
3
4stdenv.mkDerivation rec {
5 name = "libtoxcore-${version}";
6 version = "0.1.8";
7
8 src = fetchFromGitHub {
9 owner = "TokTok";
10 repo = "c-toxcore";
11 rev = "v${version}";
12 sha256 = "08vdq3j60wn62lj2z9f3f47hibns93rvaqx5xc5bm3nglk70q7kk";
13 };
14
15 cmakeFlags = [
16 "-DBUILD_NTOX=ON"
17 "-DDHT_BOOTSTRAP=ON"
18 "-DBOOTSTRAP_DAEMON=ON"
19 ];
20
21 buildInputs = [
22 libsodium libmsgpack ncurses
23 ] ++ stdenv.lib.optionals (!stdenv.isArm) [
24 libopus
25 libvpx
26 ];
27 nativeBuildInputs = [ cmake pkgconfig ];
28 checkInputs = [ check ];
29
30 checkPhase = "ctest";
31
32 # for some reason the tests are not running - it says "No tests found!!"
33 doCheck = true;
34
35 meta = with stdenv.lib; {
36 description = "P2P FOSS instant messaging application aimed to replace Skype with crypto";
37 license = licenses.gpl3Plus;
38 maintainers = with maintainers; [ peterhoeg ];
39 platforms = platforms.all;
40 };
41}