{ name , writeScript , xidel , coreutils , gnused , gnugrep , curl , jq }: let version = (builtins.parseDrvName name).version; in writeScript "update-firefox-nightly-bin" '' PATH=${coreutils}/bin:${gnused}/bin:${gnugrep}/bin:${xidel}/bin:${curl}/bin:${jq}/bin #set -eux pushd pkgs/firefox-nightly-bin tmpfile=`mktemp` url=https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ nightly_file=`curl $url | \ xidel - --extract //a | \ grep firefox | \ grep linux-x86_64.json | \ tail -1 | \ sed -e 's/.json//'` nightly_json=`curl --silent $url$nightly_file.json` cat > $tmpfile <