Exec format error after overriding a package's attribute set

I am trying to override the attribute of nixpkgs powershell package using the following snippet in my flake.nix:

mypwsh = pkgs.powershell.overrideAttrs( rec { 
  version = "7.2.19"; 		  
  src = pkgs.fetchurl {
    url = "https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-linux-arm64.tar.gz";
    hash = "sha256-9tJFZfM+qEi4/EhJLpn324ldossMgTP7ndfpIILG5N4="        

This seemed fine at first but when running the executable I get

/nix/store/3xpdbh6mfrrh9gazwnb4nhzayhsgigsy-powershell-7.2.19/bin/pwsh: line 47: /nix/store/3xpdbh6mfrrh9gazwnb4nhzayhsgigsy-powershell-7.2.19/share/powershell/pwsh: cannot execute binary file: Exec format error
/nix/store/3xpdbh6mfrrh9gazwnb4nhzayhsgigsy-powershell-7.2.19/bin/pwsh: line 47: /nix/store/3xpdbh6mfrrh9gazwnb4nhzayhsgigsy-powershell-7.2.19/share/powershell/pwsh: Success

It would seem I am not using the correct platform, even though my machine is indeed x86_64-linux? Any clue how to fix that?

Thanks in advance, any hint appreciated!

The download link says arm64, so it seems indeed as if it’s wrong for your platform.

You’re right, silly me!

Now I have another error to work around: missing libssl.so.1 and libcrypto.so.1. I guess I need to help the linker find them when building. Not sure how to do this but I’ll do my homework.