From 4f5b1c61af838d29f1f80b493160a28d0866d277 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 8 Jan 2022 00:58:14 +0100 Subject: ... --- flake.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 2f5758a..237d7e9 100644 --- a/flake.nix +++ b/flake.nix @@ -91,6 +91,7 @@ pkgconfig ubnt-mkfwimage + gnused ]; openwrtWithPackages = pkgs.stdenv.mkDerivation { @@ -164,8 +165,12 @@ done < <(find . "$patchDir" -not \( \( -path ./tmp -o -path ./build_dir -o -path ./bin -o -path ./staging_dir \) -a -prune \) -a \( -type f -a -name '*.sops' -a -print0 \)) while IFS= read -r -d $'\0' patchFile; do - patch -p1 --batch <$patchFile - done < <(find "$patchDir" -type f -name '*.patch' -print0) + if [[ "''${patchFile##*.}" = "patch" ]]; then + patch -p1 --batch <$patchFile + else + . $patchFile + fi + done < <(find "$patchDir" -type f -print0) } function buildPhase() { -- cgit v1.2.3