about summary refs log tree commit diff
path: root/pkgs/shells/fish/plugins/wakatime-fish.nix
blob: c434ab7175982aedbbd32f6131125fe521845b8d (plain) (blame)
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
{ lib
, wakatime-cli
, buildFishPlugin
, fetchFromGitHub
}:

buildFishPlugin rec {
  pname = "wakatime-fish";
  version = "0.0.6";

  src = fetchFromGitHub {
    owner = "ik11235";
    repo = "wakatime.fish";
    rev = "v${version}";
    hash = "sha256-Hsr69n4fCvPc64NztgaBZQuR0znkzlL8Uotw9Jf2S1o=";
  };

  preFixup = ''
    substituteInPlace $out/share/fish/vendor_conf.d/wakatime.fish \
      --replace-fail "if type -p wakatime" "if type -p ${lib.getExe wakatime-cli}" \
      --replace-fail "(type -p wakatime)" "${lib.getExe wakatime-cli}"
  '';

  meta = with lib; {
    description = "Fish plugin for wakatime";
    homepage = "https://github.com/ik11235/wakatime.fish";
    license = licenses.mit;
    maintainers = with maintainers; [ ocfox ];
  };
}