Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hosts/Rhizome/programs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
mochi
slack
the-unarchiver
wblock
zoom-us
];

homebrew = {
enable = true;
casks = [
"adguard"
"boltai"
"dash"
"legcord"
Expand Down
3 changes: 3 additions & 0 deletions overlays/custom-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ self: super: {

# Ungoogled Chromium with privacy enhancements
ungoogled-chromium = super.callPackage ./../packages/ungoogled-chromium/package.nix {};

# wBlock Safari extension
wblock = super.callPackage ./../packages/wblock/package.nix {};
}
38 changes: 38 additions & 0 deletions packages/wblock/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# TODO: Build from source and upstream
{
lib,
stdenvNoCC,
fetchurl,
_7zz,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "wblock";
version = "2.0.0";

src = fetchurl {
url = "https://github.com/0xCUB3/wBlock/releases/download/${finalAttrs.version}/wBlock.dmg";
hash = "sha256-emcEURH/G6Laph4/P4vGJ+Ht6QvOjijrDh1qgstGMVo=";
};

# Use 7zz to work around APFS: https://discourse.nixos.org/t/help-with-error-only-hfs-file-systems-are-supported-on-ventura/25873/9
nativeBuildInputs = [_7zz];

sourceRoot = ".";

installPhase = ''
runHook preInstall

mkdir -p "$out/Applications"
cp -r *.app "$out/Applications"

runHook postInstall
'';

meta = with lib; {
description = "Next-generation ad blocker for Safari";
homepage = "https://github.com/0xCUB3/wBlock";
license = lib.licenses.gpl3Only;
platforms = platforms.darwin;
sourceProvenance = with sourceTypes; [binaryNativeCode];
};
})