depot/pkgs/tools/networking/hblock/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

41 lines
911 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, coreutils
, gawk
, curl
, gnugrep
}:
stdenv.mkDerivation rec {
pname = "hblock";
version = "3.5.0";
src = fetchFromGitHub {
owner = "hectorm";
repo = "hblock";
rev = "v${version}";
hash = "sha256-XnBmKOZBHWyjNlv+L24LYns05oGTOJnNNzM0jCwZMuI=";
};
buildInputs = [ coreutils curl gnugrep gawk ];
nativeBuildInputs = [ makeWrapper ];
installFlags = [
"prefix=$(out)"
];
postInstall = ''
wrapProgram "$out/bin/hblock" \
--prefix PATH : ${lib.makeBinPath [ coreutils curl gnugrep gawk ]}
'';
meta = with lib; {
description = "Improve your security and privacy by blocking ads, tracking and malware domains";
mainProgram = "hblock";
homepage = "https://github.com/hectorm/hblock";
license = licenses.mit;
maintainers = with maintainers; [ alanpearce ];
platforms = platforms.unix;
};
}