2020-08-19 22:12:32 +02:00
|
|
|
{ stdenv, fetchFromGitHub, cmake }:
|
2014-12-08 21:53:52 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-05-06 14:30:33 +02:00
|
|
|
pname = "utf8proc";
|
2020-12-16 13:15:11 +01:00
|
|
|
version = "2.6.1";
|
2014-12-08 21:53:52 +01:00
|
|
|
|
2019-05-06 14:30:33 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "JuliaStrings";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-12-16 13:15:11 +01:00
|
|
|
sha256 = "1zqc6airkzkssbjxanx5v8blfk90180gc9id0dx8ncs54f1ib8w7";
|
2014-12-08 21:53:52 +01:00
|
|
|
};
|
|
|
|
|
2020-08-19 22:12:32 +02:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
2020-08-23 14:27:55 +02:00
|
|
|
"-DUTF8PROC_ENABLE_TESTING=ON"
|
|
|
|
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
|
2020-08-19 22:12:32 +02:00
|
|
|
];
|
2014-12-08 21:53:52 +01:00
|
|
|
|
2020-08-23 23:41:50 +02:00
|
|
|
# the pkg-config file is not created in the cmake installation
|
|
|
|
# process, so we use the Makefile and install it manually
|
|
|
|
# see https://github.com/JuliaStrings/utf8proc/issues/198
|
|
|
|
preConfigure = "make libutf8proc.pc prefix=$out";
|
|
|
|
postInstall = "install -Dm644 ../libutf8proc.pc -t $out/lib/pkgconfig/";
|
|
|
|
|
2020-08-23 14:27:55 +02:00
|
|
|
doCheck = true;
|
|
|
|
|
2015-05-29 21:48:46 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A clean C library for processing UTF-8 Unicode data";
|
2019-05-06 14:30:33 +02:00
|
|
|
homepage = "https://juliastrings.github.io/utf8proc/";
|
2015-05-29 21:48:46 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.ftrvxmtrx ];
|
2014-12-08 21:53:52 +01:00
|
|
|
};
|
|
|
|
}
|