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

high-tide: init at 0.1.0 #370085

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TotalTaxAmount
Copy link
Contributor

closes: #369825

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.

@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Jan 2, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Jan 2, 2025
preFixup = ''
gappsWrapperArgs+=(
# XDG_CACHE_HOME needs to be set, or high-tide will save images to its working dir.
--prefix XDG_CACHE_HOME : "/tmp"
Copy link
Member

@griffi-gh griffi-gh Jan 18, 2025

Choose a reason for hiding this comment

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

Everything else seems okay but...

Should we be overriding this? (i assume most DEs would set it automatically?)

But even then, as per XDG specs XDG_CACHE should probably point to a directory in ~/.cache and not /tmp?

Copy link
Member

Choose a reason for hiding this comment

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

This would also lead to the client re-downloading the images on every boot if /tmp is mounted on top of tmpfs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

XDG_CACHE_HOME wasn't set for me on Hyprland, I could move it to .cache though I wasn't sure if $HOME/.cache is the correct "nix" way to do that or if there is a nix way to get the user home dir

Copy link
Member

@griffi-gh griffi-gh Jan 19, 2025

Choose a reason for hiding this comment

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

yea it's not set for me either.. hmm
i think that /tmp is okay as well, but $HOME/.cache is probably preferable over that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

with

gappsWrapperArgs+=(
      # XDG_CACHE_HOME needs to be set, or high-tide will save images to its working dir.
      --prefix XDG_CACHE_HOME : "$HOME/.cache"
    )

High tide crashes with:

./HighTide           
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Traceback (most recent call last):
  File "/nix/store/2afapcyiwmmxp13281n58xhvq8rrxnzb-high-tide-0.1.0/bin/.HighTide-wrapped", line 46, in <module>
    sys.exit(main.main(VERSION))
             ^^^^^^^^^^^^^^^^^^
  File "/nix/store/2afapcyiwmmxp13281n58xhvq8rrxnzb-high-tide-0.1.0/share/HighTide/high_tide/main.py", line 140, in main
    app = TidalApplication()
          ^^^^^^^^^^^^^^^^^^
  File "/nix/store/2afapcyiwmmxp13281n58xhvq8rrxnzb-high-tide-0.1.0/share/HighTide/high_tide/main.py", line 47, in __init__
    variables.init()
  File "/nix/store/2afapcyiwmmxp13281n58xhvq8rrxnzb-high-tide-0.1.0/share/HighTide/high_tide/lib/variables.py", line 28, in init
    os.makedirs(IMG_DIR)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '/homeless-shelter'

Running strings HighTide it appears that nix is changing $HOME to /homeless-shelter:

/homeless-shelter/.cache
XDG_CACHE_HOME

This might have been the reason I made it cache in /tmp before and I just forgot. Not sure if there is a different way to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package request: high-tide
2 participants