nixpkgs/pkgs/servers/unifi/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.4 KiB
Nix
Raw Normal View History

2021-12-18 02:55:13 +03:00
{ lib, stdenv, dpkg, fetchurl, zip, nixosTests }:
2014-08-06 01:00:10 +04:00
let
generic = { version, sha256, suffix ? "", ... } @ args:
stdenv.mkDerivation (args // {
2019-08-14 00:52:01 +03:00
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
'';
2021-12-18 02:55:13 +03:00
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 ];
};
});
2014-08-06 01:00:10 +04:00
in rec {
# see https://community.ui.com/releases / https://www.ui.com/download/unifi
2014-08-06 01:00:10 +04:00
unifi7 = generic {
2023-11-18 01:03:59 +03:00
version = "7.5.187";
2024-01-01 23:42:04 +03:00
suffix = "-f57f5bf7ab";
2023-11-18 01:03:59 +03:00
sha256 = "sha256-a5kl8gZbRnhS/p1imPl7soM0/QSFHdM0+2bNmDfc1mY=";
};
2023-11-26 23:54:18 +03:00
unifi8 = generic {
2024-06-01 04:37:41 +03:00
version = "8.2.93";
suffix = "-1c329ecd26";
sha256 = "sha256-7zcRxflEvPRxH7MtudOqumeUpSzAaEIbjaaJVpr2Gbc=";
2023-11-26 23:54:18 +03:00
};
2014-08-06 01:00:10 +04:00
}