aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Höppner2020-11-14 20:37:51 +0000
committernotgne22020-11-14 14:12:29 -0700
commitf32a6f17f6b1fb4bf9c3a9857e459177081dbb56 (patch)
treeb3032c1b29a00e76b7c5c56b358d9c52e13b8fdf
parentcd751f1e95c9ac5e73cf5e6b0423d05ec9adcc7f (diff)
[OPS-1085] Add CI
-rw-r--r--.buildkite/pipeline.yml4
-rw-r--r--flake.nix12
-rw-r--r--shell.nix13
3 files changed, 29 insertions, 0 deletions
diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml
new file mode 100644
index 0000000..95c9417
--- /dev/null
+++ b/.buildkite/pipeline.yml
@@ -0,0 +1,4 @@
+steps:
+ - label: Check Nix flake
+ commands:
+ - nix-shell --run 'nix --experimental-features "nix-command flakes" flake check'
diff --git a/flake.nix b/flake.nix
index 81a639e..76afb54 100644
--- a/flake.nix
+++ b/flake.nix
@@ -34,6 +34,18 @@
program = "${self.defaultPackage."${system}"}/bin/deploy";
};
+ devShell = let
+ inherit (self.packages.${system}) deploy-rs;
+ in
+ pkgs.mkShell {
+ inherit (deploy-rs)
+ nativeBuildInputs
+ builtDependencies;
+
+ buildInputs = deploy-rs.buildInputs
+ ++ [ pkgs.nixUnstable ];
+ };
+
lib = rec {
setActivate = base: activate: pkgs.buildEnv {
name = ("activatable-" + base.name);
diff --git a/shell.nix b/shell.nix
new file mode 100644
index 0000000..9eb132a
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,13 @@
+(import
+ (
+ let
+ lock = builtins.fromJSON (builtins.readFile ./flake.lock);
+ in
+ fetchTarball {
+ url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
+ sha256 = lock.nodes.flake-compat.locked.narHash;
+ }
+ )
+ {
+ src = ./.;
+ }).shellNix