From 4a5c21b1afbc26da906fa9fe03015e2d65810ca5 Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Tue, 23 Dec 2025 10:30:29 +1000 Subject: [PATCH] Refactor the darktable thing --- hosts/modules/home.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/hosts/modules/home.nix b/hosts/modules/home.nix index 71736c0..681d5ae 100644 --- a/hosts/modules/home.nix +++ b/hosts/modules/home.nix @@ -20,11 +20,18 @@ signal-desktop spotify - (darktable.overrideAttrs (oldAttrs: { - nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [ makeWrapper ]; - postInstall = (oldAttrs.postInstall or "") + '' - wrapProgram $out/bin/darktable --set GDK_BACKEND wayland - ''; - })) + (symlinkJoin { + name = "darktable"; + paths = [ darktable ]; + nativeBuildInputs = [ makeWrapper ]; + postBuild = '' + # Remove the symlink to the original binary + rm $out/bin/darktable + + # Create a wrapper that points to the cached original + makeWrapper ${darktable}/bin/darktable $out/bin/darktable \ + --set GDK_BACKEND wayland + ''; + }) ]; }