28 assert lib.assertOneOf "backend" backend [ "x11" "wayland" ];
32 version = "2.0.2-unstable-2024-06-16";
34 src = fetchFromGitHub {
37 rev = "37c4c862deb133a85b7d72989acfdbd2ef16b8ad";
38 hash = "sha256-1lPNj47vTPLBK7mVm+PngV8C/ZsjJ2EN4ffXGU2TlQo=";
41 nativeBuildInputs = [ makeWrapper ];
47 cp -a rofi-pass $out/bin/rofi-pass
49 mkdir -p $out/share/doc/rofi-pass/
50 cp -a config.example $out/share/doc/rofi-pass/config.example
53 wrapperPath = lib.makeBinPath ([
62 ] ++ lib.optionals (backend == "x11") [
64 (pass.withExtensions (ext: [ ext.pass-otp ]))
67 ] ++ lib.optionals (backend == "wayland") [
69 (pass-wayland.withExtensions (ext: [ ext.pass-otp ]))
75 patchShebangs $out/bin
77 wrapProgram $out/bin/rofi-pass \
78 --prefix PATH : "$wrapperPath" \
79 --set-default ROFI_PASS_BACKEND ${if backend == "wayland" then "wtype" else "xdotool"} \
80 --set-default ROFI_PASS_CLIPBOARD_BACKEND ${if backend == "wayland" then "wl-clipboard" else "xclip"}
83 passthru.updateScript = unstableGitUpdater { };
86 description = "Script to make rofi work with password-store";
87 mainProgram = "rofi-pass";
88 homepage = "https://github.com/carnager/rofi-pass";
89 license = lib.licenses.gpl3;
90 platforms = with lib.platforms; linux;