From 20c20cef4694381b91fb80758e055da7cf69a40c Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 21 Apr 2021 21:11:20 +0000 Subject: [PATCH] pkgs: add unified-hosts-lists --- pkgs/default.nix | 2 ++ pkgs/unified-hosts-lists/default.nix | 33 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/unified-hosts-lists/default.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index 5faf4d5..dee7e08 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -7,4 +7,6 @@ nolimips = pkgs.callPackage ./nolimips { }; podgrab = pkgs.callPackage ./podgrab { }; + + unified-hosts-lists = pkgs.callPackage ./unified-hosts-lists { }; } diff --git a/pkgs/unified-hosts-lists/default.nix b/pkgs/unified-hosts-lists/default.nix new file mode 100644 index 0000000..af55994 --- /dev/null +++ b/pkgs/unified-hosts-lists/default.nix @@ -0,0 +1,33 @@ +{ fetchFromGitHub, lib, stdenvNoCC }: +stdenvNoCC.mkDerivation rec { + pname = "unified-hosts-lists"; + version = "3.6.4"; + + src = fetchFromGitHub { + owner = "StevenBlack"; + repo = "hosts"; + rev = version; + sha256 = "sha256-U6vRwbFSYka2VS8M1z0n+FaTkKKwdV/cCWIKxp487/I="; + }; + + phases = [ "installPhase" ]; + + installPhase = '' + mkdir -p $out + cp -r $src/hosts $out + for file in $src/alternates/*/hosts; do + cp $file $out/$(basename $(dirname $file)) + done + ''; + + meta = with lib; { + description = "Unified host lists"; + longDescription = '' + Consolidating and extending hosts files from several well-curated sources. + Optionally pick extensions for porn, social media, and other categories. + ''; + homepage = "https://github.com/StevenBlack/hosts"; + license = licenses.mit; + platforms = platforms.all; + }; +}