Unverified Commit 1118ab81 authored by jopejoe1's avatar jopejoe1 Committed by GitHub
Browse files

unifi: 8.5.6 -> 8.6.9 (#355103)

parents f9aa6104 e4f14638
Loading
Loading
Loading
Loading
+53 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  dpkg,
  fetchurl,
  nixosTests,
}:

stdenv.mkDerivation rec {
  pname = "unifi-controller";
  version = "8.6.9";

  # see https://community.ui.com/releases / https://www.ui.com/download/unifi
  src = fetchurl {
    url = "https://dl.ui.com/unifi/${version}/unifi_sysvinit_all.deb";
    sha256 = "sha256-004ZJEoj23FyFEBznqrpPzQ9E6DYpD7gBxa3ewSunIo=";
  };

  nativeBuildInputs = [ dpkg ];

  unpackPhase = ''
    runHook preUnpack
    dpkg-deb -x $src ./
    runHook postUnpack
  '';

  installPhase = ''
    runHook preInstall

    mkdir -p $out
    cd ./usr/lib/unifi
    cp -ar dl lib webapps $out

    runHook postInstall
  '';

  passthru.tests = {
    unifi = nixosTests.unifi;
  };

  meta = with lib; {
    homepage = "http://www.ubnt.com/";
    description = "Controller for Ubiquiti UniFi access points";
    sourceProvenance = with sourceTypes; [ binaryBytecode ];
    license = licenses.unfree;
    platforms = platforms.unix;
    maintainers = with maintainers; [
      globin
      patryk27
    ];
    knownVulnerabilities = [ ];
  };
}

pkgs/servers/unifi/default.nix

deleted100644 → 0
+0 −54
Original line number Diff line number Diff line
{ lib, stdenv, dpkg, fetchurl, zip, nixosTests }:

let
  generic = { version, sha256, suffix ? "", knownVulnerabilities ? [ ], ... } @ args:
  stdenv.mkDerivation (args // {
    pname = "unifi-controller";

    src = fetchurl {
      url = "https://dl.ubnt.com/unifi/${version}${suffix}/unifi_sysvinit_all.deb";
      inherit sha256;
    };

    nativeBuildInputs = [ dpkg ];

    unpackPhase = ''
      runHook preUnpack
      dpkg-deb -x $src ./
      runHook postUnpack
    '';

    installPhase = ''
      runHook preInstall

      mkdir -p $out
      cd ./usr/lib/unifi
      cp -ar dl lib webapps $out

      runHook postInstall
    '';

    passthru.tests = {
      unifi = nixosTests.unifi;
    };

    meta = with lib; {
      homepage = "http://www.ubnt.com/";
      description = "Controller for Ubiquiti UniFi access points";
      sourceProvenance = with sourceTypes; [ binaryBytecode ];
      license = licenses.unfree;
      platforms = platforms.unix;
      maintainers = with maintainers; [ globin patryk27 ];
      inherit knownVulnerabilities;
    };
  });

in rec {
  # see https://community.ui.com/releases / https://www.ui.com/download/unifi

  unifi8 = generic {
    version = "8.5.6";
    suffix = "-1x29lm155t";
    sha256 = "sha256-ZpCoE8OPb3FcKzf7Nurf9q+g2BpbjZcp1LvWOsV/tpA=";
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -1250,6 +1250,7 @@ mapAliases {
  unifi5 = throw "'unifi5' has been removed since its required MongoDB version is EOL."; # Added 2024-04-11
  unifi6 = throw "'unifi6' has been removed since its required MongoDB version is EOL."; # Added 2024-04-11
  unifi7 = throw "'unifi7' has been removed since it is vulnerable to CVE-2024-42025 and its required MongoDB version is EOL."; # Added 2024-10-01
  unifi8 = unifi; # Added 2024-11-15
  unifiLTS = throw "'unifiLTS' has been removed since UniFi no longer has LTS and stable releases. Use `pkgs.unifi` instead."; # Added 2024-04-11
  unifiStable = throw "'unifiStable' has been removed since UniFi no longer has LTS and stable releases. Use `pkgs.unifi` instead."; # Converted to throw 2024-04-11
  untrunc = throw "'untrunc' has been renamed to/replaced by 'untrunc-anthwlock'"; # Converted to throw 2024-10-17
+0 −5
Original line number Diff line number Diff line
@@ -12348,11 +12348,6 @@ with pkgs;
    matomo_5
    matomo-beta;
  inherit (callPackages ../servers/unifi { })
    unifi8;
  unifi = unifi8;
  unpackerr = callPackage ../servers/unpackerr {
    inherit (darwin.apple_sdk.frameworks) Cocoa WebKit;
  };