Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 60 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 autoconf, 6 automake, 7 libtool, 8 which, 9 pkg-config, 10 gtk3, 11 lib3270, 12}: 13 14stdenv.mkDerivation rec { 15 pname = "libv3270"; 16 version = "5.4"; 17 18 src = fetchFromGitHub { 19 owner = "PerryWerneck"; 20 repo = "libv3270"; 21 rev = version; 22 hash = "sha256-Z3FvxPa1pfeECxfB5ZL6gwhkbTKFpfO3D/zLVLF+uiI="; 23 }; 24 25 nativeBuildInputs = [ 26 which 27 pkg-config 28 autoconf 29 automake 30 libtool 31 ]; 32 33 buildInputs = [ 34 gtk3 35 lib3270 36 ]; 37 38 postPatch = '' 39 # lib3270_build_data_filename is relative to lib3270's share - not ours. 40 for f in $(find . -type f -iname "*.c"); do 41 sed -i -e "s@lib3270_build_data_filename(@g_build_filename(\"$out/share/pw3270\", @" "$f" 42 done 43 ''; 44 45 preConfigure = '' 46 mkdir -p scripts 47 touch scripts/config.rpath 48 NOCONFIGURE=1 sh ./autogen.sh 49 ''; 50 51 enableParallelBuilding = true; 52 53 meta = with lib; { 54 description = "3270 Virtual Terminal for GTK"; 55 homepage = "https://github.com/PerryWerneck/libv3270"; 56 changelog = "https://github.com/PerryWerneck/libv3270/blob/master/CHANGELOG"; 57 license = licenses.lgpl3Plus; 58 maintainers = [ maintainers.vifino ]; 59 }; 60}