From 252376c617aa8f3003b044c897643174c07dfbda Mon Sep 17 00:00:00 2001 From: "Wael M. Nasreddine" Date: Sun, 3 Mar 2019 09:30:43 -0800 Subject: [PATCH] go_1_12: switch to fetchurl for sha256 consistency on Darwin fetchFromGitHub and thus fetchzip hashes the contents of the archive and not the archive itself. Unicode file names lead to different checksums on HFS+ vs. other file systems because of Unicode normalisation --- pkgs/development/compilers/go/1.12.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/development/compilers/go/1.12.nix b/pkgs/development/compilers/go/1.12.nix index 33485ad38178..7a02bac3fdaf 100644 --- a/pkgs/development/compilers/go/1.12.nix +++ b/pkgs/development/compilers/go/1.12.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin +{ stdenv, fetchurl, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin , perl, which, pkgconfig, patch, procps, pcre, cacert, llvm, Security, Foundation , mailcap, runtimeShell , buildPackages, targetPackages }: @@ -31,11 +31,9 @@ stdenv.mkDerivation rec { name = "go-${version}"; version = "1.12"; - src = fetchFromGitHub { - owner = "golang"; - repo = "go"; - rev = "go${version}"; - sha256 = "08j7ghcy5cs5p4sw5rqi57lzg52lrix8xbxn87y7y9sv6s3wx44n"; + src = fetchurl { + url = "https://dl.google.com/go/go${version}.src.tar.gz"; + sha256 = "1wl8kq21fbzmv4plnaza5acz8dhbaaq6smjzk3r6cf3l6qrkvi09"; }; # perl is used for testing go vet