In case you are interested, this is what I use to store the password in the macos keychain. While it should not be complicated, my haskell-fu is not large enough to support both linux and macOS in the same sourcecode.
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by ktf and has received 4 comments.