Fix : fasten your software
Distributing software is a notoriously hard thing to pull off on Linux. The sheer variability of distributions, language ecosystems and user preferences makes it almost impossible to guarantee that the software you write and test on a platform will work everywhere else.
The problem is painful enough that developpers and companies have collectively chosen to distribute entire systems (so-called "containerized" applications) rather than try to use what the underlying system provides.
Now, instead of having to maintain a version of your software for 10+ distributions and their quirks, you only have to maintain your software for 10+ containerization technologies, and their quirks. Yay.
The only way to stop the ecosystem from fragmenting further and further is not to invent new tools. Or rather, before inventing new tools, to agree on a single distribution protocol, that those tools can follow. Much like the venerable HTTP protocol has done for the Web, and the LSP has done for IDEs, here is a proposal for a new protocol for reliable software distribution, thus dubbed RSDP.
At its heart, this protocol describes the interactions between a build server (similar to a Nix daemon) that runs install tasks and writes to a global package store, and a build client that asks for packages to be installed.
The tools provided in this repository are intended as a reference implementation of this protocol, and an example interface to its features. Note that the Fix scripting language is only provided as a convenience to help in describing your own build plans, and is not required by the protocol.
Installation
Download a compiled version
Get the latest compiled version for your system :
Or find a previous version
Build from source
This project is written in Haskell, and uses Stack for building and Nix for simplicity.
If you have Nix installed, you will be able to build it by entering the following commands in a terminal :
nix-channel --add https:/nixos.org/channels/nixos-23.11
nix-channel --update
NIX_PATH=nixpkgs=channel:nixos-23.11 nix-shell --run 'stack build'
Otherwise, just using Stack :
stack build
Usage
Once installed, you will have two executables, fix-daemon
and
fix
.
The first is a server, that you can start simply by running the executable.
The second is a client for the server, that can create build plans
from a basic Nix-like scripting language and submit them to the
server. The client has a very simple CLI, consisting of three
subcommands (and a --help
option for each one) :
-
fix plan <script-file>
creates the build plan described in the given script, and outputs its name -
fix build <script-file>
does the same asfix eval
, but also asks the server to build the plan (choosing a default target, or one that it provided in theFIX_TARGET
environment variable) -
fix install <plan-file>
sends the given plan file to the server