nix-files/nixpatches/flake.nix
colin c8dcb4ac59 flake: lift the nixpkgs patching out to its own flake
i hope it's a *little* cleaner this way, but tbh i'm not really sure.
2023-01-10 17:00:48 +00:00

27 lines
780 B
Nix

{
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.11";
};
outputs = { self, nixpkgs }:
let
patchedPkgsFor = system: nixpkgs.legacyPackages.${system}.applyPatches {
name = "nixpkgs-patched-uninsane";
src = nixpkgs;
patches = import ./list.nix {
inherit (nixpkgs.legacyPackages.${system}) fetchpatch;
inherit (nixpkgs.lib) fakeHash;
};
};
patchedFlakeFor = system: import "${patchedPkgsFor system}/flake.nix";
patchedFlakeOutputsFor = system:
(patchedFlakeFor system).outputs { inherit self; };
in
{
legacyPackages = builtins.mapAttrs
(system: _:
(patchedFlakeOutputsFor system).legacyPackages."${system}"
)
nixpkgs.legacyPackages;
};
}