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

Build failure: immich / redis #363768

Closed
emmertex opened this issue Dec 10, 2024 · 3 comments · Fixed by #363775
Closed

Build failure: immich / redis #363768

emmertex opened this issue Dec 10, 2024 · 3 comments · Fixed by #363775
Labels
0.kind: build failure A package fails to build

Comments

@emmertex
Copy link

emmertex commented Dec 10, 2024

Steps To Reproduce

Steps to reproduce the behavior:

  1. build immich using this head

Build log

Build Log
building Nix...
building the system configuration...
error:
       … while calling the 'head' builtin
         at /home/nixos/nixpkgs/lib/attrsets.nix:1574:11:
         1573|         || pred here (elemAt values 1) (head values) then
         1574|           head values
             |           ^
         1575|         else

       … while evaluating the attribute 'value'
         at /home/nixos/nixpkgs/lib/modules.nix:846:9:
          845|     in warnDeprecation opt //
          846|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          847|         inherit (res.defsFinal') highestPrio;

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/home/nixos/nixpkgs/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `warnings':

       … while evaluating definitions from `/home/nixos/nixpkgs/nixos/modules/system/boot/systemd.nix':

       … while evaluating the option `systemd.services.redis-immich.serviceConfig':

       … while evaluating definitions from `/home/nixos/nixpkgs/nixos/modules/services/databases/redis.nix':

       … while evaluating the option `services.redis.servers.immich.settings':

       … while evaluating definitions from `/home/nixos/nixpkgs/nixos/modules/services/databases/redis.nix':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: undefined variable 'mkMerge'
       at /home/nixos/nixpkgs/nixos/modules/services/databases/redis.nix:278:29:
          277|           };
          278|           config.settings = mkMerge [
             |                             ^
          279|             {

Additional context

Have been using the PR for immich on all builds up to 1.122.1 with no issue.
First build since 1.122.2

Metadata

  • system: "x86_64-linux"
  • host os: Linux 6.6.62, NixOS, 25.05 (Warbler), 25.05.git.2c8a792facf4
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.24.10
  • channels(root): "nixos"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Notify maintainers

@dotlambda
@Stunkymonkey

Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

@emmertex emmertex added the 0.kind: build failure A package fails to build label Dec 10, 2024
@emmertex
Copy link
Author

emmertex commented Dec 10, 2024

Sorry, not you @dotlambda

Regression in redis, incomplete refactor. @Stunkymonkey
db321b9

diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix
index 49990dd736c7..31532646f8ed 100644
--- a/nixos/modules/services/databases/redis.nix
+++ b/nixos/modules/services/databases/redis.nix
@@ -275,7 +275,7 @@ in {
               '';
             };
           };
-          config.settings = mkMerge [
+          config.settings = lib.mkMerge [
             {
               inherit (config) port logfile databases maxclients appendOnly;
               daemonize = false;
@@ -293,14 +293,14 @@ in {
               slowlog-log-slower-than = config.slowLogLogSlowerThan;
               slowlog-max-len = config.slowLogMaxLen;
             }
-            (mkIf (config.bind != null) { inherit (config) bind; })
-            (mkIf (config.unixSocket != null) {
+            (lib.mkIf (config.bind != null) { inherit (config) bind; })
+            (lib.mkIf (config.unixSocket != null) {
               unixsocket = config.unixSocket;
               unixsocketperm = toString config.unixSocketPerm;
             })
-            (mkIf (config.slaveOf != null) { slaveof = "${config.slaveOf.ip} ${toString config.slaveOf.port}"; })
-            (mkIf (config.masterAuth != null) { masterauth = config.masterAuth; })
-            (mkIf (config.requirePass != null) { requirepass = config.requirePass; })
+            (lib.mkIf (config.slaveOf != null) { slaveof = "${config.slaveOf.ip} ${toString config.slaveOf.port}"; })
+            (lib.mkIf (config.masterAuth != null) { masterauth = config.masterAuth; })
+            (lib.mkIf (config.requirePass != null) { requirepass = config.requirePass; })
           ];
         }));
         description = "Configuration of multiple `redis-server` instances.";

Above changes for successful build

@dotlambda
Copy link
Member

Above changes for successful build

Can you open a PR with those changes?

@emmertex
Copy link
Author

Above changes for successful build

Can you open a PR with those changes?

Sure, it will be my first PR to this project, so apologies in advance if I do it wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants