extract fish plugins from personal configuration
3 files changed, 53 insertions(+), 0 deletions(-)
M default.nix → default.nix
@@ -16,6 +16,13 @@ lib = import ./lib { inherit pkgs; }; # functions modules = import ./modules/nixos; # NixOS modules overlays = import ./overlays; # nixpkgs overlays + fishPlugins = pkgs.lib.makeScope pkgs.fishPlugins.newScope ( + self: + pkgs.lib.packagesFromDirectoryRecursive { + inherit (pkgs.fishPlugins) callPackage; + directory = ./pkgs/scoped/fishPlugins; + } + ); } // pkgs.lib.packagesFromDirectoryRecursive { inherit (pkgs) callPackage;
A pkgs/scoped/fishPlugins/ghq.nix
@@ -0,0 +1,24 @@ +{ + lib, + buildFishPlugin, + fetchFromGitHub, +}: +buildFishPlugin { + pname = "ghq"; + version = "0-unstable-2021-07-16"; + + src = fetchFromGitHub { + owner = "decors"; + repo = "fish-ghq"; + sha256 = "0cv7jpvdfdha4hrnjr887jv1pc6vcrxv2ahy7z6x562y7fd77gg9"; + # date = "2021-07-16T13:17:09+09:00"; + rev = "cafaaabe63c124bf0714f89ec715cfe9ece87fa2"; + }; + + meta = { + description = "Completions and keybinding for ghq"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ alinnow ]; + platforms = with lib.platforms; [ unix ]; + }; +}
A pkgs/scoped/fishPlugins/tide.nix
@@ -0,0 +1,22 @@ +{ + lib, + tide, + fetchFromGitHub, +}: + +tide.overrideAttrs (oldAttrs: rec { + version = "7.0.12"; + + src = fetchFromGitHub { + owner = "plttn"; + repo = "tide"; + tag = "v${version}"; + hash = "sha256-VqbVrf84P59Inc+fc48evp3G62ur6yVVn2bIqI+O9FQ="; + }; + + meta = oldAttrs // { + homepage = "https://github.com/plttn/tide"; + changelog = "https://github.com/plttn/tide/blob/${src.rev}/CHANGELOG.md"; + maintainers = with lib.maintainers; [ alinnow ]; + }; +})