summary refs log tree commit diff
path: root/pkgs/servers/adguardhome/default.nix
blob: b193fd2cfdfe51282f545618089406ece1a6748f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ lib, stdenv, fetchurl, fetchzip, nixosTests }:

let
  inherit (stdenv.hostPlatform) system;
  sources = import ./bins.nix { inherit fetchurl fetchzip; };
in

stdenv.mkDerivation rec {
  pname = "adguardhome";
  version = "0.107.7";
  src = sources.${system} or (throw "Source for ${pname} is not available for ${system}");

  installPhase = ''
    install -m755 -D ./AdGuardHome $out/bin/adguardhome
  '';

  passthru = {
    updateScript = ./update.sh;
    tests.adguardhome = nixosTests.adguardhome;
  };

  meta = with lib; {
    homepage = "https://github.com/AdguardTeam/AdGuardHome";
    description = "Network-wide ads & trackers blocking DNS server";
    platforms = builtins.attrNames sources;
    maintainers = with maintainers; [ numkem iagoq ];
    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
    license = licenses.gpl3Only;
  };
}