anchor.diff:      done
     '';
   
  -  passthru.updateScript = writeShellScript "${pname}-update-script" ''
  -    set -o errexit
  -    PATH=${lib.makeBinPath [ common-updater-scripts curl ]}
  +  passthru = {
  +    updateScript = writeShellScript "${packageAttribute}-update-script" ''
  +      set -o errexit
  +      PATH=${lib.makeBinPath [ common-updater-scripts curl ]}
   
  -    latestVersion=$(curl -s ${versionUrl})
  +      latestVersion=$(curl -s "${versionUrl}")
   
  -    if [[ "${buildVersion}" = "$latestVersion" ]]; then
  -        echo "The new version same as the old version."
  -        exit 0
  -    fi
  +      if [[ "${buildVersion}" = "$latestVersion" ]]; then
  +          echo "The new version same as the old version."
  +          exit 0
  +      fi
   
  -    for platform in ${lib.concatStringsSep " " meta.platforms}; do
  -        # The script will not perform an update when the version attribute is up to date from previous platform run
  -        # We need to clear it before each run
  -        update-source-version ${packageAttribute}.${primaryBinary} 0 0000000000000000000000000000000000000000000000000000000000000000 --file=${versionFile} --version-key=buildVersion --system=$platform
  -        update-source-version ${packageAttribute}.${primaryBinary} $latestVersion --file=${versionFile} --version-key=buildVersion --system=$platform
  -    done
  -  '';
  +      for platform in ${lib.escapeShellArgs meta.platforms}; do
  +          # The script will not perform an update when the version attribute is up to date from previous platform run
  +          # We need to clear it before each run
  +          update-source-version "${packageAttribute}.${primaryBinary}" 0 "${lib.fakeSha256}" --file=${versionFile} --version-key=buildVersion --source-key="sources.$platform"
  +          update-source-version "${packageAttribute}.${primaryBinary}" "$latestVersion" --file=${versionFile} --version-key=buildVersion --source-key="sources.$platform"
  +      done
  +    '';
  +  };
   
     meta = with lib; {
       description = "Sophisticated text editor for code, markup and prose";
  
positive.code:         --set LOCALE_ARCHIVE "${glibcLocales.out}/lib/locale/locale-archive" \
          "''${gappsWrapperArgs[@]}"
      '';
    };
  in stdenv.mkDerivation (rec {
    inherit pname;
    version = buildVersion;
  
    dontUnpack = true;
  
negative.code: }:
  
  let
    pnameBase = "sublimetext4";
    packageAttribute = "sublime4${lib.optionalString dev "-dev"}";
    binaries = [ "sublime_text" "plugin_host-3.3" "plugin_host-3.8" "crash_reporter" ];
    primaryBinary = "sublime_text";
    primaryBinaryAliases = [ "subl" "sublime" "sublime4" ];
    downloadUrl = arch: "https://download.sublimetext.com/sublime_text_build_${buildVersion}_${arch}.tar.xz";
    versionUrl = "https://download.sublimetext.com/latest/${if dev then "dev" else "stable"}";
    versionFile = builtins.toString ./packages.nix;
  
    libPath = lib.makeLibraryPath [ xorg.libX11 xorg.libXtst glib libglvnd openssl gtk3 cairo pango curl ];
  in let
    binaryPackage = stdenv.mkDerivation rec {
      pname = "${pnameBase}-bin";
      version = buildVersion;
  
      src = passthru.sources.${stdenv.hostPlatform.system};
  
      dontStrip = true;
      dontPatchELF = true;
  