noql-net / org

0 stars 0 forks source link

Add `MatsuriDayo/nekoray` to `apt.noql.net` #5

Open markpash opened 1 year ago

markpash commented 1 year ago

This is a multi-step process

yazdan commented 1 year ago

Hi, I can do this I'm learning about how nix works

markpash commented 1 year ago

Hi, I can do this I'm learning about how nix works

It might be better to try doing static and cross-compilation without nix first. If that works, I can help porting build scripts to nix.

yazdan commented 1 year ago

What do you mean by cross-compile which targets we need? Is there any restrictions on hos specification? something like we want to compile windows executables on Linux

markpash commented 1 year ago

What do you mean by cross-compile which targets we need? Is there any restrictions on hos specification? something like we want to compile windows executables on Linux

So the idea would be that a amd64-linux machine could compile to produce a binary for arm64-linux.

yazdan commented 1 year ago

Ok that is fairly easy as I have done it couple of times

yazdan commented 1 year ago

I just have Mac M1 at home, I successfully compile amd64 Linux binary on arm64 Linux.

The process of cross compiling is not that straight forward because nekoray has some assumptions and those make the compilation a bit complicated.

I will try to the same in nix env

markpash commented 1 year ago

I just have Mac M1 at home, I successfully compile amd64 Linux binary on arm64 Linux.

The process of cross compiling is not that straight forward because nekoray has some assumptions and those make the compilation a bit complicated.

I will try to the same in nix env

can you document those assumptions here? I'd love to know what is required and replicate it locally in a nix environment. Perhaps there's changes needed for upstream to make compilation easier.

yazdan commented 1 year ago

I have created a markdown file I will upload it here https://gist.github.com/yazdan/11aed6b8a693628c2001bfc5d04d292d

yazdan commented 1 year ago

Cross compiling on nix is far easier, I'm in the middle of it

yazdan commented 1 year ago

Cross compiling is done but static linking of nekoray needs lots of work as it need updating the static packages of nix specially qt

DearRude commented 1 year ago

Any updates on this?

markpash commented 1 year ago

Any updates on this?

sadly no. I think for apps like these that are hard to package as a single static binary, I should investigate making flatpaks.