WIP: readme
This commit is contained in:
parent
e033b3e678
commit
b6a6a87179
48
README.md
Normal file
48
README.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
# 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 [ ];
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
|
@ -20,11 +20,13 @@ struct Cli {
|
|||
|
||||
#[derive(Subcommand)]
|
||||
enum CliCommands {
|
||||
/// Track how far a PR has made it in the nix pipeline
|
||||
Track(Track),
|
||||
/// Download a diff without touching the tracking file
|
||||
GetDiff(GetDiff),
|
||||
// Update all PR, removing them if they are contained in your local nixpkgs
|
||||
/// Update all PR, removing them if they are contained in your local nixpkgs
|
||||
UpdatePrs(UpdatePRs),
|
||||
// Unconditionally add a new PR
|
||||
/// Unconditionally add a new PR
|
||||
AddPr(AddPR),
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue