NixOS evaluation aborted when building from HEAD: required argument "apple-sdk_11" #652

Closed
opened 2025-01-29 16:25:18 +00:00 by ian-h-chamberlain · 3 comments

Describe the bug

I was looking to try out HEAD using lix-module on NixOS but ran into this error:

error:
       … while calling the 'head' builtin
         at /nix/store/2k0r4pk0hzjzk9iwyi61xc0z4qv791j9-source/lib/attrsets.nix:1575:11:
         1574|         || pred here (elemAt values 1) (head values) then
         1575|           head values
             |           ^
         1576|         else

       … while evaluating the attribute 'value'
         at /nix/store/2k0r4pk0hzjzk9iwyi61xc0z4qv791j9-source/lib/modules.nix:809:9:
          808|     in warnDeprecation opt //
          809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          810|         inherit (res.defsFinal') highestPrio;

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

       error: evaluation aborted with the following error message: 'lib.customisation.callPackageWith: Function called without required argument "apple-sdk_11" at /nix/store/i7sl95fhbqpzpimbsfjsbdbvbz0g54wl-source/package.nix:5'

Steps To Reproduce

  1. Add lix and lix-module inputs to systemwide flake (as in the Beta guide):
    lix = {
      url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
      flake = false;
    };
    lix-module = {
      url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
      inputs.nixpkgs.follows = "nixpkgs";
      inputs.lix.follows = "lix";
    };
    
  2. sudo nixos-rebuild dry-build

A clear and concise description of what you expected to happen.

  • A successful evaluation of my system flake, and eventually also a build.

nix --version output

$ nix --version
nix (Lix, like Nix) 2.91.1

(using from nixpkgs).

Additional context

It seems this input was added in 8ddcdfb59c but I guess (unsurprisingly) that package only exists on macOS? Maybe the fix is as simple as adding a ? null to the input argument, or I can work around it with a .override in the right place?

## Describe the bug I was looking to try out HEAD using `lix-module` on NixOS but ran into this error: ``` error: … while calling the 'head' builtin at /nix/store/2k0r4pk0hzjzk9iwyi61xc0z4qv791j9-source/lib/attrsets.nix:1575:11: 1574| || pred here (elemAt values 1) (head values) then 1575| head values | ^ 1576| else … while evaluating the attribute 'value' at /nix/store/2k0r4pk0hzjzk9iwyi61xc0z4qv791j9-source/lib/modules.nix:809:9: 808| in warnDeprecation opt // 809| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 810| inherit (res.defsFinal') highestPrio; (stack trace truncated; use '--show-trace' to show the full trace) error: evaluation aborted with the following error message: 'lib.customisation.callPackageWith: Function called without required argument "apple-sdk_11" at /nix/store/i7sl95fhbqpzpimbsfjsbdbvbz0g54wl-source/package.nix:5' ``` ## Steps To Reproduce 1. Add `lix` and `lix-module` inputs to systemwide flake (as in the [Beta guide](https://wiki.lix.systems/books/lix-contributors/page/lix-beta-guide)): ```nix lix = { url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"; flake = false; }; lix-module = { url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz"; inputs.nixpkgs.follows = "nixpkgs"; inputs.lix.follows = "lix"; }; ``` 2. `sudo nixos-rebuild dry-build` A clear and concise description of what you expected to happen. - A successful evaluation of my system flake, and eventually also a build. ## `nix --version` output ``` $ nix --version nix (Lix, like Nix) 2.91.1 ``` (using from `nixpkgs`). ## Additional context It seems this input was added in https://git.lix.systems/lix-project/lix/commit/8ddcdfb59c7c7717698c3ce1a0b7f14503f8b7e6 but I guess (unsurprisingly) that package only exists on macOS? Maybe the fix is as simple as adding a `? null` to the input argument, or I can work around it with a `.override` in the right place?
Owner

Hmmm, what nixpkgs version are you on? Usually this is because of an unsupported old nixpkgs.

Hmmm, what nixpkgs version are you on? Usually this is because of an unsupported old nixpkgs.

Hmmm, what nixpkgs version are you on? Usually this is because of an unsupported old nixpkgs.

Ah, that was it! Applying the overlay manually on top of nixos-unstable works, but I guess I won't be able to use the nixosModules.default itself since I am using nixos-24.05 for my main pkgs:

├───nixpkgs: github:NixOS/nixpkgs/b134951a4c9f3c995fd7be05f3243f8ecd65d798
│   Last modified: 2024-12-30 08:00:28

Is there any documentation somewhere indicating what is a supported nixpkgs version? I didn't see anything on https://lix.systems/add-to-config/ or https://wiki.lix.systems/books/lix-contributors/page/lix-beta-guide which seemed to have any specific requirements, but it might be nice to know what is officially supported (even if the answer is always just HEAD of unstable).

I guess I can close this issue, unless you'd like me to keep it open as a documentation tracker.

> Hmmm, what nixpkgs version are you on? Usually this is because of an unsupported old nixpkgs. Ah, that was it! Applying the overlay manually on top of `nixos-unstable` works, but I guess I won't be able to use the `nixosModules.default` itself since I am using `nixos-24.05` for my main pkgs: ``` ├───nixpkgs: github:NixOS/nixpkgs/b134951a4c9f3c995fd7be05f3243f8ecd65d798 │ Last modified: 2024-12-30 08:00:28 ``` Is there any documentation somewhere indicating what _is_ a supported `nixpkgs` version? I didn't see anything on https://lix.systems/add-to-config/ or https://wiki.lix.systems/books/lix-contributors/page/lix-beta-guide which seemed to have any specific requirements, but it might be nice to know what is officially supported (even if the answer is always just `HEAD` of unstable). I guess I can close this issue, unless you'd like me to keep it open as a documentation tracker.
Owner

Yeah we can close this. In general Lix tries to support the oldest major nixpkgs in security support, which is 24.11. You will not receive security updates on 24.05, which means in general it should not be used, which is why we draw the line approximately there. Certainly the module could do explicit version checks though, and perhaps even should.

Yeah we can close this. In general Lix tries to support the oldest major nixpkgs in security support, which is 24.11. You will not receive security updates on 24.05, which means in general it should not be used, which is why we draw the line approximately there. Certainly the module could do explicit version checks though, and perhaps even should.
jade closed this issue 2025-01-30 21:09:25 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#652
No description provided.