1
0
Fork 0

tools/: add nixops

This now means we require Nix to be installed globally. This shouldn't
be the case in the long run, but will be until
https://github.com/tweag/rules_nixpkgs/issues/75 gets fixed or we maybe
move from rules_nixpkgs to nix-bundle or something similar.
master
q3k 2019-05-15 19:08:25 +02:00
parent b7e4bd4fa1
commit 1e6b52a194
4 changed files with 31 additions and 1 deletions

2
README
View File

@ -3,6 +3,8 @@ HSCloud
This is a monorepo. You'll need bash and Bazel 0.20.0+ to use it.
You'll also need Nix installed globally in your system until [rules_nixpkgs/75](https://github.com/tweag/rules_nixpkgs/issues/75) is resolved. Or run on NixOS.
Getting started
---------------

View File

@ -1,6 +1,27 @@
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Nix rules
http_archive(
name = "io_tweag_rules_nixpkgs",
strip_prefix = "rules_nixpkgs-364adc70f32c2b3982995fce06b334f4d159070e",
urls = ["https://github.com/tweag/rules_nixpkgs/archive/364adc70f32c2b3982995fce06b334f4d159070e.tar.gz"],
)
# Nix packages
load("@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl", "nixpkgs_git_repository", "nixpkgs_package")
nixpkgs_git_repository(
name = "nixpkgs",
revision = "2f1f9a9fe8a3c22f0677733523eaf6bd33995d50",
)
nixpkgs_package(
name = "nixops",
attribute_path = "nixops",
repositories = { "nixpkgs": "@nixpkgs" },
)
# Python rules
git_repository(
name = "io_bazel_rules_python",

View File

@ -55,3 +55,9 @@ copy_go_binary(
src = "@com_github_cloudflare_cfssl//cmd/cfssl:cfssl",
visibility = ["//visibility:public"],
)
copy_go_binary(
name = "nixops",
src = "@nixops//:bin",
visibility = ["//visibility:public"],
)

View File

@ -9,4 +9,5 @@ cd "${hscloud_root}"
bazel build \
//tools:kubectl //tools:kubecfg //tools:secretstore \
//tools:pass //tools:calicoctl.bin //tools:cfssl
//tools:pass //tools:calicoctl.bin //tools:cfssl \
//tools:nixops