summaryrefslogtreecommitdiffstats
path: root/pkgs/simple/fzmenu/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/simple/fzmenu/default.nix')
-rw-r--r--pkgs/simple/fzmenu/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/simple/fzmenu/default.nix b/pkgs/simple/fzmenu/default.nix
new file mode 100644
index 0000000..1a285ee
--- /dev/null
+++ b/pkgs/simple/fzmenu/default.nix
@@ -0,0 +1,50 @@
+{ lib, pkgs, stdenv }:
+
+let
+ terminal = pkgs.writeDashBin "terminal" ''
+ # usage: terminal COMMAND [ARGS...]
+ exec ${pkgs.alacritty-tv}/bin/alacritty \
+ --profile=fzmenu \
+ --class AlacrittyFzmenuFloat \
+ -e "$@"
+ '';
+in
+
+pkgs.runCommand "fzmenu" {
+} /* sh */ ''
+ mkdir $out
+
+ cp -r ${./bin} $out/bin
+
+ substituteInPlace $out/bin/otpmenu \
+ --replace '#! /bin/sh' '#! ${pkgs.dash}/bin/dash' \
+ --replace '#PATH=' PATH=${lib.makeBinPath [
+ pkgs.coreutils
+ pkgs.dash
+ pkgs.findutils
+ pkgs.fzf
+ pkgs.gawk
+ (pkgs.pass.withExtensions (ext: [
+ ext.pass-otp
+ ]))
+ pkgs.utillinux
+ pkgs.xdotool
+ terminal
+ ]}
+
+ substituteInPlace $out/bin/passmenu \
+ --replace '#! /bin/sh' '#! ${pkgs.dash}/bin/dash' \
+ --replace '#PATH=' PATH=${lib.makeBinPath [
+ pkgs.coreutils
+ pkgs.dash
+ pkgs.findutils
+ pkgs.fzf
+ pkgs.gawk
+ (pkgs.pass.withExtensions (ext: [
+ ext.pass-otp
+ ]))
+ pkgs.utillinux
+ pkgs.xdotool
+ terminal
+ ]}
+''