Skip to content

Commit

Permalink
Merge pull request #1490 from tweag/update-rules-nixpkgs
Browse files Browse the repository at this point in the history
Update rules nixpkgs
  • Loading branch information
mergify[bot] committed Feb 18, 2021
2 parents e2006b7 + 322ca1a commit 7fd2f19
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 54 deletions.
6 changes: 2 additions & 4 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,8 @@ build:windows-bindist --experimental_strict_action_env
# Note [backward compatible options]
build:linux-bindist --incompatible_enable_cc_toolchain_resolution
build:macos-bindist --incompatible_enable_cc_toolchain_resolution
# rules_nixpkgs is not yet compatible with cc toolchain resolution, see
# https://github.com/tweag/rules_nixpkgs/issues/88
#build:ci-linux-nixpkgs --incompatible_enable_cc_toolchain_resolution
#build:ci-macos-nixpkgs --incompatible_enable_cc_toolchain_resolution
build:linux-nixpkgs --incompatible_enable_cc_toolchain_resolution
build:macos-nixpkgs --incompatible_enable_cc_toolchain_resolution
# Windows still uses --crosstool_top.
#build:ci-windows-bindist --incompatible_enable_cc_toolchain_resolution
# Blocked by https://github.com/bazelbuild/bazel/issues/11704
Expand Down
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ register_toolchains(
)

nixpkgs_cc_configure(
nix_file = "//nixpkgs:cc-toolchain.nix",
nix_file_deps = ["//nixpkgs:default.nix"],
# Don't override the default cc toolchain needed for bindist mode.
name = "nixpkgs_config_cc",
repository = "@nixpkgs_default",
)

Expand Down
4 changes: 2 additions & 2 deletions examples/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ load(
)

nixpkgs_cc_configure(
nix_file = "@rules_haskell//nixpkgs:cc-toolchain.nix",
nix_file_deps = ["@rules_haskell//nixpkgs:default.nix"],
# Don't override the default cc toolchain needed for bindist mode.
name = "nixpkgs_config_cc",
repository = "@rules_haskell//nixpkgs:default.nix",
)

Expand Down
6 changes: 3 additions & 3 deletions haskell/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def rules_haskell_dependencies():
maybe(
http_archive,
name = "io_tweag_rules_nixpkgs",
sha256 = "5c80f5ed7b399a857dd04aa81e66efcb012906b268ce607aaf491d8d71f456c8",
strip_prefix = "rules_nixpkgs-0.7.0",
urls = ["https://github.com/tweag/rules_nixpkgs/archive/v0.7.0.tar.gz"],
sha256 = "7aee35c95251c1751e765f7da09c3bb096d41e6d6dca3c72544781a5573be4aa",
strip_prefix = "rules_nixpkgs-0.8.0",
urls = ["https://github.com/tweag/rules_nixpkgs/archive/v0.8.0.tar.gz"],
)

maybe(
Expand Down
37 changes: 0 additions & 37 deletions nixpkgs/cc-toolchain.nix

This file was deleted.

13 changes: 9 additions & 4 deletions start
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,12 @@ nix_toolchain=$(cat <<EOF
# which was already initialized by rules_haskell_dependencies above.
load(
"@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl",
"nixpkgs_cc_configure",
"nixpkgs_git_repository",
"nixpkgs_package",
"nixpkgs_python_configure",
)
nixpkgs_python_configure(
repository = "@nixpkgs",
)
# Fetch a version of nixpkgs from GitHub.
# For more information see the documentation of rules_nixpkgs at
# https://github.com/tweag/rules_nixpkgs/blob/master/README.md
Expand All @@ -160,6 +157,14 @@ nixpkgs_git_repository(
# sha256 = …
)
nixpkgs_cc_configure(
repository = "@nixpkgs",
)
nixpkgs_python_configure(
repository = "@nixpkgs",
)
load(
"@rules_haskell//haskell:nixpkgs.bzl",
"haskell_register_ghc_nixpkgs",
Expand Down
4 changes: 2 additions & 2 deletions tutorial/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ load(
)

nixpkgs_cc_configure(
nix_file = "@rules_haskell//nixpkgs:cc-toolchain.nix",
nix_file_deps = ["@rules_haskell//nixpkgs:default.nix"],
# Don't override the default cc toolchain needed for bindist mode.
name = "nixpkgs_config_cc",
repository = "@rules_haskell//nixpkgs:default.nix",
)

Expand Down

0 comments on commit 7fd2f19

Please sign in to comment.