about summary refs log tree commit diff
path: root/pkgs/applications/office/ppl-address-book/default.nix
blob: f15affaa8d67236f29d1f78ea80baaaa1b61a1d9 (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
{ stdenv, lib, bundlerEnv, ruby, makeWrapper, which }:

let
  pname = "ppl-address-book";

  version = (import ./gemset.nix).ppl.version;

  env = bundlerEnv rec {
    name = "${pname}-env-${version}";
    inherit ruby;
    gemdir = ./.;

    gemConfig.rugged = attrs: { buildInputs = [ which ]; };
  };

in stdenv.mkDerivation {
  name = "${pname}-${version}";

  phases = [ "installPhase" ];

  buildInputs = [ env makeWrapper ];

  installPhase = ''
    mkdir -p $out/bin
    makeWrapper ${env}/bin/ppl $out/bin/ppl
  '';

  meta = with lib; {
    description = "Address book software for command-line users";
    homepage    = http://ppladdressbook.org/;
    license     = with licenses; mit;
    maintainers = with maintainers; [ chris-martin ];
    platforms   = platforms.unix;
  };

}