15 pname = "moonfire-nvr";
17 src = fetchFromGitHub {
19 repo = "moonfire-nvr";
21 hash = "sha256-+7VahlS+NgaO2knP+xqdlZnNEfjz8yyF/VmjWf77KXI=";
23 ui = buildNpmPackage {
25 pname = "${pname}-ui";
26 sourceRoot = "${src.name}/ui";
27 npmDepsHash = "sha256-IpZWgMo6Y3vRn9h495ifMB3tQxobLeTLC0xXS1vrKLA=";
36 in rustPlatform.buildRustPackage {
37 inherit pname version src;
39 sourceRoot = "${src.name}/server";
42 lockFile = ./Cargo.lock;
44 "coded-0.2.0-pre" = "sha256-ICDvLFCsiPCzAzf3nrRhH/McNPVQz1+uVOmj6Uc5teg=";
45 "hashlink-0.8.1" = "sha256-h7DEapTVy0SSTaOV9rCkdH3em4A9+PS0k1QQh1+0P4c=";
46 "mp4-0.9.2" = "sha256-mJZJDzD8Ep9c+4QusyBtRoqAArHK9SLdFxG1AR7JydE=";
57 ] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
63 ln -s ${ui} $out/lib/ui
70 tests.version = testers.testVersion {
72 package = moonfire-nvr;
73 command = "moonfire-nvr --version";
78 description = "Moonfire NVR, a security camera network video recorder";
79 homepage = "https://github.com/scottlamb/moonfire-nvr";
80 changelog = "https://github.com/scottlamb/moonfire-nvr/releases/tag/v${version}";
81 license = licenses.gpl3Only;
82 maintainers = with maintainers; [ gaelreyrol ];
83 mainProgram = "moonfire-nvr";