2019-07-22 14:02:47 +02:00
|
|
|
{ stdenv, lib, bundlerEnv, ruby, bundlerUpdateScript, xsel, makeWrapper }:
|
2016-04-25 01:55:07 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-07-22 14:02:47 +02:00
|
|
|
name = "pws-${(import ./gemset.nix).pws.version}";
|
2016-04-25 01:55:07 +02:00
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
phases = ["installPhase"];
|
|
|
|
|
2019-11-10 02:13:39 +01:00
|
|
|
installPhase = let
|
|
|
|
env = bundlerEnv {
|
|
|
|
name = "${name}-gems";
|
|
|
|
|
|
|
|
inherit ruby;
|
|
|
|
|
|
|
|
gemdir = ./.;
|
|
|
|
};
|
|
|
|
in ''
|
2016-04-25 01:55:07 +02:00
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper ${env}/bin/pws $out/bin/pws \
|
|
|
|
--set PATH '"${xsel}/bin/:$PATH"'
|
|
|
|
'';
|
|
|
|
|
2019-07-22 14:02:47 +02:00
|
|
|
passthru.updateScript = bundlerUpdateScript "pws";
|
|
|
|
|
2016-04-25 01:55:07 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Command-line password safe";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/janlelis/pws";
|
2016-04-25 01:55:07 +02:00
|
|
|
license = licenses.mit;
|
2019-07-22 14:02:47 +02:00
|
|
|
maintainers = with maintainers; [ swistak35 nicknovitski ];
|
2016-04-25 01:55:07 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|