help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating new package for Guix - newbie's question


From: Matthew Jordan
Subject: Re: Creating new package for Guix - newbie's question
Date: Sun, 12 Jun 2016 17:24:37 -0400
User-agent: mu4e 0.9.13; emacs 24.5.1

Hi Rodion,

Welcome to Guix!

Here is the fast way;

$ mkdir -p ${HOME}/tmp/packages/gnu/packages
$ export GUIX_PACKAGE_PATH="${HOME}/tmp/packages"

$ mv <package-file>.scm ${HOME}/tmp/packages/gnu/packages
$ guix build <package-name>

If you intend to contribute the package, keep reading.

> OK, that is not really a problem - I tried to create this package 
> myself. So, I copied template "hello.scm" from documentation, modified 
> it according to compton's build process.

See the following sections/chapters in the Guile Reference Manual;

5 Programming Interface (Page 41)
https://www.gnu.org/software/guix/manual/guix.html#Programming-Interface

6.1 Invoking guix build (Page 75)
https://www.gnu.org/software/guix/manual/guix.html#Invoking-guix-build

8 Contributing (Page 170))
https://www.gnu.org/software/guix/manual/guix.html#Contributing

> Question is - how I can test created package build process?
Here is what I do atm for developing packages.

$ guix environment guix --ad-hoc help2man git strace
$ eval `guix environment guix --ad-hoc --search-paths help2man git
strace`

$ unset GUIX_PACKAGE_PATH
$ export GUIX_BUILD_OPTIONS="--keep-failed --verbosity=3"
$ export BUILD_LOG=${HOME}/tmp/logs/pre-guix-build.log
$ mkdir -p $(dirname ${BUILD_LOG})

Inital setup
$ git clone --recurse git://git.savannah.gnu.org/guix.git

Update
$ git pull --recurse-submodules

Build
$ ./bootstrap
$ ./configure --localstate=/var
$ make
$ make check

Runs in the foreground
optional unless editing damon code
$ sudo ./pre-inst-env guix-daemon --build-users-group=guixbuild

Edit/add code under gnu/packages directory.

$ export GUIX_BUILD_OPTIONS="--keep-failed --verbosity=3"
$ ./pre-inst-env guix build hello &>/dev/stdout &>${BUILD_LOG}
$ ./pre-inst-env guix lint hello

-- 
Matthew Jordan
Sent with my mu4e



reply via email to

[Prev in Thread] Current Thread [Next in Thread]