diff options
Diffstat (limited to 'pkgs/development/compilers/go/binary.nix')
-rw-r--r-- | pkgs/development/compilers/go/binary.nix | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/pkgs/development/compilers/go/binary.nix b/pkgs/development/compilers/go/binary.nix deleted file mode 100644 index 3b4e8010d27e..000000000000 --- a/pkgs/development/compilers/go/binary.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ lib, stdenv, fetchurl, version, hashes, autoPatchelfHook }: -let - toGoKernel = platform: - if platform.isDarwin then "darwin" - else platform.parsed.kernel.name; - - toGoCPU = platform: { - "i686" = "386"; - "x86_64" = "amd64"; - "aarch64" = "arm64"; - "armv6l" = "armv6l"; - "armv7l" = "armv6l"; - "powerpc64le" = "ppc64le"; - "riscv64" = "riscv64"; - }.${platform.parsed.cpu.name} or (throw "Unsupported CPU ${platform.parsed.cpu.name}"); - - toGoPlatform = platform: "${toGoKernel platform}-${toGoCPU platform}"; - - platform = toGoPlatform stdenv.hostPlatform; -in -stdenv.mkDerivation rec { - name = "go-${version}-${platform}-bootstrap"; - - src = fetchurl { - url = "https://go.dev/dl/go${version}.${platform}.tar.gz"; - sha256 = hashes.${platform} or (throw "Missing Go bootstrap hash for platform ${platform}"); - }; - - nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; - - # We must preserve the signature on Darwin - dontStrip = stdenv.hostPlatform.isDarwin; - - installPhase = '' - runHook preInstall - mkdir -p $out/share/go $out/bin - cp -r . $out/share/go - ln -s $out/share/go/bin/go $out/bin/go - runHook postInstall - ''; -} |