NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.51k stars 13k forks source link

goku: cannot find /bin/joker #135425

Open alexeyre opened 2 years ago

alexeyre commented 2 years ago

Describe the bug

Error when running goku via nix-shell -p goku on a fresh install of nix on an M1 Mac with Rosetta2 installed.

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix-shell -p goku
  2. goku

Expected behavior

Goku runs, assuming that the rest of the karabiner setup is complete.

Screenshots

~/.local/dot master*
❯ nix-shell -p goku                                                                                                                              ~/.local/dot
goku
[nix-shell:~/.local/dot]$ goku
Exception in thread "main" java.io.IOException: Cannot run program "/bin/joker": error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at java.lang.Runtime.exec(Runtime.java:621)
    at clojure.java.shell$sh.invokeStatic(shell.clj:113)
    at clojure.java.shell$sh.doInvoke(shell.clj:79)
    at clojure.lang.RestFn.invoke(RestFn.java:436)
    at karabiner_configurator.core$check_edn_syntax.invokeStatic(core.clj:41)
    at karabiner_configurator.core$check_edn_syntax.invoke(core.clj:27)
    at karabiner_configurator.core$parse.invokeStatic(core.clj:142)
    at karabiner_configurator.core$parse.doInvoke(core.clj:139)
    at clojure.lang.RestFn.invoke(RestFn.java:439)
    at karabiner_configurator.core$_main.invokeStatic(core.clj:229)
    at karabiner_configurator.core$_main.doInvoke(core.clj:224)
    at clojure.lang.RestFn.invoke(RestFn.java:397)
    at clojure.lang.AFn.applyToHelper(AFn.java:152)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at karabiner_configurator.core.main(Unknown Source)
Caused by: java.io.IOException: error=2, No such file or directory
    at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_io_IOException_2_0002e_0003cinit_0003e_00028Ljava_lang_String_2_00029V(JNIJavaCallWrappers.java:0)
    at java.lang.UNIXProcess.forkAndExec(UNIXProcess.java)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
    at java.lang.ProcessImpl.start(ProcessImpl.java:134)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    ... 15 more

Additional context

Errors goes away once goku is installed via brew, as it automatically installs joker and the nix-shell goku finds and uses that instead, but does not go away when running nix-shell -p goku joker assuming neither are installed via brew.

Notify maintainers

@nikitavoloboev

Metadata

 - system: `"aarch64-darwin"`
 - host os: `Darwin 21.0.0, macOS 12.0`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.4pre20210802_47e96bb`
 - channels(root): `"nixpkgs-21.11pre310022.14b0f20fa1f"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
- goku
# a list of nixos modules affected by the problem
module:
Synthetica9 commented 2 years ago

Source of the problem found here: https://github.com/yqrashawn/GokuRakuJoudo/blob/0186eee673da967046631e34d929d39f4651c853/src/karabiner_configurator/core.clj#L40

Should be relatively easy to force it to always use our joker, but I don't have a Mac and I don't know Clojure

stale[bot] commented 2 years ago

I marked this as stale due to inactivity. → More info