Compiling minimal installer iso image for i586

I’m trying to compile a minimal installer iso image for the i586 CPU architecture.
This older topic let me to believe that this is possible:

However I end up with the following error:
error: missing bootstrap url for platform i586-unknown-linux-gnu
This seems to be caused by the rust bootstrap compiler because the spidermonkey javascript engine got pulled in somehow.
Is there a way to find out and exclude whatever packages are causing rust to be pulled into the iso image?

My nix script is as follow:

iso.nix
{config, pkgs, ...}:
let
  customKernel = pkgs.linuxKernel.kernels.linux_5_10.override {
    extraConfig = ''
      MGEODE_LX y
    '';
  };
  customKernelPackages = pkgs.linuxPackagesFor customKernel;
in
{
  imports = [
    <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>

    # Provide an initial copy of the NixOS channel so that the user
    # doesn't need to run "nix-channel --update" first.
    <nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
  ];

  boot.kernelPackages = customKernelPackages;

  nixpkgs.localSystem = {
    config = "i586-unknown-linux-gnu";
    system = "i686-linux";
  };
}
1 Like

What I would try: nix-instantiate but not build the iso, nix-store -qR the result, find all the rust-related derivations, ask nix-store -q --referrers-closure to see what depends on them. Maybe intersect with the references of the ISO derivation.

Unfortunately nix-instantiate returns the same error.
To work around the problem I’ve installed installed normal 32bit nixos in a VM and then changed the config to i586. The idea being that I can then copy the VM drive to a real HD.

$ nix-instantiate ‘<nixpkgs/nixos>’ -A config.system.build.isoImage -I nixos-config=iso.nix
error: missing bootstrap url for platform i586-unknown-linux-gnu
(use ‘–show-trace’ to show detailed location information)

Trace
   $ nix-instantiate '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix --show-trace
   error: missing bootstrap url for platform i586-unknown-linux-gnu

   … while evaluating the attribute 'SSL_CERT_FILE' of the derivation 'rust-1.55.0-i586-unknown-linux-gnu.tar.gz'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating the attribute 'src' of the derivation 'rustc-bootstrap-1.55.0'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating the attribute 'installPhase' of the derivation 'cargo-bootstrap-1.55.0'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating 'optionalString'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/lib/strings.nix:202:5:

      201|     # String to return if condition is true
      202|     string: if cond then string else "";
         |     ^
      203|

   … from call site

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/build-support/trivial-builders.nix:470:12:

      469|         cp ${script} $out/nix-support/setup-hook
      470|       '' + lib.optionalString (deps != []) ''
         |            ^
      471|         printWords ${toString deps} > $out/nix-support/propagated-build-inputs

   … while evaluating the attribute 'buildCommand' of the derivation 'cargo-build-hook.sh'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating the attribute 'nativeBuildInputs' of the derivation 'cargo-1.56.1'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating the attribute 'nativeBuildInputs' of the derivation 'spidermonkey-78.15.0'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating the attribute 'buildInputs' of the derivation 'polkit-0.120'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating the attribute 'buildInputs' of the derivation 'pcsclite-1.9.4'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating 'optionalString'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/lib/strings.nix:202:5:

      201|     # String to return if condition is true
      202|     string: if cond then string else "";
         |     ^
      203|

   … from call site

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/tools/security/gnupg/22.nix:45:8:

       44|     sed -i 's/$SOURCE_DATE_EPOCH/''${SOURCE_DATE_EPOCH}/' doc/Makefile.in
       45|   '' + lib.optionalString ( stdenv.isLinux && pcsclite != null) ''
         |        ^
       46|     sed -i 's,"libpcsclite\.so[^"]*","${lib.getLib pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c

   … while evaluating the attribute 'postPatch' of the derivation 'gnupg-2.2.27'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating the attribute 'configureFlags' of the derivation 'gpgme-1.16.0'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating the attribute 'buildInputs' of the derivation 'volume_key-0.3.11'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating the attribute 'buildInputs' of the derivation 'libblockdev-2.26'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating the attribute 'buildInputs' of the derivation 'udisks-2.9.4'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating the attribute 'passAsFile'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/build-support/buildenv/default.nix:77:5:

       76|     # XXX: The size is somewhat arbitrary
       77|     passAsFile = if builtins.stringLength pkgs >= 128*1024 then [ "pkgs" ] else [ ];
         |     ^
       78|   }

   … while evaluating the attribute 'passAsFile' of the derivation 'system-path'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating 'check'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:362:15:

      361|       name = "path";
      362|       check = x: isCoercibleToString x && builtins.substring 0 1 (toString x) == "/";
         |               ^
      363|       merge = mergeEqualOption;

   … from call site

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:619:22:

      618|       if isDefined then
      619|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
         |                      ^
      620|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

   … while evaluating anonymous lambda

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:619:17:

      618|       if isDefined then
      619|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
         |                 ^
      620|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

   … from call site

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:619:12:

      618|       if isDefined then
      619|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
         |            ^
      620|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

   … while evaluating the attribute 'value'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:630:27:

      629|     optionalValue =
      630|       if isDefined then { value = mergedValue; }
         |                           ^
      631|       else {};

   … while evaluating anonymous lambda

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:371:14:

      370|       merge = loc: defs:
      371|         map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
         |              ^
      372|           imap1 (m: def':

   … from call site

   … while evaluating the attribute 'serviceDirectories' of the derivation 'dbus-1'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating 'check'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:362:15:

      361|       name = "path";
      362|       check = x: isCoercibleToString x && builtins.substring 0 1 (toString x) == "/";
         |               ^
      363|       merge = mergeEqualOption;

   … from call site

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:619:22:

      618|       if isDefined then
      619|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
         |                      ^
      620|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

   … while evaluating anonymous lambda

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:619:17:

      618|       if isDefined then
      619|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
         |                 ^
      620|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

   … from call site

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:619:12:

      618|       if isDefined then
      619|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
         |            ^
      620|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

   … while evaluating the attribute 'mergedValue'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:617:5:

      616|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
      617|     mergedValue =
         |     ^
      618|       if isDefined then

   … while evaluating the option `environment.etc.dbus-1.source':

   … while evaluating the attribute 'value'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:585:9:

      584|     in warnDeprecation opt //
      585|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
         |         ^
      586|         inherit (res.defsFinal') highestPrio;

   … while evaluating anonymous lambda

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:171:72:

      170|           # For definitions that have an associated option
      171|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
         |                                                                        ^
      172|

   … from call site

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:304:20:

      303|               then recurse (path ++ [name]) value
      304|               else f (path ++ [name]) value;
         |                    ^
      305|         in mapAttrs g set;

   … while evaluating 'g'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:301:19:

      300|           g =
      301|             name: value:
         |                   ^
      302|             if isAttrs value && cond value

   … from call site

   … while evaluating 'escapeShellArg'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings.nix:318:20:

      317|   */
      318|   escapeShellArg = arg: "'${replaceStrings ["'"] ["'\\''"] (toString arg)}'";
         |                    ^
      319|

   … from call site

   … while evaluating 'concatMapStringsSep'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings.nix:110:5:

      109|     # List of input strings
      110|     list: concatStringsSep sep (map f list);
         |     ^
      111|

   … from call site

   at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:54:43:

       53|     mkdir -p "$out/etc"
       54|     ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
         |                                           ^
       55|       "makeEtcEntry"

   … while evaluating anonymous lambda

   at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:54:33:

       53|     mkdir -p "$out/etc"
       54|     ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
         |                                 ^
       55|       "makeEtcEntry"

   … from call site

   … while evaluating 'concatMapStringsSep'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings.nix:110:5:

      109|     # List of input strings
      110|     list: concatStringsSep sep (map f list);
         |     ^
      111|

   … from call site

   at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:54:7:

       53|     mkdir -p "$out/etc"
       54|     ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
         |       ^
       55|       "makeEtcEntry"

   … while evaluating the attribute 'buildCommand' of the derivation 'etc'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating the attribute 'value'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:452:44:

      451|       defnsByName' = byName "config" (module: value:
      452|           [{ inherit (module) file; inherit value; }]
         |                                            ^
      453|         ) configs;

   … while evaluating 'dischargeProperties'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:669:25:

      668|   */
      669|   dischargeProperties = def:
         |                         ^
      670|     if def._type or "" == "merge" then

   … from call site

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:598:137:

      597|         defs' = concatMap (m:
      598|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
         |                                                                                                                                         ^
      599|         ) defs;

   … while evaluating definitions from `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix':

   … while evaluating anonymous lambda

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:597:28:

      596|         # Process mkMerge and mkIf properties.
      597|         defs' = concatMap (m:
         |                            ^
      598|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

   … from call site

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:597:17:

      596|         # Process mkMerge and mkIf properties.
      597|         defs' = concatMap (m:
         |                 ^
      598|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

   … while evaluating the attribute 'values'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:710:7:

      709|     in {
      710|       values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
         |       ^
      711|       inherit highestPrio;

   … while evaluating the attribute 'values'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:611:9:

      610|       in {
      611|         values = defs''';
         |         ^
      612|         inherit (defs'') highestPrio;

   … while evaluating the attribute 'mergedValue'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:617:5:

      616|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
      617|     mergedValue =
         |     ^
      618|       if isDefined then

   … while evaluating the option `system.activationScripts.etc.text':

   … while evaluating the attribute 'value'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:585:9:

      584|     in warnDeprecation opt //
      585|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
         |         ^
      586|         inherit (res.defsFinal') highestPrio;

   … while evaluating anonymous lambda

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:171:72:

      170|           # For definitions that have an associated option
      171|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
         |                                                                        ^
      172|

   … from call site

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:304:20:

      303|               then recurse (path ++ [name]) value
      304|               else f (path ++ [name]) value;
         |                    ^
      305|         in mapAttrs g set;

   … while evaluating 'g'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:301:19:

      300|           g =
      301|             name: value:
         |                   ^
      302|             if isAttrs value && cond value

   … from call site

   … while evaluating the attribute 'text'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:9:5:

        8|   addAttributeName = mapAttrs (a: v: v // {
        9|     text = ''
         |     ^
       10|       #### Activation script snippet ${a}:

   … while evaluating 'id'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:14:5:

       13|     # The value to return
       14|     x: x;
         |     ^
       15|

   … from call site

   … while evaluating 'textClosureMap'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings-with-deps.nix:75:35:

       74|
       75|   textClosureMap = f: predefined: names:
         |                                   ^
       76|     concatStringsSep "\n" (map f (textClosureList predefined names));

   … from call site

   at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:49:9:

       48|
       49|       ${textClosureMap id (withDrySnippets) (attrNames withDrySnippets)}
         |         ^
       50|

   … while evaluating 'systemActivationScript'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:20:33:

       19|
       20|   systemActivationScript = set: onlyDry: let
         |                                 ^
       21|     set' = mapAttrs (_: v: if isString v then (noDepEntry v) // { supportsDryActivation = false; } else v) set;

   … from call site

   at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:136:18:

      135|       apply = set: set // {
      136|         script = systemActivationScript set false;
         |                  ^
      137|       };

   … while evaluating the attribute 'system.activationScripts.script'

   at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:136:9:

      135|       apply = set: set // {
      136|         script = systemActivationScript set false;
         |         ^
      137|       };

   … while evaluating the attribute 'activationScript' of the derivation 'nixos-system-nixos-21.11.335288.3ddd960a3b5'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating the attribute 'exportReferencesGraph' of the derivation 'closure-info'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating the attribute 'buildCommand' of the derivation 'squashfs.img'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

   … while evaluating the attribute 'sources' of the derivation 'nixos-21.11.335288.3ddd960a3b5-i686-linux.iso'

   at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

      204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
      205|       name =
         |       ^
      206|         let

Hmm, maybe instantiate the same config but for x86_64-linux. I hope dependencies are similar

Looking at your trace: gnupg seems to be relevant

Thanks for the suggestions!
Doing the instantiate for i686 works, and leads to the closure list.
I used nix-tree on that.
efi-directory > polkit > spidermonkey > rust bootstrap
disabling polkit and udisks2 (it pulls in polkit) fixes it.

security.polkit.enable = false;
services.udisks2.enable = false;

Which gives me a higher up error:

$ nix-instantiate '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix --show-trace
error: Unsupported architecture

       … while evaluating the attribute 'buildCommand' of the derivation 'efi-directory'

       at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

          204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          205|       name =
             |       ^
          206|         let

       … while evaluating the attribute 'buildCommand' of the derivation 'efi-image_eltorito'

       at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

          204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          205|       name =
             |       ^
          206|         let

       … while evaluating the attribute 'sources' of the derivation 'nixos-21.11.335288.3ddd960a3b5-i686-linux.iso'

       at /nix/store/29613iy7zr7hdj06pq8lgp7sbv58n6jx-nixos-21.11.335288.3ddd960a3b5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:

          204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          205|       name =
             |       ^
          206|         let

I wonder if disabling EFI support could fix it, but I’m not sure how to do that.

I wonder if disabling EFI support could fix it, but I’m not sure how to do that.

I wonder if that new i586 is good with UEFI…

Maaybe that?

isoImage.makeEfiBootable = mkForce false;
1 Like

Yes, that fixed it. Compilation starts now.
It eventually fails while building syslinux with:

gcc -MT zlib/adler32.o -MD -MF zlib/.adler32.o.d -Os -march=i386 -falign-functions=0 -falign-jumps=0 -falign-labels=0 -ffast-math -fomit-frame-pointer -malign-functions=0 -malign-jumps=0 -malign-labels=0 -malign-loops=0 -g -D__COM32__ -D__FIRMWARE_BIOS__ >
/nix/store/vfai0jim0db67nk9rd7ziq29jxb5n79n-bash-5.1-p8/bin/bash: line 1: gcc: command not found

In the VM workaround I discovered that keeping nixpkgs.localSystem.system on “i686” results in a i686 kernel so that’s no good. Trying to change it to i586-linux causes the nix evaluation to fail.
But instead nixpkgs.crossSystem.system can be used. Additionally the nix option “filter-syscalls” needs to be set to false (using “nix.extraOptions”).
This got me pretty far along, but it fails while trying to compile perl.
The error given is “Can’t load module Fnctl, dynamic loading not available in this perl.”

«Cross-compiling Perl» brings rough associations that are not good… Do I undestand correctly that syslinux failure is also under cross-compilation? Maybe trying to make a minimal failing example of syslinux cross-compilation failing could be a check. But I have not used much of a cross compilation (or syslinux) for a long time.

Do I undestand correctly that syslinux failure is also under cross-compilation?

That’s correct. Compilation also failed with nixpkgs.localSystem but I can’t remember why. I didn’t investigate that further as I don’t think that it will give me a i586 kernel.
Though I’ve given up at this point, this is clearly not a well traveled path :stuck_out_tongue:

edit: Tried again with nixpkgs.localSystem and it’s the same syslinux error