Skip to content

moneydance: 2023.3_5064 -> 2024.1_5118#306372

Merged
thiagokokada merged 1 commit intoNixOS:masterfrom
philiptaron:moneydance
May 14, 2024
Merged

moneydance: 2023.3_5064 -> 2024.1_5118#306372
thiagokokada merged 1 commit intoNixOS:masterfrom
philiptaron:moneydance

Conversation

@philiptaron
Copy link
Contributor

@philiptaron philiptaron commented Apr 23, 2024

Description of changes

Changelog: https://infinitekind.com/stabledl/2024_5118/changelog.txt

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.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Apr 23, 2024
Copy link
Contributor

@lucasbergman lucasbergman left a comment

Choose a reason for hiding this comment

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

Brilliant, @philiptaron, thanks for the update. (Pity they made the version numbering inconsistent for URL construction.) Just a couple of things:

  1. Could you please split the version update and the AA change into two commits (this is feedback I got when I first uploaded this package)
  2. Consider sticking the antialias-related system properties with the rest of the JRE command line construction

Thanks again.

Copy link
Contributor

@thiagokokada thiagokokada left a comment

Choose a reason for hiding this comment

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

I think this kind of setting should be done at the system level at your configuration instead of by application (like e.g.: theme settings), otherwise we will have lots of applications applying anti-aliasing in different ways.

I can also think that users that don't want anti-aliasing would be really annoyed if some random application is applying anti-aliasing for them.

@lucasbergman
Copy link
Contributor

I think this kind of setting should be done at the system level at your configuration instead of by application...

Hm, upon rethinking it, I think I agree with @thiagokokada overall here. I didn't know (I don't use Java GUIs much anymore except Moneydance), but a user can set _JAVA_OPTIONS in the environment on NixOS and get this kind of behavior globally.

@philiptaron Could you whittle this PR down to just the version upgrade for now? Sound reasonable?

@philiptaron
Copy link
Contributor Author

philiptaron commented Apr 26, 2024

Many other JavaFX applications have this setting. I don't know why it's not the default, but I do know that "looks gross by default" -- and it does! -- is pretty bad.

Here are a couple PRs adding antialiasing to packages:

@philiptaron philiptaron changed the title moneydance: update to 2024.1 and turn on font antialiasing by default moneydance: update to 2024.1_5118 Apr 26, 2024
@philiptaron
Copy link
Contributor Author

Saving these lines from the original PR.

Before setting _JAVA_OPTIONS "${lib.optionalString antialiasFont "-Dswing.aatext=TRUE -Dawt.useSystemAAFontSettings=on"}"

image

After setting it.

image

Copy link
Contributor

@lucasbergman lucasbergman left a comment

Choose a reason for hiding this comment

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

Many thanks

@ofborg ofborg bot requested a review from lucasbergman April 26, 2024 19:08
@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Apr 27, 2024
@philiptaron
Copy link
Contributor Author

@thiagokokada, mind taking another look?

Copy link
Member

@leona-ya leona-ya left a comment

Choose a reason for hiding this comment

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

Can you please change the commit message to moneydance: 2023.3_5064 -> 2024.1_5118

@philiptaron philiptaron changed the title moneydance: update to 2024.1_5118 moneydance: 2023.3_5064 -> 2024.1_5118 May 14, 2024
@philiptaron philiptaron requested a review from leona-ya May 14, 2024 14:45
@ofborg ofborg bot requested a review from lucasbergman May 14, 2024 15:15
@thiagokokada thiagokokada merged commit 28c6709 into NixOS:master May 14, 2024
@philiptaron philiptaron deleted the moneydance branch May 14, 2024 16:31
@RaghavSood
Copy link
Member

RaghavSood commented May 15, 2024

This appears to have broken evaluation for the package set on at least aarch64-darwin

aarch64-darwin logs
raghavsood@r-mbp-a15> nix-shell -p nixpkgs-review --run "GITHUB_TOKEN=$TOKEN nixpkgs-review pr --post-result 311861"                       ~/r/local/dev/github.com/RaghavSood/nixpkgs
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/311861/head:refs/nixpkgs-review/1
From https://github.com/NixOS/nixpkgs
   6b5afbf413cd..979dd1308ebc  master                -> refs/nixpkgs-review/0
   1fe8866947ce..351274bf946b  refs/pull/311861/head -> refs/nixpkgs-review/1
$ git worktree add /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs 979dd1308ebc574742d466941dd65b9f2544f085
Preparing worktree (detached HEAD 979dd1308ebc)
Updating files: 100% (41042/41042), done.
HEAD is now at 979dd1308ebc Merge pull request #311842 from r-ryantm/auto-update/cargo-expand
$ nix-env --extra-experimental-features no-url-literals --option system aarch64-darwin -f /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs -qaP --xml --out-path --show-trace --no-allow-import-from-derivation
error:
       … while querying the derivation named 'moneydance-2024.1_5118'
   … in the condition of the assert statement

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/lib/customisation.nix:352:23:

      351|             drvPath = assert condition; drv.${outputName}.drvPath;
      352|             outPath = assert condition; drv.${outputName}.outPath;
         |                       ^
      353|           } //

   … from call site

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:565:14:

      564|   };
      565|   validity = checkMeta.assertValidity { inherit meta attrs; };
         |              ^
      566|

   … while calling 'assertValidity'

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/pkgs/stdenv/generic/check-meta.nix:501:20:

      500|
      501|   assertValidity = { meta, attrs }: let
         |                    ^
      502|       validity = checkValidity attrs;

   … from call site

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/pkgs/stdenv/generic/check-meta.nix:502:18:

      501|   assertValidity = { meta, attrs }: let
      502|       validity = checkValidity attrs;
         |                  ^
      503|       inherit (validity) valid;

   … while calling anonymous lambda

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/pkgs/stdenv/generic/check-meta.nix:400:5:

      399|     in
      400|     attrs:
         |     ^
      401|     # Check meta attribute types first, to make sure it is always called even when there are other issues

   … from call site

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/pkgs/stdenv/generic/check-meta.nix:404:13:

      403|     let
      404|       res = checkMeta (attrs.meta or {});
         |             ^
      405|     in

   … while calling 'checkMeta'

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/pkgs/stdenv/generic/check-meta.nix:375:15:

      374|       [ "key 'meta.${k}' is unrecognized; expected one of: \n  [${concatMapStringsSep ", " (x: "'${x}'") (attrNames metaTypes)}]" ];
      375|   checkMeta = meta: optionals config.checkMeta (concatMap (attr: checkMetaAttr attr meta.${attr}) (attrNames meta));
         |               ^
      376|

   … from call site

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/pkgs/stdenv/generic/check-meta.nix:375:21:

      374|       [ "key 'meta.${k}' is unrecognized; expected one of: \n  [${concatMapStringsSep ", " (x: "'${x}'") (attrNames metaTypes)}]" ];
      375|   checkMeta = meta: optionals config.checkMeta (concatMap (attr: checkMetaAttr attr meta.${attr}) (attrNames meta));
         |                     ^
      376|

   … while calling 'optionals'

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/lib/lists.nix:820:5:

      819|     cond:
      820|     elems: if cond then elems else [];
         |     ^
      821|

   … while calling anonymous lambda

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/pkgs/stdenv/generic/check-meta.nix:375:60:

      374|       [ "key 'meta.${k}' is unrecognized; expected one of: \n  [${concatMapStringsSep ", " (x: "'${x}'") (attrNames metaTypes)}]" ];
      375|   checkMeta = meta: optionals config.checkMeta (concatMap (attr: checkMetaAttr attr meta.${attr}) (attrNames meta));
         |                                                            ^
      376|

   … from call site

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/pkgs/stdenv/generic/check-meta.nix:375:66:

      374|       [ "key 'meta.${k}' is unrecognized; expected one of: \n  [${concatMapStringsSep ", " (x: "'${x}'") (attrNames metaTypes)}]" ];
      375|   checkMeta = meta: optionals config.checkMeta (concatMap (attr: checkMetaAttr attr meta.${attr}) (attrNames meta));
         |                                                                  ^
      376|

   … while calling anonymous lambda

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/pkgs/stdenv/generic/check-meta.nix:365:9:

      364|     metaTypes' = mapAttrs (_: t: t.verify) metaTypes;
      365|   in k: v:
         |         ^
      366|     if metaTypes?${k} then

   … from call site

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/pkgs/stdenv/generic/check-meta.nix:367:10:

      366|     if metaTypes?${k} then
      367|       if metaTypes'.${k} v then
         |          ^
      368|         [ ]

   … while calling anonymous lambda

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/pkgs/stdenv/generic/meta-types.nix:66:12:

       65|       if t == self.any then isList
       66|       else v: isList v && all verify v;
         |            ^
       67|   };

   … from call site

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/lib/trivial.nix:895:7:

      894|     { # TODO: Should we add call-time "type" checking like built in?
      895|       __functor = self: f;
         |       ^
      896|       __functionArgs = args;

   … while calling anonymous lambda

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/lib/customisation.nix:144:34:

      143|       # Re-call the function but with different arguments
      144|       overrideArgs = mirrorArgs (newArgs: makeOverridable f (overrideWith newArgs));
         |                                  ^
      145|       # Change the result of the function call by applying g to it

   … from call site

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/lib/trivial.nix:895:7:

      894|     { # TODO: Should we add call-time "type" checking like built in?
      895|       __functor = self: f;
         |       ^
      896|       __functionArgs = args;

   … while calling anonymous lambda

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/lib/customisation.nix:136:17:

      135|     in
      136|     mirrorArgs (origArgs:
         |                 ^
      137|     let

   … from call site

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/lib/customisation.nix:138:16:

      137|     let
      138|       result = f origArgs;
         |                ^
      139|

   … while calling anonymous lambda

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/pkgs/development/compilers/zulu/22.nix:1:1:

        1| { callPackage
         | ^
        2| , enableJavaFX ? false

   … from call site

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/pkgs/development/compilers/zulu/22.nix:6:1:

        5|
        6| callPackage ./common.nix ({
         | ^
        7|   # Details from https://www.azul.com/downloads/?version=java-22-lts&package=jdk

   … while calling 'callPackageWith'

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/lib/customisation.nix:212:35:

      211|   */
      212|   callPackageWith = autoArgs: fn: args:
         |                                   ^
      213|     let

   … from call site

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/lib/trivial.nix:895:7:

      894|     { # TODO: Should we add call-time "type" checking like built in?
      895|       __functor = self: f;
         |       ^
      896|       __functionArgs = args;

   … while calling anonymous lambda

     at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/lib/customisation.nix:136:17:

      135|     in
      136|     mirrorArgs (origArgs:
         |                 ^
      137|     let

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

   at /Users/raghavsood/.cache/nixpkgs-review/pr-311861/nixpkgs/pkgs/development/compilers/zulu/common.nix:1:1:

        1| { lib
         | ^
        2| , stdenv

@philiptaron
Copy link
Contributor Author

@RaghavSood -- evidently, on Darwin, the openjdk22 package evaluates to pkgs/development/compilers/zulu/22.nix rather than the openjdk22 expression from pkgs/development/compilers/openjdk/22.nix

Let's fix it in a hacky way:

diff --git a/pkgs/by-name/mo/moneydance/package.nix b/pkgs/by-name/mo/moneydance/package.nix
index 0c86365380f4..11803fc7845e 100644
--- a/pkgs/by-name/mo/moneydance/package.nix
+++ b/pkgs/by-name/mo/moneydance/package.nix
@@ -1,10 +1,10 @@
 { lib, stdenv, fetchzip, makeWrapper, openjdk22, openjfx22, jvmFlags ? [ ] }:
 let
   openjfx = openjfx22;
+  openjfxAvailable = !stdenv.isDarwin;
   jdk = openjdk22.override {
     enableJavaFX = true;
-    inherit openjfx;
-  };
+  } // lib.optionalAttrs openjfxAvailable { inherit openjfx; };
 in
 stdenv.mkDerivation (finalAttrs: {
   pname = "moneydance";
@@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: {
   };

   nativeBuildInputs = [ makeWrapper ];
-  buildInputs = [ jdk openjfx ];
+  buildInputs = [ jdk ] ++ lib.optionals openjfxAvailable [ openjfx ];

   # Note the double escaping in the call to makeWrapper. The escapeShellArgs
   # call quotes each element of the flags list as a word[1] and returns a

But we get another error:

trying https://cdn.azul.com/zulu/bin/zulu22.28.91-ca-fx-jdk22.0.0-macosx_aarch64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  275M  100  275M    0     0  49.1M      0  0:00:05  0:00:05 --:--:-- 54.3M
error: hash mismatch in fixed-output derivation '/nix/store/x4dl5y9010hrjyr12j0h8h26nig1gf0w-zulu22.28.91-ca-fx-jdk22.0.0-macosx_aarch64.tar.gz.drv':
         specified: sha256-o0VkWB4+PzBmNNWy+FZlyjTgukBTe6owfydb3YNfEE0=
            got:    sha256-256UP6MtUReQYqCKVt0ThN9BVDyKLAMXQTdpcDB9t24=

So there is more awry in the Java-on-MacOS than just this.

@RaghavSood
Copy link
Member

Perhaps it's worth it to remove darwin as a support platform for this until it can be addressed.

I'm not familiar enough with our Java handling to give it a shot or suggest a more practical workaround for now, unfortunately.

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: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants