2017-05-01 22:00:09 +01:00
|
|
|
{ stdenv
|
|
|
|
, dpkg
|
|
|
|
, fetchurl
|
|
|
|
, unzip
|
|
|
|
}:
|
2014-08-05 22:00:10 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "unifi-controller-${version}";
|
2017-07-03 22:09:16 +01:00
|
|
|
version = "5.5.19";
|
2014-08-05 22:00:10 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-07-03 22:09:16 +01:00
|
|
|
url = "https://www.ubnt.com/downloads/unifi/${version}/unifi_sysvinit_all.deb";
|
|
|
|
sha256 = "0bsfq48xjp230ir8pm9wpa5p4dh88zfy51lbi2xwpr454371ixcl";
|
2014-08-05 22:00:10 +01:00
|
|
|
};
|
|
|
|
|
2017-05-01 22:00:09 +01:00
|
|
|
buildInputs = [ dpkg ];
|
2014-08-05 22:00:10 +01:00
|
|
|
|
2017-05-01 22:00:09 +01:00
|
|
|
unpackPhase = ''
|
|
|
|
dpkg-deb -x ${src} ./
|
2014-08-05 22:00:10 +01:00
|
|
|
'';
|
|
|
|
|
2017-05-01 22:00:09 +01:00
|
|
|
doConfigure = false;
|
|
|
|
|
2014-08-05 22:00:10 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
2017-05-01 22:00:09 +01:00
|
|
|
cd ./usr/lib/unifi
|
|
|
|
cp -ar dl lib webapps $out
|
2014-08-05 22:00:10 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.ubnt.com/;
|
|
|
|
description = "Controller for Ubiquiti UniFi accesspoints";
|
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = platforms.unix;
|
2014-08-06 03:47:55 +01:00
|
|
|
maintainers = with maintainers; [ wkennington ];
|
2014-08-05 22:00:10 +01:00
|
|
|
};
|
|
|
|
}
|