about summary refs log tree commit diff
path: root/pkgs/by-name/or/ory/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/or/ory/package.nix')
-rw-r--r--pkgs/by-name/or/ory/package.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/by-name/or/ory/package.nix b/pkgs/by-name/or/ory/package.nix
new file mode 100644
index 0000000000000..e014240f53f2c
--- /dev/null
+++ b/pkgs/by-name/or/ory/package.nix
@@ -0,0 +1,43 @@
+{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
+
+buildGoModule rec {
+  pname = "ory";
+  version = "0.3.1";
+
+  src = fetchFromGitHub {
+    owner = "ory";
+    repo = "cli";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-dO595NzdkVug955dqji/ttAPb+sMGLxJftXHzHA37Lo=";
+  };
+
+  nativeBuildInputs = [
+    installShellFiles
+  ];
+
+  subPackages = [ "." ];
+
+  CGO_ENABLED = 1;
+
+  tags = [
+    "sqlite"
+  ];
+
+  vendorHash = "sha256-H1dM/r7gJvjnexQwlA4uhJ7rUH15yg4AMRW/f0k1Ixw=";
+
+  postInstall = ''
+    mv $out/bin/cli $out/bin/ory
+    installShellCompletion --cmd ory \
+      --bash <($out/bin/ory completion bash) \
+      --fish <($out/bin/ory completion fish) \
+      --zsh <($out/bin/ory completion zsh)
+  '';
+
+  meta = with lib; {
+    mainProgram = "ory";
+    description = "The Ory CLI";
+    homepage = "https://www.ory.sh/cli";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ luleyleo nicolas-goudry ];
+  };
+}