all repos — nixfiles @ 6f0a0e13eb0c3fd5ec3928d185220fd30cf79f01

System and user configuration, managed by nix and home-manager

zsh: package and install command-help
Alan Pearce alan@alanpearce.eu
Sat, 24 Oct 2020 18:47:30 +0200
commit

6f0a0e13eb0c3fd5ec3928d185220fd30cf79f01

parent

313e62e865b2c453b26b3739efac5c7eaf4ff49a

M user/overlays/extra-packages.nixuser/overlays/extra-packages.nix
@@ -4,4 +4,5 @@ lumen = super.callPackage ../packages/lumen {     buildGoPackage = self.buildGo112Package;
   };
   node2nixPackages = super.callPackage ../packages/node2nix {};
+  command-help = super.callPackage ../packages/command-help {};
 }
A 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
+  '';
+}
M user/settings/zsh.nixuser/settings/zsh.nix
@@ -22,6 +22,7 @@ }; in
 {
   home.packages = with pkgs; [
+    command-help
     fzf
     ghq
     git