{ lib , stdenv , fetchFromRepoOrCz , perl , texinfo , which }: stdenv.mkDerivation rec { pname = "tcc"; version = "0.9.27+date=2022-01-11"; src = fetchFromRepoOrCz { repo = "tinycc"; rev = "4e0e9b8f210d69893b306d6b24d2dd615a22f246"; hash = "sha256-0BJ5wXsgDLBIvcbq+rL9UQC4NjLHCI9r6sUWF98APPg="; }; nativeBuildInputs = [ perl texinfo which ]; postPatch = '' patchShebangs texi2pod.pl ''; configureFlags = [ "--cc=$CC" "--ar=$AR" "--crtprefix=${lib.getLib stdenv.cc.libc}/lib" "--sysincludepaths=${lib.getDev stdenv.cc.libc}/include:{B}/include" "--libpaths=${lib.getLib stdenv.cc.libc}/lib" # build cross compilers "--enable-cross" ] ++ lib.optionals stdenv.hostPlatform.isMusl [ "--config-musl" ]; preConfigure = '' echo ${version} > VERSION configureFlagsArray+=("--elfinterp=$(< $NIX_CC/nix-support/dynamic-linker)") ''; postFixup = '' cat >libtcc.pc <