nixpkgs/pkgs/tools/misc/pws/default.nix

35 lines
788 B
Nix
Raw Normal View History

{ stdenv, lib, bundlerEnv, ruby, bundlerUpdateScript, xsel, makeWrapper }:
2016-04-25 00:55:07 +01:00
stdenv.mkDerivation rec {
2021-07-20 17:26:48 +01:00
pname = "pws";
version = (import ./gemset.nix).pws.version;
2016-04-25 00:55:07 +01:00
nativeBuildInputs = [ makeWrapper ];
2016-04-25 00:55:07 +01:00
2021-07-20 16:02:35 +01:00
dontUnpack = true;
2016-04-25 00:55:07 +01:00
installPhase = let
env = bundlerEnv {
2021-07-20 17:26:48 +01:00
name = "${pname}-gems";
inherit ruby;
gemdir = ./.;
};
in ''
2016-04-25 00:55:07 +01:00
mkdir -p $out/bin
makeWrapper ${env}/bin/pws $out/bin/pws \
--set PATH '"${xsel}/bin/:$PATH"'
'';
passthru.updateScript = bundlerUpdateScript "pws";
2016-04-25 00:55:07 +01:00
meta = with lib; {
description = "Command-line password safe";
homepage = "https://github.com/janlelis/pws";
2016-04-25 00:55:07 +01:00
license = licenses.mit;
maintainers = with maintainers; [ swistak35 nicknovitski ];
2016-04-25 00:55:07 +01:00
platforms = platforms.unix;
};
}