From 76285643d8473948b10f742fb2d5c2968fa9dd02 Mon Sep 17 00:00:00 2001 From: fleaz Date: Fri, 1 Dec 2023 14:58:00 +0100 Subject: [PATCH] try to package neolink --- default.nix | 4 +++- neolink.nix | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 neolink.nix diff --git a/default.nix b/default.nix index ed693b3..3c4741d 100644 --- a/default.nix +++ b/default.nix @@ -15,4 +15,6 @@ self: super: { nginxModules = super.recurseIntoAttrs (super.callPackage ./nginx/modules.nix { }); libedgetpu = self.callPackage ./libedgetpu {}; -} \ No newline at end of file + + neolink = self.callPackage ./neolink.nix {}; +} diff --git a/neolink.nix b/neolink.nix new file mode 100644 index 0000000..51e7ba1 --- /dev/null +++ b/neolink.nix @@ -0,0 +1,41 @@ +{ lib +,fetchFromGitHub +, rustPlatform +, pkg-config +, gst_all_1 +}: + +rustPlatform.buildRustPackage rec { + version = "0.6.2"; + pname = "neolink"; + + src = fetchFromGitHub { + owner = "QuantumEntangledAndy"; + repo = "neolink"; + rev = "v${version}"; + hash = "sha256-O+CbxK0phdRFcPH+ELjxd5Ad5eZWz/FZrmnGvkFv1b8="; + }; + + nativeBuildInputs = [ pkg-config + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gst_all_1.gst-plugins-bad + gst_all_1.gst-rtsp-server + ]; + propagatedBuildInputs = [ + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gst_all_1.gst-plugins-bad + gst_all_1.gst-rtsp-server + ]; + + cargoSha256 = "sha256-Y82G/gk7VE2q0DZdZoEkDT+Iye/nqixauKir3dW7tCg="; + + meta = with lib; { + homepage = "https://github.com/QuantumEntangledAndy/neolink"; + description = " An RTSP bridge to Reolink IP cameras "; + license = lib.licenses.agpl3; + maintainers = with lib.maintainers; [ fleaz ]; + }; +} +