#!/usr/bin/env bash set -eux githubToken=$(pass julm/github.com/token/nixpkgs-patches.sh) { echo '[' for pr in \ 83904 \ 93305_ \ 93293_ \ 93457_ \ 93659 \ 96655 \ 97740 \ 98455 \ 98734 \ 101071 \ 104457 \ 109643 \ ; do PR=${pr%_} test $PR = $pr || echo '/*' # pkgs.fetchpatch tries to normalize the patch using filterdiff after downloading it # https://github.com/NixOS/nixpkgs/issues/41401#issuecomment-394173658 nix=$(mktemp) trap "rm $nix" EXIT cat >"$nix" < {} }: pkgs.fetchpatch { url = "https://github.com/NixOS/nixpkgs/pull/$PR.diff"; sha256 = "0000000000000000000000000000000000000000000000000000"; } EOF hash=$(nix -L build -f "$nix" |& sed -ne 's/^ *got: *//p') test -n "$hash" # Token generated on https://github.com/settings/tokens info=$(curl -Ls -H "Authorization: token $githubToken" \ https://api.github.com/repos/NixOS/nixpkgs/pulls/$PR) description=$(printf %s "$info" | jq --raw-output .title) cat <"${0%.sh}".nix