Overriding a package version without building the old version

I tried to override the package version of the burpsuite package. I use an overlay to do so. The problem is that nix still build the package with old url. What I have to do that nix will only use the new url?

In fact, looking at this package description,
<nixpkgs/pkgs/tools/networking/burpsuite/default.nix>

overrideAttrs only replace the derivation attributes, not the local variables and here, so you need to replace the buildCommand attribute

self:super:
{
  burpsuite = super.burpsuite.overrideAttrs (o: let
      jar = super.fetchurl {
        name = "burpsuite.jar";
        url = "https://portswigger.net/Burp/Releases/Download?productId=100&version=<your-version>&type=Jar";
        sha256 = "<your-hash>";
    };
    launcher = ''
      #!${super.runtimeShell}
      exec ${super.jre}/bin/java -jar ${jar} "$@"
    '';
    in rec {
      buildCommand = ''
        mkdir -p $out/bin
        echo "${launcher}" > $out/bin/burpsuite
        chmod +x $out/bin/burpsuite
      '';
}

It is a bit sad this derivation could have been written in a more friendly way

Thank’s for your help. At the end this here works for me:

self: super: {
  burpsuite = super.burpsuite.overrideAttrs ( oldAttrs : let
      version = "2020.12.1";
      jar = super.fetchurl {
        name = "burpsuite.jar";
        url = "https://portswigger.net/burp/releases/download?product=community&version=${version}&type=Jar";
        sha256 = "01ca0fc955d47f66067d7dbf19bb4665e4383fbcd2b1815bf4be7bb6b5e2bded";
    };
    jre = super.pkgs.jdk11;
    launcher = ''
      #!${super.runtimeShell}
      exec ${jre}/bin/java -jar ${jar} "$@"
    '';
    in rec {
      buildCommand = ''
        mkdir -p $out/bin
        echo "${launcher}" > $out/bin/burpsuite
        chmod +x $out/bin/burpsuite
      '';
    });
}