2021-12-17 23:55:13 +00:00
|
|
|
{ lib, stdenv, dpkg, fetchurl, zip, nixosTests }:
|
2014-08-05 21:00:10 +00:00
|
|
|
|
2018-03-25 20:49:54 +00:00
|
|
|
let
|
2024-09-07 19:54:39 +00:00
|
|
|
generic = { version, sha256, suffix ? "", knownVulnerabilities ? [ ], ... } @ args:
|
2021-12-17 23:55:13 +00:00
|
|
|
stdenv.mkDerivation (args // {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "unifi-controller";
|
2018-04-30 03:31:44 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://dl.ubnt.com/unifi/${version}${suffix}/unifi_sysvinit_all.deb";
|
|
|
|
inherit sha256;
|
2018-03-25 20:49:54 +00:00
|
|
|
};
|
2018-04-30 03:31:44 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-12-17 23:55:13 +00:00
|
|
|
passthru.tests = {
|
|
|
|
unifi = nixosTests.unifi;
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.ubnt.com/";
|
2018-04-30 03:31:44 +00:00
|
|
|
description = "Controller for Ubiquiti UniFi access points";
|
2022-06-02 13:38:41 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2018-04-30 03:31:44 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = platforms.unix;
|
2023-06-06 21:29:46 +00:00
|
|
|
maintainers = with maintainers; [ globin patryk27 ];
|
2024-09-07 19:54:39 +00:00
|
|
|
inherit knownVulnerabilities;
|
2018-03-25 20:49:54 +00:00
|
|
|
};
|
2021-12-17 23:55:13 +00:00
|
|
|
});
|
2014-08-05 21:00:10 +00:00
|
|
|
|
2020-12-28 15:07:10 +00:00
|
|
|
in rec {
|
|
|
|
# see https://community.ui.com/releases / https://www.ui.com/download/unifi
|
2014-08-05 21:00:10 +00:00
|
|
|
|
2023-11-26 20:54:18 +00:00
|
|
|
unifi8 = generic {
|
2024-10-07 22:33:31 +00:00
|
|
|
version = "8.5.6";
|
|
|
|
suffix = "-1x29lm155t";
|
|
|
|
sha256 = "sha256-ZpCoE8OPb3FcKzf7Nurf9q+g2BpbjZcp1LvWOsV/tpA=";
|
2023-11-26 20:54:18 +00:00
|
|
|
};
|
2014-08-05 21:00:10 +00:00
|
|
|
}
|