Lix overlay causes prefetch-yarn-deps (electron) evaluation error #591

Closed
opened 2024-12-03 20:46:05 +00:00 by freyacodes · 6 comments

Describe the bug

I am getting error: nix_2_18 has been removed when rebuilding my system. I have traced the issue back to the Lix overlay and prefetch-yarn-deps, which is mentioned in the trace (/nix/store/l7mvpqiyrr8g5ipl307alrjj8isrp3pc-source/overlay.nix:63:7).

The Lix overlay seems to do some kind of weird hack with prefetch-yarn-deps.

  # This is kind of scary to not override the nix version to pretend to be
  # 2.18 since nixpkgs can introduce new breakage in its Nix unstable CLI
  # usage.
  # https://github.com/nixos/nixpkgs/blob/6afb255d976f85f3359e4929abd6f5149c323a02/nixos/modules/config/nix.nix#L121
  lixPkg = final.callPackage (lix + "/package.nix") ({
    # versionSuffix = "-${versionSuffix}";
    # FIXME: do this more sensibly for future releases
    # https://git.lix.systems/lix-project/lix/issues/406
    officialRelease = true;
  });

  # These packages depend on Nix features that Lix does not support
  overridelist_2_18 = [
    "attic-client"
    "devenv"
    "nix-du"
    "nix-init"
    "nix-prefetch-git"
    "nixos-option"
    "nurl"
    "prefetch-yarn-deps" # force these onto upstream so we are not regularly rebuilding electron
  ];
  override_2_18 = prev.lib.genAttrs overridelist_2_18 (
    name: prev.${name}.override {
      nix = final.nixVersions.nix_2_18_upstream;
    });

Removing the Lix overlay fixes the problem, allowing me to build my system

Steps To Reproduce

  1. Install Lix as part of a flake as per https://lix.systems/add-to-config/
  2. Depend on an electron package such as obsidian-1.7.7
  3. Run nixos-rebuild switch --show-trace

Expected behavior

The system configuration is built and applied

nix --version output

nix (Lix, like Nix) 2.90.0

Additional context

See attached file for a trace

## Describe the bug I am getting `error: nix_2_18 has been removed` when rebuilding my system. I have traced the issue back to the Lix overlay and `prefetch-yarn-deps`, which is mentioned in the trace (`/nix/store/l7mvpqiyrr8g5ipl307alrjj8isrp3pc-source/overlay.nix:63:7`). The Lix overlay seems to do some kind of weird hack with `prefetch-yarn-deps`. ```nix # This is kind of scary to not override the nix version to pretend to be # 2.18 since nixpkgs can introduce new breakage in its Nix unstable CLI # usage. # https://github.com/nixos/nixpkgs/blob/6afb255d976f85f3359e4929abd6f5149c323a02/nixos/modules/config/nix.nix#L121 lixPkg = final.callPackage (lix + "/package.nix") ({ # versionSuffix = "-${versionSuffix}"; # FIXME: do this more sensibly for future releases # https://git.lix.systems/lix-project/lix/issues/406 officialRelease = true; }); # These packages depend on Nix features that Lix does not support overridelist_2_18 = [ "attic-client" "devenv" "nix-du" "nix-init" "nix-prefetch-git" "nixos-option" "nurl" "prefetch-yarn-deps" # force these onto upstream so we are not regularly rebuilding electron ]; override_2_18 = prev.lib.genAttrs overridelist_2_18 ( name: prev.${name}.override { nix = final.nixVersions.nix_2_18_upstream; }); ``` Removing the Lix overlay fixes the problem, allowing me to build my system ## Steps To Reproduce 1. Install Lix as part of a flake as per https://lix.systems/add-to-config/ 2. Depend on an electron package such as obsidian-1.7.7 3. Run `nixos-rebuild switch --show-trace` ## Expected behavior The system configuration is built and applied ## `nix --version` output `nix (Lix, like Nix) 2.90.0` ## Additional context See attached file for a trace
freyacodes added the
bug
label 2024-12-03 20:46:05 +00:00
Owner

Hm, can you verify that your overlay is up to date? I suspect this is fixed in 2.91.1-2 and main of the overlay as of a few weeks ago.

Hm, can you verify that your overlay is up to date? I suspect this is fixed in 2.91.1-2 and main of the overlay as of a few weeks ago.
Author

All this time I was under the impression that I didn't need to update the Lix version in flake.nix, where I had https://git.lix.systems/lix-project/lix/archive/2.90.0.tar.gz listed. I had however updated my lock file immediately before encountering this issue.

$ nix flake update --commit-lock-file
warning: Git tree '/etc/nixos' is dirty
warning: updating lock file '/etc/nixos/flake.lock':
• Updated input 'lix-module':
    'https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/5c48c833c15bb80d127a398a8c2484d42fdd8257.tar.gz?narHash=sha256-yEO2cGNgzm9x/XxiDQI%2BWckSWnZX63R8aJLBRSXtYNE%3D' (2024-07-10)
  → 'https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/f19bd752910bbe3a861c9cad269bd078689d50fe.tar.gz?narHash=sha256-DN5/166jhiiAW0Uw6nueXaGTueVxhfZISAkoxasmz/g%3D' (2024-11-26)
• Updated input 'lix-module/flake-utils':
    'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a?narHash=sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ%3D' (2024-03-11)
  → 'github:numtide/flake-utils/c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a?narHash=sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ%3D' (2024-09-17)
• Updated input 'lix-module/lix':
    'https://git.lix.systems/api/v1/repos/lix-project/lix/archive/2a4376be20d70feaa2b0e640c5041fb66ddc67ed.tar.gz?narHash=sha256-f8k%2BBezKdJfmE%2Bk7zgBJiohtS3VkkriycdXYsKOm3sc%3D' (2024-07-10)
  → 'https://git.lix.systems/api/v1/repos/lix-project/lix/archive/ad9d06f7838a25beec425ff406fe68721fef73be.tar.gz?narHash=sha256-hiGtfzxFkDc9TSYsb96Whg0vnqBVV7CUxyscZNhed0U%3D&rev=ad9d06f7838a25beec425ff406fe68721fef73be' (2024-10-19)

Either way, updating the URL in flake.nix resolved the issue. I suppose I will close this issue.

All this time I was under the impression that I didn't need to update the Lix version in `flake.nix`, where I had `https://git.lix.systems/lix-project/lix/archive/2.90.0.tar.gz` listed. I had however updated my lock file immediately before encountering this issue. ``` $ nix flake update --commit-lock-file warning: Git tree '/etc/nixos' is dirty warning: updating lock file '/etc/nixos/flake.lock': • Updated input 'lix-module': 'https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/5c48c833c15bb80d127a398a8c2484d42fdd8257.tar.gz?narHash=sha256-yEO2cGNgzm9x/XxiDQI%2BWckSWnZX63R8aJLBRSXtYNE%3D' (2024-07-10) → 'https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/f19bd752910bbe3a861c9cad269bd078689d50fe.tar.gz?narHash=sha256-DN5/166jhiiAW0Uw6nueXaGTueVxhfZISAkoxasmz/g%3D' (2024-11-26) • Updated input 'lix-module/flake-utils': 'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a?narHash=sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ%3D' (2024-03-11) → 'github:numtide/flake-utils/c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a?narHash=sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ%3D' (2024-09-17) • Updated input 'lix-module/lix': 'https://git.lix.systems/api/v1/repos/lix-project/lix/archive/2a4376be20d70feaa2b0e640c5041fb66ddc67ed.tar.gz?narHash=sha256-f8k%2BBezKdJfmE%2Bk7zgBJiohtS3VkkriycdXYsKOm3sc%3D' (2024-07-10) → 'https://git.lix.systems/api/v1/repos/lix-project/lix/archive/ad9d06f7838a25beec425ff406fe68721fef73be.tar.gz?narHash=sha256-hiGtfzxFkDc9TSYsb96Whg0vnqBVV7CUxyscZNhed0U%3D&rev=ad9d06f7838a25beec425ff406fe68721fef73be' (2024-10-19) ``` Either way, updating the URL in flake.nix resolved the issue. I suppose I will close this issue.

Seeing this as well. Tried bumping lix to 2.91.1 in flake.nix but no luck, got a different error: error: attribute 'stable_upstream' missing

Seeing this as well. Tried bumping lix to 2.91.1 in flake.nix but no luck, got a different error: ` error: attribute 'stable_upstream' missing`
Owner

Seeing this as well. Tried bumping lix to 2.91.1 in flake.nix but no luck, got a different error: error: attribute 'stable_upstream' missing

You want 2.91.1-2, not 2.91.1. I wish there was a way to yank releases to make this mistake harder to make. For reference, the installation guide on the lix website will list the correct URL for the latest stable version.

> Seeing this as well. Tried bumping lix to 2.91.1 in flake.nix but no luck, got a different error: ` error: attribute 'stable_upstream' missing` You want 2.91.1-2, not 2.91.1. I wish there was a way to yank releases to make this mistake harder to make. For reference, the installation guide on the lix website will list the correct URL for the latest stable version.

@jade oh dang you're right! Looks like I've got the url wrong (2.91.1 vs 2.91.1-2). Let me try with that one right after this massive rebuild finishes

@jade oh dang you're right! Looks like I've got the url wrong (2.91.1 vs 2.91.1-2). Let me try with that one right after this massive rebuild finishes

👍looks like it's working! (not sure if having the electron derivations already built in the nix store helped things)

👍looks like it's working! (not sure if having the electron derivations already built in the nix store helped things)
Sign in to join this conversation.
No milestone
No project
No assignees
3 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#591
No description provided.