diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-06-24 06:01:33 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-24 06:01:33 +0000 |
commit | c1d6d547af0681d59459d7c81b8fe20cbc363c7f (patch) | |
tree | 8e3c516c85918e73336e9e461c07d2a376f830c7 /pkgs/tools/misc | |
parent | 5a848335958255a7a0a1fbc0d41f6bfeea93e6cc (diff) | |
parent | 93d3b3c04639d5bbdb3cdc0309fa9169ef7d991e (diff) |
Merge staging-next into staging
Diffstat (limited to 'pkgs/tools/misc')
-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 |