ryantm / home-manager-template

A quick-start template for using home-manager in a more reproducible way.

Home Page:https://github.com/ryantm/home-manager-template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation fails at Update dependencies with "cannot coerce null to a string"

L0g4n opened this issue · comments

First thanks for the template,
I tried to follow the installation instructions, but it fails already in the first step.

error: cannot coerce null to a string

       at /nix/store/cl859pbyw47jzn4jn6ybiwayl0zby8ns-nixpkgs-unstable-src/pkgs/stdenv/generic/make-derivation.nix:192:19:

          191|         // (lib.optionalAttrs (!(attrs ? name) && attrs ? pname && attrs ? version)) {
          192|           name = "${attrs.pname}-${attrs.version}";
             |                   ^
          193|         } // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix && (attrs ? name || (attrs ? pname && attrs ? version)))) {
(use '--show-trace' to show detailed location information)

Full Trace:

error: cannot coerce null to a string

       at /nix/store/cl859pbyw47jzn4jn6ybiwayl0zby8ns-nixpkgs-unstable-src/pkgs/stdenv/generic/make-derivation.nix:192:19:

          191|         // (lib.optionalAttrs (!(attrs ? name) && attrs ? pname && attrs ? version)) {
          192|           name = "${attrs.pname}-${attrs.version}";
             |                   ^
          193|         } // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix && (attrs ? name || (attrs ? pname && attrs ? version)))) {

       … while evaluating the derivation attribute 'name'

       at /nix/store/cl859pbyw47jzn4jn6ybiwayl0zby8ns-nixpkgs-unstable-src/pkgs/stdenv/generic/make-derivation.nix:192:11:

          191|         // (lib.optionalAttrs (!(attrs ? name) && attrs ? pname && attrs ? version)) {
          192|           name = "${attrs.pname}-${attrs.version}";
             |           ^
          193|         } // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix && (attrs ? name || (attrs ? pname && attrs ? version)))) {

       … while evaluating the attribute 'depsBuildBuild' of the derivation 'gmp-6.2.0'

       at /nix/store/cl859pbyw47jzn4jn6ybiwayl0zby8ns-nixpkgs-unstable-src/pkgs/development/libraries/gmp/6.x.nix:14:3:

           13| let self = stdenv.mkDerivation rec {
           14|   name = "gmp-6.2.0";
             |   ^
           15|

       … while evaluating the attribute 'buildInputs' of the derivation 'coreutils-8.31'

       at /nix/store/cl859pbyw47jzn4jn6ybiwayl0zby8ns-nixpkgs-unstable-src/pkgs/stdenv/generic/make-derivation.nix:192:11:

          191|         // (lib.optionalAttrs (!(attrs ? name) && attrs ? pname && attrs ? version)) {
          192|           name = "${attrs.pname}-${attrs.version}";
             |           ^
          193|         } // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix && (attrs ? name || (attrs ? pname && attrs ? version)))) {

       … while evaluating the attribute 'configurePhase' of the derivation 'QuickCheck-2.13.2'

       at /nix/store/cl859pbyw47jzn4jn6ybiwayl0zby8ns-nixpkgs-unstable-src/pkgs/development/haskell-modules/generic-builder.nix:291:3:

          290| stdenv.mkDerivation ({
          291|   name = "${pname}-${version}";
             |   ^
          292|

       … while evaluating the attribute 'buildInputs' of the derivation 'attoparsec-0.13.2.4'

       at /nix/store/cl859pbyw47jzn4jn6ybiwayl0zby8ns-nixpkgs-unstable-src/pkgs/development/haskell-modules/generic-builder.nix:291:3:

          290| stdenv.mkDerivation ({
          291|   name = "${pname}-${version}";
             |   ^
          292|

       … while evaluating the attribute 'buildInputs' of the derivation 'aeson-1.4.7.1'

       at /nix/store/cl859pbyw47jzn4jn6ybiwayl0zby8ns-nixpkgs-unstable-src/pkgs/development/haskell-modules/generic-builder.nix:291:3:

          290| stdenv.mkDerivation ({
          291|   name = "${pname}-${version}";
             |   ^
          292|

       … while evaluating the attribute 'buildInputs' of the derivation 'niv-0.2.18'

       at /nix/store/cl859pbyw47jzn4jn6ybiwayl0zby8ns-nixpkgs-unstable-src/pkgs/development/haskell-modules/generic-builder.nix:291:3:

          290| stdenv.mkDerivation ({
          291|   name = "${pname}-${version}";
             |   ^
          292|

       … while evaluating the attribute 'buildInputs' of the derivation 'home-manager-shell'

       at /Users/yk/nixfiles/shell.nix:11:3:

           10|
           11|   name = "home-manager-shell";
             |   ^
           12|

Is this error maybe related to not being able to determine the platform (=darwin)?
I have Nix 2.4 installed on macOS Big Sur, so I should be good to go.

It looks like it is having trouble building Niv. What architecture of darwin are you using? x86 or Arm? Looks like this could be related NixOS/nixpkgs#140774

Good call, it's indeed ARM. Seems I have to try the workarounds there or just wait for a fix.

My home.nix is not minimal, it's the version I used previously with manual installation of home-manager. See here.
Only Haskell package I have in there is pandoc which worked just fine at previous times.

It looks like it is having trouble building Niv. What architecture of darwin are you using? x86 or Arm? Looks like this could be related NixOS/nixpkgs#140774

niv fails at build time, this is clearly some sort of eval issue…