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

stdenv.mkDerivation rec {
  name = "pws-${(import ./gemset.nix).pws.version}";

  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"'
  '';

  passthru.updateScript = bundlerUpdateScript "pws";

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