Guix Package Rebuilds

Building any package from the archive

Mastering Guix Packaging

  • The main scenarios are
    • ​Using an older package (downgrading)
    • Rebuilding an existing package
    • Modifying an existing package
    • Creating a new package (with and without source)
    • Contributing a package to the distribution
  • ​We use Guix build in all these scenarios
     

Learning Path

Profiles

Package

Commands

Shell

Command

Basic Build

Command

Manifests

Manifests

Transforms in Manifests

Guix Build Overview

  • Guix build is used to build a package (or a derivation)

​

  • Receives:
    • package definition
    • Guix build options

​

  • It outputs:
    • build logs
    • build derivation
    • package

​

  • Recommendation: use with guix shell for a clean build environment

1

Create build environment with guix shell

3

Create a test environment with guix shell and test the new build

2

Build the current package to test dependencies

Package build steps

Start a build shell environment:

 

guix shell --container --nesting  --network \

  --development hello nss-certs

See it in Action

Option Description
--dry-run Give output but don't take the action
--no-substitutes Don't use binary substitutes
--no-grafts Do not put security grafts onto packages
--verbosity=<lvl> 0=no output; 1=quiet; 2=show urls; 3=build log
--cores=n Use N CPU cores for each build job
--max-jobs=N Allow the Guix Daemon to run at most N build jobs. Each build can be limited to use --cores=N
--check Rebuilt an items that's already in the Store to check determinism  
--source Build the packages source derivation

Common Build Options

What we've seen

Package build command so we can build any package from the archive

1

Guix build

Using Guix shell to create both a build and a test enviroment

2

Guix shell

Installing the package locally to test it

3

Testing packages

Steps from here

Profiles

Package

Commands

Shell

Command

Basic Build

Command

Manifests

Transform

Command

Manifests

Transforms in Manifests

Thank You!

Guix Package Rebuilds

By futurile

Guix Package Rebuilds

  • 302