Skip to content

moneydance: restrict supported platforms to linux#312409

Merged
wegank merged 1 commit intoNixOS:masterfrom
RaghavSood:moneydance/no-darwin
May 17, 2024
Merged

moneydance: restrict supported platforms to linux#312409
wegank merged 1 commit intoNixOS:masterfrom
RaghavSood:moneydance/no-darwin

Conversation

@RaghavSood
Copy link
Member

@RaghavSood RaghavSood commented May 17, 2024

Description of changes

This removes Darwin from the supported platforms for moneydance.

#306372 unintentionally breaks the package set evaluation (in some cases, I'm not quite sure what triggers it) for aarch64-darwin (see logs)

Before
raghavsood@r-mbp-a15> nix-build -A moneydance                                                                                                                                ~/r/local/dev/github.com/RaghavSood/nixpkgs
error:
       … in the condition of the assert statement
     at /Users/raghavsood/r/local/dev/github.com/RaghavSood/nixpkgs/lib/customisation.nix:365:17:

      364|     in commonAttrs // {
      365|       drvPath = assert condition; drv.drvPath;
         |                 ^
      366|       outPath = assert condition; drv.outPath;

   … while evaluating the attribute 'handled'

     at /Users/raghavsood/r/local/dev/github.com/RaghavSood/nixpkgs/pkgs/stdenv/generic/check-meta.nix:507:7:

      506|       # or, alternatively, just output a warning message.
      507|       handled =
         |       ^
      508|         (

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

   error: Package ‘moneydance-2024.1_5118’ in /Users/raghavsood/r/local/dev/github.com/RaghavSood/nixpkgs/pkgs/by-name/mo/moneydance/package.nix:53 has an unfree license (‘unfree’), refusing to evaluate.

   a) To temporarily allow unfree packages, you can use an environment variable
      for a single invocation of the nix tools.

        $ export NIXPKGS_ALLOW_UNFREE=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.allowUnfree = true; }
   in configuration.nix to override this.

   Alternatively you can configure a predicate to allow specific packages:
     { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
         "moneydance"
       ];
     }

   c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
     { allowUnfree = true; }
   to ~/.config/nixpkgs/config.nix.
After
raghavsood@r-mbp-a15> NIXPKGS_ALLOW_UNFREE=1 nix-build -A moneydance                                                                                                     ~/r/local/dev/github.com/RaghavSood/nixpkgs
error:
       … in the condition of the assert statement
     at /Users/raghavsood/r/local/dev/github.com/RaghavSood/nixpkgs/lib/customisation.nix:365:17:

      364|     in commonAttrs // {
      365|       drvPath = assert condition; drv.drvPath;
         |                 ^
      366|       outPath = assert condition; drv.outPath;

   … while evaluating the attribute 'handled'

     at /Users/raghavsood/r/local/dev/github.com/RaghavSood/nixpkgs/pkgs/stdenv/generic/check-meta.nix:507:7:

      506|       # or, alternatively, just output a warning message.
      507|       handled =
         |       ^
      508|         (

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

   error: Package ‘moneydance-2024.1_5118’ in /Users/raghavsood/r/local/dev/github.com/RaghavSood/nixpkgs/pkgs/by-name/mo/moneydance/package.nix:53 is not available on the requested hostPlatform:
     hostPlatform.config = "aarch64-apple-darwin"
     package.meta.platforms = [
       "aarch64-linux"
       "armv5tel-linux"
       "armv6l-linux"
       "armv7a-linux"
       "armv7l-linux"
       "i686-linux"
       "loongarch64-linux"
       "m68k-linux"
       "microblaze-linux"
       "microblazeel-linux"
       "mips-linux"
       "mips64-linux"
       "mips64el-linux"
       "mipsel-linux"
       "powerpc64-linux"
       "powerpc64le-linux"
       "riscv32-linux"
       "riscv64-linux"
       "s390-linux"
       "s390x-linux"
       "x86_64-linux"
     ]
     package.meta.badPlatforms = [ ]
   , 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.05 Release Notes (or backporting 23.05 and 23.11 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.

@RaghavSood RaghavSood requested a review from philiptaron May 17, 2024 09:46
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

tested

NIXPKGS_ALLOW_UNFREE=1 nix-instantiate  -A moneydance --show-trace --argstr system aarch64-darwin

does not abort and crash eval.

Comment on lines +56 to +57
# Darwin refers to Zulu Java, which breaks the evaluation of this derivation
# for some reason
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zulu java doesn't seem have an argument named openjfx, which seems to be causing the error.

 error: function 'anonymous lambda' called with unexpected argument 'openjfx'

       at /Users/anna/src/nix.1/pkgs/development/compilers/zulu/common.nix:1:1:

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels May 17, 2024
@RaghavSood
Copy link
Member Author

I would want to get this in before 24.05 - the breakage is inconsistent for me (I can run nixpkgs-review for some packages, but some fail to evaluate), and I'm not sure what the broader consequences of this are

cc @NixOS/nixos-release-managers

@wegank wegank merged commit 32557ea into NixOS:master May 17, 2024
@RaghavSood RaghavSood deleted the moneydance/no-darwin branch May 17, 2024 12:04
@philiptaron
Copy link
Contributor

Thank you @RaghavSood!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants