1{ stdenv, fetchFromGitHub, cmake }:
2
3stdenv.mkDerivation rec {
4 pname = "utf8proc";
5 version = "2.5.0";
6
7 src = fetchFromGitHub {
8 owner = "JuliaStrings";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "1xlkazhdnja4lksn5c9nf4bln5gjqa35a8gwlam5r0728w0h83qq";
12 };
13
14 nativeBuildInputs = [ cmake ];
15
16 cmakeFlags = [
17 "-DBUILD_SHARED_LIBS=ON"
18 ];
19
20 # the pkg-config file is not created in the cmake installation
21 # process, so we use the Makefile and install it manually
22 # see https://github.com/JuliaStrings/utf8proc/issues/198
23 preConfigure = "make libutf8proc.pc prefix=$out";
24 postInstall = "install -Dm644 ../libutf8proc.pc -t $out/lib/pkgconfig/";
25
26 meta = with stdenv.lib; {
27 description = "A clean C library for processing UTF-8 Unicode data";
28 homepage = "https://juliastrings.github.io/utf8proc/";
29 license = licenses.mit;
30 platforms = platforms.all;
31 maintainers = [ maintainers.ftrvxmtrx ];
32 };
33}