Unverified Commit 3ba984c2 authored by Randy Eckenrode's avatar Randy Eckenrode
Browse files

NSPlist: fix build with clang 16

The pre-generated lexer uses the `register` storage class specifier,
which is not supported in C++17 (the default for clang 16). Regenerate
it for improved compatibility.
parent 1181aa74
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, cmake }:
{ lib, stdenv, fetchFromGitHub, flex, cmake }:

stdenv.mkDerivation {
  pname = "NSPlist";
@@ -11,7 +11,12 @@ stdenv.mkDerivation {
    sha256 = "0v4yfiwfd08hmh2ydgy6pnmlzjbd96k78dsla9pfd56ka89aw74r";
  };

  nativeBuildInputs = [ cmake ];
  nativeBuildInputs = [ flex cmake ];

  preConfigure = ''
    # Regenerate the lexer for improved compatibility with clang 16.
    flex -o src/NSPlistLexer.cpp <(tail --lines=+17 src/NSPlistLexer.l)
  '';

  meta = with lib; {
    maintainers = with maintainers; [ matthewbauer ];