18 enableValgrindTests = !stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind
19 # Apparently valgrind doesn't support some new ARM features on (some) Hydra machines:
20 # VEX: Mismatch detected between RDMA and atomics features.
22 # Valgrind on musl does not hook malloc calls properly, resulting in errors `Invalid free() / delete / delete[] / realloc()`
23 # https://bugs.kde.org/show_bug.cgi?id=435441
24 && !stdenv.hostPlatform.isMusl
26 in stdenv.mkDerivation rec {
31 url = "https://github.com/rockdaboot/libpsl/releases/download/${version}/libpsl-${version}.tar.lz";
32 sha256 = "sha256-qj1wbEUnhtE0XglNriAc022B8Dz4HWNtXPwQ02WQfxc=";
44 ] ++ lib.optionals enableValgrindTests [
54 propagatedBuildInputs = [
59 patchShebangs src/psl-make-dafsa
69 "--with-psl-distfile=${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat"
70 "--with-psl-file=${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat"
71 "--with-psl-testfile=${publicsuffix-list}/share/publicsuffix/test_psl.txt"
72 ] ++ lib.optionals enableValgrindTests [
73 "--enable-valgrind-tests"
76 enableParallelBuilding = true;
81 description = "C library for the Publix Suffix List";
83 libpsl is a C library for the Publix Suffix List (PSL). A "public suffix"
84 is a domain name under which Internet users can directly register own
85 names. Browsers and other web clients can use it to avoid privacy-leaking
86 "supercookies" and "super domain" certificates, for highlighting parts of
87 the domain in a user interface or sorting domain lists by site.
89 homepage = "https://rockdaboot.github.io/libpsl/";
90 changelog = "https://raw.githubusercontent.com/rockdaboot/${pname}/${pname}-${version}/NEWS";
91 license = licenses.mit;
92 maintainers = [ maintainers.c0bw3b ];
94 platforms = platforms.unix;
95 pkgConfigModules = [ "libpsl" ];