# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
#
# SPDX-License-Identifier: Apache-2.0

{ depot, ... }: {
  openshiftauth = depot.third_party.buildGo.package {
    name = "hg.lukegb.com/lukegb/depot/go/openshiftauth";
    srcs = [ ./openshiftauth.go ];
    deps = with depot.third_party; [
      gopkgs."github.com".dghubble.gologin.v2
      gopkgs."github.com".dghubble.gologin.v2.oauth2
      gopkgs."github.com".dgrijalva.jwt-go
      gopkgs."github.com".gorilla.mux
      gopkgs."github.com".gorilla.securecookie
      gopkgs."github.com".gorilla.sessions
      gopkgs."golang.org".x.oauth2
    ];
  };

  example = depot.third_party.buildGo.program {
    name = "example";
    srcs = [ ./example/example.go ];
    deps = with depot.third_party; [
      depot.go.openshiftauth.openshiftauth
      gopkgs."github.com".gorilla.mux
    ];
  };
}