]> Git — Sourcephile - sourcephile-nix.git/blob - nixpkgs/patches.sh
nix: update to latest nixpkgs-unstable
[sourcephile-nix.git] / nixpkgs / patches.sh
1 #!/usr/bin/env bash
2 set -eux
3 set -o pipefail
4 githubToken=$(pass julm/github.com/token/nixpkgs-patches.sh)
5 {
6 echo '['
7 for pr in \
8 83904 \
9 93305_ \
10 93293_ \
11 93457_ \
12 93659 \
13 93629 \
14 94938 \
15 96655 \
16 97740 \
17 98455 \
18 98734 \
19 101071_ \
20 104457 \
21 104460 \
22 ; do
23 PR=${pr%_}
24 test $PR = $pr || echo '/*'
25 sha256=$(nix-prefetch-url --type sha256 https://github.com/NixOS/nixpkgs/pull/$PR.diff)
26 # Token generated on https://github.com/settings/tokens
27 info=$(curl -Ls -H "Authorization: token $githubToken" \
28 https://api.github.com/repos/NixOS/nixpkgs/pulls/$PR)
29 description=$(printf %s "$info" | jq --raw-output .title)
30 cat <<EOF
31 {$(test "$(printf %s "$info" | jq --raw-output .merged)" = false || echo " # merged")
32 meta.description = "$description";
33 url = "https://github.com/NixOS/nixpkgs/pull/$PR.diff";
34 sha256 = "$sha256";
35 }
36 EOF
37 test $PR = $pr || echo '*/'
38 done
39 echo ']'
40 } >"${0%.sh}".nix
41