From 38e9cef9e03ca3bd1fc7e3ed888e8fb17c339ee7 Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Wed, 9 Jan 2019 18:16:47 +0100 Subject: [PATCH] Fix custom_package rules The mangled hazel_workspace name was inserted wrongly. Whenever another package depended on a custom package it would fail due to the missing external workspace. --- hazel.bzl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hazel.bzl b/hazel.bzl index 6f00dd2..c478fc8 100644 --- a/hazel.bzl +++ b/hazel.bzl @@ -191,10 +191,9 @@ def hazel_custom_package_hackage( package_id, package_id, ) - fixed_package_name = hazel_workspace(package_name) http_archive( - name = "haskell_{0}".format(fixed_package_name), - build_file = "//third_party/haskell:BUILD.{0}".format(fixed_package_name), + name = hazel_workspace(package_name), + build_file = "//third_party/haskell:BUILD.{0}".format(package_name), sha256 = sha256, strip_prefix = package_id, urls = [url], @@ -222,13 +221,12 @@ def hazel_custom_package_github( repos). """ - fixed_package_name = hazel_workspace(package_name) - build_file = "//third_party/haskell:BUILD.{0}".format(fixed_package_name) + build_file = "//third_party/haskell:BUILD.{0}".format(package_name) url = "https://github.com/{0}/{1}".format(github_user, github_repo) ssh_url = "git@github.com:{0}/{1}".format(github_user, github_repo) new_git_repository( - name = "haskell_{0}".format(fixed_package_name), + name = hazel_workspace(package_name), remote = ssh_url if clone_via_ssh else url, build_file = build_file, commit = repo_sha,