Skip to content

Commit

Permalink
Define Nix-enabled platform
Browse files Browse the repository at this point in the history
Like bazelbuild/rules_docker, we define a Nix-enabled platform with
`@local_config_platform//:host` as the parent platform.

Deprecates `linux_x86_64_nixpkgs` and `darwin_x86_64_nixpkgs`.
  • Loading branch information
mboes authored and mergify-bot committed Apr 20, 2020
1 parent 09246d7 commit 6e6a706
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
build --host_platform=@io_tweag_rules_nixpkgs//nixpkgs/constraints:linux_x86_64_nixpkgs
build --host_platform=@io_tweag_rules_nixpkgs//nixpkgs/platforms:host
2 changes: 2 additions & 0 deletions nixpkgs/constraints/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ platform(
"@platforms//os:linux",
"@io_tweag_rules_nixpkgs//nixpkgs/constraints:nixpkgs",
],
deprecation = "Use @io_tweag_rules_nixpkgs//platforms:host instead.",
visibility = ["//visibility:public"],
)

Expand All @@ -30,5 +31,6 @@ platform(
"@platforms//os:osx",
"@io_tweag_rules_nixpkgs//nixpkgs/constraints:nixpkgs",
],
deprecation = "Use @io_tweag_rules_nixpkgs//platforms:host instead.",
visibility = ["//visibility:public"],
)
6 changes: 6 additions & 0 deletions nixpkgs/platforms/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
platform(
name = "host",
constraint_values = ["@io_tweag_rules_nixpkgs//nixpkgs/constraints:support_nix"],
parents = ["@local_config_platform//:host"],
visibility = ["//visibility:public"],
)

0 comments on commit 6e6a706

Please sign in to comment.