This Nix plugin adds Pijul support to Nix
in the form of a fetcher. This means that builtins.fetchTree,
builtins.getFlake and the nix3 CLI tools now support Pijul
repositories.
The following new URL schemes are supported:
Right now, the first three support specifying channel and state for pure fetching, pijul+file right now only fetches from the worktree and doesn't support these yet.
Requires Nix 2.25+. The plugin executes pijul to actually fetch repositories, make sure that is available in the PATH.
Build from the NUR:
nix-build -A nix-plugin-pijul https://github.com/DzmingLi/nur-packages/archive/master.tar.gz
Or build from source:
pijul clone https://nest.pijul.com/DzmingLi/nix-plugin-pijul
cd nix-plugin-pijul
nix build
Add the built pijul.so module to plugin-files in nix.conf. Make sure it is built for the Nix version you are using it with.
{pkgs, config, ...}:
let
nur = import (builtins.fetchTarball "https://github.com/DzmingLi/nur-packages/archive/master.tar.gz") { inherit pkgs; };
in {
environment.systemPackages = [pkgs.pijul];
nix.settings.plugin-files = "${nur.nix-plugin-pijul}/lib/nix/plugins/pijul.so";
}
nix build pijul+https://nest.pijul.com/pijul/pijulnix build pijul+https://nest.pijul.com/pijul/pijul?channel=main&state=PNJL5TPZLQ3VXAASTLUX7462RCRPO7TV3GKOTTHDZABDQCBMXPRQC{
inputs = {
nix-plugin-pijul.url = "pijul+https://nest.pijul.com/DzmingLi/nix-plugin-pijul";
};
outputs = { self, nix-plugin-pijul }: {
# ...
};
}