|
120 | 120 | sourceRoot = "${src.name}/web"; |
121 | 121 | inherit (sources.components.web) npmDepsHash; |
122 | 122 |
|
| 123 | + # prePatch is needed because npmConfigHook is a postPatch |
| 124 | + prePatch = '' |
| 125 | + # some part of the build wants to use un-prefixed binaries. let them. |
| 126 | + mkdir -p $TMP/bin |
| 127 | + ln -s "$(type -p ${stdenv.cc.targetPrefix}pkg-config)" $TMP/bin/pkg-config || true |
| 128 | + ln -s "$(type -p ${stdenv.cc.targetPrefix}c++filt)" $TMP/bin/c++filt || true |
| 129 | + ln -s "$(type -p ${stdenv.cc.targetPrefix}readelf)" $TMP/bin/readelf || true |
| 130 | + export PATH="$TMP/bin:$PATH" |
| 131 | + ''; |
| 132 | + |
123 | 133 | preBuild = '' |
124 | 134 | rm node_modules/@immich/sdk |
125 | 135 | ln -s ${openapi} node_modules/@immich/sdk |
@@ -161,17 +171,18 @@ buildNpmPackage' { |
161 | 171 | src = "${src}/server"; |
162 | 172 | inherit (sources.components.server) npmDepsHash; |
163 | 173 |
|
164 | | - postPatch = '' |
| 174 | + # prePatch is needed because npmConfigHook is a postPatch |
| 175 | + prePatch = '' |
165 | 176 | # pg_dumpall fails without database root access |
166 | 177 | # see https://github.com/immich-app/immich/issues/13971 |
167 | 178 | substituteInPlace src/services/backup.service.ts \ |
168 | 179 | --replace-fail '`/usr/lib/postgresql/''${databaseMajorVersion}/bin/pg_dumpall`' '`pg_dump`' |
169 | 180 |
|
170 | 181 | # some part of the build wants to use un-prefixed binaries. let them. |
171 | 182 | mkdir -p $TMP/bin |
172 | | - ln -s "$(type -p ${stdenv.cc.targetPrefix}pkg-config)" $TMP/bin/pkg-config |
173 | | - ln -s "$(type -p ${stdenv.cc.targetPrefix}c++filt)" $TMP/bin/c++filt |
174 | | - ln -s "$(type -p ${stdenv.cc.targetPrefix}readelf)" $TMP/bin/readelf |
| 183 | + ln -s "$(type -p ${stdenv.cc.targetPrefix}pkg-config)" $TMP/bin/pkg-config || true |
| 184 | + ln -s "$(type -p ${stdenv.cc.targetPrefix}c++filt)" $TMP/bin/c++filt || true |
| 185 | + ln -s "$(type -p ${stdenv.cc.targetPrefix}readelf)" $TMP/bin/readelf || true |
175 | 186 | export PATH="$TMP/bin:$PATH" |
176 | 187 | ''; |
177 | 188 |
|
|
0 commit comments