summary refs log tree commit diff
path: root/pkgs/tools/misc/zsh-autoenv/default.nix
diff options
context:
space:
mode:
authorAlexey Lebedeff <binarin@gmail.com>2018-02-14 07:31:59 +0100
committerJörg Thalheim <Mic92@users.noreply.github.com>2018-02-14 06:31:59 +0000
commit6d442efe9966661c60f22a43397e7b66f1acde84 (patch)
tree7bcc6646ca8a3ac2461f4d133349cd41a773c957 /pkgs/tools/misc/zsh-autoenv/default.nix
parentc2973f986d4fc5da938aaca158a8497751ef35f0 (diff)
downloadnixpkgs-6d442efe9966661c60f22a43397e7b66f1acde84.tar
nixpkgs-6d442efe9966661c60f22a43397e7b66f1acde84.tar.gz
nixpkgs-6d442efe9966661c60f22a43397e7b66f1acde84.tar.bz2
nixpkgs-6d442efe9966661c60f22a43397e7b66f1acde84.tar.lz
nixpkgs-6d442efe9966661c60f22a43397e7b66f1acde84.tar.xz
nixpkgs-6d442efe9966661c60f22a43397e7b66f1acde84.tar.zst
nixpkgs-6d442efe9966661c60f22a43397e7b66f1acde84.zip
zsh-autoenv: init at 2017-12-16 (#34932)
Diffstat (limited to 'pkgs/tools/misc/zsh-autoenv/default.nix')
-rw-r--r--pkgs/tools/misc/zsh-autoenv/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/tools/misc/zsh-autoenv/default.nix b/pkgs/tools/misc/zsh-autoenv/default.nix
new file mode 100644
index 00000000000..492b72a176e
--- /dev/null
+++ b/pkgs/tools/misc/zsh-autoenv/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchFromGitHub, bash }:
+
+stdenv.mkDerivation rec {
+  name = "zsh-autoenv-${version}";
+  version = "2017-12-16";
+
+  src = fetchFromGitHub {
+    owner = "Tarrasch";
+    repo = "zsh-autoenv";
+    rev = "2c8cfbcea8e7286649840d7ec98d7e9d5e1d45a0";
+    sha256 = "004svkfzhc3ab6q2qvwzgj36wvicg5bs8d2gcibx6adq042di7zj";
+  };
+
+  buildPhase = ":";
+
+  installPhase = ''
+    mkdir -p $out/{bin,share}
+    cp -R $src $out/share/zsh-autoenv
+
+    cat <<SCRIPT > $out/bin/zsh-autoenv-share
+    #!${stdenv.shell}
+    # Run this script to find the fzf shared folder where all the shell
+    # integration scripts are living.
+    echo $out/share/zsh-autoenv
+    SCRIPT
+    chmod +x $out/bin/zsh-autoenv-share
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Automatically sources whitelisted .autoenv.zsh files";
+    longDescription = ''
+      zsh-autoenv automatically sources (known/whitelisted)
+      .autoenv.zsh files, typically used in project root directories.
+      It handles "enter" and "leave" events, nesting, and stashing of
+      variables (overwriting and restoring).
+    '';
+    homepage = https://github.com/Tarrasch/zsh-autoenv;
+    platforms = stdenv.lib.platforms.all;
+  };
+}