about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/nntp-proxy/default.nix
blob: 05c8263f436bb80acc99d51abc106586895da3d9 (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
{ lib, stdenv, fetchFromGitHub, libconfig, pkg-config, libevent, openssl, libxcrypt }:

stdenv.mkDerivation {
  pname = "nntp-proxy";
  version = "2014-01-06";

  src = fetchFromGitHub {
    owner = "nieluj";
    repo = "nntp-proxy";
    rev = "0358e7ad6c4676f90ac5074320b16e1461b0011a";
    sha256 = "0jwxh71am83fbnq9mn06jl06rq8qybm506js79xmmc3xbk5pqvy4";
  };

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ libconfig libevent openssl libxcrypt ];

  installFlags = [ "INSTALL_DIR=$(out)/bin/" ];

  prePatch = ''
    mkdir -p $out/bin
    substituteInPlace Makefile \
      --replace /usr/bin/install $(type -P install) \
      --replace gcc cc
  '';

  meta = {
    description = "Simple NNTP proxy with SSL support";
    homepage = "https://github.com/nieluj/nntp-proxy";
    license = lib.licenses.gpl2Plus;
    maintainers = [ lib.maintainers.fadenb ];
    platforms = lib.platforms.all;
    mainProgram = "nntp-proxy";
  };
}