core/pkgs/by-name/li/libpsl/default.nix

73 lines
2.1 KiB
Nix
Raw Normal View History

2024-05-13 21:24:10 +00:00
{ lib, stdenv, fetchurl, autoreconfHook, docbook_xsl, docbook_xml_dtd_43
, gtk-doc, lzip, libidn2, libunistring, libxslt, pkg-config, python3
2024-05-02 00:46:19 +00:00
# , valgrind
2024-05-13 21:24:10 +00:00
, publicsuffix-list }:
2024-05-02 00:46:19 +00:00
stdenv.mkDerivation rec {
pname = "libpsl";
version = "0.21.5";
src = fetchurl {
2024-05-13 21:24:10 +00:00
url =
"https://github.com/rockdaboot/libpsl/releases/download/${version}/libpsl-${version}.tar.lz";
2024-05-02 00:46:19 +00:00
hash = "sha256-mp9qjG7bplDPnqVUdc0XLdKEhzFoBOnHMgLZdXLNOi0=";
};
# bin/psl-make-dafsa brings a large runtime closure through python3
outputs = [ "bin" "out" "dev" ];
nativeBuildInputs = [
autoreconfHook
docbook_xsl
docbook_xml_dtd_43
gtk-doc
lzip
pkg-config
python3
libxslt
];
2024-05-13 21:24:10 +00:00
buildInputs = [ libidn2 libunistring libxslt ];
2024-05-02 00:46:19 +00:00
2024-05-13 21:24:10 +00:00
propagatedBuildInputs = [ publicsuffix-list ];
2024-05-02 00:46:19 +00:00
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;
doCheck = true;
meta = with lib; {
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/";
2024-05-13 21:24:10 +00:00
changelog =
"https://raw.githubusercontent.com/rockdaboot/${pname}/${pname}-${version}/NEWS";
2024-05-02 00:46:19 +00:00
license = licenses.mit;
maintainers = [ maintainers.c0bw3b ];
mainProgram = "psl";
platforms = platforms.unix ++ platforms.windows;
pkgConfigModules = [ "libpsl" ];
};
}