Unverified Commit 72559731 authored by williamvds's avatar williamvds
Browse files

pihole-web: init at 6.1

parent 0b006677
Loading
Loading
Loading
Loading
+51 −0
Original line number Diff line number Diff line
{
  stdenv,
  lib,
  fetchFromGitHub,
  pihole,
  pihole-ftl,
  procps,
  ...
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "pihole-web";
  version = "6.1";

  src = fetchFromGitHub {
    owner = "pi-hole";
    repo = "web";
    tag = "v${finalAttrs.version}";
    hash = "sha256-+h4cPDsTAKR8MM+Za0mp2nOX1cHW8LRlFmLqvrBHfbs=";
  };

  propagatedBuildInputs = [
    pihole
    pihole-ftl
    procps
  ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share
    cp -r -t $out/share *.lp img/ scripts/ style/ vendor/

    mkdir -p $out/share/doc/$name/
    cp README.md $out/share/doc/$name/

    runHook postInstall
  '';

  meta = {
    description = "Pi-hole web dashboard displaying stats and more";
    longDescription = ''
      Pi-hole's Web interface (based off of AdminLTE) provides a central
      location to manage your Pi-hole and review the statistics generated by
      FTLDNS.
    '';
    license = lib.licenses.eupl12;
    maintainers = with lib.maintainers; [ williamvds ];
    platforms = lib.platforms.linux;
  };
})