]>
Git — Sourcephile - sourcephile-nix.git/blob - nixpkgs/patches.sh
3 githubToken
=$(pass julm/github.com/token/nixpkgs-patches.sh)
21 test $PR = $pr || echo '/*'
22 # pkgs.fetchpatch tries to normalize the patch using filterdiff after downloading it
23 # https://github.com/NixOS/nixpkgs/issues/41401#issuecomment-394173658
27 { pkgs ? import <nixpkgs> {} }:
29 url = "https://github.com/NixOS/nixpkgs/pull/$PR.diff";
30 sha256 = "0000000000000000000000000000000000000000000000000000";
33 hash=$(nix -L build -f "$nix" |& sed -ne 's/^ *got: *//p')
35 # Token generated on https://github.com/settings/tokens
36 info
=$
(curl
-Ls -H "Authorization: token $githubToken" \
37 https
://api.github.com
/repos
/NixOS
/nixpkgs
/pulls
/$PR)
38 description
=$(printf %s "$info" | jq --raw-output .title)
40 {$(test "$(printf %s "$info" | jq --raw-output .merged)" = false || echo " # merged")
41 meta.description = "$description";
42 url = "https://github.com/NixOS/nixpkgs/pull/$PR.diff";
46 test $PR = $pr || echo '*/'