2017-05-01 21:00:09 +00:00
|
|
|
{ stdenv
|
|
|
|
, dpkg
|
|
|
|
, fetchurl
|
|
|
|
, unzip
|
|
|
|
}:
|
2014-08-05 21:00:10 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "unifi-controller-${version}";
|
2017-10-14 20:58:12 +00:00
|
|
|
version = "5.6.18";
|
2014-08-05 21:00:10 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-10-14 20:58:12 +00:00
|
|
|
url = "https://www.ubnt.com/downloads/unifi/${version}-8261dc5066/unifi_sysvinit_all.deb";
|
|
|
|
sha256 = "1xcnfmxwzij9qs9l71d3zkmq6q3ci80a8xbmfckb0gz08cvrw5k1";
|
2014-08-05 21:00:10 +00:00
|
|
|
};
|
|
|
|
|
2017-05-01 21:00:09 +00:00
|
|
|
buildInputs = [ dpkg ];
|
2014-08-05 21:00:10 +00:00
|
|
|
|
2017-05-01 21:00:09 +00:00
|
|
|
unpackPhase = ''
|
|
|
|
dpkg-deb -x ${src} ./
|
2014-08-05 21:00:10 +00:00
|
|
|
'';
|
|
|
|
|
2017-05-01 21:00:09 +00:00
|
|
|
doConfigure = false;
|
|
|
|
|
2014-08-05 21:00:10 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
2017-05-01 21:00:09 +00:00
|
|
|
cd ./usr/lib/unifi
|
|
|
|
cp -ar dl lib webapps $out
|
2014-08-05 21:00:10 +00: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 02:47:55 +00:00
|
|
|
maintainers = with maintainers; [ wkennington ];
|
2014-08-05 21:00:10 +00:00
|
|
|
};
|
|
|
|
}
|