diff --git a/pkgs/os-specific/darwin/karabiner-elements/default.nix b/pkgs/os-specific/darwin/karabiner-elements/default.nix index 5239bc73b842..f7c02f9bf9fa 100644 --- a/pkgs/os-specific/darwin/karabiner-elements/default.nix +++ b/pkgs/os-specific/darwin/karabiner-elements/default.nix @@ -41,9 +41,10 @@ stdenv.mkDerivation (finalAttrs: { sourceRoot = "."; postPatch = '' - for f in *.pkg/Library/Launch{Agents,Daemons}/*.plist; do - substituteInPlace $f \ - --replace "/Library/" "$out/Library/" + shopt -s globstar + for f in *.pkg/Library/**/Launch{Agents,Daemons}/*.plist; do + substituteInPlace "$f" \ + --replace-fail "/Library/" "$out/Library/" done '';