Conversation
|
I guess I'm not endorsing this, as calling |
| # LM Studio ships Scripts inside the App Bundle, which may be messed up by standard fixups | ||
| dontFixup = true; | ||
|
|
||
| # undmg doesn't support APFS and 7zz does break the xattr. Took that approach from https://github.com/NixOS/nixpkgs/blob/a3c6ed7ad2649c1a55ffd94f7747e3176053b833/pkgs/by-name/in/insomnia/package.nix#L52 |
There was a problem hiding this comment.
@wegank We should probably avoid 7zz because of this. Also we can't cross compile to darwin anyway so this shouldn't make things worse.
There was a problem hiding this comment.
Cross-compiling to Darwin is a stretch goal for 25.11 (see #405893). What is the issue with xattrs?
There was a problem hiding this comment.
I think @Prince213 meant #372738 (comment), although that doesn't really justify switching to hdiutil in airbuddy, aldente, or wechat in #416709.
There was a problem hiding this comment.
Wait a sec, it seems that lmstudio does work with _7zz on my machine?
There was a problem hiding this comment.
I think @Prince213 meant #372738 (comment), although that doesn't really justify switching to hdiutil in
airbuddy,aldente, or
Yes I'm worried about the xattrs issue.
I think it may be better if we have this in fetchzip as nativeBuildInputs.
If we allow networking for FODs it should also be okay to allow relaxed sandbox.
What do you think @reckenrode and @wegank?
There was a problem hiding this comment.
But with fetchurl I would probably call /usr/bin/hdiutil in a normal derivation, I guess?
There was a problem hiding this comment.
Doesn't feel right. It's not really part of the build process, just part of the unpackPhase.
There was a problem hiding this comment.
The Nix store does not support xattrs so I don't think workarounds to keep them are a good idea. They will fundamentally break in cached NARs etc. That would need fixing on the Nix end.
There was a problem hiding this comment.
What do you think @reckenrode and @wegank?
As @emilazy notes, the store doesn’t support xattrs. While a local build may be able to preserve them, a cached download from Hydra won’t have them.
The problem here is upstream apparently signed everything in their app bundle, including non-binaries. macOS supports that; the signatures are stored in xattrs. Unfortunately, the store doesn’t support xattrs. 🫤
undmg doesn't support extracting .dmg files using APFS, so we need hdiutil to extract.
Upstream issue: matthewbauer/undmg#4
Implementation is adapted from
nixpkgs/pkgs/by-name/in/insomnia/package.nix
Lines 52 to 68 in 5d77675
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.