aboutsummaryrefslogtreecommitdiff
path: root/tools/govanity/flake.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-05-29 09:25:11 -0700
committerFranck Cuny <franck@fcuny.net>2022-05-29 09:25:11 -0700
commitf3a1d10b2c5df68835f86082cfb722ae679190ff (patch)
treeab29190a9e513380ff55b297c4ee58be41a70d12 /tools/govanity/flake.nix
parentfix(cgit): write the test correctly (diff)
parentremove unused Makefile (diff)
downloadinfra-f3a1d10b2c5df68835f86082cfb722ae679190ff.tar.gz
Merge remote-tracking branch 'govanity/main'
Change-Id: I4fd7c748648415db1fa9baaa048ba51e186ec268
Diffstat (limited to 'tools/govanity/flake.nix')
-rw-r--r--tools/govanity/flake.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/govanity/flake.nix b/tools/govanity/flake.nix
new file mode 100644
index 0000000..d2c2254
--- /dev/null
+++ b/tools/govanity/flake.nix
@@ -0,0 +1,37 @@
+{
+ description = "govanity";
+
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs/release-21.11";
+ utils.url = "github:numtide/flake-utils";
+ };
+
+ outputs = { self, utils, nixpkgs, pre-commit-hooks }:
+ utils.lib.eachDefaultSystem (system:
+ let pkgs = nixpkgs.legacyPackages.${system};
+ in {
+
+ defaultPackage = self.packages.${system}.vanity;
+
+ packages.vanity = pkgs.buildGoModule {
+ pname = "vanity";
+ version = "0.0.1";
+ src = ./.;
+ vendorSha256 = "sha256-iu2QE+vvenFWpOOz1NHVQHudiWkvkKqZvD4ZX4Xa1sY=";
+ nativeBuildInputs = with pkgs; [ go ];
+ };
+
+ apps = {
+ deploy = pkgs.pkgs.writeShellScriptBin "run-deploy" ''
+ set -euxo pipefail
+ export PATH=${
+ pkgs.lib.makeBinPath [ pkgs.go pkgs.git pkgs.jq pkgs.flyctl ]
+ }:$PATH
+ bash ./scripts/deploy.sh
+ '';
+ };
+
+ devShell = with pkgs;
+ mkShell { nativeBuildInputs = [ git go gopls golangci-lint bash ]; };
+ });
+}