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

lix: lix requires nix to build #378715

Open
3 tasks done
eclairevoyant opened this issue Feb 2, 2025 · 0 comments
Open
3 tasks done

lix: lix requires nix to build #378715

eclairevoyant opened this issue Feb 2, 2025 · 0 comments
Labels
0.kind: bug Something is broken

Comments

@eclairevoyant
Copy link
Contributor

eclairevoyant commented Feb 2, 2025

Nixpkgs version

  • Unstable (25.05)

Describe the bug

lix depends on nix. More specifically, an overlay that attempts to replace nix with lix fails due to infrec.

Steps to reproduce

Run the following in a local clone of nixpkgs:

$ nix-build --expr 'let pkgs = (import ./. { overlays = [(f: _: { nix = f.lix; })]; }); in pkgs.lix.out'
trace: evaluation warning: undeclared Nixpkgs option set: config.allowUnfreePredicate
error:
       … while evaluating 'strict' to select 'drvPath' on it
         at /builtin/derivation.nix:1:552:
       … while calling the 'derivationStrict' builtin
         at /builtin/derivation.nix:1:208:
       (stack trace truncated; use '--show-trace' to show the full trace)

       error: infinite recursion encountered

Alternatively, replace ./. with <nixpkgs>, assuming you're on the current nixos-unstable (3a22805).

Expected behaviour

lix should be, IMO, buildable independently of nix.

Additional context

The path of dependencies is essentially lixlix.docfetchCargoVendornix-prefetch-gitnix

See full trace below ⤵
trace: evaluation warning: undeclared Nixpkgs option set: config.allowUnfreePredicate
error:
       … while evaluating 'strict' to select 'drvPath' on it
         at /builtin/derivation.nix:1:552:
       … while calling the 'derivationStrict' builtin
         at /builtin/derivation.nix:1:208:
       … while evaluating derivation 'lix-2.91.1'
         whose name attribute is located at /mnt/scratch/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:375:7

       … while evaluating attribute 'buildInputs' of derivation 'lix-2.91.1'
         at /mnt/scratch/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:422:7:
          421|       depsHostHost                = elemAt (elemAt dependencies 1) 0;
          422|       buildInputs                 = elemAt (elemAt dependencies 1) 1;
             |       ^
          423|       depsTargetTarget            = elemAt (elemAt dependencies 2) 0;

       … while calling the 'getAttr' builtin
         at /builtin/derivation.nix:1:500:
       … while calling the 'derivationStrict' builtin
         at /builtin/derivation.nix:1:208:
       … while evaluating derivation 'lix-doc-2.91.1'
         whose name attribute is located at /mnt/scratch/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:375:7

       … while evaluating attribute 'cargoDeps' of derivation 'lix-doc-2.91.1'
         at /mnt/scratch/nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix:138:5:
          137|   // {
          138|     cargoDeps = cargoDeps';
             |     ^
          139|     inherit buildAndTestSubdir;

       … while calling the 'getAttr' builtin
         at /builtin/derivation.nix:1:500:
       … while calling the 'derivationStrict' builtin
         at /builtin/derivation.nix:1:208:
       … while evaluating derivation 'lix-doc-2.91.1-vendor'
         whose name attribute is located at /mnt/scratch/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:375:7

       … while evaluating attribute 'vendorStaging' of derivation 'lix-doc-2.91.1-vendor'
         at /mnt/scratch/nixpkgs/pkgs/build-support/rust/fetch-cargo-vendor.nix:94:13:
           93|   {
           94|     inherit vendorStaging;
             |             ^
           95|     nativeBuildInputs = [

       … while calling the 'getAttr' builtin
         at /builtin/derivation.nix:1:500:
       … while calling the 'derivationStrict' builtin
         at /builtin/derivation.nix:1:208:
       … while evaluating derivation 'lix-doc-2.91.1-vendor-staging'
         whose name attribute is located at /mnt/scratch/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:375:7

       … while evaluating attribute 'nativeBuildInputs' of derivation 'lix-doc-2.91.1-vendor-staging'
         at /mnt/scratch/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:419:7:
          418|       depsBuildBuild              = elemAt (elemAt dependencies 0) 0;
          419|       nativeBuildInputs           = elemAt (elemAt dependencies 0) 1;
             |       ^
          420|       depsBuildTarget             = elemAt (elemAt dependencies 0) 2;

       … while calling the 'getAttr' builtin
         at /builtin/derivation.nix:1:500:
       … while calling the 'derivationStrict' builtin
         at /builtin/derivation.nix:1:208:
       … while evaluating derivation 'nix-prefetch-git'
         whose name attribute is located at /mnt/scratch/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:375:7

       … while evaluating attribute 'installPhase' of derivation 'nix-prefetch-git'
         at /mnt/scratch/nixpkgs/pkgs/tools/package-management/nix-prefetch-scripts/default.nix:15:5:
           14|
           15|     installPhase = ''
             |     ^
           16|       install -vD ${src} $out/bin/$name;

       … from call site
         at /mnt/scratch/nixpkgs/pkgs/tools/package-management/nix-prefetch-scripts/default.nix:18:27:
           17|       wrapProgram $out/bin/$name \
           18|         --prefix PATH : ${lib.makeBinPath (deps ++ [ coreutils gnused nix ])} \
             |                           ^
           19|         --set HOME /homeless-shelter

       … while calling 'makeSearchPathOutput'
         at /mnt/scratch/nixpkgs/lib/strings.nix:548:5:
          547|     subDir:
          548|     pkgs: makeSearchPath subDir (map (lib.getOutput output) pkgs);
             |     ^
          549|

       … from call site
         at /mnt/scratch/nixpkgs/lib/strings.nix:548:11:
          547|     subDir:
          548|     pkgs: makeSearchPath subDir (map (lib.getOutput output) pkgs);
             |           ^
          549|

       … while calling 'makeSearchPath'
         at /mnt/scratch/nixpkgs/lib/strings.nix:506:5:
          505|     subDir:
          506|     paths:
             |     ^
          507|     concatStringsSep ":" (map (path: path + "/" + subDir) (filter (x: x != null) paths));

       … while calling the 'concatStringsSep' builtin
         at /mnt/scratch/nixpkgs/lib/strings.nix:507:5:
          506|     paths:
          507|     concatStringsSep ":" (map (path: path + "/" + subDir) (filter (x: x != null) paths));
             |     ^
          508|

       … while calling anonymous lambda
         at /mnt/scratch/nixpkgs/lib/strings.nix:507:32:
          506|     paths:
          507|     concatStringsSep ":" (map (path: path + "/" + subDir) (filter (x: x != null) paths));
             |                                ^
          508|

       … while calling the 'getAttr' builtin
         at /builtin/derivation.nix:1:500:
       error: infinite recursion encountered

System metadata

Attempted to build on current master (b29c6f5)

Notify maintainers

@alyssais re: #377518
@RaitoBezarius @Qyriad as maintainers


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

@eclairevoyant eclairevoyant added the 0.kind: bug Something is broken label Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant