stockholm/tv/5pkgs/simple/fzmenu/default.nix

51 lines
1.1 KiB
Nix
Raw Normal View History

2022-05-31 17:14:09 +00:00
{ lib, pkgs, stdenv }:
2018-11-28 08:20:25 +00:00
2023-01-11 16:21:51 +00:00
let
terminal = pkgs.writeDashBin "terminal" ''
# usage: terminal COMMAND [ARGS...]
exec ${pkgs.alacritty-tv}/bin/alacritty \
--profile=fzmenu \
--class AlacrittyFzmenuFloat \
-e "$@"
'';
in
2022-05-31 17:14:09 +00:00
pkgs.runCommand "fzmenu" {
2018-11-28 08:20:25 +00:00
} /* sh */ ''
mkdir $out
cp -r ${./bin} $out/bin
substituteInPlace $out/bin/otpmenu \
2022-05-31 17:14:09 +00:00
--replace '#! /bin/sh' '#! ${pkgs.dash}/bin/dash' \
--replace '#PATH=' PATH=${lib.makeBinPath [
2022-05-31 17:14:09 +00:00
pkgs.coreutils
pkgs.dash
2023-03-22 17:04:21 +00:00
pkgs.findutils
2022-05-31 17:14:09 +00:00
pkgs.fzf
2023-03-22 17:04:21 +00:00
pkgs.gawk
2022-05-31 17:14:09 +00:00
(pkgs.pass.withExtensions (ext: [
ext.pass-otp
]))
pkgs.utillinux
pkgs.xdotool
2023-01-11 16:21:51 +00:00
terminal
2018-11-28 08:20:25 +00:00
]}
substituteInPlace $out/bin/passmenu \
2022-05-31 17:14:09 +00:00
--replace '#! /bin/sh' '#! ${pkgs.dash}/bin/dash' \
--replace '#PATH=' PATH=${lib.makeBinPath [
2022-05-31 17:14:09 +00:00
pkgs.coreutils
pkgs.dash
2023-03-22 17:04:21 +00:00
pkgs.findutils
2022-05-31 17:14:09 +00:00
pkgs.fzf
2023-03-22 17:04:21 +00:00
pkgs.gawk
2022-05-31 17:14:09 +00:00
(pkgs.pass.withExtensions (ext: [
ext.pass-otp
]))
pkgs.utillinux
pkgs.xdotool
2023-01-11 16:21:51 +00:00
terminal
2018-11-28 08:20:25 +00:00
]}
''