This section describes how to set up the build environment required by the project. These instructions are for Fedora 38.
-
Install an implementation of Nix, such as Lix used here.
curl -sSf -L https://install.lix.systems/lix | sh -s -- install
-
First, clone the source code of this repository locally.
git clone https://github.com/jwillikers/cyrillic-encoder.git
-
Then change into the project directory.
cd cyrillic-encoder
-
Run with
nix run
.nix run
Nix is used to manage all of the necessary dependencies.
The nix develop
command can be used to enter or run commands in an environment with all of the necessary dependencies.
For convenience, direnv can be used to automatically load this environment when entering the project’s directory.
The mkhl.direnv VSCode extension integrates this environment in VSCode for development.
Nix also generates the configuration for pre-commit, which automates formatting and various checks when committing changes.
-
Install direnv for your system according to the direnv installation instructions.
sudo rpm-ostree install direnv
-
Integrate direnv with your shell by following the instructions on the direnv Setup page.
-
Permit the direnv configuration in the repository.
direnv allow
-
The just command runner can be used to perform common tasks, such as building the project and running tests. The
workflow
, orw
, subcommand can be used to easily run the default developer workflow. This will configure the CMake build, build everything, and run the tests.just w
CMake presets are used to simplify common configurations and tasks.
The workflow presets perform sets of tasks in a specific order.
The presets of most interest to developers are dev
and dev-clang
.
These perform the configure, build, and test steps.
The former uses the default compiler, oftentimes GCC, and the latter uses Clang.
In addition to these two workflows, the ci-gcc
, ci-clang
, and coverage-clang
presets can be used to perform the exact workflows used in CI.
The following command demonstrates how to execute the workflow for the dev
preset.
cmake --workflow --preset dev
Cyrillic Encoder can be built locally as a Flatpak. I might get around to setting up a Flatpak remote using GitHub Pages for easy installation someday. Follow these instructions to build the Flatpak.
-
Add the Flathub remote to the user’s Flatpak installation.
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
-
Use the
just flatpak
command to build the Flatpak.just flatpak
Contributions in the form of issues, feedback, and even pull requests are welcome. Make sure to adhere to the project’s Code of Conduct.
This project is built on the hard work of countless open source contributors. Several of these projects are enumerated below.
The project’s Code of Conduct is available in the Code of Conduct file.
This repository is licensed under the GPLv3, available in the license file.
© 2021-2024 Jordan Williams