about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-06-29 18:00:11 +0200
committerAlan Pearce2024-06-29 18:00:11 +0200
commitb8ac79d7ead214f96cc8b642fa7ce085a2ee2043 (patch)
tree071cb3ac10e71ef87cb19fa89914fc8ec62097f4
parent1dee212b8732d6360b7d3823ca923ab6946e428d (diff)
downloadnix-packages-b8ac79d7ead214f96cc8b642fa7ce085a2ee2043.tar.lz
nix-packages-b8ac79d7ead214f96cc8b642fa7ce085a2ee2043.tar.zst
nix-packages-b8ac79d7ead214f96cc8b642fa7ce085a2ee2043.zip
porto: init at 0.6.0
-rw-r--r--default.nix1
-rw-r--r--pkgs/porto/default.nix29
2 files changed, 30 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index 7fd2811..920e0c8 100644
--- a/default.nix
+++ b/default.nix
@@ -21,5 +21,6 @@
   };
   emacs-unlimited-select = pkgs.callPackage ./pkgs/emacs-unlimited-select { };
   goatcounter = pkgs.callPackage ./pkgs/goatcounter { };
+  porto = pkgs.callPackage ./pkgs/porto { };
   vanity-imports = pkgs.callPackage ./pkgs/vanity-imports { };
 }
diff --git a/pkgs/porto/default.nix b/pkgs/porto/default.nix
new file mode 100644
index 0000000..9a93481
--- /dev/null
+++ b/pkgs/porto/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+}:
+
+buildGoModule rec {
+  pname = "porto";
+  version = "0.6.0";
+
+  src = fetchFromGitHub {
+    owner = "jcchavezs";
+    repo = "porto";
+    rev = "v${version}";
+    hash = "sha256-0Wu5F95f7EaDL7kiJudlq2ioHxXx/sUXqVKwg/n/Cx0=";
+  };
+
+  vendorHash = "sha256-doUt43BWXFKYDdl6aHWeMvZEyxh+otHAfA4X+yqBTas=";
+  subPackages = [ "cmd/porto" ];
+
+  ldflags = [ "-s" "-w" ];
+
+  meta = with lib; {
+    description = "Tool for adding vanity import to Go code";
+    homepage = "https://github.com/jcchavezs/porto";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ alanpearce ];
+    mainProgram = "porto";
+  };
+}