about summary refs log tree commit diff
path: root/nixpkgs/pkgs/shells/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/shells/zsh')
-rw-r--r--nixpkgs/pkgs/shells/zsh/zsh-autocomplete/default.nix8
-rw-r--r--nixpkgs/pkgs/shells/zsh/zsh-fzf-tab/default.nix67
2 files changed, 53 insertions, 22 deletions
diff --git a/nixpkgs/pkgs/shells/zsh/zsh-autocomplete/default.nix b/nixpkgs/pkgs/shells/zsh/zsh-autocomplete/default.nix
index 05721221f2ab..1ecd96121972 100644
--- a/nixpkgs/pkgs/shells/zsh/zsh-autocomplete/default.nix
+++ b/nixpkgs/pkgs/shells/zsh/zsh-autocomplete/default.nix
@@ -2,20 +2,20 @@
 
 stdenvNoCC.mkDerivation rec {
   pname = "zsh-autocomplete";
-  version = "23.05.24";
+  version = "23.07.13";
 
   src = fetchFromGitHub {
     owner = "marlonrichert";
     repo = "zsh-autocomplete";
     rev = version;
-    sha256 = "sha256-/6V6IHwB5p0GT1u5SAiUa20LjFDSrMo731jFBq/bnpw=";
+    sha256 = "sha256-0NW0TI//qFpUA2Hdx6NaYdQIIUpRSd0Y4NhwBbdssCs=";
   };
 
   strictDeps = true;
   installPhase = ''
     install -D zsh-autocomplete.plugin.zsh $out/share/zsh-autocomplete/zsh-autocomplete.plugin.zsh
-    cp -R scripts $out/share/zsh-autocomplete/scripts
-    cp -R functions $out/share/zsh-autocomplete/functions
+    cp -R Completions $out/share/zsh-autocomplete/Completions
+    cp -R Functions $out/share/zsh-autocomplete/Functions
   '';
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/shells/zsh/zsh-fzf-tab/default.nix b/nixpkgs/pkgs/shells/zsh/zsh-fzf-tab/default.nix
index 89e4fe783b93..97a6992ee672 100644
--- a/nixpkgs/pkgs/shells/zsh/zsh-fzf-tab/default.nix
+++ b/nixpkgs/pkgs/shells/zsh/zsh-fzf-tab/default.nix
@@ -1,16 +1,16 @@
-{ stdenv, lib, fetchFromGitHub, ncurses, nix-update-script }:
+{ stdenv, lib, fetchFromGitHub, zsh, ncurses, nix-update-script }:
 
 let
   INSTALL_PATH="${placeholder "out"}/share/fzf-tab";
 in stdenv.mkDerivation rec {
   pname = "zsh-fzf-tab";
-  version = "unstable-2024-02-01";
+  version = "1.0";
 
   src = fetchFromGitHub {
     owner = "Aloxaf";
     repo = "fzf-tab";
-    rev = "b06e7574577cd729c629419a62029d31d0565a7a";
-    hash = "sha256-ilUavAIWmLiMh2PumtErMCpOcR71ZMlQkKhVOTDdHZw=";
+    rev = "v${version}";
+    hash = "sha256-o3R9dh9t8w/SVO3IUeJqP8kkQxwnRjNX8oZ4wSZxBYo=";
   };
 
   strictDeps = true;
@@ -24,31 +24,62 @@ in stdenv.mkDerivation rec {
     ];
   };
 
-  postConfigure = ''
+  # this script is modified according to fzf-tab/lib-ftb-build-module
+  configurePhase = ''
+    runHook preConfigure
+
     pushd modules
-    ./configure --disable-gdbm --without-tcsetpgrp
+
+    tar -xf ${zsh.src}
+    ln -s $(pwd)/src/fzftab.c zsh-${zsh.version}/Src/Modules/
+    ln -s $(pwd)/src/fzftab.mdd zsh-${zsh.version}/Src/Modules/
+
+    pushd zsh-${zsh.version}
+
+
+    if [[ ! -f ./configure ]]; then
+      ./Util/preconfig
+    fi
+    if [[ ! -f ./Makefile ]]; then
+      ./configure --disable-gdbm --without-tcsetpgrp
+    fi
+
     popd
+    popd
+
+    runHook postConfigure
   '';
 
-  postBuild = ''
-    pushd modules
+  buildPhase = ''
+    runHook preBuild
+
+    pushd modules/zsh-${zsh.version}
     make -j$NIX_BUILD_CORES
     popd
+
+    runHook postBuild
   '';
 
   installPhase = ''
-     mkdir -p ${INSTALL_PATH}
-     cp -r lib ${INSTALL_PATH}/lib
-     install -D fzf-tab.zsh ${INSTALL_PATH}/fzf-tab.zsh
-     install -D fzf-tab.plugin.zsh ${INSTALL_PATH}/fzf-tab.plugin.zsh
-     install -D modules/Src/aloxaf/fzftab.so ${INSTALL_PATH}/modules/Src/aloxaf/fzftab.so
+    runHook preInstall
+
+    mkdir -p ${INSTALL_PATH}
+    cp -r lib ${INSTALL_PATH}/lib
+    install -D fzf-tab.zsh ${INSTALL_PATH}/fzf-tab.zsh
+    install -D fzf-tab.plugin.zsh ${INSTALL_PATH}/fzf-tab.plugin.zsh
+    pushd modules/zsh-${zsh.version}/Src/Modules
+    if [[ -e "fzftab.so" ]]; then
+       install -D -t ${INSTALL_PATH}/modules/Src/aloxaf/ fzftab.so
+    fi
+    if [[ -e "fzftab.bundle" ]]; then
+       install -D -t ${INSTALL_PATH}/modules/Src/aloxaf/ fzftab.bundle
+    fi
+    popd
+
+    runHook postInstall
   '';
 
-  passthru = {
-    updateScript = nix-update-script {
-      extraArgs = [ "--version" "branch=master" ];
-    };
-  };
+  passthru.updateScript = nix-update-script { };
 
   meta = with lib; {
     homepage = "https://github.com/Aloxaf/fzf-tab";