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
|
2021-12-17 23:55:13 +00:00
|
|
|
generic = { version, sha256, suffix ? "", ... } @ args:
|
|
|
|
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 ];
|
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
|
|
|
|
2022-02-02 19:42:06 +00:00
|
|
|
unifi7 = generic {
|
2023-11-17 22:03:59 +00:00
|
|
|
version = "7.5.187";
|
2024-01-01 20:42:04 +00:00
|
|
|
suffix = "-f57f5bf7ab";
|
2023-11-17 22:03:59 +00:00
|
|
|
sha256 = "sha256-a5kl8gZbRnhS/p1imPl7soM0/QSFHdM0+2bNmDfc1mY=";
|
2022-02-02 19:42:06 +00:00
|
|
|
};
|
2023-11-26 20:54:18 +00:00
|
|
|
|
|
|
|
unifi8 = generic {
|
2024-04-30 03:27:33 +00:00
|
|
|
version = "8.1.127";
|
|
|
|
sha256 = "sha256-7Xg4I0Kuvta4oKzkduCda7aonTFzutrQJK03FLqM0KE=";
|
2023-11-26 20:54:18 +00:00
|
|
|
};
|
2014-08-05 21:00:10 +00:00
|
|
|
}
|