From 7cc1fd5e1636dd6fcf321029946d655371576337 Mon Sep 17 00:00:00 2001 From: Diogo Correia Date: Sat, 26 Sep 2026 21:12:15 +0100 Subject: [PATCH] immich: prevent node-gyp .pyc unreproducible files Disable writing python bytecode since those files contain timestamps, causing unreproducible builds. There are still other causes of unreproducibility in this package, but this is a step in the right direction. See #566878 --- pkgs/by-name/im/immich/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/im/immich/package.nix b/pkgs/by-name/im/immich/package.nix index 13a0e5f955da..77680ff05cab 100644 --- a/pkgs/by-name/im/immich/package.nix +++ b/pkgs/by-name/im/immich/package.nix @@ -169,6 +169,8 @@ stdenv.mkDerivation (finalAttrs: { env.ESBUILD_BINARY_PATH = lib.getExe esbuild'; # fix for node-gyp, see https://github.com/nodejs/node-gyp/issues/1191#issuecomment-301243919 env.npm_config_nodedir = nodejs; + # Prevent Python (via node-gyp) from writing bytecode to ensure build determinism + env.PYTHONDONTWRITEBYTECODE = "1"; buildPhase = '' runHook preBuild