Find a file
2024-12-01 21:17:33 +01:00
src chore: move pr logic to extra file 2024-12-01 21:17:33 +01:00
.envrc init 2024-11-11 17:43:58 +01:00
.gitignore init 2024-11-11 17:43:58 +01:00
Cargo.lock feat: allow giving prs as github links 2024-11-13 18:58:21 +01:00
Cargo.toml feat: allow giving prs as github links 2024-11-13 18:58:21 +01:00
flake.lock feat: update 2024-11-14 21:20:11 +01:00
flake.nix feat: update 2024-11-14 21:20:11 +01:00
README.md feat: remove tracking file 2024-12-01 20:45:49 +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.

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.

Then using below module one can alter nixpkgs to use these patches

{
  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 [ ];
      };
  };
}