flake-info: fix patch after upstream reformatting
`add_arg_pair` call was changed to multi-line format.
This commit is contained in:
@@ -17,8 +17,13 @@
|
||||
# This allows running flake-info in an offline environment (./flake-info-sandboxed.sh).
|
||||
flake-info = nixos-search.packages.${system}.flake-info.overrideAttrs (old: {
|
||||
postPatch = (old.postPatch or "") + ''
|
||||
substituteInPlace src/commands/nix_flake_attrs.rs --replace-fail \
|
||||
'command.add_arg_pair("-I", "nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz");' ""
|
||||
file=src/commands/nix_flake_attrs.rs
|
||||
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
|
||||
'';
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user