This is version 1 of the patch nix script