Can't get a created overlay to work on home-manager

Context: I’m using Nix with a non-NixOS distro.

I want to use an updated version of a software I use for work (The current version at Nixpkgs 20.09 and unstable is outdated).

I created the following at .config/nixpkgs/overlays/upwork.nix:

{
  upwork = super.upwork.overrideAttrs (old: {
    src = super.fetchurl {
      url = "https://upwork-usw2-desktopapp.upwork.com/binaries/v5_4_9_6_2565cdd0547940a2/upwork_5.4.9.6_amd64.deb";
      sha256 = "ff6246b3b4a1ed79cc9bca2934652fefb40bdac4b7e95997f3a46e354ce52456";
    };
  });
}

I have added the following to my home.nix file:

{ config, pkgs, ... }:                                                                                                 
                                                                                                                                                                                                                                              
{
...
  packages = with pkgs; [ upwork ];
...
  nixpkgs.overlays = [
    (import ../overlays/upwork.nix)
  ];
...

After building and switching, I’m still getting the old version (5.3.3), as shown here:

ls -la /nix/store/30jf6l2phdsljvm75b1pnb28r15mbayj-home-manager-path/bin | grep upwork
lrwxrwxrwx 1 pyak pyak   71 Dec 31  1969 upwork -> /nix/store/wx6h3fv12lcsq19mzsdh8s53x1ls60zc-upwork-5.3.3-883/bin/upwork

What I’m doing wrong here? I tried to be as similar as in here.

Folks, I feel stupid. Found the answer under my own nose.

After testing and building my home.nix billion times, I started verifying the logs and saw that the Upwork deb package version I was looking for was being downloaded as expected. So, after checking its settings (nix edit -f "<nixpkgs>" upwork), I decided to add the version on the overrideAttrs (was only setting the fetchurl function). It now looks like this:

{
  upwork = super.upwork.overrideAttrs (old: {
    version = "5.4.9.6";
    src = super.fetchurl {
      url = "https://upwork-usw2-desktopapp.upwork.com/binaries/v5_4_9_6_2565cdd0547940a2/upwork_5.4.9.6_amd64.deb";
      sha256 = "ff6246b3b4a1ed79cc9bca2934652fefb40bdac4b7e95997f3a46e354ce52456";
    };
  });
}

Now, building it once again and checking the links, the binary points to the newest version (the one on the overlay).

That’s just a random number in the store path. What version is actually built? Have you checked using the programs --version flag or graphical equivalent?

Hey NobbZ, in fact that was the issue, but the post I did previously was hidden by the spam bot of this forum.

EDIT: updating as post with answer is now showing