Skip to content

wine: restore the eval on linux#347843

Merged
emilazy merged 1 commit intoNixOS:stagingfrom
trofi:wine-restore-linux-eval
Oct 11, 2024
Merged

wine: restore the eval on linux#347843
emilazy merged 1 commit intoNixOS:stagingfrom
trofi:wine-restore-linux-eval

Conversation

@trofi
Copy link
Contributor

@trofi trofi commented Oct 11, 2024

Without the change the instantiation in linux fails as:

$ nix-instantiate -A wine
error:
   … while calling the 'derivationStrict' builtin
     at <nix/derivation-internal.nix>:34:12:
       33|
       34|   strict = derivationStrict drvAttrs;
         |            ^
       35|

   … while evaluating derivation 'wine-9.0'
     whose name attribute is located at /tmp/z/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:336:7

   … while evaluating attribute 'NIX_LDFLAGS' of derivation 'wine-9.0'
     at /tmp/z/nixpkgs/pkgs/applications/emulators/wine/base.nix:121:3:
      120|   # LD_LIBRARY_PATH.
      121|   NIX_LDFLAGS = toString (map (path: "-rpath " + path) (
         |   ^
      122|       map (x: "${lib.getLib x}/lib") ([ stdenv.cc.cc ]

   (stack trace truncated; use '--show-trace' to show the full, detailed trace)

   error: Package ‘apple-sdk-14.4’ in /tmp/z/nixpkgs/pkgs/by-name/ap/apple-sdk/package.nix:111 is not available on the requested hostPlatform:
     hostPlatform.config = "i686-unknown-linux-gnu"
     package.meta.platforms = [
       "x86_64-darwin"
       "i686-darwin"
       "aarch64-darwin"
       "armv7a-darwin"
     ]
     package.meta.badPlatforms = [
       {
         cpu = {
           bits = 32;
         };
       }
     ]
   , refusing to evaluate.

   a) To temporarily allow packages that are unsupported for this system, you can use an environment variable
      for a single invocation of the nix tools.

        $ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1

      Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
            then pass `--impure` in order to allow use of environment variables.

   b) For `nixos-rebuild` you can set
     { nixpkgs.config.allowUnsupportedSystem = true; }
   in configuration.nix to override this.

   c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
     { allowUnsupportedSystem = true; }
   to ~/.config/nixpkgs/config.nix.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Without the change the instantiation in `linux` fails as:

    $ nix-instantiate -A wine
    error:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:34:12:
           33|
           34|   strict = derivationStrict drvAttrs;
             |            ^
           35|

       … while evaluating derivation 'wine-9.0'
         whose name attribute is located at /tmp/z/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:336:7

       … while evaluating attribute 'NIX_LDFLAGS' of derivation 'wine-9.0'
         at /tmp/z/nixpkgs/pkgs/applications/emulators/wine/base.nix:121:3:
          120|   # LD_LIBRARY_PATH.
          121|   NIX_LDFLAGS = toString (map (path: "-rpath " + path) (
             |   ^
          122|       map (x: "${lib.getLib x}/lib") ([ stdenv.cc.cc ]

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: Package ‘apple-sdk-14.4’ in /tmp/z/nixpkgs/pkgs/by-name/ap/apple-sdk/package.nix:111 is not available on the requested hostPlatform:
         hostPlatform.config = "i686-unknown-linux-gnu"
         package.meta.platforms = [
           "x86_64-darwin"
           "i686-darwin"
           "aarch64-darwin"
           "armv7a-darwin"
         ]
         package.meta.badPlatforms = [
           {
             cpu = {
               bits = 32;
             };
           }
         ]
       , refusing to evaluate.

       a) To temporarily allow packages that are unsupported for this system, you can use an environment variable
          for a single invocation of the nix tools.

            $ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1

          Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
                then pass `--impure` in order to allow use of environment variables.

       b) For `nixos-rebuild` you can set
         { nixpkgs.config.allowUnsupportedSystem = true; }
       in configuration.nix to override this.

       c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowUnsupportedSystem = true; }
       to ~/.config/nixpkgs/config.nix.
@emilazy emilazy merged commit db18268 into NixOS:staging Oct 11, 2024
@trofi trofi deleted the wine-restore-linux-eval branch October 11, 2024 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants