How do I add files to a bwrapped application?

I am trying to get all my config to a single flake folder, but I am currently having issues with getting Davinci Resolve license file to work. On a standard linux install, the license will be located on /opt/resolve/.license/blackmagic.lic, but on nixos it is located inside the nix store & symlinked with bwrap to user home directory.

First I tried doing this

nixpkgs.overlays = [
  (self: super: {
    davinci-resolve-studio = super.davinci-resolve-studio.overrideAttrs (oldAttrs: rec{
      postInstall = (oldAttrs.postInstall or "") + ''
        mkdir $out/testdavinci1

        mkdir -p $out/.license/
        echo -e "//REDACTED//" > $out/.license/blackmagic.lic
      '';
    });
  })
];

environment.systemPackages = with pkgs; [
  davinci-resolve-studio
];

The config above doesn’t throw an error but doesn’t create the new folders (tested with tree -d -L 2 . | grep testdavinci)

I also tried

nixpkgs.overlays = [
  (self: super: {
    davinci = super.davinci-resolve-studio.davinci.overrideAttrs (oldAttrs: rec{
      postInstall = (oldAttrs.postInstall or "") + ''
        mkdir $out/testdavinci2

        mkdir -p $out/.license/
        echo -e "//REDACTED//" > $out/.license/blackmagic.lic
      '';
    });

    davinci-resolve-studio = super.davinci-resolve-studio.overrideAttrs (oldAttrs: rec{
      davinci = self.davinci;
    });
  })
];

environment.systemPackages = with pkgs; [
  davinci-resolve-studio
];

This one builds fine, created the proper folders, but when I check the desktop shortcut it leads to a bwrap file that references a different unmodified build. What did I do wrong?

Here is the default nix file from nixpkgs nixpkgs/pkgs/applications/video/davinci-resolve/default.nix at b73c2221a46c13557b1b3be9c2070cc42cf01eb3 · NixOS/nixpkgs · GitHub