{ lib , stdenv , mkDerivation , fetchFromGitHub , cmake , pkg-config , freetype , fontconfig , libGL , pcre , boost , catch2 , fmt , microsoft_gsl , range-v3 , libyamlcpp , ncurses , file , darwin , nixosTests }: let # Commits refs come from https://github.com/contour-terminal/contour/blob/master/scripts/install-deps.sh libunicode-src = fetchFromGitHub { owner = "contour-terminal"; repo = "libunicode"; rev = "c2369b6380df1197476b08d3e2d0e96b6446f776"; sha256 = "sha256-kq7GpFCkrJG7F9/YEGz3gMTgYzhp/QB8D5b9wwMaLvQ="; }; termbench-pro-src = fetchFromGitHub { owner = "contour-terminal"; repo = "termbench-pro"; rev = "cd571e3cebb7c00de9168126b28852f32fb204ed"; sha256 = "sha256-dNtOmBu63LFYfiGjXf34C2tiG8pMmsFT4yK3nBnK9WI="; }; in mkDerivation rec { pname = "contour"; version = "0.3.1.200"; src = fetchFromGitHub { owner = "contour-terminal"; repo = pname; rev = "v${version}"; sha256 = "sha256-TpxVC0GFZD3jGISnDWHKEetgVVpznm5k/Vc2dwVfSG4="; }; nativeBuildInputs = [ cmake pkg-config ncurses file ]; buildInputs = [ fontconfig freetype libGL pcre boost catch2 fmt microsoft_gsl range-v3 libyamlcpp ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.libs.utmp ]; preConfigure = '' mkdir -p _deps/sources cat > _deps/sources/CMakeLists.txt <