Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 installShellFiles,
6}:
7
8buildGoModule rec {
9 pname = "ory";
10 version = "0.3.4";
11
12 src = fetchFromGitHub {
13 owner = "ory";
14 repo = "cli";
15 tag = "v${version}";
16 hash = "sha256-q7+Fpttgx62GbKxCCiEDlX//e/pNO24e7KhhBeGRDH0=";
17 };
18
19 nativeBuildInputs = [
20 installShellFiles
21 ];
22
23 subPackages = [ "." ];
24
25 env.CGO_ENABLED = 1;
26
27 tags = [
28 "sqlite"
29 ];
30
31 vendorHash = "sha256-B0y1JVjJmC5eitn7yIcDpl+9+xaBDJBMdvm+7N/ZxTk=";
32
33 postInstall = ''
34 mv $out/bin/cli $out/bin/ory
35 installShellCompletion --cmd ory \
36 --bash <($out/bin/ory completion bash) \
37 --fish <($out/bin/ory completion fish) \
38 --zsh <($out/bin/ory completion zsh)
39 '';
40
41 meta = with lib; {
42 mainProgram = "ory";
43 description = "Ory CLI";
44 homepage = "https://www.ory.sh/cli";
45 license = licenses.asl20;
46 maintainers = with maintainers; [
47 luleyleo
48 nicolas-goudry
49 ];
50 };
51}