daml/nix/repositories.bzl
Andreas Herrmann 18a9c93549
Bazelify ghc-lib (#12508)
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Co-authored-by: Claudio Bley <claudio.bley@digitalasset.com>
2022-05-19 10:49:16 +02:00

29 lines
1.1 KiB
Python

# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# Bazel cannot automatically determine which files a Nix target depends on.
# rules_nixpkgs offers the nix_file_deps attribute for that purpose. It should
# list all files that a target depends on. This allows Bazel to rebuild the
# target using Nix if any of these files has been changed. Omitting files from
# this list can cause subtle bugs or cache misses when Bazel loads an outdated
# store path. You can use the following command to determine what files a Nix
# target depends on. E.g. for tools.curl
#
# $ nix-build -vv -A tools.curl nix 2>&1 \
# | egrep '(evaluating file|copied source)' \
# | egrep -v '/nix/store'
#
# Unfortunately there is no mechanism to automatically keep this list up to
# date at the moment. See https://github.com/tweag/rules_nixpkgs/issues/74.
common_nix_file_deps = [
"//nix:bazel.nix",
"//nix:nixpkgs.nix",
"//nix:system.nix",
"//nix:nixpkgs/default.nix",
"//nix:nixpkgs/default.src.json",
]
dev_env_nix_repos = {
"nixpkgs": "@nixpkgs",
}