about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/xm/xmpp-bridge/package.nix
blob: ed11cccfeab5bff42652419c04a3e74b86d2251a (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
{ lib
, fetchFromGitHub
, stdenv
, pkg-config
, libstrophe
, installShellFiles
}:

stdenv.mkDerivation rec {
  pname = "xmpp-bridge";
  version = "0.6.0";

  src = fetchFromGitHub {
    owner = "majewsky";
    repo = "xmpp-bridge";
    rev = "v${version}";
    hash = "sha256-JXhVi2AiV/PmWPfoQJl/N92GAZQ9UxReAiCkiDxgdFY=";
  };

  nativeBuildInputs = [
    installShellFiles
    pkg-config
  ];

  buildInputs = [
    libstrophe
  ];

  strictDeps  = true;

  # Makefile is hardcoded to install to /usr, install manually
  installPhase = ''
    runHook  preInstall

    install -D -m 0755 build/xmpp-bridge "$out/bin/xmpp-bridge"
    installManPage xmpp-bridge.1

    runHook postInstall
  '';

  meta = {
    description = "Connect command-line programs to XMPP";
    homepage = "https://github.com/majewsky/xmpp-bridge";
    license = lib.licenses.gpl3Plus;
    mainProgram = "xmpp-bridge";
    maintainers = with lib.maintainers; [ gigahawk ];
    platforms = lib.platforms.unix;
  };
}