about summary refs log tree commit diff
path: root/pkgs/by-name/li/lib3270/package.nix
blob: bdb74eceb2829ae560888df7c2013f19b22bd03f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ lib
, stdenv
, fetchFromGitHub
, which
, pkg-config
, autoconf
, automake
, libtool
, gettext
, openssl
, curl
}:

stdenv.mkDerivation rec {
  pname = "lib3270";
  version = "5.4";

  src = fetchFromGitHub {
    owner = "PerryWerneck";
    repo = pname;
    rev = version;
    hash = "sha256-w6Bg+TvSDAuZwtu/nyAIuq6pgheM5nXtfuryECfnKng=";
  };

  nativeBuildInputs = [
    which
    pkg-config
    autoconf
    automake
    libtool
  ];

  buildInputs = [
    gettext
    openssl
    curl
  ];

  postPatch = ''
    # Patch the required version.
    sed -i -e "s/20211118/19800101/" src/core/session.c
  '';

  preConfigure = ''
    NOCONFIGURE=1 sh autogen.sh
  '';

  enableParallelBuilds = true;

  meta = with lib; {
    description = "TN3270 client Library";
    homepage = "https://github.com/PerryWerneck/lib3270";
    license = licenses.lgpl3Plus;
    maintainers = [ maintainers.vifino ];
  };
}