summary refs log tree commit diff
path: root/pkgs/tools/networking/atftp/default.nix
blob: 06b04170a3f3bff7b0ea9d05b3a9ecdb70c5616d (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
57
58
{ lib
, stdenv
, autoreconfHook
, fetchurl
, gcc
, makeWrapper
, pcre2
, perl
, ps
, readline
, tcp_wrappers
}:

stdenv.mkDerivation rec {
  pname = "atftp";
  version = "0.8.0";

  src = fetchurl {
    url = "mirror://sourceforge/atftp/${pname}-${version}.tar.gz";
    hash = "sha256-3yqgicdnD56rQOVZjl0stqWC3FGCkm6lC01pDk438xY=";
  };

  # fix test script
  postPatch = ''
    patchShebangs .
  '';

  nativeBuildInputs = [
    autoreconfHook
    makeWrapper
  ];

  buildInputs = [
    gcc
    pcre2
    readline
    tcp_wrappers
  ];

  nativeCheckInputs = [
    perl
    ps
  ];

  # Expects pre-GCC5 inline semantics
  NIX_CFLAGS_COMPILE = "-std=gnu89";

  doCheck = true;

  meta = with lib; {
    description = "Advanced tftp tools";
    changelog = "https://sourceforge.net/p/atftp/code/ci/v${version}/tree/Changelog";
    homepage = "https://sourceforge.net/projects/atftp/";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ raskin ];
    platforms = platforms.linux;
  };
}