nixpkgs/pkgs/servers/unifi/default.nix

38 lines
760 B
Nix
Raw Normal View History

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