Skip to content

Commit

Permalink
immich: unvendor exiftool
Browse files Browse the repository at this point in the history
  • Loading branch information
dotlambda committed Nov 9, 2024
1 parent ee1cffa commit a329ca6
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions pkgs/by-name/im/immich/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
cacert,
unzip,
# runtime deps
exiftool,
jellyfin-ffmpeg, # Immich depends on the jellyfin customizations, see https://github.com/NixOS/nixpkgs/issues/351943
imagemagick,
libraw,
libheif,
vips,
perl,
}:
let
buildNpmPackage' = buildNpmPackage.override { inherit nodejs; };
Expand Down Expand Up @@ -174,7 +174,7 @@ buildNpmPackage' {
makeCacheWritable = true;

preBuild = ''
cd node_modules/sharp
pushd node_modules/sharp
mkdir node_modules
ln -s ${node-addon-api} node_modules/node-addon-api
Expand All @@ -183,8 +183,13 @@ buildNpmPackage' {
rm -r node_modules
cd ../..
popd
rm -r node_modules/@img/sharp*
# If exiftool-vendored.pl isn't found, exiftool is searched for on the PATH
rm -r node_modules/exiftool-vendored.*
substituteInPlace node_modules/exiftool-vendored/dist/DefaultExifToolOptions.js \
--replace-fail "checkPerl: !(0, IsWin32_1.isWin32)()," "checkPerl: false,"
'';

installPhase = ''
Expand All @@ -205,7 +210,7 @@ buildNpmPackage' {
--set IMMICH_BUILD_DATA $out/build --set NODE_ENV production \
--suffix PATH : "${
lib.makeBinPath [
perl
exiftool
jellyfin-ffmpeg
]
}"
Expand Down

0 comments on commit a329ca6

Please sign in to comment.