2024-10-24 02:04:11 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
autoreconfHook,
|
|
|
|
docbook_xsl,
|
|
|
|
docbook_xml_dtd_43,
|
|
|
|
gtk-doc,
|
|
|
|
lzip,
|
|
|
|
libidn2,
|
|
|
|
libunistring,
|
|
|
|
libxslt,
|
|
|
|
pkg-config,
|
|
|
|
python3,
|
|
|
|
buildPackages,
|
|
|
|
publicsuffix-list,
|
2019-05-25 22:06:42 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-29 16:17:14 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-05-25 22:06:42 +00:00
|
|
|
pname = "libpsl";
|
2024-01-15 21:48:08 +00:00
|
|
|
version = "0.21.5";
|
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";
|
2024-01-15 21:48:08 +00:00
|
|
|
hash = "sha256-mp9qjG7bplDPnqVUdc0XLdKEhzFoBOnHMgLZdXLNOi0=";
|
2015-08-06 17:47:00 +00:00
|
|
|
};
|
|
|
|
|
2024-10-24 02:04:11 +00:00
|
|
|
outputs =
|
|
|
|
[
|
|
|
|
"out"
|
|
|
|
"dev"
|
|
|
|
]
|
2024-08-23 22:39:58 +00:00
|
|
|
# bin/psl-make-dafsa brings a large runtime closure through python3
|
|
|
|
++ lib.optional (!stdenv.hostPlatform.isStatic) "bin";
|
2024-02-29 07:00:31 +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
|
2020-02-25 00:59:49 +00:00
|
|
|
libxslt
|
2019-11-13 22:28:12 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libidn2
|
|
|
|
libunistring
|
|
|
|
libxslt
|
2024-09-14 03:41:45 +00:00
|
|
|
] ++ lib.optional (
|
2024-10-27 06:10:05 +00:00
|
|
|
!stdenv.hostPlatform.isStatic
|
|
|
|
&& !stdenv.hostPlatform.isWindows
|
|
|
|
&& (stdenv.hostPlatform.isDarwin -> stdenv.buildPlatform == stdenv.hostPlatform)
|
|
|
|
) python3;
|
2019-11-13 22:28:12 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
publicsuffix-list
|
|
|
|
];
|
2015-08-06 17:47:00 +00:00
|
|
|
|
2024-08-17 20:42:26 +00:00
|
|
|
postPatch = lib.optionalString (!stdenv.hostPlatform.isStatic) ''
|
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"
|
2024-06-20 03:15:09 +00:00
|
|
|
"PYTHON=${lib.getExe buildPackages.python3}"
|
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/";
|
2024-08-23 22:39:58 +00:00
|
|
|
changelog = "https://raw.githubusercontent.com/rockdaboot/libpsl/libpsl-${version}/NEWS";
|
2015-05-28 17:20:29 +00:00
|
|
|
license = licenses.mit;
|
2019-05-25 22:06:42 +00:00
|
|
|
maintainers = [ maintainers.c0bw3b ];
|
2022-05-05 00:52:27 +00:00
|
|
|
mainProgram = "psl";
|
2024-02-20 13:53:45 +00:00
|
|
|
platforms = platforms.unix ++ platforms.windows;
|
2023-08-08 12:53:55 +00:00
|
|
|
pkgConfigModules = [ "libpsl" ];
|
2015-05-07 14:05:51 +00:00
|
|
|
};
|
|
|
|
}
|