diff --git a/pkgs/default.nix b/pkgs/default.nix index 84f1a1e..3cb2418 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -2,9 +2,11 @@ (import ./caddy.nix) (import ./oauth2-proxy) (_self: super: { - segoe-ui-ttf = super.callPackage ./segoe-ui-ttf.nix {}; - + git-fuzzy = super.callPackage ./git-fuzzy {}; kanidm-secret-manipulator = super.callPackage ./kanidm-secret-manipulator.nix {}; + segoe-ui-ttf = super.callPackage ./segoe-ui-ttf.nix {}; + zsh-histdb-skim = super.callPackage ./zsh-skim-histdb.nix {}; + kanidm = super.kanidm.overrideAttrs (_finalAttrs: _previousAttrs: { patches = [ (super.fetchpatch { @@ -21,17 +23,5 @@ doCheck = false; }); - - bottles-unwrapped = super.bottles-unwrapped.overrideAttrs (_finalAttrs: _previousAttrs: { - version = "51.9"; - src = super.fetchFromGitHub { - owner = "bottlesdevs"; - repo = "bottles"; - rev = "51.9"; - hash = "sha256-iZUszwVcbVn6Xsqou6crSp9gJBRmm5vEqxS87h/s3PQ="; - }; - }); - - zsh-histdb-skim = super.callPackage ./zsh-skim-histdb.nix {}; }) ] diff --git a/pkgs/git-fuzzy/0001-load-git-config.patch b/pkgs/git-fuzzy/0001-load-git-config.patch new file mode 100644 index 0000000..bb0bcee --- /dev/null +++ b/pkgs/git-fuzzy/0001-load-git-config.patch @@ -0,0 +1,21 @@ +diff --git a/bin/git-fuzzy b/bin/git-fuzzy +index 27eaa4f..a33dc8c 100755 +--- a/bin/git-fuzzy ++++ b/bin/git-fuzzy +@@ -21,6 +21,7 @@ script_dir="$( cd -P "$( dirname "$script_source" )" >/dev/null 2>&1 && pwd )" + # ----------------------------------------- + git_fuzzy_dir="$script_dir/.." + ++. "$git_fuzzy_dir/lib/load-configs-from-git.sh" + . "$git_fuzzy_dir/lib/load-configs.sh" + + . "$git_fuzzy_dir/lib/snapshot.sh" +diff --git a/lib/load-configs-from-git.sh b/lib/load-configs-from-git.sh +new file mode 100644 +index 0000000..58b6371 +--- /dev/null ++++ b/lib/load-configs-from-git.sh +@@ -0,0 +1,3 @@ ++#!/usr/bin/env bash ++ ++# <> diff --git a/pkgs/git-fuzzy/default.nix b/pkgs/git-fuzzy/default.nix new file mode 100644 index 0000000..5695ad3 --- /dev/null +++ b/pkgs/git-fuzzy/default.nix @@ -0,0 +1,57 @@ +{ + fetchFromGitHub, + stdenvNoCC, + lib, + makeWrapper, + gitAndTools, + bat, + extraPackages ? [], +}: let + binPath = lib.makeBinPath ([gitAndTools.hub gitAndTools.delta bat] ++ extraPackages); +in + stdenvNoCC.mkDerivation rec { + pname = "git-fuzzy"; + version = "unstable-2023-09-18"; + src = fetchFromGitHub { + owner = "bigH"; + repo = "git-fuzzy"; + rev = "fb02ba3522e19ae1c69be80e2a58561fe2416155"; + hash = "sha256-Eo2TCx3w3SppoXi8RZu8EC1NhLOnL39bFliHDc2YsyM="; + }; + + patches = [ + ./0001-load-git-config.patch + ]; + + postPatch = '' + for GF_key in $(grep -o -- 'GF_[A-Z0-9_]*' lib/load-configs.sh | sort -u); do + key=''${GF_key#"GF_"} + key=''${key,,} + cat >> lib/load-configs-from-git.sh <