Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / librdf / redland.nix
blob252a5037f77cf75d7df5cdbe69a9489c3aa9be66
1 { lib, stdenv, fetchurl, pkg-config, openssl, libxslt, perl
2 , curl, pcre, libxml2, librdf_rasqal, gmp
3 , libmysqlclient, withMysql ? false
4 , postgresql, withPostgresql ? false
5 , sqlite, withSqlite ? true
6 , db, withBdb ? false
7 }:
9 stdenv.mkDerivation rec {
10   pname = "redland";
11   version = "1.0.17";
13   src = fetchurl {
14     url = "http://download.librdf.org/source/redland-${version}.tar.gz";
15     sha256 = "de1847f7b59021c16bdc72abb4d8e2d9187cd6124d69156f3326dd34ee043681";
16   };
18   nativeBuildInputs = [ perl pkg-config ];
20   buildInputs = [ openssl libxslt curl pcre libxml2 gmp ]
21     ++ lib.optional withMysql libmysqlclient
22     ++ lib.optional withSqlite sqlite
23     ++ lib.optional withPostgresql postgresql
24     ++ lib.optional withBdb db;
26   propagatedBuildInputs = [ librdf_rasqal ];
28   postInstall = "rm -rvf $out/share/gtk-doc";
30   configureFlags =
31     [ "--with-threads" ]
32     ++ lib.optionals withBdb [
33       "--with-bdb-include=${db.dev}/include"
34       "--with-bdb-lib=${db.out}/lib"
35     ];
37   # Fix broken DT_NEEDED in lib/redland/librdf_storage_sqlite.so.
38   NIX_CFLAGS_LINK = "-lraptor2";
40   doCheck = false; # fails 1 out of 17 tests with a segmentation fault
42   meta = with lib; {
43     description = "C libraries that provide support for the Resource Description Framework (RDF)";
44     homepage = "https://librdf.org/";
45     platforms = platforms.unix;
46     license = licenses.asl20;
47   };