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

emacsPackages.org-roam: init at 0.1.2 #80280

Closed
wants to merge 2 commits into from

Conversation

rasendubi
Copy link
Member

Motivation for this change

org-roam seems to be a nice package, but it's not packaged into melpa/elpa

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

I'm running it now and it works fine.

@adisbladis
Copy link
Member

Could you try to get upstream to upload the package to elpa/melpa?

@rasendubi
Copy link
Member Author

Sure. Asked for that in org-roam/org-roam#171

@jethrokuan
Copy link
Contributor

I'd like to upload to MELPA when things become more stable, which is when I decide it's version 1.0.0.

@rasendubi rasendubi changed the title emacsPackages.org-roam: init at 0.1.1 emacsPackages.org-roam: init at 0.1.2 Mar 6, 2020
@rasendubi
Copy link
Member Author

A melpa release won't happen any time soon. The question is, do we want org-roam in nixpkgs now, or should I stash it in my overlay?

I would go for nixpkgs as org-roam is quite an active project and gets excellent traction (see pulse). I've been using 0.1.2 for two weeks now, and I find it quite stable and useful.

@adisbladis, what do you think?

@jethrokuan
Copy link
Contributor

A melpa release won't happen any time soon.

Within the next week I think!

@rasendubi
Copy link
Member Author

oh wow. that's great news! I think we should wait then :)

@adisbladis
Copy link
Member

Great! I was just going to say "let's just add it", but if a proper MELPA release is coming soon then let's wait for it :)

:fetcher github
:files ("*.el"))
'';
packageRequires = [ dash f s async ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for when 1.0.0 lands:

Suggested change
packageRequires = [ dash f s async ];
packageRequires = [ dash f s emacsql emacsql-sqlite ];

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jethrokuan If the package is pulled from melpa all those bit's are automagic.

@adisbladis
Copy link
Member

I'm closing this for now since the package will arrive in Nixpkgs through the usual MELPA workflow.

@adisbladis adisbladis closed this Mar 7, 2020
@JeffreyBenjaminBrown
Copy link

Can we now install org-roam from our NixOS configuration?

I've tried the obvious way, by adding org-roam to my epkgs.melpaStablePackages definitions, and I get the following error when I try to build:

error: undefined variable 'org-roam' at /etc/nixos/emacs.nix:16:7

Two of you have made public your NixOS configurations; I cloned them and grepped (case insensitive) for roam and found nothing.

Here's the commit where I made the change, and here's the complete file including that change.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/emacs-can-i-install-a-package-declaratively-after-trying-it-out-procedurally/7559/1

@rasendubi
Copy link
Member Author

rasendubi commented Jun 7, 2020

Hey @JeffreyBenjaminBrown!

It's in melpaPackages, not melpaStablePackages. Move org-roam just a couple of lines below under with melpaPackages—that should help.

FWIW, here is the relevant part of my config: README.org:671

@JeffreyBenjaminBrown
Copy link

I tried putting it under melpa instead of melpaStable. I even tried under elpa. They all give me the same error, except with a different line number.

It's as if Nix is looking at an old Melpa repo when it tries to build my config. Your config includes company, which I didn't know about and looks cool, so I tried adding that to my melpaPackages declarations and it installs fine. But company-roam and org-roam generate errors when I do likewise with them.

So I tried adding the overlay you mentioned. First time overlaying, and I don't know if I added it the right way. How I added the overlay didn't generate an error but neither did it solve this problem.

I tried to understand your .org file that turns into your .nix files. Oh my god, I haven't felt so stupid in years; I don't even know what I would have to study to understand it. When I run org-babel-tangle it actually deletes the three lines containing the word roam from the .nix files in your repo, but I tried studying those files after restoring them to their original state and can't make heads or tails of it.

@adisbladis
Copy link
Member

adisbladis commented Jun 8, 2020

@JeffreyBenjaminBrown

{ pkgs ? import <nixpkgs> {} }: {} is syntax for "create a function that takes an attrset where pkgs defaults to import <nixpkgs> {}".

The thing is you are explicitly passing pkgs here https://github.com/JeffreyBenjaminBrown/nixos-experiments/blob/master/packages.nix#L5 which makes the entire overlay addition moot.

What you should be doing is adding the overlay to the NixOS option nixpkgs.overlay as shown in the overlay README: https://github.com/nix-community/emacs-overlay#latest-master-each-rebuild.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/my-first-overlay-for-emacs/7570/1

@JeffreyBenjaminBrown
Copy link

Thanks! I thought that might be happening, but it was the only thing I tried that compiled.

I had looked at the section of the emacs-overlay README you mention, and also the NixOS wiki article on overlays, and was totally baffled. I just started a new thread on the NixOS Discourse to tackle that problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants