Skip to content

Instantly share code, notes, and snippets.

@will
Created May 15, 2025 09:15
Show Gist options
  • Save will/300fb22e6b3a994465f3ecf09ccb15cd to your computer and use it in GitHub Desktop.
Save will/300fb22e6b3a994465f3ecf09ccb15cd to your computer and use it in GitHub Desktop.
remove one patch from a nixpkgs packgage
{ mosh, lib}:
let
# workaround error
# Bad configuration option: usekeychain
# by letting mosh use the system ssh instead of nixpkgs ssh
filter =
if mosh.system == "aarch64-darwin"
then
(patch: !(lib.strings.hasSuffix "ssh_path.patch" (toString patch)))
else
(patch: patch);
in
mosh.overrideDerivation (
oldAttrs: {
patches = (builtins.filter filter oldAttrs.patches);
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment