about summary refs log tree commit diff
diff options
context:
space:
mode:
authorrsynnest <contact@rsynnest.com>2021-04-22 21:39:09 -0700
committerrsynnest <contact@rsynnest.com>2021-04-26 22:09:14 -0700
commit73609958b5282f512a11664898f2f2752d6fbc0b (patch)
treeea984d13812bb7c3b2d29802f481d60b582d08ce
parent7659fca548e36a81cf33c74cc7d67a20a5b61d17 (diff)
downloadnixlib-73609958b5282f512a11664898f2f2752d6fbc0b.tar
nixlib-73609958b5282f512a11664898f2f2752d6fbc0b.tar.gz
nixlib-73609958b5282f512a11664898f2f2752d6fbc0b.tar.bz2
nixlib-73609958b5282f512a11664898f2f2752d6fbc0b.tar.lz
nixlib-73609958b5282f512a11664898f2f2752d6fbc0b.tar.xz
nixlib-73609958b5282f512a11664898f2f2752d6fbc0b.tar.zst
nixlib-73609958b5282f512a11664898f2f2752d6fbc0b.zip
unifi-video: init at 3.10.13
-rwxr-xr-xpkgs/servers/unifi-video/default.nix61
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/servers/unifi-video/default.nix b/pkgs/servers/unifi-video/default.nix
new file mode 100755
index 000000000000..4c55d5102591
--- /dev/null
+++ b/pkgs/servers/unifi-video/default.nix
@@ -0,0 +1,61 @@
+{ dpkg
+, stdenv
+, lib
+, fetchurl
+, jre8
+, jsvc
+, lsb-release
+, libcap
+, util-linux
+, makeWrapper
+, autoPatchelfHook
+, glibc
+, gcc-unwrapped
+}:
+
+stdenv.mkDerivation rec {
+  pname = "unifi-video";
+  version = "3.10.13";
+  src = fetchurl {
+    urls = [ "https://dl.ui.com/firmwares/ufv/v${version}/unifi-video.Debian9_amd64.v${version}.deb" "https://archive.org/download/unifi-video.Debian9_amd64.v${version}/unifi-video.Debian9_amd64.v${version}.deb" ];
+    sha256 = "06mxjdizs4mhm1by8kj4pg5hhdi8ns6x75ggwyp1k6zb26jvvdny";
+  };
+
+  buildInputs = [ jre8 jsvc lsb-release libcap util-linux ];
+  nativeBuildInputs = [ dpkg makeWrapper autoPatchelfHook glibc gcc-unwrapped ];
+
+  unpackCmd = ''
+    runHook preUnpack
+
+    dpkg-deb -x $src .
+    rm -r etc
+
+    runHook postUnpack
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out
+    cp -ar sbin $out/bin
+    cp -ar lib share $out
+    chmod +x $out/bin/*
+    wrapProgram $out/bin/unifi-video --set JAVA_HOME "${jre8}" --prefix PATH : ${lib.makeBinPath [ jre8 lsb-release libcap util-linux]}
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Unifi Video NVR (aka Airvision) is a software package for controlling Unifi cameras";
+    longDescription = ''
+      Unifi Video is the NVR server software which can monitor and
+      record footage from supported Unifi video cameras
+    '';
+    homepage = "https://www.ui.com";
+    downloadPage = "https://www.ui.com/download/unifi-video/";
+    license = licenses.unfree;
+    maintainers = [ maintainers.rsynnest ];
+    platforms = [ "x86_64-linux" ];
+    knownVulnerabilities = [ "Upstream support for Unifi Video ended January 1st, 2021." ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index c526c3706ab1..7045912fb33c 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -19328,6 +19328,8 @@ in
     unifi6;
   unifi = unifi6;
 
+  unifi-video = callPackage ../servers/unifi-video { };
+
   urserver = callPackage ../servers/urserver { };
 
   victoriametrics = callPackage ../servers/nosql/victoriametrics { };