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

Can't install packages hosted on GitHub #2880

Closed
AdmnUnpwnd opened this issue Sep 4, 2015 · 26 comments
Closed

Can't install packages hosted on GitHub #2880

AdmnUnpwnd opened this issue Sep 4, 2015 · 26 comments
Labels
Challenge ! Enhancement ☺ stale marked as a stale issue/pr (usually by a bot)

Comments

@AdmnUnpwnd
Copy link

I have been using vim for a while now and decided to try Emacs. I picked Spacemacs since it's easier for a vim user to transition to.

I was able to create a package layer to install packages hosted in MELPA but when I tried installing packages hosted on GitHub using :fetcher github it gave an error: 'Package [package name] is unavailable. Is the package name misspelled?'

I've checked out the develop branch.

A few packages I tried are Emacs Webkit and haxe-complete

How do I install packages hosted on GitHub?

Edit: Here is what I have in my Haxe layer that I created in .emacs.d/contrib/!lang/haxe/packages.el

    ;;; packages.el --- haxe Layer packages File for Spacemacs
    ;;
    ;; Copyright (c) 2012-2014 Sylvain Benner
    ;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
    ;;
    ;; Author: Sylvain Benner <[email protected]>
    ;; URL: https://github.com/syl20bnr/spacemacs
    ;;
    ;; This file is not part of GNU Emacs.
    ;;
    ;;; License: GPLv3

    ;; List of all packages to install and/or initialize. Built-in packages
    ;; which require an initialization must be listed explicitly in the list.
     (setq haxe-packages
        '(
          ;; package names go here
          haxe-mode
          (haxe-complete :location (recipe :fetcher github :repo "aharisson/haxe-complete"))

          ))

    ;; List of packages to exclude.
    (setq haxe-excluded-packages '())

    ;; For each package, define a function haxe/init-<package-name>
    ;;
    ;; (defun haxe/init-my-package ()
    ;;   "Initialize my package"
    ;;   )
    ;;
    ;; Often the body of an initialize function uses `use-package'
    ;; For more info on `use-package', see readme:
    ;; https://github.com/jwiegley/use-package
    (defun haxe/init-haxe-mode ()
      (use-package haxe-mode
        :defer t
        :mode ("\\.\\(hx\\|hxml\\)\\'" . haxe-mode)
        ;; :init (add-hook 'haxe-mode-hook 'haxe-mode-init)
        ))

haxe-mode is in MELPA is is working properly. haxe-complete is on GitHub and produces the above error.

@fintelkai
Copy link
Contributor

You don't give an example of the failing code in packages.el of your layer. Here's an example from a private layer of mine, which works to install stuff from github:

;; List of all packages to install and/or initialize. Built-in packages
;; which require an initialization must be listed explicitly in the list.
(setq org-ref-packages
    '(
      ;; package names go here
      (org-ref :location (recipe :fetcher github :repo "jkitchin/org-ref"))
      ))

@mbertheau
Copy link
Contributor

I added this to a FAQ which I hope will grow to become useful: https://github.com/mbertheau/spacemacs-faq/wiki#how-do-i-install-an-emacs-package-from-github

@CestDiego
Copy link
Contributor

@AdmnUnpwnd bear in mind that webkit is dependant on external dependencies..don't even bother with it. It's not worth the time.

@AdmnUnpwnd
Copy link
Author

@CestDiego Is there an alternate Emacs web browser that you recommend. I hate using lynx and if possible would like to avoid opening Chrome every time I want to view a web page.

@CestDiego
Copy link
Contributor

@AdmnUnpwnd unfortunately there is no true webkit browser :( people try w3m and eww, but I don't find unconvenient to open chrome for everything. You can search in any search engine from within emacs though (check the search-engine layer) this will open a search into chrome though, or firefox

@AdmnUnpwnd
Copy link
Author

@CestDiego Thank you. I will try the search-engine layer.

@syl20bnr
Copy link
Owner

syl20bnr commented Sep 4, 2015

Maybe haxe-complete depends on a package that is it in MELPA ?

@AdmnUnpwnd
Copy link
Author

@fintelkai @mbertheau I have tried what you posted in a custom layer but it still doesn't work. However, it works when I use it in .spacemacs's dotspacemacs-additional-packages. Is there some way I can get it working for a custom layer rather than it being in .spacemacs?

@syl20bnr
Copy link
Owner

syl20bnr commented Sep 4, 2015

haxe-complete is not a valid Elpa package, the source file haxe-complete.el has no header at all. It is likely to be the issue that lead to have no Elpa archive listing the package.

@syl20bnr
Copy link
Owner

syl20bnr commented Sep 4, 2015

@AdmnUnpwnd can you open an issue on haxe-complete repo to ask the author to add a proper package.el header to the source file ?

@AdmnUnpwnd
Copy link
Author

@syl20bnr I will open an issue on the haxe-complete repo. I've also tried installing haxe-eldoc and hx-emacs and they failed as well. From my understanding haxe-eldoc seems to have a proper package.el header however I might be wrong. Can you please confirm this? If the header is the problem then I will open an issue on those repos as well. Thank you.

@syl20bnr
Copy link
Owner

syl20bnr commented Sep 7, 2015

@AdmnUnpwnd haxe-eldoc has one but I don't know if it is valid. I don't see any other difference that might explain your issue though.

@AdmnUnpwnd
Copy link
Author

@syl20bnr Another thing I've noticed is that I can only install GitHub hosted packages if I put them in dotspacemacs-additional-packages inside the .spacemacs file. When I tried using my layers it gave me the above error of name being misspelled.

@StreakyCobra
Copy link
Contributor

Does anyone still have this problem? I tried yesterday to use github fetcher for a package in the ranger layer and it worked.

@AdmnUnpwnd
Copy link
Author

@StreakyCobra I'm still having problems installing the packages I listed above. I can install other packages that are ELPA compliant with no problem however, for some reason req-package installs but whenever I try to use it I get an error suggesting that the package is missing. I was hoping to use that to install the above packages since I tried el-get but was getting an error about el-get-recipe-path being void.

I am using the latest development version.

@AdmnUnpwnd
Copy link
Author

I've noticed that this issue has been taken care of in the Autumnal Cleanup 2015 Reporting (#3549) however unfortunately I still have no idea how I can install packages that are not in the correct ELPA compliant format. Any help will be appreciated. Thank you.

@StreakyCobra
Copy link
Contributor

@AdmnUnpwnd The autumnal cleanup was made to identify old and dead issues. This one is valid so it's still open :-) But I don't think there is an easy way now to install a package that is not in ELPA format, you can try to debug/improve/document it yourself, or wait that someone get interested in this functionality :-/

@AdmnUnpwnd
Copy link
Author

@StreakyCobra I'm not experienced in Emacs Lisp beyond the general configuration but I'll keep looking for alternate ways and report if I find anything. Meanwhile, I would appreciate if someone is able to integrate this functionality in spacemacs.

@TheBB
Copy link
Contributor

TheBB commented Dec 14, 2015

Download it and load it manually, then. I don't think the burden should be on us to support non-standard packages, particularly when the standard is as accepted as it is.

@AdmnUnpwnd
Copy link
Author

@TheBB How do I load it manually? Do I edit .spacemacs or init.el? Sorry I am new to Emacs.

@TheBB
Copy link
Contributor

TheBB commented Dec 15, 2015

You can use load-file. Put it in ~/.spacemacs.

@AdmnUnpwnd
Copy link
Author

@TheBB Thank you.

@StreakyCobra
Copy link
Contributor

@AdmnUnpwnd Do you managed to make it work?

@syl20bnr @TheBB So to be clear, there is no plan to support non-elpa packages as it's not a standard right? If this is the case, this issue can be closed once @AdmnUnpwnd will have solved his problem.

@AdmnUnpwnd
Copy link
Author

@StreakyCobra Unfortunately the load-file did not work. I am currently trying to use el-get recipes. I found a recipe, filladapt.rcp, that successfully installs filladapt.el even though it is not in the ELPA compliant format. If this works then it would be possible to install any non-ELPA package.

@StreakyCobra
Copy link
Contributor

Ok, let us know if you find a way to make it work :-)

@NJBS NJBS mentioned this issue Aug 27, 2016
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Challenge ! Enhancement ☺ stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

7 participants