Is this a VM inside an M1 mac? Because you shouldn’t get a binary execution error on most aarch64 machines because they can also run armv7l binaries.
This should obviously still be fixed up but that might be the reason it’s broken.
What does file /nix/store/xgbwg323w558yyjgp68jzasy9zdcf7db-1password-1.12.2/bin/op
say?
Best would be to fix the error upstream. If it’s just the URL and hash are wrong, simply fix those and open a PR.
You do not need an overlay for this. I personally use local checkouts as my system nixpkgs where I can simply cherry-pick the changes before they make it into a channel but you can also do something like this:
_1password.overrideAttrs (old: { src = fetchzip { ... }; } )
That whole thing evaluates to a 1password derivation where the source is different. Just add it to your environment instead of the regular 1password and you’re gtg. Obviously you’d want to revert back once the upstream fix is in your channel since you’d also be pinning the source.
You can also turn this thing into an overlay like this:
{
nixpkgs.overlays = [
(final: prev: {
_1password = prev._1password.overrideAttrs (old: { src = fetchzip { ... }; } );
})
];
}
which makes any reference to _1password
have its source overridden.
See Overlays - NixOS Wiki for more info.