Compare commits
2 commits
1f6a08ed9b
...
cf8e6ee452
Author | SHA1 | Date | |
---|---|---|---|
cf8e6ee452 | |||
4a2702934b |
3 changed files with 42 additions and 0 deletions
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/flake.lock merge=binary
|
|
@ -222,6 +222,7 @@
|
||||||
|
|
||||||
packages = {
|
packages = {
|
||||||
incus-ui = pkgs.callPackage ./pkgs/incus-ui { };
|
incus-ui = pkgs.callPackage ./pkgs/incus-ui { };
|
||||||
|
openfga = pkgs.callPackage ./pkgs/openfga { };
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.default = with pkgs; mkShell {
|
devShells.default = with pkgs; mkShell {
|
||||||
|
|
40
pkgs/openfga/default.nix
Normal file
40
pkgs/openfga/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{ lib
|
||||||
|
, buildGoModule
|
||||||
|
, fetchFromGitHub
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildGoModule rec {
|
||||||
|
pname = "openfga";
|
||||||
|
version = "1.4.2";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "openfga";
|
||||||
|
repo = "openfga";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-fWSsTmb/vwoZ5CTsOOITZC/ZOEoAtWI42KSbTDKNdDY=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorHash = "sha256-/110Ocvcj/WRpqth6RFQQ0xj2WAkW/psDQcFZO2parI=";
|
||||||
|
|
||||||
|
subPackages = [
|
||||||
|
"cmd/openfga"
|
||||||
|
];
|
||||||
|
|
||||||
|
ldflags = [
|
||||||
|
"-s"
|
||||||
|
"-w"
|
||||||
|
"-X=github.com/openfga/openfga/internal/build.Version=v${version}"
|
||||||
|
"-X=github.com/openfga/openfga/internal/build.Commit=${src.rev}"
|
||||||
|
"-X=github.com/openfga/openfga/internal/build.Date=1970-01-01T00:00:00Z"
|
||||||
|
"-X=github.com/openfga/openfga/internal/build.ProjectName=${pname}"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A high performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar";
|
||||||
|
homepage = "https://github.com/openfga/openfga";
|
||||||
|
changelog = "https://github.com/openfga/openfga/blob/${src.rev}/CHANGELOG.md";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ ];
|
||||||
|
mainProgram = "openfga";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue