[Top][All Lists]

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

branch master updated: website: Add post about Guix Packager.

From: Ludovic Courtès
Subject: branch master updated: website: Add post about Guix Packager.
Date: Fri, 24 Nov 2023 08:02:09 -0500

This is an automated email from the git hooks/post-receive script.

civodul pushed a commit to branch master
in repository guix-artwork.

The following commit(s) were added to refs/heads/master by this push:
     new ac5c520  website: Add post about Guix Packager.
ac5c520 is described below

commit ac5c520059adfe6c1e2c057d24230dcca3d23cb2
Author: Ludovic Courtès <>
AuthorDate: Tue Nov 21 15:04:47 2023 +0100

    website: Add post about Guix Packager.
    * website/posts/,
    website/static/blog/img/guix-packager.gif: New files.
    Co-authored-by: Philippe Virouleau <>
 website/posts/            | 136 ++++++++++++++++++++++++++++++
 website/static/blog/img/guix-packager.gif | Bin 0 -> 271272 bytes
 2 files changed, 136 insertions(+)

diff --git a/website/posts/ b/website/posts/
new file mode 100644
index 0000000..ee1526e
--- /dev/null
+++ b/website/posts/
@@ -0,0 +1,136 @@
+title: Write package definitions in a breeze
+author: Ludovic Courtès, Philippe Virouleau
+tags: Scheme API, Programming interfaces
+date: 2023-11-24 14:30
+More than 28,000 packages are available in Guix today, not counting
+third-party channels.  That’s a lot—the [5th largest GNU/Linux
+distro](!  But it’s nothing if the one package you
+care about is missing.  So even you, dear reader, may one day find
+yourself defining a package for your beloved deployment tool.  This post
+introduces a new tool poised to significantly lower the barrier to
+writing new packages.
+# Introducing Guix Packager
+for Guix is not all that hard but, as always, it’s much harder the first
+time you do it, especially when starting from a blank page and/or not
+being familiar with the programming environment of Guix.  [Guix
+Packager]( is a new
+web user interface to get you started—[try
+it!](  It arrived
+right in time as an aid to the [packaging
+given last week at the Workshop on Reproducible Software Environments.
+![Screenshot showing the Guix Packager 
+The interface aims to be intuitive: fill in forms on the left
+and it produces a correct, ready-to-use package definition on the right.
+Importantly, it helps you avoid pitfalls that trip up many newcomers:
+  - When you add a dependency in one of the “Inputs” fields, it adds the
+    right variable name in the generated code *and* imports the right
+    [package
+  - Likewise, you can choose a license and be sure the `license` field
+    will refer to the right variable representing that license.
+  - You can turn tests on and off, and add configure flags.  These
+    translate to a valid `arguments` field of your package, letting you
+    discover the likes of [keyword
+    and
+    without having to first dive into the manual.
+Pretty cool, no?
+# Implementation
+All the credit for this tool goes to co-worker and intrepid hacker
+Philippe Virouleau.  A unique combination of paren aversion and web
+development superpowers—unique in the Guix community—led
+Philippe to develop the whole thing in a glimpse (says Ludovic!).
+The purpose was to provide a single view to be able to edit a package recipe,
+therefore the application is a *single-page application* (SPA) written in
+using the UI library Philippe is most comfortable with: 
+and [MaterialUI]( for styling the components.
+It's built with [TypeScript](, and the library
+part actually defines all the types needed to manipulate Guix packages and 
+components (such as build systems or package sources).
+One of the more challenging parts was to be able to provide fast and helpful 
“search as you
+type” results over the 28k+ packages. It required a combination of
+MaterialUI's [virtualized 
+as well as caching the packages data in the browser's local storage,
+when possible (packaging metadata itself is fetched from
+``, a generic representation of the
+current package set).
+While the feature set provides a great starting point, there are still a few
+things that may be worth implementing.  For instance, only the GNU and
+CMake build systems are supported so far; it would make sense to include
+a few others (Python-related ones might be good candidates).
+Running a local (development) version of the application can happen on
+top of Guix, since—obviously—it's been developed with the `node`
+version packaged in Guix, using the quite standard `packages.json` for
+JavaScript dependencies installed through `npm`.  [Contributions
+# Lowering the barrier to entry
+This neat tool complements a set of steps we’ve taken over time to make
+packaging in Guix approachable.  Indeed, while package definitions are
+actually code written in the Scheme language, the `package` “language”
+was designed [from the get-go]( to be
+fully declarative—think JSON with parens instead of curly braces and
+semicolons.  More recently we [simplified the way package inputs are
+specified]( with an
+eye on making package definitions less intimidating.
+The [`guix import`
+also exists to make it easier to simplify packaging: it can generate a
+package definition for anything available in other package
+repositories such as PyPI, CRAN,, and so forth.  If your
+preference goes to curly braces rather than parens, it can also [convert
+a JSON package
+to Scheme code.  Once you have your first `.scm` file, `guix build`
+prints hints for common errors such missing module imports (those
+`#:use-module` stanzas).  We also put effort into providing [reference
+a [video
+tutorial](, and
+a [tutorial for more complex
+Do share your experience [with us]( and
+until then, happy packaging!
+# Acknowledgments
+Thanks to Felix Lechner and Timothy Sample for providing feedback on an
+earlier draft of this post.
+#### About GNU Guix
+[GNU Guix]( is a transactional package manager and
+an advanced distribution of the GNU system that [respects user
+Guix can be used on top of any system running the Hurd or the Linux
+kernel, or it can be used as a standalone operating system distribution
+for i686, x86_64, ARMv7, AArch64 and POWER9 machines.
+In addition to standard package management features, Guix supports
+transactional upgrades and roll-backs, unprivileged package management,
+per-user profiles, and garbage collection.  When used as a standalone
+GNU/Linux distribution, Guix offers a declarative, stateless approach to
+operating system configuration management.  Guix is highly customizable
+and hackable through [Guile](
+programming interfaces and extensions to the
+[Scheme]( language.
diff --git a/website/static/blog/img/guix-packager.gif 
new file mode 100644
index 0000000..de8a02f
Binary files /dev/null and b/website/static/blog/img/guix-packager.gif differ

reply via email to

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