Commit 76c0d6b3 authored by Samy Lahfa's avatar Samy Lahfa Committed by Lahfa Samy
Browse files

wofi-pass: init at 23.1.2

* Fix URL type to a string
* Add extension option and replace cp by install -Dm755
* use nativeBuildInputs instead of buildInputs
* Add install -t option
* Remove useless mkdir
* Use let in construct for wrapperPath and clean exts declaration
* Add meta.mainProgram
parent ed0f304e
Loading
Loading
Loading
Loading
+65 −0
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, pass-wayland
, coreutils
, gnugrep
, libnotify
, pwgen
, findutils
, makeWrapper
, wl-clipboard
, wtype
, wofi
, extensions ? exts: []
}:

let
  wrapperPath = lib.makeBinPath [
    coreutils
    findutils
    gnugrep
    libnotify
    pwgen
    wofi
    wl-clipboard
    wtype
    (pass-wayland.withExtensions extensions)
  ];
in
stdenv.mkDerivation rec {
  pname = "wofi-pass";
  version = "23.1.2";

  src = fetchFromGitHub {
    owner = "schmidtandreas";
    repo = "wofi-pass";
    rev = "v${version}";
    sha256 = "sha256-Z1a+nfnL6NXhufpCU7VIkwuifoS88Pf9qI8GCuP/Zqc=";
  };

  nativeBuildInputs = [ makeWrapper ];

  dontBuild = true;

  installPhase = ''
    install -Dm755 wofi-pass -t $out/bin
    install -Dm755 wofi-pass.conf -t $out/share/doc/wofi-pass/wofi-pass.conf
  '';

  fixupPhase = ''
    patchShebangs $out/bin

    wrapProgram $out/bin/wofi-pass \
      --prefix PATH : "${wrapperPath}"
  '';

  meta = {
    description = "A script to make wofi work with password-store";
    homepage = "https://github.com/schmidtandreas/wofi-pass";
    maintainers = with lib.maintainers; [ akechishiro ];
    license = lib.licenses.gpl2Plus;
    platforms = with lib.platforms; linux;
    mainProgram = "wofi-pass";
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -36512,6 +36512,8 @@ with pkgs;
  wofi = callPackage ../applications/misc/wofi { };
  wofi-pass = callPackage ../../pkgs/tools/security/pass/wofi-pass.nix { };
  wofi-emoji = callPackage ../applications/misc/wofi-emoji { };
  cl-wordle = callPackage ../games/cl-wordle { };