From 3576f97367828cf7bcb25fa7786a80f9ae62429a Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Tue, 25 Mar 2025 22:48:55 +0100 Subject: [PATCH 1/2] immich: fix npmDeps build failure It seems like c++filt and readelf are not always in PATH. npmDeps fails to build because of that. We add `|| true` to be resilient to this and move to prePatch because npmConfigHook is a postPatch hook. --- pkgs/by-name/im/immich/package.nix | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/im/immich/package.nix b/pkgs/by-name/im/immich/package.nix index 0bba7243bf87..41184f4fb8d1 100644 --- a/pkgs/by-name/im/immich/package.nix +++ b/pkgs/by-name/im/immich/package.nix @@ -120,6 +120,16 @@ let sourceRoot = "${src.name}/web"; inherit (sources.components.web) npmDepsHash; + # prePatch is needed because npmConfigHook is a postPatch + prePatch = '' + # some part of the build wants to use un-prefixed binaries. let them. + mkdir -p $TMP/bin + ln -s "$(type -p ${stdenv.cc.targetPrefix}pkg-config)" $TMP/bin/pkg-config || true + ln -s "$(type -p ${stdenv.cc.targetPrefix}c++filt)" $TMP/bin/c++filt || true + ln -s "$(type -p ${stdenv.cc.targetPrefix}readelf)" $TMP/bin/readelf || true + export PATH="$TMP/bin:$PATH" + ''; + preBuild = '' rm node_modules/@immich/sdk ln -s ${openapi} node_modules/@immich/sdk @@ -161,7 +171,8 @@ buildNpmPackage' { src = "${src}/server"; inherit (sources.components.server) npmDepsHash; - postPatch = '' + # prePatch is needed because npmConfigHook is a postPatch + prePatch = '' # pg_dumpall fails without database root access # see https://github.com/immich-app/immich/issues/13971 substituteInPlace src/services/backup.service.ts \ @@ -169,9 +180,9 @@ buildNpmPackage' { # some part of the build wants to use un-prefixed binaries. let them. mkdir -p $TMP/bin - ln -s "$(type -p ${stdenv.cc.targetPrefix}pkg-config)" $TMP/bin/pkg-config - ln -s "$(type -p ${stdenv.cc.targetPrefix}c++filt)" $TMP/bin/c++filt - ln -s "$(type -p ${stdenv.cc.targetPrefix}readelf)" $TMP/bin/readelf + ln -s "$(type -p ${stdenv.cc.targetPrefix}pkg-config)" $TMP/bin/pkg-config || true + ln -s "$(type -p ${stdenv.cc.targetPrefix}c++filt)" $TMP/bin/c++filt || true + ln -s "$(type -p ${stdenv.cc.targetPrefix}readelf)" $TMP/bin/readelf || true export PATH="$TMP/bin:$PATH" ''; From b9cfe386b47cdbab12ed339b6e50c8a5d4ed72d3 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Tue, 25 Mar 2025 22:49:39 +0100 Subject: [PATCH 2/2] immich: 1.129.0 -> 1.130.3 https://github.com/immich-app/immich/releases/tag/v1.130.0 https://github.com/immich-app/immich/releases/tag/v1.130.1 https://github.com/immich-app/immich/releases/tag/v1.130.2 https://github.com/immich-app/immich/releases/tag/v1.130.3 immich-machine-learning switched from poetry to hatchling --- .../im/immich-machine-learning/package.nix | 2 +- pkgs/by-name/im/immich/sources.json | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/im/immich-machine-learning/package.nix b/pkgs/by-name/im/immich-machine-learning/package.nix index 574517a2e904..e565479fe648 100644 --- a/pkgs/by-name/im/immich-machine-learning/package.nix +++ b/pkgs/by-name/im/immich-machine-learning/package.nix @@ -22,7 +22,7 @@ python.pkgs.buildPythonApplication rec { ]; build-system = with python.pkgs; [ - poetry-core + hatchling cython ]; diff --git a/pkgs/by-name/im/immich/sources.json b/pkgs/by-name/im/immich/sources.json index 9ee7d455a446..e84018224f45 100644 --- a/pkgs/by-name/im/immich/sources.json +++ b/pkgs/by-name/im/immich/sources.json @@ -1,26 +1,26 @@ { - "version": "1.129.0", - "hash": "sha256-cBTWmbJLbpUPLCfa0WsO87p79mZycS/vxPD55gdEYI4=", + "version": "1.130.3", + "hash": "sha256-qMRX8gwoagZJwhMg/1X+ZItFyC73qxLR8pHujWu1rog=", "components": { "cli": { - "npmDepsHash": "sha256-dMa0ZcLu2oU9jpYl3EEXTz0mY0YoK41mm6o0AGNaroU=", - "version": "2.2.53" + "npmDepsHash": "sha256-l8Aw9V6bwj/kauBmmKGiqytzjGwyXL1qlEg54eQcddQ=", + "version": "2.2.57" }, "server": { - "npmDepsHash": "sha256-VoY+/nUtjHcgeD66DHoRR53eTLqLsGrI3V3LCO1H934=", - "version": "1.129.0" + "npmDepsHash": "sha256-4FiD1+lVqth3MNzityx3oAo/LLXkfTaA57vG4KUhUcM=", + "version": "1.130.3" }, "web": { - "npmDepsHash": "sha256-xRKKRDq0T321tbAGIrVojiVVtjYmg2p2RjoXteRIVoQ=", - "version": "1.129.0" + "npmDepsHash": "sha256-nUMXNdEK8Dyai0/NKcXD8bB+aH/ZeiDcQmRKVzo9cqc=", + "version": "1.130.3" }, "open-api/typescript-sdk": { - "npmDepsHash": "sha256-ZcsVTxmMzy3fGlnHMUIzZxyXw9rDgWMcfeqqkYuF7hQ=", - "version": "1.129.0" + "npmDepsHash": "sha256-B8NqGLgmT126Cf0uPx4Eka60i3mNPskvHnfVTEqf0BY=", + "version": "1.130.3" }, "geonames": { - "timestamp": "20250306005539", - "hash": "sha256-2JYoUVF2w4RCyPn/PRoJ0/bv/hADwoLhrwY1K/51c64=" + "timestamp": "20250325151913", + "hash": "sha256-bg+KON+ydWlRJ8MsIL7Ue0c97aqiiItuK8+kFngd6W0=" } } }