mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
37 lines
858 B
Nix
37 lines
858 B
Nix
{
|
|
lib,
|
|
immich,
|
|
buildNpmPackage,
|
|
nodejs,
|
|
makeWrapper,
|
|
}:
|
|
buildNpmPackage {
|
|
pname = "immich-cli";
|
|
src = "${immich.src}/cli";
|
|
inherit (immich.sources.components.cli) version npmDepsHash;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
inherit (immich.web) preBuild;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out
|
|
mv package.json package-lock.json node_modules dist $out/
|
|
|
|
makeWrapper ${lib.getExe nodejs} $out/bin/immich --add-flags $out/dist/index.js
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Self-hosted photo and video backup solution (command line interface)";
|
|
homepage = "https://immich.app/docs/features/command-line-interface";
|
|
license = lib.licenses.agpl3Only;
|
|
maintainers = with lib.maintainers; [ jvanbruegge ];
|
|
inherit (nodejs.meta) platforms;
|
|
mainProgram = "immich";
|
|
};
|
|
}
|