NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.19k stars 14.2k forks source link

Galène in insecure mode fails to build #117693

Closed erdnaxe closed 3 years ago

erdnaxe commented 3 years ago

Describe the bug error: cannot coerce null to a string, at /nix/var/nix/profiles/per-user/root/channels/nixos-unstable/nixos/modules/services/web-apps/galene.nix:135:18 when services.galene.insecure = true;.

To Reproduce Steps to reproduce the behavior:

  1. Add to your NixOS configuration:
    services.galene = {
      enable = true;
      httpPort = 3003;
      insecure = true;
    };
  2. Rebuild nixos, and it will crash with error: cannot coerce null to a string, at /nix/var/nix/profiles/per-user/root/channels/nixos-unstable/nixos/modules/services/web-apps/galene.nix:135:18.

Expected behavior Not having building process failing. Galène server should run in insecure mode (no HTTPS).

Additional context

error: while evaluating the attribute 'config.system.build.toplevel' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:293:5:
while evaluating 'foldr' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:52:20, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:128:12:
while evaluating 'fold'' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:55:15, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:59:8:
while evaluating 'showWarnings' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:302:28, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:125:10:
while evaluating 'foldr' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:52:20, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:302:33:
while evaluating 'fold'' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:55:15, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:59:8:
while evaluating the attribute 'warnings' at undefined position:
while evaluating 'g' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:276:19, called from undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:98:72, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:279:20:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:465:9:
while evaluating the option `warnings':
while evaluating the attribute 'mergedValue' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:497:5:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:491:9:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:590:7:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:477:28, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:477:17:
while evaluating definitions from `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/boot/systemd.nix':
while evaluating 'dischargeProperties' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:549:25, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:478:137:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:338:44:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:234:10, called from undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/boot/systemd.nix:889:51, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:234:16:
while evaluating 'optional' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:254:20, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/boot/systemd.nix:893:10:
while evaluating the attribute 'serviceConfig.Type' at undefined position:
while evaluating 'g' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:276:19, called from undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:98:72, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:279:20:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:465:9:
while evaluating the option `systemd.services.galene.serviceConfig':
while evaluating the attribute 'mergedValue' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:497:5:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:491:9:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:590:7:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:477:28, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:477:17:
while evaluating definitions from `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/boot/systemd.nix':
while evaluating 'dischargeProperties' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:549:25, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:478:137:
while evaluating the attribute 'condition' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:633:14:
while evaluating the attribute 'condition' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:633:14:
while evaluating the attribute 'preStart' at undefined position:
while evaluating 'g' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:276:19, called from undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:98:72, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:279:20:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:465:9:
while evaluating the option `systemd.services.galene.preStart':
while evaluating the attribute 'mergedValue' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:497:5:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:491:9:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:590:7:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:477:28, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:477:17:
while evaluating definitions from `/nix/var/nix/profiles/per-user/root/channels/nixos-unstable/nixos/modules/services/web-apps/galene.nix':
while evaluating 'dischargeProperties' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:549:25, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:478:137:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:338:44:
cannot coerce null to a string, at /nix/var/nix/profiles/per-user/root/channels/nixos-unstable/nixos/modules/services/web-apps/galene.nix:135:18

Notify maintainers @rgrunbla

Metadata

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: ["services.galene.insecure"]
# a list of nixos modules affected by the problem
module: ["services/web-apps/galene.nix"]
rgrunbla commented 3 years ago

Hello,

This should have been fixed with https://github.com/NixOS/nixpkgs/pull/113722

Can you check with some newer channel ?

Thanks, Rémy

erdnaxe commented 3 years ago

Oh my bad, you are right my unstable channel was out of date. Updating it fixed the issue. Thank you :D