From 5cc0c69b1df838ea5c1abbb453ffc147d70fe909 Mon Sep 17 00:00:00 2001 From: Adrian Pistol Date: Tue, 21 Nov 2023 17:27:25 +0100 Subject: [PATCH] libv3270: init at 5.4 --- pkgs/by-name/li/libv3270/package.nix | 58 ++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 pkgs/by-name/li/libv3270/package.nix diff --git a/pkgs/by-name/li/libv3270/package.nix b/pkgs/by-name/li/libv3270/package.nix new file mode 100644 index 000000000000..90b6fd9f2832 --- /dev/null +++ b/pkgs/by-name/li/libv3270/package.nix @@ -0,0 +1,58 @@ +{ lib +, stdenv +, fetchFromGitHub +, autoconf +, automake +, libtool +, which +, pkg-config +, gtk3 +, lib3270 +}: + +stdenv.mkDerivation rec { + pname = "libv3270"; + version = "5.4"; + + src = fetchFromGitHub { + owner = "PerryWerneck"; + repo = pname; + rev = version; + hash = "sha256-Z3FvxPa1pfeECxfB5ZL6gwhkbTKFpfO3D/zLVLF+uiI="; + }; + + nativeBuildInputs = [ + which + pkg-config + autoconf + automake + libtool + ]; + + buildInputs = [ + gtk3 + lib3270 + ]; + + postPatch = '' + # lib3270_build_data_filename is relative to lib3270's share - not ours. + for f in $(find . -type f -iname "*.c"); do + sed -i -e "s@lib3270_build_data_filename(@g_build_filename(\"$out/share/pw3270\", @" "$f" + done + ''; + + preConfigure = '' + mkdir -p scripts + touch scripts/config.rpath + NOCONFIGURE=1 sh ./autogen.sh + ''; + + enableParallelBuilds = true; + + meta = with lib; { + description = "3270 Virtual Terminal for GTK"; + homepage = "https://github.com/PerryWerneck/libv3270"; + license = licenses.lgpl3Plus; + maintainers = [ maintainers.vifino ]; + }; +}