How can I build a Guix package for Nextcloud server?
Building a package for Nextcloud server using the Guix package manager involves a few steps:

    Familiarize yourself with the Guix system and its packaging process: Before building a package, it is important to understand how Guix handles packages and how it builds and installs software. You can start by reading the official Guix manual and tutorial.

    Get the Nextcloud source code: You can download the Nextcloud source code from the Nextcloud website or from its GitHub repository.

    Write a Guix package definition: A Guix package definition is a Scheme file that describes the package, including its dependencies, build process, and installation instructions. The definition should specify the Nextcloud source code tarball as an input, and provide all necessary information for Guix to build and install the software.

    Build the package: You can build the package by running the guix build command and specifying the package definition file. Guix will download the necessary dependencies, build the software, and create a package file.

    Install the package: You can install the Nextcloud server by running the guix package -i command and specifying the package file. Guix will take care of the installation process, including setting up the necessary configuration files and directories.

It is recommended to seek out existing package definitions for similar software and to use them as a reference when writing your own definition. The Guix community also provides a mailing list and a repository of packages that you can use as a resource.
How do I submit the package definition to the guix repositories?
You can submit package definitions to Guix by sending pull requests to the guix-devel mailing list.
The process looks like this:

Fork the guix git repository
Add your package definition in a branch
Send a pull request for your branch to guix-devel
Discuss the change with reviewers and address any feedback
Once your change is approved, it will be merged into master

So in more detail:

Fork the repo on GitHub (or GitLab if you prefer)
Commit your package definition in a separate branch
Use git send-email or format-patch/git-format-patch and email to send a pull request to guix-devel
Subscribe to guix-devel and participate in the review process
Address any feedback or comments
Once approved, a Guix maintainer will merge your branch

The Guix manual has a more detailed walkthrough of this process.
Hope that helps!