2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2019-11-13 22:28:12 +00:00
|
|
|
, fetchurl
|
|
|
|
, autoreconfHook
|
|
|
|
, docbook_xsl
|
|
|
|
, docbook_xml_dtd_43
|
|
|
|
, gtk-doc
|
|
|
|
, lzip
|
|
|
|
, libidn2
|
|
|
|
, libunistring
|
|
|
|
, libxslt
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2019-11-13 22:28:12 +00:00
|
|
|
, python3
|
|
|
|
, valgrind
|
2019-05-25 22:06:42 +00:00
|
|
|
, publicsuffix-list
|
|
|
|
}:
|
|
|
|
|
2021-06-03 05:21:56 +00:00
|
|
|
let
|
2021-10-03 08:00:54 +00:00
|
|
|
enableValgrindTests = !stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind
|
|
|
|
# Apparently valgrind doesn't support some new ARM features on (some) Hydra machines:
|
|
|
|
# VEX: Mismatch detected between RDMA and atomics features.
|
|
|
|
&& !stdenv.isAarch64;
|
2021-06-03 05:21:56 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
2019-05-25 22:06:42 +00:00
|
|
|
pname = "libpsl";
|
2021-11-16 15:23:37 +00:00
|
|
|
version = "0.21.1";
|
2019-05-25 22:06:42 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-11-16 15:23:37 +00:00
|
|
|
url = "https://github.com/rockdaboot/libpsl/releases/download/${version}/libpsl-${version}.tar.lz";
|
|
|
|
sha256 = "1a9kp2rj71jb9q030lmp3zhy33rqxscawbfzhp288fxvazapahv4";
|
2015-08-06 17:47:00 +00:00
|
|
|
};
|
|
|
|
|
2019-11-13 22:28:12 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
docbook_xsl
|
|
|
|
docbook_xml_dtd_43
|
|
|
|
gtk-doc
|
|
|
|
lzip
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2019-11-13 22:28:12 +00:00
|
|
|
python3
|
2020-02-25 00:59:49 +00:00
|
|
|
libxslt
|
2021-06-03 05:21:56 +00:00
|
|
|
] ++ lib.optionals enableValgrindTests [
|
2020-10-24 00:15:33 +00:00
|
|
|
valgrind
|
2019-11-13 22:28:12 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libidn2
|
|
|
|
libunistring
|
|
|
|
libxslt
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
publicsuffix-list
|
|
|
|
];
|
2015-08-06 17:47:00 +00:00
|
|
|
|
2015-09-25 09:33:21 +00:00
|
|
|
postPatch = ''
|
2016-08-03 18:02:25 +00:00
|
|
|
patchShebangs src/psl-make-dafsa
|
2015-09-25 09:33:21 +00:00
|
|
|
'';
|
|
|
|
|
2015-08-06 17:47:00 +00:00
|
|
|
preAutoreconf = ''
|
2015-08-06 19:33:05 +00:00
|
|
|
gtkdocize
|
2015-08-06 17:47:00 +00:00
|
|
|
'';
|
|
|
|
|
2016-01-02 17:59:09 +00:00
|
|
|
configureFlags = [
|
2019-11-13 22:28:12 +00:00
|
|
|
# "--enable-gtk-doc"
|
2016-01-02 17:59:09 +00:00
|
|
|
"--enable-man"
|
2019-05-25 22:06:42 +00:00
|
|
|
"--with-psl-distfile=${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat"
|
|
|
|
"--with-psl-file=${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat"
|
|
|
|
"--with-psl-testfile=${publicsuffix-list}/share/publicsuffix/test_psl.txt"
|
2021-06-03 05:21:56 +00:00
|
|
|
] ++ lib.optionals enableValgrindTests [
|
2020-10-24 00:15:33 +00:00
|
|
|
"--enable-valgrind-tests"
|
2016-01-02 17:59:09 +00:00
|
|
|
];
|
2015-08-06 17:47:00 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-10-24 00:15:33 +00:00
|
|
|
doCheck = true;
|
2015-08-06 17:47:00 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2015-05-07 14:05:51 +00:00
|
|
|
description = "C library for the Publix Suffix List";
|
|
|
|
longDescription = ''
|
|
|
|
libpsl is a C library for the Publix Suffix List (PSL). A "public suffix"
|
|
|
|
is a domain name under which Internet users can directly register own
|
|
|
|
names. Browsers and other web clients can use it to avoid privacy-leaking
|
|
|
|
"supercookies" and "super domain" certificates, for highlighting parts of
|
|
|
|
the domain in a user interface or sorting domain lists by site.
|
|
|
|
'';
|
2019-05-25 22:06:42 +00:00
|
|
|
homepage = "https://rockdaboot.github.io/libpsl/";
|
|
|
|
changelog = "https://raw.githubusercontent.com/rockdaboot/${pname}/${pname}-${version}/NEWS";
|
2015-05-28 17:20:29 +00:00
|
|
|
license = licenses.mit;
|
2019-05-25 22:06:42 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.c0bw3b ];
|
2015-05-07 14:05:51 +00:00
|
|
|
};
|
|
|
|
}
|