diff options
author | Peder Bergebakken Sundt <pbsds@hotmail.com> | 2024-06-24 02:39:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-24 02:39:24 +0200 |
commit | a5f040459a99b8bbc373d5f04ba7e6ce467b98d1 (patch) | |
tree | 433f4dae77d4995ad05021b533503ad9dc708f10 | |
parent | 6d455fee012f4bcd606eae0f17e95eb5d9446197 (diff) | |
parent | a8c07e63b496e72ef23ac128409f70fdd43f92c7 (diff) |
Merge pull request #319148 from pineapplehunter/immich-2.2.2
immich-cli: 2.0.6 -> 2.2.4
-rw-r--r-- | pkgs/tools/misc/immich-cli/default.nix | 71 |
1 files changed, 55 insertions, 16 deletions
diff --git a/pkgs/tools/misc/immich-cli/default.nix b/pkgs/tools/misc/immich-cli/default.nix index 82d8e96ec798a..21d0600d92b13 100644 --- a/pkgs/tools/misc/immich-cli/default.nix +++ b/pkgs/tools/misc/immich-cli/default.nix @@ -1,31 +1,70 @@ { lib , buildNpmPackage , fetchFromGitHub +, testers }: -buildNpmPackage { - pname = "immich-cli"; - version = "2.0.6"; - +let + version = "2.2.4"; src = fetchFromGitHub { owner = "immich-app"; repo = "immich"; # Using a fixed commit until upstream has release tags for cli. - rev = "014adf175ad50a61f92804666940e267ab329064"; - hash = "sha256-MK3Watq5/Zp+rymCIfWxAXSgBPDE13g23uDnW7A5x9g="; + rev = "8c2195c8205156f6e3168cc52fa34db334568ea9"; + hash = "sha256-Tseu6aIrYU4Af/jWDi2wDtP77n/aogp7Qkn9mosMaes="; }; - - npmDepsHash = "sha256-ssxOXKE1t/bSb972w/cBeK61IrqPLmx9ODMn6D+2Ezw="; - - postPatch = '' - cd cli - ''; - - meta = { + meta' = { description = "CLI utilities for Immich to help upload images and videos"; homepage = "https://github.com/immich-app/immich"; license = lib.licenses.mit; - mainProgram = "immich"; maintainers = with lib.maintainers; [ felschr pineapplehunter ]; + mainProgram = "immich"; + }; + + open-api-typescript-sdk = buildNpmPackage { + pname = "immich-cli-openapi-typescript-sdk"; + inherit src version; + + npmDepsHash = "sha256-WhNdFaFBwb6ehEQgbNJGdzPb3FdJk1Nefi8DcJfY9Wc="; + + postPatch = '' + cd open-api/typescript-sdk + ''; + meta = { + # using inherit for `builtin.unsafeGetAttrPos` to work correctly + inherit (meta') + description + homepage + license + maintainers; + }; + }; + + immich-cli = buildNpmPackage { + pname = "immich-cli"; + inherit src version; + + npmDepsHash = "sha256-aSTN+I8B/aLT2ItGoyZTlbdn1VCK0ZmOb1QG7ZQuz+Q="; + + postPatch = '' + ln -sv ${open-api-typescript-sdk}/lib/node_modules/@immich/sdk/{build,node_modules} open-api/typescript-sdk + cd cli + ''; + + passthru = { + inherit open-api-typescript-sdk; + tests.version = testers.testVersion { package = immich-cli; }; + }; + + meta = { + # using inherit for `builtin.unsafeGetAttrPos` to work correctly + inherit (meta') + description + homepage + license + maintainers + mainProgram; + }; }; -} +in +immich-cli |