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
pwsh
/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!