forked from hswaw/hscloud
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
parent
b7e4bd4fa1
commit
1e6b52a194
2
README
2
README
|
@ -3,6 +3,8 @@ HSCloud
|
||||||
|
|
||||||
This is a monorepo. You'll need bash and Bazel 0.20.0+ to use it.
|
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
|
Getting started
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
|
21
WORKSPACE
21
WORKSPACE
|
@ -1,6 +1,27 @@
|
||||||
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
||||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
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
|
# Python rules
|
||||||
git_repository(
|
git_repository(
|
||||||
name = "io_bazel_rules_python",
|
name = "io_bazel_rules_python",
|
||||||
|
|
|
@ -55,3 +55,9 @@ copy_go_binary(
|
||||||
src = "@com_github_cloudflare_cfssl//cmd/cfssl:cfssl",
|
src = "@com_github_cloudflare_cfssl//cmd/cfssl:cfssl",
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
copy_go_binary(
|
||||||
|
name = "nixops",
|
||||||
|
src = "@nixops//:bin",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
|
@ -9,4 +9,5 @@ cd "${hscloud_root}"
|
||||||
|
|
||||||
bazel build \
|
bazel build \
|
||||||
//tools:kubectl //tools:kubecfg //tools:secretstore \
|
//tools:kubectl //tools:kubecfg //tools:secretstore \
|
||||||
//tools:pass //tools:calicoctl.bin //tools:cfssl
|
//tools:pass //tools:calicoctl.bin //tools:cfssl \
|
||||||
|
//tools:nixops
|
||||||
|
|
Loading…
Reference in New Issue