You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How would I do that with rules_haskell in a WORKSPACE file?
nixpkgs_package(
name = "ghc",
build_file = "@io_tweag_rules_haskell//haskell:ghc.BUILD",
nix_file_content = """
let pkgs = import <nixpkgs> {
overlays = [ (import ./nix/overlays.nix) ];
}; in
pkgs.haskell.packages.ghc822.ghcWithPackages (p: with p;
[newtype scientific aeson cassava template-haskell]
)
""",
repository = "@nixpkgs",
)
It seems that bazel is referencing files relative to a temporary build folder and not relative to the project that I'm building.
flare-timing-bazel> bazel build //...
INFO: Build options have changed, discarding analysis cache.
error: getting status of '/private/var/tmp/_bazel_pdejoux/729fadfaa2051173dd27a953445384ed/external/ghc/nix/overlays.nix': No such file or directory
ERROR: /.../detour-via-sci/BUILD.bazel:6:1: no such package '@ghc//': Cannot build Nix attribute ghc. and referenced by '//detour-via-sci:ghc-impl'
ERROR: Analysis of target '//detour-via-sci:ghc-impl' failed; build aborted: no such package '@ghc//': Cannot build Nix attribute ghc.
INFO: Elapsed time: 0.337s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (5 packages loaded)
With overrides and overlays, external
.nix
files are often referenced.https://nixos.org/nixpkgs/manual/#how-to-create-nix-builds-for-your-own-private-haskell-packages
https://nixos.org/nixpkgs/manual/#sec-pkg-override
How would I do that with rules_haskell in a
WORKSPACE
file?It seems that bazel is referencing files relative to a temporary build folder and not relative to the project that I'm building.
I'm trying to avoid
uom-plugin-0.2.0.1
that is brought in withghc822.ghcWithPackages
and depend instead onuom-plugin-0.3.0.0
.The text was updated successfully, but these errors were encountered: