nixp-meta/README.md
2024-12-01 20:16:59 +01:00

49 lines
1.3 KiB
Markdown

# nixp-meta
General purpose meta tool for all things nix.
## Currently implemented modules
### PR tracking
Using `nixp-meta track <pr>` on can see which nixpkgs branches a pull requests has reached, to gauge if updating is worth it yet.
### Live PR diffs
If you cannot wait for a PR to be merged, or just want to test it while it's still being worked on, this module is for you.
`nixp-meta add-pr <pr>` Downloads the diff for the specified PR to a folder (default `./patches/PR`) and updates a tracking file(default `pr.txt`).
`nixp-meta update-prs` then uses that tracking file to update all prs contained.
Then using below module one can alter nixpkgs to use these patches
```nix
{
inputs,
...
}:
{
flake = {
nixpkgs-patched =
let
system = "x86_64-linux";
pkgs = import inputs.nixpkgs { inherit system; };
in
pkgs.stdenvNoCC.mkDerivation {
name = "Nixpkgs with patches from open PRs";
src = inputs.nixpkgs;
dontConfigure = true;
dontBuild = true;
doCheck = false;
dontFixup = true;
installPhase = ''
cp -r ./ $out
'';
patches =
if builtins.pathExists ../patches then pkgs.lib.filesystem.listFilesRecursive ../patches else [ ];
};
};
}
```