Derivations & Cups Filters

I have a BIXOLON SRP770III printer. I obtained the drivers from here. It comes with an install script that moves a build of rastertoBxlLabel to /usr/bin and move the ppd files.
I copied the binary and the relevant ppd file into a directory with the following structure.

SRP770III.nix
rastertoBxlLabel_v1.2.7
SRP770III_v1.1.3

Here is the derivation, which was adapted from the wiki page on printing.

{stdenv}:
stdenv.mkDerivation rec {
  name = "BIXOLON-SRP770III-x64-${version}";
  version = "1.1.3";
  src = ./.;
  installPhase = ''
    mkdir -p $out/share/cups/model/
		mkdir -p $out/bin
		cp ./rastertoBxlLabel_v1.2.7_x64 $out/bin/rastertoBxlLabel
    cp ./SRP770III_v1.1.3.ppd $out/share/cups/model/
		substituteInPlace $out/share/cups/model/SRP770III_v1.1.3.ppd \
		  --replace "rastertoBxlLabel" "$out/bin/rastertoBxlLabel"
  '';
}

In my configuration.nix i have the following element in my services.printing.drivers

(pkgs.callPackage ../../printers/BIXOLON-SRP770III/SRP770III.nix {})

The ppd file appears in CUPS and I can add the printer and it seems to be ok. However when I try to send a test page it says the filter failed. I tried inspecting journalctl as the wiki page says for troubleshooting and the only message I see that related to my print job is:

Job failed due to filter errors; please consult the syslog file for details

But there is no /var/log/cups file/directory. So I think this is a dead end.

Looking at the setup_v1.2.7.sh in the driver package, relevant lines 98-138, I think I may have figured out what I did wrong. I am pointing the filter outside of the cups directory as well as missing some permissions and a couple symlink steps.

How can I translate lines 98-137 from setup_v1.2.7.sh into a derivation?
Once I have this working I believe I can extend this derivation to every ppd file contained in the driver download.