about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/http/apt-cacher-ng/default.nix
blob: 72a456ab17f946b8c58ac32a02f823aaeac15d46 (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
{ lib
, stdenv
, bzip2
, cmake
, doxygen
, fetchurl
, fetchpatch
, fuse
, libevent
, xz
, openssl
, pkg-config
, systemd
, tcp_wrappers
, zlib
, c-ares
}:

stdenv.mkDerivation rec {
  pname = "apt-cacher-ng";
  version = "3.7.4";

  src = fetchurl {
    url = "https://ftp.debian.org/debian/pool/main/a/apt-cacher-ng/apt-cacher-ng_${version}.orig.tar.xz";
    sha256 = "0pwsj9rf6a6q7cnfbpcrfq2gjcy7sylqzqqr49g2zi39lrrh8533";
  };

  patches = [
    # this patch fixes the build for glibc >= 2.38
    (fetchpatch {
      name = "strlcpy-glibc238.patch";
      url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=0;bug=1052360;msg=10";
      hash = "sha256-uhQj+ZcHCV36Tm0pF/+JG59bSaRdTZCrMcKL3YhZTk8=";
    })
  ];

  nativeBuildInputs = [ cmake doxygen pkg-config ];
  buildInputs = [ bzip2 fuse libevent xz openssl systemd tcp_wrappers zlib c-ares ];

  meta = with lib; {
    description = "A caching proxy specialized for Linux distribution files";
    mainProgram = "apt-cacher-ng";
    homepage = "https://www.unix-ag.uni-kl.de/~bloch/acng/";
    license = licenses.bsdOriginal;
    platforms = platforms.linux;
    maintainers = [ maintainers.makefu ];
  };
}