# nix-plugin-pijul
This [Nix](https://nixos.org/) 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:
- pijul+https
- pijul+http
- pijul+ssh
- pijul+file
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.
## Installing
Add the built pijul.so module to plugin-files in nix.conf.
NixOS:
```nix
{
nix.options.plugin-files = "${nix-plugin-pijul}/lib/nix/pijul.so";
}
```
## Examples
- `nix build pijul+https://nest.pijul.com/pijul/pijul`
- `nix build pijul+https://nest.pijul.com/pijul/pijul?channel=main&state=PNJL5TPZLQ3VXAASTLUX7462RCRPO7TV3GKOTTHDZABDQCBMXPRQC`
- ```nix
{
inputs = {
nix-plugin-pijul.url = "pijul+https://nest.pijul.com/dblsaiko/nix-plugin-pijul";
};
outputs = { self, nix-plugin-pijul }: {
# ...
};
}
```
## Acknowledgements
Code based on the [pijul fetcher
PR](https://github.com/NixOS/nix/pull/8730) by Nikodem Rabuliński.