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