Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: error evaluating accounts.email.accounts.<name>.aerc.smtpOauth2Params #5959

Open
2 tasks done
ksyx opened this issue Oct 12, 2024 · 0 comments
Open
2 tasks done
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@ksyx
Copy link

ksyx commented Oct 12, 2024

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

I got

at /nix/store/69xnjv9zg8a0gsyhsn8lp8937wy0a392-source/modules/programs/aerc-accounts.nix:180:28:

          179|
          180|             oauthParams' = oauthParams {
             |                            ^
          181|               auth = cfg.aerc.smtpAuth;while calling 'oauthParams'

         at /nix/store/69xnjv9zg8a0gsyhsn8lp8937wy0a392-source/modules/programs/aerc-accounts.nix:135:21:

          134|
          135|       oauthParams = { auth, params }:
             |                     ^
          136|         if useOauth auth && params != null && params != { } then

       error: value is a function while a list was expected

and evaluating

oauthParams = { auth, params }:
if useOauth auth && params != null && params != { } then
"?" + builtins.concatStringsSep "&" lib.attrsets.mapAttrsToList
(k: v: k + "=" + lib.strings.escapeURL v) params
else
"";

in nix-repl --expr 'import <nixpkgs> {}' shows that

nix-repl> "?" + builtins.concatStringsSep "&" lib.attrsets.mapAttrsToList (k: v: k + "=" + lib.strings.escapeURL v) {"a" = "b"; "c" = "d";}
error:
       … while calling the 'concatStringsSep' builtin

         at «string»:1:7:

            1| "?" + builtins.concatStringsSep "&" lib.attrsets.mapAttrsToList (k: v: k + "=" + lib.strings.escapeURL v) {"a" = "b"; "c" = "d";}
             |       ^

       … while evaluating the second argument (the list of strings to concat) passed to builtins.concatStringsSep

         at «none»:0: (source not available)

       error: value is a function while a list was expected

while parenthesizing the second argument works:

nix-repl> "?" + builtins.concatStringsSep "&" (lib.attrsets.mapAttrsToList (k: v: k + "=" + lib.strings.escapeURL v) {"a" = "b"; "c" = "d";})
"?a=b&c=d"

Maintainer CC

@patwid

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.6.35, NixOS, 24.05 (Uakari), 24.05.20240626.89c4987`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `/nix/store/f0ddmw6s86y567yg06h5019z72szbzch-source`
@ksyx ksyx added bug triage Issues or feature request that have not been triaged yet labels Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

No branches or pull requests

4 participants