about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/templ/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/templ/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/templ/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/templ/default.nix b/nixpkgs/pkgs/development/tools/templ/default.nix
new file mode 100644
index 000000000000..cd30c9a45c3f
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/templ/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+}:
+
+buildGoModule rec {
+  pname = "templ";
+  version = "0.2.501";
+
+  subPackages = [ "cmd/templ" ];
+
+  CGO_ENABLED = 0;
+
+  ldflags = [
+    "-s"
+    "-w"
+    "-extldflags -static"
+  ];
+
+  src = fetchFromGitHub {
+    owner = "a-h";
+    repo = "templ";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-MkSGQZo2Zv6aCVANh2ETXoCXETkp+xk8jWAW4Wj+y2s=";
+  };
+
+  vendorHash = "sha256-buJArvaaKGRg3yS7BdcVY0ydyi4zah57ABeo+CHkZQU=";
+
+  meta = with lib; {
+    description = "A language for writing HTML user interfaces in Go";
+    homepage = "https://templ.guide/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ luleyleo ];
+    mainProgram = "templ";
+  };
+}