summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/overlays/extra-packages.nix1
-rw-r--r--user/packages/command-help/default.nix30
-rw-r--r--user/settings/zsh.nix1
3 files changed, 32 insertions, 0 deletions
diff --git a/user/overlays/extra-packages.nix b/user/overlays/extra-packages.nix
index bbd3bdc7..9e0d8efa 100644
--- a/user/overlays/extra-packages.nix
+++ b/user/overlays/extra-packages.nix
@@ -4,4 +4,5 @@ self: super:
     buildGoPackage = self.buildGo112Package;
   };
   node2nixPackages = super.callPackage ../packages/node2nix {};
+  command-help = super.callPackage ../packages/command-help {};
 }
diff --git a/user/packages/command-help/default.nix b/user/packages/command-help/default.nix
new file mode 100644
index 00000000..c3a22e6c
--- /dev/null
+++ b/user/packages/command-help/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, bash, gawk }:
+
+let
+  version = "2020-10-23";
+in
+stdenv.mkDerivation
+rec
+{
+  name = "command-help-unstable";
+  src = fetchFromGitHub {
+    owner = "learnbyexample";
+    repo = "command_help";
+    sha256 = "1iyi7jivd0lan1f0w6ng4x6n61i3vsz0ls31xjnza3sqmzwld3s8";
+    rev = "ee0b862a7b2fc70729d69d28e6a96c42b37b9fd3";
+    # date = 2020-10-23T11:42:04+05:30;
+  };
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/bin/
+    cat <<EOF >$out/bin/ch
+    #!${bash}/bin/bash
+    PATH=${stdenv.lib.makeBinPath [gawk]}:\$PATH
+    set -eo
+    EOF
+    cat ch >> $out/bin/ch
+    chmod +x $out/bin/ch
+  '';
+}
diff --git a/user/settings/zsh.nix b/user/settings/zsh.nix
index 35efa735..8da9ac6a 100644
--- a/user/settings/zsh.nix
+++ b/user/settings/zsh.nix
@@ -22,6 +22,7 @@ let
 in
 {
   home.packages = with pkgs; [
+    command-help
     fzf
     ghq
     git