It’s difficult to write package definitions so you will need to search the existing package definitions to learn how to write new ones. After doing guix pull the directory "~/.config/guix/latest/" should be populated.
If you were interested in finding packages that used the cmake build system you could grep for that like this:
If you want to audit the source code of a git repo for your package before making the package definition:
* clone the repo
* checkout the specific commit your package will point at
* delete the .git directory
* guix hash -r .
Creating a patch off the main package tree
If you want to create a patch off the main package tree, in order to submit it to the mailing list you need to work from a git checkout of guix.
Do a git pull to get the latest code. Make sure to configure and build guix, you can do this inside guix environment guix.
Now to edit the package definition for a package you want to change:
./pre-inst-env guix edit <package>
this opens it up in your editor. You can make changes and test them then git commit that. (Just commit to your local copy, don’t try to push).
Now to create the patch file itself:
git format-patch -1
## style tip
Make sure to use modify-phases from guix/build/utils.scm if you want to delete or replace steps of the build system! (N.B. if the package doesn’t have a make check/make test phase use #:tests? #f)
Modify PHASES sequentially as per each MOD-SPEC, which may have one of thefollowing forms: (delete <old-phase-name>) (replace <old-phase-name> <new-phase>) (add-before <old-phase-name> <new-phase-name> <new-phase>) (add-after <old-phase-name> <new-phase-name> <new-phase>)Where every <*-phase-name> is an automatically quoted symbol, and <new-phase>an expression evaluating to a procedure