]>
Git — Sourcephile - julm/julm-nix.git/blob - nixpkgs/patches.sh
4 githubToken
=$(pass julm/github.com/token/nixpkgs-patches.sh)
24 test $PR = $pr || echo '/*'
25 # pkgs.fetchpatch tries to normalize the patch using filterdiff after downloading it
26 # https://github.com/NixOS/nixpkgs/issues/41401#issuecomment-394173658
30 { pkgs ? import <nixpkgs> {} }:
32 url = "https://github.com/NixOS/nixpkgs/pull/$PR.diff";
33 sha256 = "0000000000000000000000000000000000000000000000000000";
36 hash=$(nix 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 '*/'