{ debug ? false }: with import { }; let ncursesPkg = ncurses.overrideAttrs (oldAttrs: rec { configureFlags = oldAttrs.configureFlags ++ [ "--with-cxx-shared" ];}); in stdenv.mkDerivation { name = "kNCurses"; src = ./.; buildInputs = [ libvterm-neovim ncursesPkg microsoft_gsl]; nativeBuildInputs = [ cmake ]; cmakeBuildType = if debug then "Debug" else "Release"; makeFlags = lib.lists.optional debug "VERBOSE=1"; hardeningDisable = lib.lists.optionals debug [ "fortify" ]; dontStrip = debug; }