2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, bundlerEnv, ruby, bundlerUpdateScript, xsel, makeWrapper }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "pws";
|
|
|
|
version = (import ./gemset.nix).pws.version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
dontUnpack = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = let
|
|
|
|
env = bundlerEnv {
|
2021-07-21 07:28:18 +00:00
|
|
|
name = "${pname}-gems";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
inherit ruby;
|
|
|
|
|
|
|
|
gemdir = ./.;
|
|
|
|
};
|
|
|
|
in ''
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|