about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2023-08-03 08:15:43 -0500
committerGitHub <noreply@github.com>2023-08-03 08:15:43 -0500
commitb2bd56520fd66ce3d38da03998572acd2a7f3210 (patch)
tree84b661275524a00e3d9a9a75d9e20f60d8f72f35 /pkgs/development
parent7c3cd3a9631b14e10e40fd492c021150e629a603 (diff)
parent7796d4c32cb2af397c3a0b3a6603cac585b6341d (diff)
Merge pull request #244337 from 06kellyjac/doc2go
doc2go: init at 0.4.1
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/tools/doc2go/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/tools/doc2go/default.nix b/pkgs/development/tools/doc2go/default.nix
new file mode 100644
index 0000000000000..0635c7ba1040c
--- /dev/null
+++ b/pkgs/development/tools/doc2go/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+}:
+
+buildGoModule rec {
+  pname = "doc2go";
+  version = "0.4.1";
+
+  src = fetchFromGitHub {
+    owner = "abhinav";
+    repo = "doc2go";
+    rev = "v${version}";
+    hash = "sha256-iypcjj6FFsus9mrafLBX0u7bHnzs718aEWC5dO3q0es=";
+  };
+  vendorHash = "sha256-IMqYCVGsspYigTmYNHD1b6Sgzxl47cdiCs+rq4C3Y08=";
+
+  ldflags = [ "-s" "-w" "-X main._version=${version}" ];
+
+  subPackages = [ "." ];
+
+  checkFlags = [
+    # needs to fetch additional go modules
+    "-skip=TestFinder_ImportedPackage/Modules"
+  ];
+
+  preCheck = ''
+    # run all tests
+    unset subPackages
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/abhinav/doc2go";
+    changelog = "https://github.com/abhinav/doc2go/blob/${src.rev}/CHANGELOG.md";
+    description = "Your Go project's documentation, to-go";
+    longDescription = ''
+      doc2go is a command line tool that generates static HTML documentation
+      from your Go code. It is a self-hosted static alternative to
+      https://pkg.go.dev/ and https://godocs.io/.
+    '';
+    license = with licenses; [
+      # general project license
+      asl20
+      # internal/godoc/synopsis*.go adapted from golang source
+      bsd3
+    ];
+    maintainers = with maintainers; [ jk ];
+  };
+}