nixp-meta/README.md

49 lines
1.2 KiB
Markdown
Raw Normal View History

2024-12-01 20:16:59 +01:00
# 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.
2024-12-01 20:45:49 +01:00
`nixp-meta add-pr <pr>` Downloads the diff for the specified PR to a folder (default `./patches/PR`)
`nixp-meta update-prs` updates all prs.
2024-12-01 20:16:59 +01:00
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 [ ];
};
};
}
```