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

emacs25Macport does not register as an OS X app on OS X #20514

Closed
TikhonJelvis opened this issue Nov 18, 2016 · 11 comments
Closed

emacs25Macport does not register as an OS X app on OS X #20514

TikhonJelvis opened this issue Nov 18, 2016 · 11 comments
Labels
0.kind: bug 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: darwin Running or building packages on Darwin 6.topic: emacs

Comments

@TikhonJelvis
Copy link
Contributor

Issue description

The Macport version of Emacs 25 builds fine, but doesn't show up in spotlight. Running the emacs command from the terminal only gets me a terminal version of Emacs, not a window.

I had an older Emacs 24 Macport package that worked correctly. I also just replaced it with the normal Emacs 25 package which did get installed properly as a Mac app, callable from Spotlight.

Steps to reproduce

Install emacs25Macport on OS X and try launching emacs from Spotlight.

Technical details

  • System: OS X 10.11.6
  • Nix version: nix-env (Nix) 1.11.2
  • Nixpkgs version: 17.03pre95548.8ef3eae
@periklis
Copy link
Contributor

@TikhonJelvis this is a known issue, but didn't have time to investigate a solution for it. In the meantime open ~/.nix-profile/Application/Emacs.app will help.

@lancelet
Copy link

I'm not sure if I'm doing something "obviously" wrong (I'm a complete Nix newbie), but on my system, the build doesn't seem to produce anything in ~/.nix-profile/Application at all.

Steps to reproduce

$ nix-env -i emacs-25.1-mac-6.0
replacing old ‘emacs-25.1-mac-6.0’
installing ‘emacs-25.1-mac-6.0’
$ ls ~/.nix-profile
Library      etc          lib          manifest.nix var
bin          include      libexec      share

I'm mainly wondering: is this the same for @TikhonJelvis, or is there something I'm missing like a basic configuration flag to enable building Mac app bundles?

System details

  • macOS 10.12.1
  • Nix version: nix-env 1.11.4
  • Nixpkgs version: 17.03pre95548.8ef3eae

@TikhonJelvis
Copy link
Contributor Author

Yes, it sounds like I had the same problem: it didn't produce an $out/Applications folder or put anything in it. The configure step does call ./configure with Mac-specific flags (--with-mac and --enable-mac-app=$$out/Applications), but this doesn't seem to do the right thing.

I spent a few hours playing around with it yesterday, but couldn't figure out what the underlying problem was.

@NeQuissimus NeQuissimus added 0.kind: bug 6.topic: darwin Running or building packages on Darwin 6.topic: emacs labels Nov 19, 2016
@sellout
Copy link
Contributor

sellout commented Feb 16, 2017

So, I am perhaps seeing a different issue, but I’ll mention it here to see.

If I install emacs via nix-env -i emacs25Macport, it works fine. However, if I use emacsWithPackages, then I only get bin/ and share/ directories in $out. It looks like a bug in emacs/wrapper.nix that it only copies over those particular directories.

@periklis
Copy link
Contributor

hey folks, i want just to link to a similar discussion (here) by homebrew users. It seems not to be a specific issue with nix or nixpkgs. The /nix/store paths as well as the symlinks on ~/.nix-profile/Applications are not searchable by spotlight. You can write you own Autormator script to open emacs and put it under /Applications.

@periklis
Copy link
Contributor

@sellout Are you sure that emacsWithPackages uses the emacs/macport-25.1.nix derivation and not emacs/default.nix?

@sellout
Copy link
Contributor

sellout commented Mar 12, 2017

@periklis I do the following to use the macport instead of default:

(let                                                                                                                                                                                                                                                                             
   customEmacs = pkgs.emacsPackagesNg.override (super: self: {                                                                                                                                                                                                                   
     emacs = pkgs.emacs25Macport;                                                                                                                                                                                                                                                
   });                                                                                                                                                                                                                                                                           
 in                                                                                                                                                                                                                                                                              
   customEmacs.emacsWithPackages (epkgs: (with epkgs.melpaPackages; [...])))                                                                                                                                                                                                                                                                

And re: ~/.nix-profile/Applications, the problem is that there is no Emacs.app even there. I run a command like https://nixos.org/wiki/Nix_on_OS_X#Configuration to put the apps in Spotlight-friendly locations.

I think I found the underlying emacsWithPackages problem and reported it as #22893, but it seems @TikhonJelvis and @lancelet are running into something else (unless they’ve similarly configured emacsWithPackages).

@periklis
Copy link
Contributor

@sellout Ok sounds we have a missing-wrapper-issue vor darwin-built binaries landing under Contents.

@mmahut
Copy link
Member

mmahut commented Aug 12, 2019

Are there any updates to this issue, please?

@stale
Copy link

stale bot commented Jun 2, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
@Atemu
Copy link
Member

Atemu commented Oct 19, 2021

emacsMacport produces $out/Applications/Emacs.app/ nowadays.

Everything else is already covered in other issues. If there's anything left, open a new one.

@Atemu Atemu closed this as completed Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: darwin Running or building packages on Darwin 6.topic: emacs
Projects
None yet
Development

No branches or pull requests

7 participants