1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchDebianPatch,
6 libxcrypt,
7}:
8
9stdenv.mkDerivation rec {
10 pname = "libcli";
11 version = "1.10.7";
12
13 src = fetchFromGitHub {
14 owner = "dparrish";
15 repo = "libcli";
16 rev = "V${version}";
17 hash = "sha256-ItmZfclx2mprKUOk/MwlS2w4f0ukiiPA5/QaRdGfEO8=";
18 };
19
20 patches = [
21 (fetchDebianPatch {
22 pname = "libcli";
23 version = "1.10.7";
24 debianRevision = "2";
25 patch = "02-fix-transposed-calloc-args";
26 hash = "sha256-lSZeg5h+LUIGa4DnkAmwIEs+tctCYs/tuY63hbBUjuw=";
27 })
28 ];
29
30 buildInputs = [
31 libxcrypt
32 ];
33
34 enableParallelBuilding = true;
35
36 makeFlags = [
37 "CC=${stdenv.cc.targetPrefix}cc"
38 "AR=${stdenv.cc.targetPrefix}ar"
39 "PREFIX=${placeholder "out"}"
40 ];
41
42 meta = {
43 description = "Emulate a Cisco-style telnet command-line interface";
44 homepage = "https://dparrish.com/pages/libcli";
45 license = lib.licenses.lgpl21Plus;
46 maintainers = with lib.maintainers; [ wegank ];
47 platforms = lib.platforms.linux;
48 };
49}