Guix: creating a package from a binary

Lobsters Hottest Tools

Summary

A guide on creating a Guix package from a binary using the copy-build-system, explaining how to set up an install plan.

<p><a href="https://lobste.rs/s/rvtn4v/guix_creating_package_from_binary">Comments</a></p>
Original Article
View Cached Full Text

Cached at: 07/16/26, 09:55 AM

# Guix: creating a package from a binary Source: [https://aloysberger.com/posts/guix-packaging-a-binary-as-a-guix-beginner.html](https://aloysberger.com/posts/guix-packaging-a-binary-as-a-guix-beginner.html) We now have the metadata and the source\. The last missing piece is the building instructions\. Guix offers out of the box[multiple build systems](https://guix.gnu.org/manual/1.5.0/en/html_node/Build-Systems.html)for different use cases\. For example, the \`gnu build system\` is designed for projects following the \`GNU coding standard\`\. You will find many others build systems such as node, zig or golang\. Each build system exposes \`arguments\` to customise the build process to your need\. The \`<package\>\` record can also include \`inputs\`, which specifies the build\-time or run\-time dependencies of the package\. Our case is simple, there are no dependencies as the package is already built\. We simply need to copy the executable to the right location\. Guix has a build system for this, the \`copy\-build\-system\`, which expose only one argument: \`install\-plan\`\. The \`install\-plan\` argument is used to instruct where to copy files\. In our use case, we simply want to copy the binary into the packages' \`/bin\` directory\. ``` (build-system copy-build-system) (arguments (list #:install-plan #~'(("caddy" "bin/")))) ``` Note that the binary isn't installed in the user or root binary folder\. It will be installed in the store, at \`/gnu/store/<\*ENTITY\*\>additionalhellip\-caddy\-2\.11\.4/bin/caddy\` To make it available to your user, you will need to add it as a user package, a system package or within a service\. In this case, I intend to use it for my \`caddy\-service\` which I'll go over in a future post\.

Similar Articles

Deploying Guix images on Linode

Lobsters Hottest

This article provides a technical guide on deploying Guix system images directly on Linode cloud servers, including code snippets for system configuration.

Extending Guix

Lobsters Hottest

GNU Guix 官方博客介绍如何通过 `GUIX_EXTENSIONS_PATH` 编写和分发自定义 `guix` 扩展命令,并展示了新的基于 schema 版本的扩展加载机制,该机制支持编译后的 .go 文件以显著提升性能。

GuixPkgs: every Guix package, as a Nix flake

Lobsters Hottest

GuixPkgs is a project that makes every GNU Guix package available as a Nix flake, allowing users to mix Guix and Nixpkgs packages in a single flake. It uses guix-transfer to convert Guix derivations to Nix derivations and provides a binary cache to avoid rebuilding the entire Guix bootstrap.