cctools-apple: fix download source

This probably hasn’t built for a while. Apple is redirecting to GitHub,
which results in different hashes for cctools and ld64. While I’m fixing
the hashes, I also updated the sources to use `fetchFromGitHub`.

+11 -7
+11 -7
pkgs/os-specific/darwin/cctools/apple.nix
··· 1 - { lib, stdenv, fetchurl, symlinkJoin, xcbuildHook, tcsh, libobjc, libtapi, libunwind, llvm, memstreamHook, xar }: 1 + { lib, stdenv, fetchFromGitHub, symlinkJoin, xcbuildHook, tcsh, libobjc, libtapi, libunwind, llvm, memstreamHook, xar }: 2 2 3 3 let 4 4 ··· 6 6 pname = "cctools"; 7 7 version = "973.0.1"; 8 8 9 - src = fetchurl { 10 - url = "https://opensource.apple.com/tarballs/cctools/cctools-${version}.tar.gz"; 11 - hash = "sha256-r/6tsyyfi3R/0cLl+lN/B9ZaOaVF+Z7vJ6xj4LzSgiQ="; 9 + src = fetchFromGitHub { 10 + owner = "apple-oss-distributions"; 11 + repo = "cctools"; 12 + rev = "${pname}-${version}"; 13 + hash = "sha256-0NlDqy3zeg4D0MbDipx0sMYDfzYa63Jxfsckzz/928o="; 12 14 }; 13 15 14 16 patches = [ ··· 60 62 pname = "ld64"; 61 63 version = "609"; 62 64 63 - src = fetchurl { 64 - url = "https://opensource.apple.com/tarballs/ld64/ld64-${version}.tar.gz"; 65 - hash = "sha256-SqQ7SqmK+uOPijzxOTqtkEu3qYmcth6H7rrQ03R1Q+4="; 65 + src = fetchFromGitHub { 66 + owner = "apple-oss-distributions"; 67 + repo = "ld64"; 68 + rev = "${pname}-${version}"; 69 + hash = "sha256-WAaphem6NS4eCHL/pISlDXnO1CDYTgSrVGzcothh4/Q="; 66 70 }; 67 71 68 72 postPatch = ''