about summary refs log tree commit diff
path: root/pkgs/development/tools/ent
diff options
context:
space:
mode:
authorsuperherointj <5861043+superherointj@users.noreply.github.com>2022-02-01 14:38:43 -0300
committerzowoq <59103226+zowoq@users.noreply.github.com>2022-02-05 11:12:52 +1000
commitbaca640798571218743fca3cd665194b3af9d16b (patch)
tree648b9f619dc10b639efec11b8b999bfeb1bcbaaf /pkgs/development/tools/ent
parent58e445a1b566f088a657d5eabc1bcbeacb734ea5 (diff)
ent-go: init 0.10.0
Diffstat (limited to 'pkgs/development/tools/ent')
-rw-r--r--pkgs/development/tools/ent/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/development/tools/ent/default.nix b/pkgs/development/tools/ent/default.nix
new file mode 100644
index 0000000000000..ba30aa97e0944
--- /dev/null
+++ b/pkgs/development/tools/ent/default.nix
@@ -0,0 +1,40 @@
+{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
+
+buildGoModule rec {
+  pname = "ent-go";
+  version = "0.10.0";
+
+  src = fetchFromGitHub {
+    owner = "ent";
+    repo = "ent";
+    rev = "v${version}";
+    sha256 = "sha256-TG08GRo1gNxC5iHt/Md5WVWaEQ1m2mUDGqpuxw8Pavg=";
+  };
+
+  vendorSha256 = "sha256-n5dS78SSBAEgE4/9jMZZhbOQZ3IGi9n3ErA0ioP9Tsg=";
+
+  subPackages = [ "cmd/ent" ];
+
+  ldflags = [
+    "-s"
+    "-w"
+  ];
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  postInstall = ''
+    installShellCompletion --cmd ent \
+      --bash <($out/bin/ent completion bash) \
+      --fish <($out/bin/ent completion fish) \
+      --zsh <($out/bin/ent completion zsh)
+  '';
+
+  meta = with lib; {
+    description = "An entity framework for Go";
+    downloadPage = "https://github.com/ent/ent";
+    license = licenses.asl20;
+    homepage = "https://entgo.io/";
+    maintainers = with maintainers; [ superherointj ];
+  };
+}
+