Nix packaging #138

Closed
opened 10 months ago by codedotjs · 36 comments
Owner

In order to switch from Arch to NixOS we first need to package the apps that are not available in the Nix repos manually.

In order to switch from Arch to NixOS we first need to package the apps that are not available in the [Nix repos](https://search.nixos.org/packages) manually.
a added the
enhancement
help wanted
labels 10 months ago
a added this to the (deleted) project 10 months ago
a commented 10 months ago
Owner

Based on the output of pacman -Qe, I think we need to package the following software:

  • certbot-dns-porkbun
  • collabora-online-server-nodocker
  • guacamole-client
  • guacamole-server
  • mx-puppet-discord (Nix version is out of date)
  • plugin-git
  • woodpecker
  • woodpecker-agent
  • xorgxrdp-glamor
  • zenmonitor3-git

Overall I'm suprised though at how extensive the Nix repos are, which should make the switch a lot easier.

Anyways, I'm glad @codedotjs you're taking the initiative to work on Nix packaging!

Based on the output of `pacman -Qe`, I think we need to package the following software: - certbot-dns-porkbun - collabora-online-server-nodocker - guacamole-client - guacamole-server - mx-puppet-discord (Nix version is out of date) - plugin-git - woodpecker - woodpecker-agent - xorgxrdp-glamor - zenmonitor3-git Overall I'm suprised though at how extensive the Nix repos are, which should make the switch a lot easier. Anyways, I'm glad @codedotjs you're taking the initiative to work on Nix packaging!
a commented 10 months ago
Owner

An alternative could be to use an Arch Linux container for these packages that aren't in Nix, but we'll have to package guacamole-client, guacamole-server, and xorgxrdp-glamor at least since those packages should be run bare-metal.

An alternative could be to use an Arch Linux container for these packages that aren't in Nix, but we'll have to package `guacamole-client`, `guacamole-server`, and `xorgxrdp-glamor` at least since those packages should be run bare-metal.
a added a new dependency 10 months ago
Poster
Owner

We could also run some of the programs in a docker container.

We could also run some of the programs in a docker container.
Poster
Owner

I created my first nix application using their guide at https://nixos.org/guides/dev-environment.html 😄

I created my first nix application using their guide at https://nixos.org/guides/dev-environment.html 😄
a commented 10 months ago
Owner

We could also run some of the programs in a docker container.

That's a good idea for a temporary solution, but I want to avoid Docker in the long run and migrate everything to Nix.

> We could also run some of the programs in a docker container. That's a good idea for a temporary solution, but I want to avoid Docker in the long run and migrate everything to Nix.
a added this to the v9.0 milestone 10 months ago
Poster
Owner
Here are some links: * [package search](https://search.nixos.org/packages) * [Nix manual](https://nixos.org/manual/nix/stable/) * [NixOS manual](https://nixos.org/manual/nixos/stable/) * [First steps](https://nixos.org/guides/dev-environment.html) ## Important * [nixpkgs manual](https://nixos.org/manual/nixpkgs/stable/) * [nixpkgs Go](https://nixos.org/manual/nixpkgs/unstable/#sec-language-go) * [nixpkgs Java](https://nixos.org/manual/nixpkgs/unstable/#sec-language-java) * [nixpkgs stdenv](https://nixos.org/manual/nixpkgs/unstable/#sec-using-stdenv)
Poster
Owner

I think I'll start packaging woodpecker-ci.
https://github.com/woodpecker-ci/woodpecker

I think I'll start packaging `woodpecker-ci`. https://github.com/woodpecker-ci/woodpecker
Poster
Owner

We could probably use one of these tools to automate packaging of go applications like woodpecker:

We could probably use one of these tools to automate packaging of go applications like woodpecker: * [vgo2nix](https://github.com/nix-community/vgo2nix) * [gomod2nix](https://github.com/tweag/gomod2nix) – doesn't seem to be working right now * [go2nix](https://github.com/kamilchm/go2nix) – archived
Poster
Owner

Well they don't seem to be needed.

Well they don't seem to be needed.
Poster
Owner

Woodpecker is packaged now. I got some friendly help from the Nix community. One of the devs already created a nixpkg for woodpecker but it hasn't been released yet. There are still two issues within the script but I hope they will get fixed soon. I will create a repository in the exozyme project where all our packages can be put in.

Woodpecker is packaged now. I got some friendly help from the [Nix community](https://app.element.io/#/room/#dev:nixos.org). One of the devs already created a [nixpkg](https://git.pixie.town/f0x/nixos/src/branch/main/common/packages/woodpecker/server.nix) for woodpecker but it hasn't been released yet. There are still two issues within the script but I hope they will get fixed soon. I will create a repository in the exozyme project where all our packages can be put in.
Poster
Owner

I messed up the git repos on my laptop so I have to recreate the packages repository. I also created another project board but it doesn't seem to be necessary. #justplayingaround 😁

I messed up the git repos on my laptop so I have to recreate the `packages` repository. I also created another project board but it doesn't seem to be necessary. #justplayingaround 😁
Poster
Owner

Admin rights are dangerous. I have to watch out not to delete anything important.

Admin rights are dangerous. I have to watch out not to delete anything important.
Poster
Owner

Ok the woodpecker default.nix is in the repo now.

Ok the woodpecker `default.nix` is in the repo now.
Poster
Owner

The woodpecker default.nix seems to be only the server package. We will have to change that if we want the whole toolkit.

The woodpecker default.nix seems to be only the server package. We will have to change that if we want the whole toolkit.
Poster
Owner

Ok. We will package each woodpecker subpackage seperately.

Ok. We will package each woodpecker subpackage seperately.
Poster
Owner

The woodpecker packages are added now (server, agent and cli).

The woodpecker packages are added now (server, agent and cli).
Poster
Owner

As a next step I will try packaging guacamole.

As a next step I will try packaging **guacamole**. * [website](https://guacamole.apache.org/) * [download page](https://guacamole.apache.org/releases/1.4.0/) * [documentation](https://guacamole.apache.org/doc/1.4.0/gug/) * [installation process](https://guacamole.apache.org/doc/1.4.0/gug/installing-guacamole.html)
codedotjs closed this issue 10 months ago
codedotjs reopened this issue 10 months ago
Poster
Owner

I accidently closed this issue 🤦.

I accidently closed this issue 🤦.
Poster
Owner

Building the guacamole-server package works. There are just not all extentions working. We have to take a look at that later.
Guacamole-client seems to be a bit harder to package.

Building the guacamole-server package works. There are just not all extentions working. We have to take a look at that later. Guacamole-client seems to be a bit harder to package.
Poster
Owner

Well it seems like there have been some other people also struggling with guacamole out there:

Well it seems like there have been some other people also struggling with guacamole out there: * https://github.com/NixOS/nixpkgs/pull/48140 * https://github.com/NixOS/nixpkgs/issues/17879
Poster
Owner

We probably have to build the maven-build-helper-plugin first.

We probably have to build the [maven-build-helper-plugin](https://github.com/mojohaus/build-helper-maven-plugin) first.
Poster
Owner

In fact it is called ”build-helper-maven-plugin“.

In fact it is called ”build-helper-maven-plugin“.
Poster
Owner

Oh no! I deleted the default.nix for the guacamole-server package. I really really need to clean up my folder system.

Oh no! I deleted the `default.nix` for the guacamole-server package. I really really need to clean up my folder system.
Poster
Owner

Ok I was able to restore it from the git diff 😌.

Ok I was able to restore it from the git diff 😌.
Poster
Owner

I added a project in the packages repo. That should help us keeping this issue more clean. We can also create issues for one application specifically there.

I added a [project](https://git.exozy.me/exozyme/packages/projects/4) in the packages repo. That should help us keeping this issue more clean. We can also create issues for one application specifically there.
Poster
Owner

@Ta180m could you please provide a link to the source code or a website of plugin-git? I wasn't able to find it on my short internet research.

@Ta180m could you please provide a link to the source code or a website of plugin-git? I wasn't able to find it on my short internet research.
a commented 9 months ago
Owner

@Ta180m could you please provide a link to the source code or a website of plugin-git? I wasn't able to find it on my short internet research.

Sorry, I didn't see this comment. Here's the website for it: https://github.com/woodpecker-ci/plugin-git

In the future, if I don't respond for a week, that means I probably didn't see the comment and just ping me on Matrix about it!

> @Ta180m could you please provide a link to the source code or a website of plugin-git? I wasn't able to find it on my short internet research. Sorry, I didn't see this comment. Here's the website for it: https://github.com/woodpecker-ci/plugin-git In the future, if I don't respond for a week, that means I probably didn't see the comment and just ping me on Matrix about it!
Poster
Owner

No problem 👍

No problem 👍
a commented 9 months ago
Owner

@codedotjs We are planning on upstreaming these packages to nixpkgs, right?

@codedotjs We are planning on upstreaming these packages to nixpkgs, right?
Poster
Owner

Yes if they get through our tests. The problem is that I don't have a GitHub account in the moment. That is one of my todos in order to contribute to nixpkgs in the future.

Yes if they get through our tests. The problem is that I don't have a GitHub account in the moment. That is one of my todos in order to contribute to nixpkgs in the future.
a commented 9 months ago
Owner

I can use my GitHub account to submit PRs, if that's OK with you.

I can use my GitHub account to submit PRs, if that's OK with you.
Poster
Owner

That would be totally fine 👍

That would be totally fine 👍
a commented 8 months ago
Owner

@thehedgehog Would you like to help with submitting our Nix packages to upstream nixpkgs? I think Guacamole and GLAuth have already been packaged: https://git.exozy.me/exozyme/packages/

@thehedgehog Would you like to help with submitting our Nix packages to upstream nixpkgs? I think Guacamole and GLAuth have already been packaged: https://git.exozy.me/exozyme/packages/
Collaborator

@thehedgehog Would you like to help with submitting our Nix packages to upstream nixpkgs? I think Guacamole and GLAuth have already been packaged: https://git.exozy.me/exozyme/packages/

I'd be glad to do that!

> @thehedgehog Would you like to help with submitting our Nix packages to upstream nixpkgs? I think Guacamole and GLAuth have already been packaged: https://git.exozy.me/exozyme/packages/ I'd be glad to do that!
Poster
Owner

@thehedgehog do you know how to prefetch packages or dependencies for other applications?
We have got an issue with the Guacamole client. The package is written in Java and needs Maven to compile. Maven itself requires a plugin which can't be fetched during the installation since the Nix sandbox doesn't have an internet connection. As a workaround we have got an installation script that installs a prebuilt webapp.
What do you think about that? Would it be possible to somehow prefetch the plugin and is that step even needed (or does the script suffice)?

@thehedgehog do you know how to prefetch packages or dependencies for other applications? We have got an issue with the [Guacamole client](https://git.exozy.me/exozyme/packages/issues/5). The package is written in Java and needs Maven to compile. Maven itself requires a plugin which can't be fetched during the installation since the Nix sandbox doesn't have an internet connection. As a workaround we have got an installation script that installs a prebuilt webapp. What do you think about that? Would it be possible to somehow prefetch the plugin and is that step even needed (or does the script suffice)?
Collaborator

@thehedgehog do you know how to prefetch packages or dependencies for other applications?
We have got an issue with the Guacamole client. The package is written in Java and needs Maven to compile. Maven itself requires a plugin which can't be fetched during the installation since the Nix sandbox doesn't have an internet connection. As a workaround we have got an installation script that installs a prebuilt webapp.
What do you think about that? Would it be possible to somehow prefetch the plugin and is that step even needed (or does the script suffice)?

Looking into this right now. Seems like there's a bit of JSON generation with some external tools that needs to happen. Currently building a test version, if this works, I'm going to clean it up and send a PR. Java packaging in Nix sucks as so much java tooling depends on having network access(same with most package managers tbh), and there is just SO MUCH STUFF to download. It's downloading like 6 versions of every package I swear.

> @thehedgehog do you know how to prefetch packages or dependencies for other applications? > We have got an issue with the [Guacamole client](https://git.exozy.me/exozyme/packages/issues/5). The package is written in Java and needs Maven to compile. Maven itself requires a plugin which can't be fetched during the installation since the Nix sandbox doesn't have an internet connection. As a workaround we have got an installation script that installs a prebuilt webapp. > What do you think about that? Would it be possible to somehow prefetch the plugin and is that step even needed (or does the script suffice)? Looking into this right now. Seems like there's a bit of JSON generation with some external tools that needs to happen. Currently building a test version, if this works, I'm going to clean it up and send a PR. Java packaging in Nix sucks as so much java tooling depends on having network access(same with most package managers tbh), and there is just **SO MUCH STUFF** to download. It's downloading like 6 versions of every package I swear.
a closed this issue 3 months ago
a closed this issue 3 months ago
a closed this issue 3 months ago
a closed this issue 3 months ago
a closed this issue 3 months ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: exozyme/exozyme#138
Loading…
There is no content yet.