diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -91,6 +91,7 @@ | |||
91 | 91 | ||
92 | pkgconfig | 92 | pkgconfig |
93 | ubnt-mkfwimage | 93 | ubnt-mkfwimage |
94 | gnused | ||
94 | ]; | 95 | ]; |
95 | 96 | ||
96 | openwrtWithPackages = pkgs.stdenv.mkDerivation { | 97 | openwrtWithPackages = pkgs.stdenv.mkDerivation { |
@@ -164,8 +165,12 @@ | |||
164 | 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 \)) | 165 | 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 \)) |
165 | 166 | ||
166 | while IFS= read -r -d $'\0' patchFile; do | 167 | while IFS= read -r -d $'\0' patchFile; do |
167 | patch -p1 --batch <$patchFile | 168 | if [[ "''${patchFile##*.}" = "patch" ]]; then |
168 | done < <(find "$patchDir" -type f -name '*.patch' -print0) | 169 | patch -p1 --batch <$patchFile |
170 | else | ||
171 | . $patchFile | ||
172 | fi | ||
173 | done < <(find "$patchDir" -type f -print0) | ||
169 | } | 174 | } |
170 | 175 | ||
171 | function buildPhase() { | 176 | function buildPhase() { |