2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, dpkg, fetchurl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
generic = { version, sha256, suffix ? "" }:
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "unifi-controller";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.ubnt.com/";
|
|
|
|
description = "Controller for Ubiquiti UniFi access points";
|
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = platforms.unix;
|
2021-10-17 02:12:59 +00:00
|
|
|
maintainers = with maintainers; [ erictapen globin patryk27 pennae ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-12-29 15:07:52 +00:00
|
|
|
in rec {
|
|
|
|
# see https://community.ui.com/releases / https://www.ui.com/download/unifi
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
unifiLTS = generic {
|
|
|
|
version = "5.6.42";
|
|
|
|
sha256 = "0wxkv774pw43c15jk0sg534l5za4j067nr85r5fw58iar3w2l84x";
|
|
|
|
};
|
|
|
|
|
2020-12-29 15:07:52 +00:00
|
|
|
unifi5 = generic {
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "5.14.23";
|
|
|
|
sha256 = "1aar05yjm3z5a30x505w4kakbyz35i7mk7xyg0wm4ml6h94d84pv";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-10-19 23:25:03 +00:00
|
|
|
|
2020-12-29 15:07:52 +00:00
|
|
|
unifi6 = generic {
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "6.5.53";
|
|
|
|
sha256 = "0fk7xk3nhci0abvl1vfbjx3ajgw8qwb7f2rgzz8s8h5flhjjaysb";
|
2020-10-19 23:25:03 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|