btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / ba / bash-supergenpass / package.nix
blob7bf7c36424886ef2ea94e14f7157929402b5329c
1 { lib, stdenv
2 , fetchFromGitHub
3 , unstableGitUpdater
4 , makeWrapper
5 , openssl
6 , coreutils
7 , gnugrep }:
9 stdenv.mkDerivation {
10   pname = "bash-supergenpass";
11   version = "0-unstable-2024-03-24";
13   nativeBuildInputs = [ makeWrapper ];
15   src = fetchFromGitHub {
16     owner = "lanzz";
17     repo = "bash-supergenpass";
18     rev = "03416ad4d753d825acd0443a01ac13d385d5e048";
19     sha256 = "Q+xmT72UFCc71K87mAzpyTmEIXjR9SqX0xzmQfi5P9k=";
20   };
22   installPhase = ''
23     install -m755 -D supergenpass.sh "$out/bin/supergenpass"
24     wrapProgram "$out/bin/supergenpass" --prefix PATH : "${lib.makeBinPath [ openssl coreutils gnugrep ]}"
25   '';
27   passthru.updateScript = unstableGitUpdater {
28     url = "https://github.com/lanzz/bash-supergenpass.git";
29   };
31   meta = with lib; {
32     description = "Bash shell-script implementation of SuperGenPass password generation";
33     longDescription = ''
34       Bash shell-script implementation of SuperGenPass password generation
35       Usage: ./supergenpass.sh <domain> [ <length> ]
37       Default <length> is 10, which is also the original SuperGenPass default length.
39       The <domain> parameter is also optional, but it does not make much sense to omit it.
41       supergenpass will ask for your master password interactively, and it will not be displayed on your terminal.
42     '';
43     homepage = "https://github.com/lanzz/bash-supergenpass";
44     license = licenses.mit;
45     maintainers = with maintainers; [ fgaz ];
46     mainProgram = "supergenpass";
47     platforms = platforms.all;
48   };