Nix packaging #15
No reviewers
Labels
No labels
cat
bug
cat
feature
cat
idea
cat
performance
cat
reliability
cat
security
cat
ui
difficulty
high
difficulty
low
difficulty
mid
prio
high
prio
low
prio
mid
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/guichet#15
Loading…
Reference in a new issue
No description provided.
Delete branch "nix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
To build Guichet in a controlled environment and to unify our release logic, I added some logic to package Guichet with Nix.
The packaging is based on gomod2nix and requires a
gomod2nix.toml
file.I have also embedded some files provided by
gomod2nix
in thenix/builder
folder.It might be possible to rewrite our
default.nix
to not import them and use the ones from thegomod2nix
repo.I have parameterized the code everywhere we call
static/
andtemplates/
as seeking these folders only on the current working directory was making packaging and releasing harder than necessary.Now, you can set multiple paths in the JSON file and additionnaly the working directory and the executable path are automatically checked.
This change is retro-compatible and, in practise, the 2 default paths should cover most if not all the cases.
As a side note, the generated docker image is not bigger than the previous one (prev: ~6MB, this one: ~4.5MB).
In the long run, the idea is to use this work to automatically release guichet binaries like garage ones, both statically and on the Docker Hub.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.