14 inherit pname version;
16 src = fetchFromGitHub {
20 hash = "sha256-R5BqaKiW2jhglJ6zPPQF2Ld97YCttocjhfbo0dDGvCI=";
23 vendorHash = "sha256-zrhLG5msji6t4VPKG85jD8c2XQCRdQkF9UfRMqnzSFM=";
25 nativeBuildInputs = [ installShellFiles ];
29 buildInfoPkg = "github.com/openfga/openfga/internal/build";
34 "-X ${buildInfoPkg}.Version=${version}"
35 "-X ${buildInfoPkg}.Commit=${version}"
36 "-X ${buildInfoPkg}.Date=19700101"
39 # Tests depend on docker
43 completions_dir=$TMPDIR/openfga_completions
44 mkdir $completions_dir
45 $out/bin/openfga completion bash > $completions_dir/openfga.bash
46 $out/bin/openfga completion zsh > $completions_dir/_openfga.zsh
47 $out/bin/openfga completion fish > $completions_dir/openfga.fish
48 installShellCompletion $completions_dir/*
52 description = "High performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar";
53 homepage = "https://openfga.dev/";
54 license = lib.licenses.asl20;
55 mainProgram = "openfga";
56 maintainers = with lib.maintainers; [ jlesquembre ];