
They are not doing anything right now. This is in preparation for their complete removal from the tree. Note: several changes that affect the derivation inputs (e.g. removal of references to stub paths in build instructions) were left out. They will be cleaned up the next iteration and will require special care. Note: this PR is a result of a mix of ugly regex (not AST) based automation and some manual labor. For reference, the regex automation part was hacked in: https://github.com/booxter/nix-clean-apple_sdk Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
91 lines
1.8 KiB
Nix
91 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
pkg-config,
|
|
ncurses,
|
|
sqlite,
|
|
testers,
|
|
moonfire-nvr,
|
|
nodejs,
|
|
pnpm_9,
|
|
}:
|
|
|
|
let
|
|
pname = "moonfire-nvr";
|
|
version = "0.7.20";
|
|
src = fetchFromGitHub {
|
|
owner = "scottlamb";
|
|
repo = "moonfire-nvr";
|
|
tag = "v${version}";
|
|
hash = "sha256-0EaGqZUmYGxLHcJAhlbG2wZMDiVv8U1bcTQqMx0aTo0=";
|
|
};
|
|
ui = stdenv.mkDerivation (finalAttrs: {
|
|
inherit version src;
|
|
pname = "${pname}-ui";
|
|
sourceRoot = "${src.name}/ui";
|
|
nativeBuildInputs = [
|
|
nodejs
|
|
pnpm_9.configHook
|
|
];
|
|
pnpmDeps = pnpm_9.fetchDeps {
|
|
inherit (finalAttrs) pname version src;
|
|
sourceRoot = "${finalAttrs.src.name}/ui";
|
|
hash = "sha256-7fMhUFlV5lz+A9VG8IdWoc49C2CTdLYQlEgBSBqJvtw=";
|
|
};
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
cp -r public $out
|
|
|
|
runHook postInstall
|
|
'';
|
|
});
|
|
in
|
|
rustPlatform.buildRustPackage {
|
|
inherit pname version src;
|
|
|
|
sourceRoot = "${src.name}/server";
|
|
|
|
useFetchCargoVendor = true;
|
|
|
|
cargoHash = "sha256-+L4XofUFvhJDPGv4fAGYXFNpuNd01k/P63LH2tXXHE0=";
|
|
|
|
env.VERSION = "v${version}";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
ncurses
|
|
sqlite
|
|
];
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/lib/ui
|
|
ln -s ${ui} $out/lib/ui
|
|
'';
|
|
|
|
doCheck = false;
|
|
|
|
passthru = {
|
|
inherit ui;
|
|
tests.version = testers.testVersion {
|
|
inherit version;
|
|
package = moonfire-nvr;
|
|
command = "moonfire-nvr --version";
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
description = "Moonfire NVR, a security camera network video recorder";
|
|
homepage = "https://github.com/scottlamb/moonfire-nvr";
|
|
changelog = "https://github.com/scottlamb/moonfire-nvr/releases/tag/v${version}";
|
|
license = lib.licenses.gpl3Only;
|
|
maintainers = with lib.maintainers; [ gaelreyrol ];
|
|
mainProgram = "moonfire-nvr";
|
|
};
|
|
}
|