b3nj5m1n/xdg-ninja

Provide docker image and binary to help contributions.

amtoine opened this issue ยท 14 comments

This is simply to move the discussion from #80 to a separate issue, as #80 is almost closed with #81 being already merged and #82 being opened ๐Ÿ˜‰

For those coming to this issue without context, this is about providing a standalone, static binary instead of having to compile the haskell program yourself.


I've successfully tested this on a fresh LMDE install and in an arch linux live environment.

I'd like to get a few more people to try it out before I merge this into main just to be sure, so I'll ping some contributors who've worked with the configs or the Haskell codebase, if you could try it out and let me know if it works, that would be awesome, but obviously it's not a problem if you don't.

@a2n-s @Layerex @FranzXaver @Willenbrink @o0MURDOCK0o

It should be enough to just wget the file, make it executable and run the add subcommand to verify.

cd /tmp
wget https://github.com/b3nj5m1n/xdg-ninja/releases/download/v0.2.0.0/xdgnj
sudo chmod +x xdgnj
./xdgnj add

Just tested it and it works.

Tested it on:

  • Arch with Haskell
  • Arch without anything
  • Ubuntu WSL on Win 10

Just tested it too. Running the program works fine but in the end it throws an error related to the editor:
xdgnj: EDITOR: getEnv: does not exist (no environment variable)
Perhaps you could prompt for an editor instead of failing?

Besides that everything works. Looks good!

I check that tomorrow after work ๐Ÿ˜‹

Oh wow, that is amazing @b3nj5m1n!!

works like a charm on my main production machine running ArchLinux with Haskell and cabal installed ๐Ÿ‘Œ
does not do anything on a pure vanilla ArchLinux virtual machine though ๐Ÿค”

does not do anything on a pure vanilla ArchLinux virtual machine though

Is it failing to run, or is it crashing with some kind of error message?

Thanks for trying it btw!

Is it failing to run, or is it crashing with some kind of error message?

oh no it is doing nothing at all, no errors, no message at whatsoever

I wish I had something to show you ๐Ÿ˜†

Is it failing to run, or is it crashing with some kind of error message?

oh no it is doing nothing at all, no errors, no message at whatsoever

I wish I had something to show you ๐Ÿ˜†

Wow that's weird, is it just a vanilla arch install (base, linux, linux-firmware packages)?

I'll try to reproduce it.

Wow that's weird, is it just a vanilla arch install (base, linux, linux-firmware packages)?

it should be ๐Ÿค”
i always keep a vanilla arch installation inside virtualbox for that kind of purpose!
there should not be that much things in it, maybe git and vim and obviously base-devel, linux and linux-firmware

I'll try to reproduce it.

tell me it there is anything to try out, now that archinstall is up and running, that is much easier to try things in a minute ๐Ÿ’ช

i always keep a vanilla arch installation inside virtualbox for that kind of purpose!
there should not be that much things in it, maybe git and vim and obviously base-devel, linux and linux-firmware

Same here, but it works without any problems on mine. Unfortunately, I don't know what could be causing this.

When you run file xdgnj, does it tell you that it's a statically linked binary? (i.e. xdgnj: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=6578699ea985b97f91577a9b738182f8d993d4c2, stripped)

Same here, but it works without any problems on mine. Unfortunately, I don't know what could be causing this.

forget about that, I just can't spell the URL and forgot the -fL flags on curl to notify me if the request fails...

now i can say interesting things about the binary ๐Ÿ˜Š

  • ./xdgnj prev programs/vim.json complains about glow not being installed -> works fine after sudo pacman -S glow
  • ./xdgnj edit programs/vim.json complaints about EDITOR not being defined -> works fine after export EDITOR=vim
  • same with add and EDITOR

these look like normal "errors" to me ๐Ÿ˜‰

Oh thank god.

Yes, those errors are expected. They could be handled better by giving a clear error message instead of just crashing the program, but for now I'm more concerned about the binary working.

Thanks a lot for your help!

Yes, those errors are expected. They could be handled better by giving a clear error message instead of just crashing the program, but for now I'm more concerned about the binary working.

definitely for another time! and it looks it is working ๐Ÿ™

Not everybody has responded yet, but since there haven't been any problems so far, I think it's safe to merge this.