diff --git a/flake.nix b/flake.nix index 904e70a..79d9ef3 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,8 @@ utils.lib.eachDefaultSystem ( system: let + inherit (nixpkgs) lib; + pkgs = import nixpkgs { inherit system; }; @@ -36,22 +38,37 @@ ]; in { - packages.default = pkgs.buildGo123Module { - pname = "envoy-oidc-authserver"; - version = "main"; - src = ./.; + packages = { + default = pkgs.buildGo123Module { + pname = "envoy-oidc-authserver"; + version = "main"; + src = ./.; + + meta = { + desciption = "Envoy OIDC Authserver"; + homepage = "https://github.com/shelmangroup/envoy-oidc-authserver"; + mainProgram = "envoy-oidc-authserver"; + }; - # vendorHash = ""; # Use this when upgrading dependencies - vendorHash = "sha256-n7+O+uc8YRnhXccVVnKE6zK8kh8EGiKeiES4A+R1Dhg="; + # vendorHash = ""; # Use this when upgrading dependencies + vendorHash = "sha256-n7+O+uc8YRnhXccVVnKE6zK8kh8EGiKeiES4A+R1Dhg="; - nativeBuildInputs = with pkgs; [ - buf - protoc-gen-go - ]; + nativeBuildInputs = with pkgs; [ + buf + protoc-gen-go + ]; - prePatch = '' - HOME="$TMPDIR" ${pkgs.buf}/bin/buf generate - ''; + prePatch = '' + HOME="$TMPDIR" ${pkgs.buf}/bin/buf generate + ''; + }; + + container = pkgs.dockerTools.buildImage { + name = "envoy-oidc-authserver"; + tag = "latest"; + copyToRoot = [ self.packages.${system}.default ]; + config.Entrypoint = [ (lib.getExe self.packages.${system}.default) ]; + }; }; devShells = {