about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--default.nix1
-rw-r--r--pkgs/vanity-imports/default.nix28
2 files changed, 29 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index 9c0aa78..7fd2811 100644
--- a/default.nix
+++ b/default.nix
@@ -21,4 +21,5 @@
   };
   emacs-unlimited-select = pkgs.callPackage ./pkgs/emacs-unlimited-select { };
   goatcounter = pkgs.callPackage ./pkgs/goatcounter { };
+  vanity-imports = pkgs.callPackage ./pkgs/vanity-imports { };
 }
diff --git a/pkgs/vanity-imports/default.nix b/pkgs/vanity-imports/default.nix
new file mode 100644
index 0000000..4c20919
--- /dev/null
+++ b/pkgs/vanity-imports/default.nix
@@ -0,0 +1,28 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+}:
+
+buildGoModule rec {
+  pname = "vanity-imports";
+  version = "0.0.12";
+
+  src = fetchFromGitHub {
+    owner = "mlcdf";
+    repo = "vanity-imports";
+    rev = "v${version}";
+    hash = "sha256-4JoJL079hBkwWVvOTRbCM1WZhM7hPlKQ+HEAUr7fWP8=";
+  };
+
+  vendorHash = "sha256-w0LaXevbGm1xpHvKxxyubHCOVRN712UzLyOd+hVikKg=";
+
+  ldflags = [ "-s" "-w" ];
+
+  meta = with lib; {
+    description = "Use a custom domain in your Go import path";
+    homepage = "https://github.com/mlcdf/vanity-imports";
+    license = licenses.mit;
+    maintainers = with maintainers; [ alanpearce ];
+    mainProgram = "vanity-imports";
+  };
+}