From 241f52592899b42e42a1bfe861228f4686335203 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 4 Jun 2023 17:45:14 -0400 Subject: [PATCH] cctools-apple: fix download source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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`. --- pkgs/os-specific/darwin/cctools/apple.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkgs/os-specific/darwin/cctools/apple.nix b/pkgs/os-specific/darwin/cctools/apple.nix index f8ff90dbb13f..7adcfa9539a2 100644 --- a/pkgs/os-specific/darwin/cctools/apple.nix +++ b/pkgs/os-specific/darwin/cctools/apple.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, symlinkJoin, xcbuildHook, tcsh, libobjc, libtapi, libunwind, llvm, memstreamHook, xar }: +{ lib, stdenv, fetchFromGitHub, symlinkJoin, xcbuildHook, tcsh, libobjc, libtapi, libunwind, llvm, memstreamHook, xar }: let @@ -6,9 +6,11 @@ cctools = stdenv.mkDerivation rec { pname = "cctools"; version = "973.0.1"; - src = fetchurl { - url = "https://opensource.apple.com/tarballs/cctools/cctools-${version}.tar.gz"; - hash = "sha256-r/6tsyyfi3R/0cLl+lN/B9ZaOaVF+Z7vJ6xj4LzSgiQ="; + src = fetchFromGitHub { + owner = "apple-oss-distributions"; + repo = "cctools"; + rev = "${pname}-${version}"; + hash = "sha256-0NlDqy3zeg4D0MbDipx0sMYDfzYa63Jxfsckzz/928o="; }; patches = [ @@ -60,9 +62,11 @@ ld64 = stdenv.mkDerivation rec { pname = "ld64"; version = "609"; - src = fetchurl { - url = "https://opensource.apple.com/tarballs/ld64/ld64-${version}.tar.gz"; - hash = "sha256-SqQ7SqmK+uOPijzxOTqtkEu3qYmcth6H7rrQ03R1Q+4="; + src = fetchFromGitHub { + owner = "apple-oss-distributions"; + repo = "ld64"; + rev = "${pname}-${version}"; + hash = "sha256-WAaphem6NS4eCHL/pISlDXnO1CDYTgSrVGzcothh4/Q="; }; postPatch = ''