Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
70 lines
1.4 KiB
Nix
70 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenvNoCC,
|
|
fetchFromGitHub,
|
|
nix-update-script,
|
|
}:
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "stevenblack-blocklist";
|
|
version = "3.16.23";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "StevenBlack";
|
|
repo = "hosts";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-xwfozRzPrq8PybpRYVkQ/RXF4AbroLk3FMA32XCnFrk=";
|
|
};
|
|
|
|
outputs = [
|
|
# default src fallback
|
|
"out"
|
|
|
|
# base hosts file
|
|
"ads"
|
|
|
|
# extensions only
|
|
"fakenews"
|
|
"gambling"
|
|
"porn"
|
|
"social"
|
|
];
|
|
|
|
dontConfigure = true;
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out $ads $fakenews $gambling $porn $social
|
|
|
|
# out
|
|
find alternates -type f -not -name "hosts" -exec rm {} +
|
|
cp -r alternates $out
|
|
install -Dm644 hosts $out
|
|
|
|
# ads
|
|
install -Dm644 hosts $ads
|
|
|
|
# extensions
|
|
install -Dm644 alternates/fakenews-only/hosts $fakenews
|
|
install -Dm644 alternates/gambling-only/hosts $gambling
|
|
install -Dm644 alternates/porn-only/hosts $porn
|
|
install -Dm644 alternates/social-only/hosts $social
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = with lib; {
|
|
description = "Unified hosts file with base extensions";
|
|
homepage = "https://github.com/StevenBlack/hosts";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [
|
|
moni
|
|
Guanran928
|
|
frontear
|
|
];
|
|
};
|
|
})
|