nixpkgs/pkgs/servers/unifi/default.nix

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

55 lines
1.3 KiB
Nix
Raw Normal View History

2021-12-17 23:55:13 +00:00
{ lib, stdenv, dpkg, fetchurl, zip, nixosTests }:
2014-08-05 21:00:10 +00:00
let
generic = { version, sha256, suffix ? "", knownVulnerabilities ? [ ], ... } @ args:
stdenv.mkDerivation (args // {
2019-08-13 21:52:01 +00: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-17 23:55:13 +00: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 ];
inherit knownVulnerabilities;
};
});
2014-08-05 21:00: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
}