about summary refs log tree commit diff
path: root/pkgs/tools/misc/pws/default.nix
blob: 7294c61da8fadcfbaa7b9519cb5297f3d45c3301 (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
{ stdenv, lib, bundlerEnv, ruby, xsel, makeWrapper }:

stdenv.mkDerivation rec {
  name = "pws-1.0.6";

  env = bundlerEnv {
    name = "${name}-gems";

    inherit ruby;

    gemdir = ./.;
  };

  buildInputs = [ makeWrapper ];

  phases = ["installPhase"];

  installPhase = ''
    mkdir -p $out/bin
    makeWrapper ${env}/bin/pws $out/bin/pws \
      --set PATH '"${xsel}/bin/:$PATH"'
  '';

  meta = with lib; {
    description = "Command-line password safe";
    homepage    = https://github.com/janlelis/pws;
    license     = licenses.mit;
    maintainers = [ maintainers.swistak35 ];
    platforms   = platforms.unix;
  };
}