summaryrefslogtreecommitdiff
path: root/pkgs/immich-frame/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/immich-frame/default.nix')
-rw-r--r--pkgs/immich-frame/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/immich-frame/default.nix b/pkgs/immich-frame/default.nix
new file mode 100644
index 0000000..598ffa3
--- /dev/null
+++ b/pkgs/immich-frame/default.nix
@@ -0,0 +1,47 @@
+{
+ fetchgit,
+ pkgs,
+ python3Packages,
+ buildNpmPackage,
+}:
+
+let
+ version = "0.3.1";
+ src = fetchgit {
+ url = "https://git.tjkeller.xyz/immich-frame";
+ tag = "v${version}";
+ hash = "sha256-xDZAPprXRDRxZ8oJdskpijkO9DK6wzEn48vD9bBdCVY=";
+ };
+
+ frontend = buildNpmPackage {
+ inherit version src;
+ pname = "immich-frame-frontend";
+
+ npmBuildScript = [ "build" ];
+ npmDepsHash = "sha256-DGQlzgQoRCrYp6Y+WnDmG/QE92v6E3MT9y0bj8lBTfc=";
+
+ installPhase = ''
+ mkdir -p $out
+ cp -R dist $out/
+ '';
+ };
+in python3Packages.buildPythonApplication {
+ inherit version src;
+ pname = "immich-frame";
+
+ makeWrapperArgs = [ "--set" "IMMICH_FRAME_STATIC_WEB_ASSETS" "${frontend}/dist" ];
+
+ pyproject = true;
+ build-system = with python3Packages; [ setuptools ];
+ propagatedBuildInputs = with python3Packages; [
+ flask
+ flask-cors # DEBUG
+ flask-socketio
+ numpy
+ pillow
+ platformdirs
+ pygame
+ pyopengl
+ requests
+ ];
+}