!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

741 Members
141 Servers

Load older messages


SenderMessageTime
26 Sep 2023
@jon.reeve:matrix.orgJonathan Reeve I can install emacs-plus for instance by adding it to homebrew.brews, and I can verify that which emacs points to /opt/homebrew/bin/emacs, but that's all I can find 22:57:02
@reckenrode:matrix.orgRandy Eckenrode find /opt/homebrew -name Emacs.app returns nothing? 22:59:29
@reckenrode:matrix.orgRandy Eckenrode Looking at the formula, it apparently installs the app bundle in #{prefix}/Emacs.app. I guess that’s in the store somewhere and symlinked? 23:00:09
@jon.reeve:matrix.orgJonathan Reeve It's in /opt/homebrew/Cellar/emacs-plus@29/29.1/Emacs.app, and I can run it with emacs on the command line, but it doesn't show up in Spotlight 23:01:59
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/d12frosted/homebrew-emacs-plus/blob/4a9d9d7fbda87ab40fffa62610b449b5fd038bc7/Formula/emacs-plus%4029.rb#L265_L27723:04:06
@reckenrode:matrix.orgRandy Eckenrode Assuming that’s the right formula, I assume the caveat is not being shown or is suppressed during activation. It seems you’re supposed to manually symlink it from there to /Applications. 23:04:51
@jon.reeve:matrix.orgJonathan ReeveAhhhh OK. Mystery solved. 23:07:22
27 Sep 2023
@mib:kanp.aimib 🥐 changed their display name from mib to mib 🥐.05:53:09
@rdtechie:matrix.orgRichard Diphoorn joined the room.10:11:38
@k0kada:matrix.orgk0kada (he/him)Hey folks, need some help in this PR: https://github.com/NixOS/nixpkgs/pull/257433/16:12:49
@k0kada:matrix.orgk0kada (he/him)https://github.com/NixOS/nixpkgs/pull/257433/files#diff-02e244126dc8858978341ddfd5a9b23e3f12154659534cf3590a5201644f2265R202-R20316:13:12
@k0kada:matrix.orgk0kada (he/him)Basically, for some reason it seems that inside the builder in GraalVM, the C compiler can't see the macOS libraries like Foundation16:13:52
@k0kada:matrix.orgk0kada (he/him) It can't find the Foundation/Foundation.h for example 16:14:02
@k0kada:matrix.orgk0kada (he/him)

I did the following hack and wrapped the native-image binary with it. This got it to go further (still fails), but it is clear that this is wrong:

  darwin-cc = with darwin.apple_sdk.frameworks; (writeShellScriptBin "cc"
    ''${stdenv.cc}/bin/cc -F ${CoreFoundation}/Library/Frameworks -F ${Foundation}/Library/Frameworks "$@"''
  );

16:15:13
@k0kada:matrix.orgk0kada (he/him)I am trying to understand how those libraries works in the context of macOS, e.g.: how does the compiler knows where to search the libraries?16:19:25
@reckenrode:matrix.orgRandy Eckenrode Adding frameworks to buildInputs should add the appropriate framework search paths to NIX_CFLAGS_COMPILE. 16:22:32
@k0kada:matrix.orgk0kada (he/him)I see, so the only thing I can think is that native-image is cleaning the environment for some reason16:24:20
@k0kada:matrix.orgk0kada (he/him) This used to work (adding Foundation to propagatedBuildInputs), so I am assuming this is something they did in this new version 16:24:44
@reckenrode:matrix.orgRandy EckenrodeIt would be strange for an upstream project to clobber Nix build variables.16:25:40
@k0kada:matrix.orgk0kada (he/him)What I was thinking is their just cleaning all variables to set the environment manually16:26:22
@k0kada:matrix.orgk0kada (he/him)Or something like this16:26:25
@k0kada:matrix.orgk0kada (he/him)Let me try to create a wrapper and try to dump what the wrapper can see16:26:41
@k0kada:matrix.orgk0kada (he/him)

One think for sure is that it is using the wrapped compiler:

Error: Error compiling query code (in /var/folders/zf/6dxm00pn1xx19sg7cbkk4dqm00009d/T/SVM-3772678470445595386/PosixDirectives.c). Compiler command '/nix/store/adnfb3qi50jn2cqbp8g524rm6mxcwhz7-clang-wrapper-11.1.0/bin/cc -Wall -Werror -Wno-tautological-compare -ObjC -o /var/folders/zf/6dxm00pn1xx19sg7cbkk4dqm00009d/T/SVM-3772678470445595386/PosixDirectives /var/folders/zf/6dxm00pn1xx19sg7cbkk4dqm00009d/T/SVM-3772678470445595386/PosixDirectives.c' output included error: /var/folders/zf/6dxm00pn1xx19sg7cbkk4dqm00009d/T/SVM-3772678470445595386/PosixDirectives.c:34:10: fatal error: 'Foundation/Foundation.h' file not found
16:36:39
@k0kada:matrix.orgk0kada (he/him)
USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM=true
PWD=/private/var/folders/zf/6dxm00pn1xx19sg7cbkk4dqm00009d/T/SVM-5402244417479824549
HOME=/homeless-shelter
SHLVL=1
PATH=/nix/store/h0spdbrj0xnj684ajxfw22325wrpxb2i-cc/bin:/nix/store/adnfb3qi50jn2cqbp8g524rm6mxcwhz7-clang-wrapper-11.1.0/bin:/nix/store/n8rclk8s39lv147ka8hvlsmp459p7dqx-unzip-6.0/bin:/nix/store/rngczdw1717sqqp6hc0j3sm8szjracck-clang-11.1.0/bin:/nix/store/cf5x52z1vw9pxkwjrypxzjc006ivih3k-coreutils-9.3/bin:/nix/store/a0sn94fkr24336ipljc5g9llcdhdif82-cctools-binutils-darwin-wrapper-11.1.0-973.0.1/bin:/nix/store/zf13rw6lv61gbamlfcf4bn75wfi7l78v-cctools-binutils-darwin-11.1.0-973.0.1/bin:/nix/store/cf5x52z1vw9pxkwjrypxzjc006ivih3k-coreutils-9.3/bin:/nix/store/0idlnnlj3r5qvdi2c328qxhnasqlg7zr-findutils-4.9.0/bin:/nix/store/2y17vbm5wqss9hq0gwhx52z89x1sm3sl-diffutils-3.10/bin:/nix/store/z8y8ldjv16hx44kbhamm03i2jc43y5z3-gnused-4.9/bin:/nix/store/dh13glbrmfzysam1shbkakjjla9i51q1-gnugrep-3.11/bin:/nix/store/db8h92bj71zp9zy3npkya6c9n7vcimkz-gawk-5.2.2/bin:/nix/store/h786vhh9gw7c5zhq1pq8cxqgmzm5bgv7-gnutar-1.35/bin:/nix/store/ljk4vl7ja0pxznawh3jyxxma7vr09sh2-gzip-1.13/bin:/nix/store/d19x83q7ay3ybqzx1idgy8z19alxil6v-bzip2-1.0.8-bin/bin:/nix/store/wmgi910bjl21rc6bvfjl1hqhwdxijr98-gnumake-4.4.1/bin:/nix/store/dvk14kpsjv70jcqlj6z3izxwchka3ic3-bash-5.2-p15/bin:/nix/store/rwx19xxwfpbxck949zf9c8ysishvfvi3-patch-2.7.6/bin:/nix/store/7r4qr7w1szis7siyx5dcq22lsrzc9izp-xz-5.4.4-bin/bin:/nix/store/flc70ndgc8yxn6sn2y3xgy6dhy4a9hqm-file-5.45/bin
__CF_USER_TEXT_ENCODING=0x12D:0:0
_=/nix/store/cf5x52z1vw9pxkwjrypxzjc006ivih3k-coreutils-9.3/bin/env
/nix/store/0z0aifkg800ysw5krfnkaybdsyy6pl28-graalvm-ce-21.0.0

Yep

17:04:42
@k0kada:matrix.orgk0kada (he/him)It is cleaning the environment17:04:49
@reckenrode:matrix.orgRandy EckenrodeShouldn’t that also be causing problems on Linux?17:05:18
@k0kada:matrix.orgk0kada (he/him)I think in Linux native-image has no external deps17:18:20
@k0kada:matrix.orgk0kada (he/him)At least not at compile time17:18:26
@reckenrode:matrix.orgRandy EckenrodeAh17:18:42
@marcusramberg:matrix.orgMarcusWould be great to get https://github.com/LnL7/nix-darwin/pull/754 in, to get parity with nixpkgs fonts.packages. I see it has some conflicts by now tho.17:22:05

There are no newer messages yet.


Back to Room ListRoom Version: 6