librep: fix darwin build

Functions coming from ctype.h get inlines, but are not static when
compiling this with clang. This causes duplicates when linking.
Force an older gnu standard to prevent the issue.
This commit is contained in:
Stanisław Pitucha 2023-03-24 22:02:48 +11:00 committed by Anderson Torres
parent cbb3c7139f
commit 8e09dec9ee

View file

@ -31,6 +31,9 @@ stdenv.mkDerivation rec {
readline
];
# ensure libsystem/ctype functions don't get duplicated when using clang
configureFlags = lib.optionals stdenv.isDarwin [ "CFLAGS=-std=gnu89" ];
setupHook = ./setup-hook.sh;
meta = with lib;{
@ -44,7 +47,6 @@ stdenv.mkDerivation rec {
license = licenses.gpl2Plus;
maintainers = [ maintainers.AndersonTorres ];
platforms = platforms.unix;
broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/librep.x86_64-darwin
};
}
# TODO: investigate fetchFromGithub