Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 pkg-config, 6 glib, 7 ncurses, 8}: 9 10stdenv.mkDerivation rec { 11 pname = "libvterm"; 12 version = "0.99.7"; 13 14 src = fetchurl { 15 url = "mirror://sourceforge/libvterm/${pname}-${version}.tar.gz"; 16 sha256 = "10gaqygmmwp0cwk3j8qflri5caf8vl3f7pwfl2svw5whv8wkn0k2"; 17 }; 18 19 preInstall = '' 20 mkdir -p $out/include $out/lib 21 ''; 22 23 postPatch = '' 24 substituteInPlace Makefile \ 25 --replace "gcc" "${stdenv.cc.targetPrefix}cc" \ 26 --replace "ldconfig" "" \ 27 --replace "/usr" "$out" 28 29 makeFlagsArray+=("PKG_CFG=`${stdenv.cc.targetPrefix}pkg-config --cflags glib-2.0`") 30 ''; 31 32 # For headers 33 propagatedBuildInputs = [ glib ]; 34 35 strictDeps = true; 36 37 nativeBuildInputs = [ pkg-config ]; 38 buildInputs = [ ncurses ]; 39 40 meta = with lib; { 41 homepage = "http://libvterm.sourceforge.net/"; 42 description = "Terminal emulator library to mimic both vt100 and rxvt"; 43 license = licenses.gpl2Plus; 44 platforms = platforms.linux; 45 }; 46}