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