about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tools/govanity/.envrc1
-rw-r--r--tools/govanity/.gitignore1
-rw-r--r--tools/govanity/flake.lock90
-rw-r--r--tools/govanity/flake.nix27
4 files changed, 119 insertions, 0 deletions
diff --git a/tools/govanity/.envrc b/tools/govanity/.envrc
new file mode 100644
index 0000000..3550a30
--- /dev/null
+++ b/tools/govanity/.envrc
@@ -0,0 +1 @@
+use flake
diff --git a/tools/govanity/.gitignore b/tools/govanity/.gitignore
new file mode 100644
index 0000000..c4a847d
--- /dev/null
+++ b/tools/govanity/.gitignore
@@ -0,0 +1 @@
+/result
diff --git a/tools/govanity/flake.lock b/tools/govanity/flake.lock
new file mode 100644
index 0000000..a334e5c
--- /dev/null
+++ b/tools/govanity/flake.lock
@@ -0,0 +1,90 @@
+{
+  "nodes": {
+    "flake-utils": {
+      "locked": {
+        "lastModified": 1644229661,
+        "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    },
+    "nixpkgs": {
+      "locked": {
+        "lastModified": 1652298859,
+        "narHash": "sha256-hcwRboK+NxMWUJh0fQ3VsocDcAHrYJ95FmPEHlddV0Y=",
+        "owner": "nixos",
+        "repo": "nixpkgs",
+        "rev": "051448e41537c3463ae776d46115d01afb6c498d",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nixos",
+        "ref": "release-21.11",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "nixpkgs_2": {
+      "locked": {
+        "lastModified": 1645655918,
+        "narHash": "sha256-ZfbEFRW7o237+A1P7eTKhXje435FCAoe0blj2n20Was=",
+        "owner": "nixos",
+        "repo": "nixpkgs",
+        "rev": "77a7a4197740213879b9a1d2e1788c6c8ade4274",
+        "type": "github"
+      },
+      "original": {
+        "id": "nixpkgs",
+        "type": "indirect"
+      }
+    },
+    "pre-commit-hooks": {
+      "inputs": {
+        "flake-utils": "flake-utils",
+        "nixpkgs": "nixpkgs_2"
+      },
+      "locked": {
+        "lastModified": 1649054408,
+        "narHash": "sha256-wz8AH7orqUE4Xog29WMTqOYBs0DMj2wFM8ulrTRVgz0=",
+        "path": "/nix/store/2bw70fnmml6w0vjkcj2n7jvzcxpgprrm-source",
+        "rev": "e5e7b3b542e7f4f96967966a943d7e1c07558042",
+        "type": "path"
+      },
+      "original": {
+        "id": "pre-commit-hooks",
+        "type": "indirect"
+      }
+    },
+    "root": {
+      "inputs": {
+        "nixpkgs": "nixpkgs",
+        "pre-commit-hooks": "pre-commit-hooks",
+        "utils": "utils"
+      }
+    },
+    "utils": {
+      "locked": {
+        "lastModified": 1649676176,
+        "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    }
+  },
+  "root": "root",
+  "version": 7
+}
diff --git a/tools/govanity/flake.nix b/tools/govanity/flake.nix
new file mode 100644
index 0000000..15b13d0
--- /dev/null
+++ b/tools/govanity/flake.nix
@@ -0,0 +1,27 @@
+{
+  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 ];
+        };
+
+        devShell = with pkgs;
+          mkShell { nativeBuildInputs = [ git go gopls golangci-lint bash ]; };
+      });
+}