2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
|
|
|
, autoreconfHook
|
|
|
|
, docbook_xsl
|
|
|
|
, docbook_xml_dtd_43
|
|
|
|
, gtk-doc
|
|
|
|
, lzip
|
|
|
|
, libidn2
|
|
|
|
, libunistring
|
|
|
|
, libxslt
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, python3
|
|
|
|
, valgrind
|
|
|
|
, publicsuffix-list
|
|
|
|
}:
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "libpsl";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.21.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "https://github.com/rockdaboot/libpsl/releases/download/${version}/libpsl-${version}.tar.lz";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-mp9qjG7bplDPnqVUdc0XLdKEhzFoBOnHMgLZdXLNOi0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# bin/psl-make-dafsa brings a large runtime closure through python3
|
|
|
|
outputs = [ "bin" "out" "dev" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
docbook_xsl
|
|
|
|
docbook_xml_dtd_43
|
|
|
|
gtk-doc
|
|
|
|
lzip
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
python3
|
|
|
|
libxslt
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libidn2
|
|
|
|
libunistring
|
|
|
|
libxslt
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
publicsuffix-list
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs src/psl-make-dafsa
|
|
|
|
'';
|
|
|
|
|
|
|
|
preAutoreconf = ''
|
|
|
|
gtkdocize
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
# "--enable-gtk-doc"
|
|
|
|
"--enable-man"
|
|
|
|
"--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"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
doCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +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.
|
|
|
|
'';
|
|
|
|
homepage = "https://rockdaboot.github.io/libpsl/";
|
|
|
|
changelog = "https://raw.githubusercontent.com/rockdaboot/${pname}/${pname}-${version}/NEWS";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.c0bw3b ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "psl";
|
2024-02-29 20:09:43 +00:00
|
|
|
platforms = platforms.unix ++ platforms.windows;
|
2023-08-10 07:59:29 +00:00
|
|
|
pkgConfigModules = [ "libpsl" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|