Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
35 lines
813 B
Nix
35 lines
813 B
Nix
{ stdenv, lib, bundlerEnv, ruby, bundlerUpdateScript, xsel, makeWrapper }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "pws";
|
|
version = (import ./gemset.nix).pws.version;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
dontUnpack = true;
|
|
|
|
installPhase = let
|
|
env = bundlerEnv {
|
|
name = "${pname}-gems";
|
|
|
|
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;
|
|
mainProgram = "pws";
|
|
};
|
|
}
|