diff --git a/pkgs/by-name/oa/oauth2-proxy/fix-tests-go-1.24.diff b/pkgs/by-name/oa/oauth2-proxy/fix-tests-go-1.24.diff deleted file mode 100644 index 47162b625f41..000000000000 --- a/pkgs/by-name/oa/oauth2-proxy/fix-tests-go-1.24.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/pkg/apis/options/load_test.go b/pkg/apis/options/load_test.go -index 32d52fb8..ef343fd1 100644 ---- a/pkg/apis/options/load_test.go -+++ b/pkg/apis/options/load_test.go -@@ -470,7 +470,7 @@ func(in loadYAMLTableInput) { - configFile: []byte(`stringSliceOption: "a"`), - input: &TestOptions{}, - expectedOutput: &TestOptions{}, -- expectedErr: errors.New("error unmarshalling config: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go struct field TestOptions.StringSliceOption of type []string"), -+ expectedErr: errors.New("error unmarshalling config: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go struct field TestOptions.TestOptionSubStruct.StringSliceOption of type []string"), - }), - Entry("with a config file containing environment variable references", loadYAMLTableInput{ - configFile: []byte("stringOption: ${TESTUSER}"), diff --git a/pkgs/by-name/oa/oauth2-proxy/package.nix b/pkgs/by-name/oa/oauth2-proxy/package.nix index 52f525b83bab..8e229d675238 100644 --- a/pkgs/by-name/oa/oauth2-proxy/package.nix +++ b/pkgs/by-name/oa/oauth2-proxy/package.nix @@ -2,27 +2,28 @@ lib, buildGoModule, fetchFromGitHub, + versionCheckHook, }: buildGoModule rec { pname = "oauth2-proxy"; - version = "7.9.0"; + version = "7.11.0"; src = fetchFromGitHub { repo = "oauth2-proxy"; owner = "oauth2-proxy"; - sha256 = "sha256-ykC29q7/rTv7POGETMiypj9CQYdYVo7rjT5B+3nfj/U="; + sha256 = "sha256-rZoD1H4YeVs9q8406gpYnWOyOEi2me/KkvSenzL/rA8="; rev = "v${version}"; }; - patches = [ - ./fix-tests-go-1.24.diff - ]; - - vendorHash = "sha256-KIu/NSKaXLutlY8757haAlsyuHUZjkDZ6D10lJ08uCM="; + vendorHash = "sha256-6Asydomg4Xz0JciRnODJSqVBtFAmpfMjDnr1JKr222o="; # Taken from https://github.com/oauth2-proxy/oauth2-proxy/blob/master/Makefile - ldflags = [ "-X main.VERSION=${version}" ]; + ldflags = [ "-X github.com/oauth2-proxy/oauth2-proxy/v7/pkg/version.VERSION=v${version}" ]; + + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--version"; + doInstallCheck = true; meta = with lib; { description = "Reverse proxy that provides authentication with Google, Github, or other providers";