1{ lib, stdenv, fetchFromGitHub, cmake }:
2
3stdenv.mkDerivation rec {
4 pname = "utf8cpp";
5 version = "3.2.2";
6
7 src = fetchFromGitHub {
8 owner = "nemtrif";
9 repo = "utfcpp";
10 rev = "v${version}";
11 fetchSubmodules = true;
12 sha256 = "sha256-L58OMNrKd1+yco0V/jpOfWgDr0K1y8jOJ3TasUMRw0k=";
13 };
14
15 cmakeFlags = [
16 "-DCMAKE_INSTALL_LIBDIR=lib"
17 ];
18
19 nativeBuildInputs = [ cmake ];
20
21 # Tests fail on darwin, probably due to a bug in the test framework:
22 # https://github.com/nemtrif/utfcpp/issues/84
23 doCheck = !stdenv.isDarwin;
24
25 meta = with lib; {
26 homepage = "https://github.com/nemtrif/utfcpp";
27 description = "UTF-8 with C++ in a Portable Way";
28 license = licenses.boost;
29 maintainers = with maintainers; [ jobojeha ];
30 platforms = platforms.all;
31 };
32}