Fork me on GitHub

(apologies for the repost from #emacs, I’m hoping for extra visibility, the topic concerns both editors anyway) Anybody using the emacs or vscode flatpak?  I’ve done some experimentation and managed to get clojure, doom and a few tools up and running, using the emacs flatpak + a few sdk extensions (openjdk11, rust-stable, node14) I’m sure I’m not the first one to use this or to manage this, so before I duplicate any existing work, I’d like to know if others have setup and documente this, or even worked on some clojure sdk extension for flatpak?


Never heard of it. What is it? A link will do.


hmmm maybe multiple links at minimum lol flatpaks are the newish Linux application distribution format, intended to allow distributing a single package across many distributions, separate from the OS’s package manager.. they use containerization facilities from the kernel to isolate the apps and provide some semblance of a permission model to avoid duplication of libs/frameworks/etc they make use of layers called “runtimes” or “extensions”, so that e.g. all the apps built on gnome 40 share the same gnome 40 base (as opposed to, say, regular docker containers or appimage applications that need to package all dependencies within the package, leading to bloat)


but because of this isolation, IDEs don’t have access to tools installed on the host OS, not directly anyway so they’ve come up with the concept of SDK Extensions, similar to what I’ve mentioned just above but provide rust/jdk/node/etc as layers that get added to the IDE when running it, making the languages/SDKs available from within the flatpak at runtime


hope this explains it well enough, I was only vaguely familiar with all that until a few days ago, now looking into it more


link to the flatpak homepage…


Hmm, seems like the various Linux flavors are just trying to make packaging more complicated and hostile to the end user experience. Can you explain any benefits from this approach, from the p.o.v. of developers who are just trying to use Emacs/VSCode to write software? I can see how something like Gitpod (or GitHub CodeSpaces) are beneficial but having seem the whole "build everything from source" and now "let's isolate editors from files" I'm not seeing any benefits from this increasing "purity" in the Linux world 😞


@U04V70XH6 you'll get no argument from me about this making everything more complex... HOWEVER more and more distributions are going in this direction.. most notable example would be Fedora's Silverblue variant (immutable os-tree based root partition + containers and flatpaks for everything, which is an interesting workflow), ElementaryOS's recent release which refocused on flatpaks, GNOME being all-in.... soooo I've decided to experiment (once a year) to see how well this works.. and here we are


it does kinda sorta solve some issues though, for example: being on Debian stable, and not needing to compile or add third-party repos or PPAs to get the latest emacs. installing applications as a user without root privilege. things like that.


Is this something the mainstream Linux variants like Ubuntu are doing?


it's supported on all mainstream distributions


but of course canonical favors their own Snap format...


I'm just a lowly Ubuntu user -- how are we supposed to find out about this weird crap?


lol no idea


flatpaks have been a big topic here and there over the past 3-5 years, HN etc, lots of controversy


I try to ignore the orange site, for the most part.

Patrix05:08:50 flathub is the main repo of most flatpaks, but unlike Snap, flatpak is not dependent on a central distribution/authority


I love how one of the driving premises of flatpak is so that you don't have to add custom repos and then the very first step is... to add a custom repo "Add the necessary repository..." 🙂




perhaps they mean don't need to add a custom deb/rpm/etc repo


bnut yeah the wording if not the concept is ironic


of course you can just download the flatpak directly and install it, no repo required


Oh, and then the second thing you do (after rebooting your system -- WAT?) is... "The first thing we’re going to do is add the Flathub remote repository" 🙂


Do these people not even read their own instructions?

😀 9

you ARE on the flathub site lol


I assume at some point this will be baked into future Linux versions and you'll just go to the "store" and install apps -- like you've been able to do on macOS and Windows for years?


that's the way ElementaryOS is going, that's what Purism was planning on their phone, that's what Fedora wants as well, no idea about other distros plans


I love Linux for development and deployment but this sort of stuff is why "Linux on the desktop" is just such a joke!


It's serious Stockholm syndrome.


well in either case, I'm not here to argue for or against flatpaks but to experiment with it, and to see if anybody else had tried to do what I'm about to attempt


Fair enough. If this is how all Linux distros are going to be in the future, we'll need a sane way to get Clojure running and an editor installed.


I have to say, I like what Microsoft has done here: VS Code on Windows with a Remote extension to work with all your code and REPL on WSL2/Ubuntu.


no idea if they're ALL going like that -- but if they are, there are definitely a myriad of issues to fix before this is usable normally


we'll see how it goes lol


And macOS has essentially had the same model ever since OS X appeared (and years before that I ran BSD unix with a Mach kernel on my old Macs to get essentially the same thing).


(dating back nearly 30 years)


"essentially" aside from the app store apps...


imagine my surprise the other day when I deleted the simcity 4 app from the app store on my Mac and lost all my save files, just like on an iphone


oops 🙂 I half expected it and didn't care though


True, there was no app store back then... and I'm not sure they're an improvement...


big improvement (for Apple's bottomline lol)


Aye, one of many reasons I'm switching away from Apple these days (after being an Apple customer for 30 years).


yeah, same here, which brings me to my Linux experiments and figuring out if this flatpak thing is worth it and usable or not


alrighty, so I guess my little weekend project will be to figure out if there's any documentation about how to create flatpak "SDK extensions", or if I need to just read the source and figure things out on my own haha


and I will at least publish.. somewhere.. the steps I've taken to get clojure up and running in my experimental setup


Alrighty, I’m going to publish something this week, but I essentially managed to create a flatpak sdk extension that contains: • clojure • clj-kondo • bb • nbb • lein and load that up along with emacs, so that now when running emacs I have access to all those tools inside the flatpak. Would work the same with vscode. I’m not happy with the installation process for every one of these (lots of curls and running scripts that download arbitrary things, and npm install -g for nbb..), but it works, and can be refined over time 🙂