flake-info: fix patch after upstream reformatting

`add_arg_pair` call was changed to multi-line format.
This commit is contained in:
Jonas Nick
2025-12-23 10:45:43 +01:00
committed by Erik Arvstedt
parent bde29b84f7
commit 2a59766cb1
+7 -2
View File
@@ -17,8 +17,13 @@
# This allows running flake-info in an offline environment (./flake-info-sandboxed.sh). # This allows running flake-info in an offline environment (./flake-info-sandboxed.sh).
flake-info = nixos-search.packages.${system}.flake-info.overrideAttrs (old: { flake-info = nixos-search.packages.${system}.flake-info.overrideAttrs (old: {
postPatch = (old.postPatch or "") + '' postPatch = (old.postPatch or "") + ''
substituteInPlace src/commands/nix_flake_attrs.rs --replace-fail \ file=src/commands/nix_flake_attrs.rs
'command.add_arg_pair("-I", "nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz");' "" old_size=$(stat -c%s "$file")
sed -zi 's|command.add_arg_pair([ \n]*"-I",[ \n]*"nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz",[ \n]*);||' "$file"
if (($(stat -c%s "$file") == $old_size)); then
echo "String substitution failed"
exit 1
fi
''; '';
}); });
}); });