19 stdenv.mkDerivation rec {
24 url = "https://github.com/rockdaboot/libpsl/releases/download/${version}/libpsl-${version}.tar.lz";
25 hash = "sha256-mp9qjG7bplDPnqVUdc0XLdKEhzFoBOnHMgLZdXLNOi0=";
33 # bin/psl-make-dafsa brings a large runtime closure through python3
34 ++ lib.optional (!stdenv.hostPlatform.isStatic) "bin";
51 !stdenv.hostPlatform.isStatic
52 && !stdenv.hostPlatform.isWindows
53 && (stdenv.hostPlatform.isDarwin -> stdenv.buildPlatform == stdenv.hostPlatform)
56 propagatedBuildInputs = [
60 postPatch = lib.optionalString (!stdenv.hostPlatform.isStatic) ''
61 patchShebangs src/psl-make-dafsa
71 "--with-psl-distfile=${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat"
72 "--with-psl-file=${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat"
73 "--with-psl-testfile=${publicsuffix-list}/share/publicsuffix/test_psl.txt"
74 "PYTHON=${lib.getExe buildPackages.python3}"
77 enableParallelBuilding = true;
82 description = "C library for the Publix Suffix List";
84 libpsl is a C library for the Publix Suffix List (PSL). A "public suffix"
85 is a domain name under which Internet users can directly register own
86 names. Browsers and other web clients can use it to avoid privacy-leaking
87 "supercookies" and "super domain" certificates, for highlighting parts of
88 the domain in a user interface or sorting domain lists by site.
90 homepage = "https://rockdaboot.github.io/libpsl/";
91 changelog = "https://raw.githubusercontent.com/rockdaboot/libpsl/libpsl-${version}/NEWS";
92 license = licenses.mit;
93 maintainers = [ maintainers.c0bw3b ];
95 platforms = platforms.unix ++ platforms.windows;
96 pkgConfigModules = [ "libpsl" ];