Change:
<ins> #!/usr/bin/env nix-shell #!nix-shell -i bash -p git nix jq coreutils gnugrep gnused curl common-updater-scripts set -euo pipefail nixpkgs="$(git rev-parse --show-toplevel || (printf 'Could not find root of nixpkgs reponAre we running from within the nixpkgs git repo?n' >&2; exit 1))" stripwhitespace() { sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' } narhash() { nix --extra-experimental-features nix-command store prefetch-file --json "$1" | jq -r .hash } nixeval() { nix --extra-experimental-features nix-command eval --json --impure -f "$nixpkgs" "$1" | jq -r . } vendorhash() { (nix --extra-experimental-features nix-command build --no-link -f "$nixpkgs" --no-link "$1" 2>&1 >/dev/null | tail -n3 | grep -F got: | cut -d: -f2- | stripwhitespace) 2>/dev/null || true } findpath() { path="$(nix --extra-experimental-features nix-command eval --json --impure -f "$nixpkgs" "$1.meta.position" | jq -r . | cut -d: -f1)" outpath="$(nix --extra-experimental-features nix-command eval --json --impure --expr "builtins.fetchGit "$nixpkgs"")" if [ -n "$outpath" ]; then path="${path/$(echo "$outpath" | jq -r .)/$nixpkgs}" fi echo "$path" } getvar() { echo "$2" | grep -F "$1" | sed -e 's/:=/:/g' | cut -d: -f2- | stripwhitespace } attr="${UPDATE_NIX_ATTR_PATH:-curl-impersonate}" version="$(curl -sSL "https://api.github.com/repos/lwthiker/curl-impersonate/releases/latest" | jq -r .tag_name | sed -e 's/^v//')" pkgpath="$(findpath "$attr")" updated="$(cd "$nixpkgs" && update-source-version "$attr" "$version" --file="$pkgpath" --print-changes | jq -r length)" if [ "$updated" -eq 0 ]; then echo 'update.sh: Package version not updated, nothing to do.' exit 0 fi vars="$(curl -sSL "https://github.com/lwthiker/curl-impersonate/raw/v$version/Makefile.in" | grep '^ *[^ ]*_(VERSION|URL|COMMIT) *:=')" cat >"$(dirname "$pkgpath")"/deps.nix <<EOF # Generated by update.sh { fetchurl }: { "$(getvar CURL_VERSION "$vars").tar.xz" = fetchurl { url = "https://curl.se/download/$(getvar CURL_VERSION "$vars").tar.xz"; hash = "$(narhash "https://curl.se/download/$(getvar CURL_VERSION "$vars").tar.xz")"; }; "brotli-$(getvar BROTLI_VERSION "$vars").tar.gz" = fetchurl { url = "https://github.com/google/brotli/archive/refs/tags/v$(getvar BROTLI_VERSION "$vars").tar.gz"; hash = "$(narhash "https://github.com/google/brotli/archive/refs/tags/v$(getvar BROTLI_VERSION "$vars").tar.gz")"; }; "$(getvar NSS_VERSION "$vars").tar.gz" = fetchurl { url = "$(getvar NSS_URL "$vars")"; hash = "$(narhash "$(getvar NSS_URL "$vars")")"; }; "boringssl.zip" = fetchurl { url = "https://github.com/google/boringssl/archive/$(getvar BORING_SSL_COMMIT "$vars").zip"; hash = "$(narhash "https://github.com/google/boringssl/archive/$(getvar BORING_SSL_COMMIT "$vars").zip")"; }; "$(getvar NGHTTP2_VERSION "$vars").tar.bz2" = fetchurl { url = "$(getvar NGHTTP2_URL "$vars")"; hash = "$(narhash "$(getvar NGHTTP2_URL "$vars")")"; }; } EOF curhash="$(nixeval "$attr.curl-impersonate-chrome.boringssl-go-modules.outputHash")" newhash="$(vendorhash "$attr.curl-impersonate-chrome.boringssl-go-modules")" if [ -n "$newhash" ] && [ "$curhash" != "$newhash" ]; then sed -i -e "s|"$curhash"|"$newhash"|" "$pkgpath" else echo 'update.sh: New vendorHash same as old vendorHash, nothing to do.' fi </ins>

Discussion:
Project description is like curl, but doesn't get you blocked by cloudflare and other WAPs that insist you have the TLS fingerprint of a web browser. Metadata homepage URL: source URL: license: MIT platforms: linux
the build process produces a separate 'Chrome' and 'Firefox' impersonation binary
I started packaging the firefox variant of curl-impersonate in , but it has unresolved issues, including: missing the curl-impersonate wrapper scripts; PATH conflicts with ; disabled tests; missing shell completions; possible issues with getting an HTTP response from some sites including But it does sort of work and may be useful as a starting point. (Note that I have not checked the TLS fingerprint.)
I've opened which should add a fully working build from source of curl-impersonate (with both firefox and chrome variants)