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 23:06:42 +01:00
|
|
|
, publicsuffix-list
|
|
|
|
}:
|
|
|
|
|
2021-06-03 06:21:56 +01:00
|
|
|
let
|
2021-10-03 09:00:54 +01: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 06:21:56 +01:00
|
|
|
in stdenv.mkDerivation rec {
|
2019-05-25 23:06:42 +01:00
|
|
|
pname = "libpsl";
|
2021-11-16 15:23:37 +00:00
|
|
|
version = "0.21.1";
|
2019-05-25 23:06:42 +01: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 18:47:00 +01: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 06:21:56 +01:00
|
|
|
] ++ lib.optionals enableValgrindTests [
|
2020-10-24 01:15:33 +01:00
|
|
|
valgrind
|
2019-11-13 22:28:12 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libidn2
|
|
|
|
libunistring
|
|
|
|
libxslt
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
publicsuffix-list
|
|
|
|
];
|
2015-08-06 18:47:00 +01:00
|
|
|
|
2015-09-25 10:33:21 +01:00
|
|
|
postPatch = ''
|
2016-08-03 19:02:25 +01:00
|
|
|
patchShebangs src/psl-make-dafsa
|
2015-09-25 10:33:21 +01:00
|
|
|
'';
|
|
|
|
|
2015-08-06 18:47:00 +01:00
|
|
|
preAutoreconf = ''
|
2015-08-06 20:33:05 +01:00
|
|
|
gtkdocize
|
2015-08-06 18:47:00 +01: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 23:06:42 +01: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 06:21:56 +01:00
|
|
|
] ++ lib.optionals enableValgrindTests [
|
2020-10-24 01:15:33 +01:00
|
|
|
"--enable-valgrind-tests"
|
2016-01-02 17:59:09 +00:00
|
|
|
];
|
2015-08-06 18:47:00 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-10-24 01:15:33 +01:00
|
|
|
doCheck = true;
|
2015-08-06 18:47:00 +01:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2015-05-07 15:05:51 +01: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 23:06:42 +01:00
|
|
|
homepage = "https://rockdaboot.github.io/libpsl/";
|
|
|
|
changelog = "https://raw.githubusercontent.com/rockdaboot/${pname}/${pname}-${version}/NEWS";
|
2015-05-28 18:20:29 +01:00
|
|
|
license = licenses.mit;
|
2019-05-25 23:06:42 +01:00
|
|
|
maintainers = [ maintainers.c0bw3b ];
|
2022-05-05 01:52:27 +01:00
|
|
|
mainProgram = "psl";
|
|
|
|
platforms = platforms.unix;
|
2015-05-07 15:05:51 +01:00
|
|
|
};
|
|
|
|
}
|