summary refs log tree commit diff stats
path: root/user/packages/command-help/default.nix
blob: c3a22e6c2e0b8e2dc49fe2f4954e80d3b4e48dcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
  '';
}