nix-config/nix/patch.nix
Patrick 332cac14c3
fix: remove merged patches
fix: allow empty patch folder
2024-11-10 16:22:05 +01:00

27 lines
599 B
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 [ ];
};
};
}