diff --git a/pkgs/development/libraries/lemon-graph/default.nix b/pkgs/development/libraries/lemon-graph/default.nix index 81c21bb68d69..ae071a727133 100644 --- a/pkgs/development/libraries/lemon-graph/default.nix +++ b/pkgs/development/libraries/lemon-graph/default.nix @@ -18,6 +18,11 @@ stdenv.mkDerivation rec { # error: no viable conversion from ... doCheck = !stdenv.isDarwin; + patches = [ + # error: ISO C++17 does not allow 'register' storage class specifier + ./remove-register.patch + ]; + meta = with lib; { homepage = "https://lemon.cs.elte.hu/trac/lemon"; description = "Efficient library for combinatorial optimization tasks on graphs and networks"; diff --git a/pkgs/development/libraries/lemon-graph/remove-register.patch b/pkgs/development/libraries/lemon-graph/remove-register.patch new file mode 100644 index 000000000000..002e832035bf --- /dev/null +++ b/pkgs/development/libraries/lemon-graph/remove-register.patch @@ -0,0 +1,15 @@ +diff --git a/lemon/random.h b/lemon/random.h +index 8de74ede8a..f9861f3916 100644 +--- a/lemon/random.h ++++ b/lemon/random.h +@@ -249,8 +249,8 @@ namespace lemon { + + current = state + length; + +- register Word *curr = state + length - 1; +- register long num; ++ Word *curr = state + length - 1; ++ long num; + + num = length - shift; + while (num--) {