about summary refs log tree commit diff
path: root/pkgs/shells
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2023-04-17 10:08:49 +0200
committerGitHub <noreply@github.com>2023-04-17 10:08:49 +0200
commit980d7e66e6f2327b944564aeb875f907b55723a4 (patch)
tree88889f260cd0d0dbb2416d16f54c20e558ef9667 /pkgs/shells
parent4c3edba85629ec304b5269e4b0ac7f26c433df23 (diff)
parent32f10b45f8458a495a5d96a7c3f06fc3a02d1fa7 (diff)
downloadnixlib-980d7e66e6f2327b944564aeb875f907b55723a4.tar
nixlib-980d7e66e6f2327b944564aeb875f907b55723a4.tar.gz
nixlib-980d7e66e6f2327b944564aeb875f907b55723a4.tar.bz2
nixlib-980d7e66e6f2327b944564aeb875f907b55723a4.tar.lz
nixlib-980d7e66e6f2327b944564aeb875f907b55723a4.tar.xz
nixlib-980d7e66e6f2327b944564aeb875f907b55723a4.tar.zst
nixlib-980d7e66e6f2327b944564aeb875f907b55723a4.zip
Merge pull request #224606 from ocfox/wakatime.fish
fishPlugins.wakatime-fish: init at 0.0.3
Diffstat (limited to 'pkgs/shells')
-rw-r--r--pkgs/shells/fish/plugins/default.nix2
-rw-r--r--pkgs/shells/fish/plugins/wakatime-fish.nix30
2 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/shells/fish/plugins/default.nix b/pkgs/shells/fish/plugins/default.nix
index dbac3e30e34a..e6b7db5966a8 100644
--- a/pkgs/shells/fish/plugins/default.nix
+++ b/pkgs/shells/fish/plugins/default.nix
@@ -50,6 +50,8 @@ lib.makeScope newScope (self: with self; {
 
   tide = callPackage ./tide.nix { };
 
+  wakatime-fish = callPackage ./wakatime-fish.nix { };
+
   z = callPackage ./z.nix { };
 } // lib.optionalAttrs config.allowAliases {
   autopair-fish = self.autopair; # Added 2023-03-10
diff --git a/pkgs/shells/fish/plugins/wakatime-fish.nix b/pkgs/shells/fish/plugins/wakatime-fish.nix
new file mode 100644
index 000000000000..3bd6585d19ca
--- /dev/null
+++ b/pkgs/shells/fish/plugins/wakatime-fish.nix
@@ -0,0 +1,30 @@
+{ lib
+, wakatime
+, buildFishPlugin
+, fetchFromGitHub
+}:
+
+buildFishPlugin rec {
+  pname = "wakatime-fish";
+  version = "0.0.3";
+
+  src = fetchFromGitHub {
+    owner = "ik11235";
+    repo = "wakatime.fish";
+    rev = "v${version}";
+    hash = "sha256-t0b8jvkNU7agF0A8YkwQ57qGGqcYJF7l9eNr12j2ZQ0=";
+  };
+
+  preFixup = ''
+    substituteInPlace $out/share/fish/vendor_conf.d/wakatime.fish \
+      --replace "if type -p wakatime" "if type -p ${lib.getExe wakatime}" \
+      --replace "(type -p wakatime)" "${lib.getExe wakatime}"
+  '';
+
+  meta = with lib; {
+    description = "A fish plugin for wakatime";
+    homepage = "https://github.com/ik11235/wakatime.fish";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ocfox ];
+  };
+}