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