lol

pkgsStatic.gsasl: fix build

GNU libc and Musl libc have different ideas what

strverscmp("UNKNOWN", "2.2.0")

should return. Upstream of gsasl naturally relies on GNU libc behaviour, so I
patch-out this test for musl builds.

According to Musl maintainer, this is bug on musl side.
=> https://www.openwall.com/lists/musl/2022/11/06/2

+27
+6
pkgs/development/libraries/gsasl/default.nix
··· 9 9 sha256 = "sha256-ebho47mXbcSE1ZspygroiXvpbOTTbTKu1dk1p6Mwd1k="; 10 10 }; 11 11 12 + # This is actually bug in musl. It is already fixed in trunc and 13 + # this patch won't be necessary with musl > 1.2.3. 14 + # 15 + # https://git.musl-libc.org/cgit/musl/commit/?id=b50eb8c36c20f967bd0ed70c0b0db38a450886ba 16 + patches = lib.optional stdenv.hostPlatform.isMusl ./gsasl.patch; 17 + 12 18 buildInputs = [ libidn libkrb5 ]; 13 19 14 20 configureFlags = [ "--with-gssapi-impl=mit" ];
+21
pkgs/development/libraries/gsasl/gsasl.patch
··· 1 + GNU libc and Musl libc have different ideas what 2 + 3 + strverscmp("UNKNOWN", "2.2.0") 4 + 5 + should return. Hopefully nobody depend on this particular behaviour in 6 + practice. 7 + 8 + --- a/tests/version.c 1970-01-01 00:00:00.000000000 -0000 9 + +++ b/tests/version.c 1970-01-01 00:00:00.000000000 -0000 10 + @@ -111,11 +111,5 @@ 11 + exit_code = EXIT_FAILURE; 12 + } 13 + 14 + - if (gsasl_check_version ("UNKNOWN")) 15 + - { 16 + - printf ("FAIL: gsasl_check_version (UNKNOWN)\n"); 17 + - exit_code = EXIT_FAILURE; 18 + - } 19 + - 20 + return exit_code; 21 + }