Loading nixos/modules/services/web-apps/immich.nix +1 −1 Original line number Diff line number Diff line Loading @@ -290,7 +290,7 @@ in wantedBy = [ "multi-user.target" ]; inherit (cfg.machine-learning) environment; serviceConfig = commonServiceConfig // { ExecStart = lib.getExe cfg.package.machine-learning; ExecStart = lib.getExe (cfg.package.machine-learning.override { immich = cfg.package; }); CacheDirectory = "immich"; User = cfg.user; Group = cfg.group; Loading pkgs/by-name/im/immich/machine-learning.nix→pkgs/by-name/im/immich-machine-learning/package.nix +27 −25 Original line number Diff line number Diff line { lib, src, fetchFromGitHub, immich, python3, # Override Python packages using # self: super: { pkg = super.pkg.overridePythonAttrs (oldAttrs: { ... }); } # Applied after defaultOverrides packageOverrides ? self: super: { }, }: let defaultOverrides = self: super: { python = python3.override { self = python; packageOverrides = self: super: { pydantic = super.pydantic_1; versioningit = super.versioningit.overridePythonAttrs (_: { Loading @@ -27,20 +25,19 @@ let }; }); }; python = python3.override { self = python; packageOverrides = lib.composeExtensions defaultOverrides packageOverrides; }; in python.pkgs.buildPythonApplication { pname = "immich-machine-learning"; inherit (immich) version; src = "${src}/machine-learning"; src = "${immich.src}/machine-learning"; pyproject = true; postPatch = '' substituteInPlace pyproject.toml --replace-fail 'fastapi-slim' 'fastapi' # AttributeError: module 'cv2' has no attribute 'Mat' substituteInPlace app/test_main.py --replace-fail ": cv2.Mat" "" ''; pythonRelaxDeps = [ "setuptools" ]; Loading Loading @@ -72,7 +69,12 @@ python.pkgs.buildPythonApplication { ] ++ uvicorn.optional-dependencies.standard; doCheck = false; nativeCheckInputs = with python.pkgs; [ httpx pytest-asyncio pytest-mock pytestCheckHook ]; postInstall = '' mkdir -p $out/share/immich Loading pkgs/by-name/im/immich/package.nix +2 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ node-gyp, runCommand, nixosTests, callPackage, immich-machine-learning, # build-time deps glib, pkg-config, Loading Loading @@ -210,7 +210,7 @@ buildNpmPackage' { inherit (nixosTests) immich; }; machine-learning = callPackage ./machine-learning.nix { inherit src; }; machine-learning = immich-machine-learning; inherit src Loading pkgs/by-name/im/immich/update.sh +1 −1 Original line number Diff line number Diff line Loading @@ -41,4 +41,4 @@ for npm_component in cli server web "open-api/typescript-sdk"; do done rm "$lock" cp "$sources_tmp" sources.json mv "$sources_tmp" sources.json Loading
nixos/modules/services/web-apps/immich.nix +1 −1 Original line number Diff line number Diff line Loading @@ -290,7 +290,7 @@ in wantedBy = [ "multi-user.target" ]; inherit (cfg.machine-learning) environment; serviceConfig = commonServiceConfig // { ExecStart = lib.getExe cfg.package.machine-learning; ExecStart = lib.getExe (cfg.package.machine-learning.override { immich = cfg.package; }); CacheDirectory = "immich"; User = cfg.user; Group = cfg.group; Loading
pkgs/by-name/im/immich/machine-learning.nix→pkgs/by-name/im/immich-machine-learning/package.nix +27 −25 Original line number Diff line number Diff line { lib, src, fetchFromGitHub, immich, python3, # Override Python packages using # self: super: { pkg = super.pkg.overridePythonAttrs (oldAttrs: { ... }); } # Applied after defaultOverrides packageOverrides ? self: super: { }, }: let defaultOverrides = self: super: { python = python3.override { self = python; packageOverrides = self: super: { pydantic = super.pydantic_1; versioningit = super.versioningit.overridePythonAttrs (_: { Loading @@ -27,20 +25,19 @@ let }; }); }; python = python3.override { self = python; packageOverrides = lib.composeExtensions defaultOverrides packageOverrides; }; in python.pkgs.buildPythonApplication { pname = "immich-machine-learning"; inherit (immich) version; src = "${src}/machine-learning"; src = "${immich.src}/machine-learning"; pyproject = true; postPatch = '' substituteInPlace pyproject.toml --replace-fail 'fastapi-slim' 'fastapi' # AttributeError: module 'cv2' has no attribute 'Mat' substituteInPlace app/test_main.py --replace-fail ": cv2.Mat" "" ''; pythonRelaxDeps = [ "setuptools" ]; Loading Loading @@ -72,7 +69,12 @@ python.pkgs.buildPythonApplication { ] ++ uvicorn.optional-dependencies.standard; doCheck = false; nativeCheckInputs = with python.pkgs; [ httpx pytest-asyncio pytest-mock pytestCheckHook ]; postInstall = '' mkdir -p $out/share/immich Loading
pkgs/by-name/im/immich/package.nix +2 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ node-gyp, runCommand, nixosTests, callPackage, immich-machine-learning, # build-time deps glib, pkg-config, Loading Loading @@ -210,7 +210,7 @@ buildNpmPackage' { inherit (nixosTests) immich; }; machine-learning = callPackage ./machine-learning.nix { inherit src; }; machine-learning = immich-machine-learning; inherit src Loading
pkgs/by-name/im/immich/update.sh +1 −1 Original line number Diff line number Diff line Loading @@ -41,4 +41,4 @@ for npm_component in cli server web "open-api/typescript-sdk"; do done rm "$lock" cp "$sources_tmp" sources.json mv "$sources_tmp" sources.json