rasmus-kirk / nixarr

The Media Server Nixos Module
https://nixarr.com/
GNU General Public License v3.0
170 stars 16 forks source link

Eval failure with recent nixpkgs due to submerger #40

Closed xokdvium closed 3 weeks ago

xokdvium commented 4 weeks ago

Describe the bug

Recently due to a change in nixpkgs rust-overlay stopped working with latest unstable: rust-overlay#191. This affects submerged dependency when the nixpkgs inputs gets overriden via inputs.nixpkgs.follows.

[ERROR]   stderr)
[ERROR]   stderr)        … while evaluating definitions from `/nix/store/yp8idjv05iqdr70n7fvlh1z2ibr61y4d-m68ikm8045fj7ys7qvgr608z9l70hh1k-source/nixos/modules/system/activation/activatable-system.nix':
[ERROR]   stderr)
[ERROR]   stderr)        … while evaluating the option `microvm.vms.nixarr-vm.config.system.activationScripts.etc.text':
[ERROR]   stderr)
[ERROR]   stderr)        … while evaluating definitions from `/nix/store/yp8idjv05iqdr70n7fvlh1z2ibr61y4d-m68ikm8045fj7ys7qvgr608z9l70hh1k-source/nixos/modules/system/etc/etc-activation.nix':
[ERROR]   stderr)
[ERROR]   stderr)        … while evaluating definitions from `/nix/store/yp8idjv05iqdr70n7fvlh1z2ibr61y4d-m68ikm8045fj7ys7qvgr608z9l70hh1k-source/nixos/modules/system/etc/etc.nix':
[ERROR]   stderr)
[ERROR]   stderr)        … while evaluating the option `microvm.vms.nixarr-vm.config.environment.etc.dbus-1.source':
[ERROR]   stderr)
[ERROR]   stderr)        (stack trace truncated; use '--show-trace' to show the full, detailed trace)
[ERROR]   stderr)
[ERROR]   stderr)        error: attribute 'targetPlatforms' missing
[ERROR]   stderr)        at /nix/store/m68ikm8045fj7ys7qvgr608z9l70hh1k-source/pkgs/build-support/rust/build-rust-package/default.nix:162:7:
[ERROR]   stderr)           161|       meta.platforms or lib.platforms.all
[ERROR]   stderr)           162|       rustc.targetPlatforms;
[ERROR]   stderr)              |       ^
[ERROR]   stderr)           163|   };
[ERROR]  failure) Child process exited with error code: 1
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 1

To Reproduce Try to use the nixarr flake with overriden nixpkgs input after nixpkgs#338999

Expected behavior No eval failure occurs.

Additional context I can work around this problem by overriding the rust-overlay input for submerger like so:

inputs = {
  nixarr = {
    url = "github:rasmus-kirk/nixarr";
    inputs.nixpkgs.follows = "nixpkgs";
    inputs.treefmt-nix.follows = "treefmt-nix";
    inputs.flake-parts.follows = "flake-parts";
    inputs.submerger.follows = "submerger";
  };

  submerger = {
    url = "github:rasmus-kirk/submerger";
    inputs.nixpkgs.follows = "nixpkgs";
    inputs.rust-overlay.follows = "nix-files/rust-overlay";
  };
};

It should be enough to just bump rust-overlay in submerger repo to fix this.

joinemm commented 3 weeks ago

I ran into the same issue and tbh I don't understand why submerger is part of this flake, nor why is installed by default with no option to disable it? https://github.com/rasmus-kirk/nixarr/blob/main/nixarr/default.nix#L7

It seems to not be referenced anywhere else. Personally I would not want this installed on my system as I do not need it.

Yasso9 commented 3 weeks ago

I have the same issue with nixos unstable and the latest version of nixarr

rasmus-kirk commented 3 weeks ago

Fixed in main