summaryrefslogtreecommitdiffstats
path: root/tv/5pkgs/simple/fzmenu/default.nix
blob: 35918ff77646bae2458d3d1145b9bbb067c67b2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ coreutils, dash, gnused, fzf, pass-otp, runCommand, rxvt_unicode, stdenv, utillinux, xdotool }:

runCommand "fzmenu" {
} /* sh */ ''
  mkdir $out

  cp -r ${./bin} $out/bin

  substituteInPlace $out/bin/otpmenu \
      --replace '#! /bin/sh' '#! ${dash}/bin/dash' \
      --replace '#PATH=' PATH=${stdenv.lib.makeBinPath [
        coreutils
        dash
        fzf
        gnused
        pass-otp
        rxvt_unicode
        utillinux
        xdotool
      ]}

  substituteInPlace $out/bin/passmenu \
      --replace '#! /bin/sh' '#! ${dash}/bin/dash' \
      --replace '#PATH=' PATH=${stdenv.lib.makeBinPath [
        coreutils
        dash
        fzf
        gnused
        pass-otp
        rxvt_unicode
        utillinux
        xdotool
      ]}
''