Coder Social home page Coder Social logo

Comments (9)

alezost avatar alezost commented on September 23, 2024

Hm, Works For Me 😕 I use GUIX_PACKAGE_PATH myself and I've never
faced the problem you describe.

Could you evaluate (in M-x ielm, for example) the following:

(guix-package-location "<your-package-name>")

I am using a git checkout of the guix tree in ~/.guix-profile/latest, in case that might influence things.

I suppose you meant ~/.config/guix/latest, right? Do you use it by symlinking it to your git checkout?

Also could you show the value of GUIX_PACKAGE_PATH?
Also did you set guix-directory variable?

from guix.el.

jellelicht avatar jellelicht commented on September 23, 2024

from guix.el.

alezost avatar alezost commented on September 23, 2024

(guix-package-location "zeal")
"gnu/packages/third-party.scm:160:2"

OK, so this is the problem. For me, all packages that I have in
GUIX_PACKAGE_PATH have absolute file names, and the packages from Guix
have relative file names ("gnu/packages/..."). So I have:

(guix-package-location "zeal")
"/home/al/config/guix/guix-package-path/gnu/packages/third-party.scm:7:2"

That's why it works for me. And to be honest, I don't know why you have
a relative file name. Could you try the following guile script to check
if it also outputs the relative file name:

(use-modules
 (guix packages)
 (guix utils)
 (gnu packages third-party))

(display (location-file (package-location zeal)))
(newline)

Run it like this:

$ GUILE_LOAD_COMPILED_PATH=/home/jelle/.config/guix/latest GUILE_LOAD_PATH=/home/jelle/guix-pkgs:/home/jelle/.config/guix/latest guile <the-above-script.scm>

Does it output the same file name?

Also I wonder, what if you put your packages just in (third-party)
module (or whatever you'll call it), without "gnu packages" part, I mean
into ~/guix-pkgs/third-party.scm file. What file name do you get in
this case?

from guix.el.

jellelicht avatar jellelicht commented on September 23, 2024

Running your guile snippet, I get the correct answer:
/home/jelle/guix-pkgs/gnu/packages/third-party.scm

Changing my module to reside in the top level guix-pkgs folder does seem to work. I would still say something somewhere is going wrong, but this workaround is good enough for me. You can close this issue if you want, thanks for the help 👍

EDIT: to recap, placing my custom modules in anything but guix-pkgs/gnu/packages makes them work immediately with guix-edit and related functions.

from guix.el.

alezost avatar alezost commented on September 23, 2024

Hm, interesting.

I see that Guix uses current-source-location Guile procedure (in
(guix packages) module) to define package location. And I wonder why
sometimes it is relative and sometimes absolute.

Anyway, it's not an Emacs-Guix issue (either Guix or Guile).

Closing, thanks.

from guix.el.

jellelicht avatar jellelicht commented on September 23, 2024

Hey alezost,

if I am not mistaken, the current guix-devel ML discussion is referring to exactly this issue as I was experiencing it.

Invoking guix edit in a terminal seems to be able to properly resolve any package, so maybe guix.el could do something similar?

EDIT: I guess you are already aware as you were participating in that thread 😜. Me and my reading comprehension...

from guix.el.

alezost avatar alezost commented on September 23, 2024

Yeah, you are right. This is now in the TODO list 😄

from guix.el.

alezost avatar alezost commented on September 23, 2024

I have finally found the time to fix it (by commit f85e1bc) 😊

from guix.el.

jellelicht avatar jellelicht commented on September 23, 2024

thanks! It makes using emacs for managing guix-related things a lot nicer 😄

from guix.el.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.