Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qownnotes: fix build for macOS #363327

Merged
merged 1 commit into from
Dec 13, 2024
Merged

qownnotes: fix build for macOS #363327

merged 1 commit into from
Dec 13, 2024

Conversation

pbek
Copy link
Contributor

@pbek pbek commented Dec 8, 2024

This should fix the build on macOS, where there is no xvfb-run. Or is this only an issue on aarch64 darwin, @wineee?
(See pbek/QOwnNotes#2912 (comment))

But

platforms = platforms.linux;
told me there is no xvfb-run.

@sfatula, maybe you want to test this build?

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

@pbek
Copy link
Contributor Author

pbek commented Dec 8, 2024

@wineee, @sfatula, sorry for the spam because of the two broken PRs!

@github-actions github-actions 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 Dec 8, 2024
Copy link
Member

@getchoo getchoo 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 it would also be worth checking if the Darwin executable will spit out the completions without this command -- or if there is an alternative for xquartz as mentioned in the issue

pkgs/applications/office/qownnotes/default.nix Outdated Show resolved Hide resolved
@getchoo
Copy link
Member

getchoo commented Dec 9, 2024

Log
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_tl.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_fil.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_ceb.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_hi.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_hil.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_ur.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_fi.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_el.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_gl.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_no.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_da.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_ro.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_sl.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_sk.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_eu.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_sr.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_fa.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_ha.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_bg.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_is.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_pa.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_sq.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_he.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_yi.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_th.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_sn.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_km.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_si.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_zu.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_xh.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_ms.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_mi.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_ga.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_uz.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_vi.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_lv.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_ku.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_lt.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_bs.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_mk.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_ko.qm
-- Installing: /nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/share/qt6/translations/QOwnNotes_et.qm
mv: cannot stat '/nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/bin/QOwnNotes.app': No such file or directory

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 363327


aarch64-darwin

❌ 1 package failed to build:
  • qownnotes

@pbek
Copy link
Contributor Author

pbek commented Dec 9, 2024

@getchoo, so do you have Apple Silicon hardware? That's amazing! Thank you for testing!

mv: cannot stat '/nix/store/1fq8jcv4ziaf16d5c5a7748jlvgpr2j7-qownnotes-24.11.2/bin/QOwnNotes.app': No such file or directory

Yes, we just saw that in pbek/QOwnNotes#2912 (comment).

Can the paths in

# Wrap application for macOS as lowercase binary
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
mv $out/bin/${appname}.app $out/Applications
makeWrapper $out/Applications/${appname}.app/Contents/MacOS/${appname} $out/bin/${pname}
'';
be adapted to work for aarch64-darwin?

But why did it ever work on x86_64-darwin? 🤔

@wineee
Copy link
Member

wineee commented Dec 9, 2024

@ofborg build qownnotes

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Dec 9, 2024
@ofborg ofborg bot requested a review from totoroot December 9, 2024 13:38
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin labels Dec 9, 2024
@getchoo
Copy link
Member

getchoo commented Dec 9, 2024

But why did it ever work on x86_64-darwin? 🤔

Seems it doesn't anymore

My guess is that is the .app bundle is actually in $out/${appname}.app rather than mv $out/bin/${appname}.app

@pbek
Copy link
Contributor Author

pbek commented Dec 9, 2024

@ofborg build qownnotes

@pbek
Copy link
Contributor Author

pbek commented Dec 9, 2024

I played around in a GitHub workflow, the build should work now, including shell completion.
https://github.com/pbek/QOwnNotes/actions/runs/12243377462

@wineee wineee merged commit 27eaf78 into NixOS:master Dec 13, 2024
45 of 46 checks passed
@pbek
Copy link
Contributor Author

pbek commented Dec 13, 2024

Thank you!

@pbek pbek deleted the patch-13 branch December 13, 2024 11:56
@pbek pbek mentioned this pull request Dec 20, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants