[colmena][npins] error: attribute 'rev' missing #906

Open
opened 2025-07-07 14:37:49 +00:00 by nairou · 2 comments

Describe the bug

Using npins, not flakes. Building with colmena. After updating lix and nixos-module, I get an error trying to build.

  at /nix/store/p37qxkwfq6mi897d9q7kpc0an9ywghln-source/overlay.nix:117:9:
   116|       {
   117|         version = "2.93.0-lix-${builtins.substring 0 7 lix.rev}";
      |         ^
   118|         __intentionallyOverridingVersion = true;

… while calling the 'substring' builtin
  at /nix/store/p37qxkwfq6mi897d9q7kpc0an9ywghln-source/overlay.nix:117:33:
   116|       {
   117|         version = "2.93.0-lix-${builtins.substring 0 7 lix.rev}";
      |                                 ^
   118|         __intentionallyOverridingVersion = true;

error: attribute 'rev' missing
at /nix/store/p37qxkwfq6mi897d9q7kpc0an9ywghln-source/overlay.nix:117:60:
   116|       {
   117|         version = "2.93.0-lix-${builtins.substring 0 7 lix.rev}";
      |                                                            ^
   118|         __intentionallyOverridingVersion = true;

Steps To Reproduce

> npins add --name lix-module tarball "https://git.lix.systems/lix-project/nixos-module/archive/2.93.2-1.tar.gz"
[INFO ] Adding 'lix-module' …
    url: https://git.lix.systems/lix-project/nixos-module/archive/2.93.2-1.tar.gz
    locked_url: https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/8b1094356f4723d6e89d3f8a95b333ee16d9ab02.tar.gz?rev=8b1094356f4723d6e89d3f8a95b333ee16d9ab02
    hash: 01dxjdwniql8rjrxq3wd5y48ybvnhygwn1qkml01jgb33abh0xa9
    frozen: false

> npins add --name lix-pkg tarball "https://git.lix.systems/lix-project/lix/archive/2.93.2.tar.gz"
[INFO ] Adding 'lix-pkg' …
    url: https://git.lix.systems/lix-project/lix/archive/2.93.2.tar.gz
    locked_url: https://git.lix.systems/api/v1/repos/lix-project/lix/archive/22be6ff62626c8cdbb9cdb59a3e4bd910fedd0d6.tar.gz?rev=22be6ff62626c8cdbb9cdb59a3e4bd910fedd0d6
    hash: 10pr6xp2m3fmnhywakv9msb33gllkr85qi0bl40wlgn7hlp9r317
    frozen: false

> colmena build

Expected behavior

This worked fine with 2.92.0.

nix --version output

nix (Lix, like Nix) 2.92.0
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/nairou/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/nairou/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/nairou/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/nairou/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/gzpkswm2kqhjjvdd7pw0pn2dznhz2qsa-lix-2.92.0/share

Additional context

I don't know why building with colmena changes things. Error occurs even with a minimal hive.nix:

let
  sources = import ./npins;
in
{
  meta = {
    nixpkgs = import sources.nixpkgs;
    specialArgs = { inherit sources; };
  };

  kharik = {
    imports = [
      (import "${sources.lix-module}/module.nix" { lix = sources.lix-pkg; })
      ./kharik/configuration.nix
    ];
    deployment = {
      allowLocalDeployment = true;
      targetHost = null;
    };
  };
}

Full error log trace attached.

## Describe the bug Using `npins`, not flakes. Building with `colmena`. After updating `lix` and `nixos-module`, I get an error trying to build. ``` at /nix/store/p37qxkwfq6mi897d9q7kpc0an9ywghln-source/overlay.nix:117:9: 116| { 117| version = "2.93.0-lix-${builtins.substring 0 7 lix.rev}"; | ^ 118| __intentionallyOverridingVersion = true; … while calling the 'substring' builtin at /nix/store/p37qxkwfq6mi897d9q7kpc0an9ywghln-source/overlay.nix:117:33: 116| { 117| version = "2.93.0-lix-${builtins.substring 0 7 lix.rev}"; | ^ 118| __intentionallyOverridingVersion = true; error: attribute 'rev' missing at /nix/store/p37qxkwfq6mi897d9q7kpc0an9ywghln-source/overlay.nix:117:60: 116| { 117| version = "2.93.0-lix-${builtins.substring 0 7 lix.rev}"; | ^ 118| __intentionallyOverridingVersion = true; ``` ## Steps To Reproduce ``` > npins add --name lix-module tarball "https://git.lix.systems/lix-project/nixos-module/archive/2.93.2-1.tar.gz" [INFO ] Adding 'lix-module' … url: https://git.lix.systems/lix-project/nixos-module/archive/2.93.2-1.tar.gz locked_url: https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/8b1094356f4723d6e89d3f8a95b333ee16d9ab02.tar.gz?rev=8b1094356f4723d6e89d3f8a95b333ee16d9ab02 hash: 01dxjdwniql8rjrxq3wd5y48ybvnhygwn1qkml01jgb33abh0xa9 frozen: false > npins add --name lix-pkg tarball "https://git.lix.systems/lix-project/lix/archive/2.93.2.tar.gz" [INFO ] Adding 'lix-pkg' … url: https://git.lix.systems/lix-project/lix/archive/2.93.2.tar.gz locked_url: https://git.lix.systems/api/v1/repos/lix-project/lix/archive/22be6ff62626c8cdbb9cdb59a3e4bd910fedd0d6.tar.gz?rev=22be6ff62626c8cdbb9cdb59a3e4bd910fedd0d6 hash: 10pr6xp2m3fmnhywakv9msb33gllkr85qi0bl40wlgn7hlp9r317 frozen: false > colmena build ``` ## Expected behavior This worked fine with 2.92.0. ## `nix --version` output nix (Lix, like Nix) 2.92.0 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/nairou/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/nairou/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/nairou/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/nairou/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/gzpkswm2kqhjjvdd7pw0pn2dznhz2qsa-lix-2.92.0/share ## Additional context I don't know why building with colmena changes things. Error occurs even with a minimal `hive.nix`: ``` let sources = import ./npins; in { meta = { nixpkgs = import sources.nixpkgs; specialArgs = { inherit sources; }; }; kharik = { imports = [ (import "${sources.lix-module}/module.nix" { lix = sources.lix-pkg; }) ./kharik/configuration.nix ]; deployment = { allowLocalDeployment = true; targetHost = null; }; }; } ``` Full error log trace attached.
Owner

cc @piegames for npins

cc @piegames for npins
Member

See lix-project/nixos-module#69. Try this:

        pkgs.applyPatches {
          name = "lix-module";
          src = sources.lix-module;
          patches = [
            (pkgs.fetchpatch {
              url = "https://git.lix.systems/lix-project/nixos-module/pulls/69.diff";
              hash = "sha256-AhcDcj8qVw98AtT4EF9S+cbIF4dG09+/2Y//1gzNbUY=";
            })
          ];
          postPatch = ''
            echo '{ "version": "2.93.0" }' > version.json
          '';
        }
See https://git.lix.systems/lix-project/nixos-module/pulls/69. Try this: ```nix pkgs.applyPatches { name = "lix-module"; src = sources.lix-module; patches = [ (pkgs.fetchpatch { url = "https://git.lix.systems/lix-project/nixos-module/pulls/69.diff"; hash = "sha256-AhcDcj8qVw98AtT4EF9S+cbIF4dG09+/2Y//1gzNbUY="; }) ]; postPatch = '' echo '{ "version": "2.93.0" }' > version.json ''; } ```
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#906
No description provided.