summaryrefslogtreecommitdiffstats
path: root/tv/5pkgs/simple/hc.nix
blob: 4d325e16cf333e62b405e51bfc61eac46a5c7241 (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
31
32
33
34
35
36
37
{ coreutils, fetchgit, findutils, gawk, gnugrep, makeWrapper, qrencode, stdenv, texlive, utillinux, zbar }:

stdenv.mkDerivation rec {
  name = "hc-${meta.version}";

  src = fetchgit {
    url = "https://cgit.krebsco.de/hc";
    rev = "refs/tags/v${meta.version}";
    sha256 = "09349gja22p0j3xs082kp0fnaaada14bafszn4r3q7rg1id2slfb";
  };

  nativeBuildInputs = [ makeWrapper ];

  buildPhase = null;

  installPhase = ''
    mkdir -p $out/bin

    cp $src/bin/hc $out/bin/hc

    wrapProgram $out/bin/hc \
      --prefix PATH : ${stdenv.lib.makeBinPath [
        coreutils
        findutils
        gawk
        gnugrep
        qrencode
        texlive.combined.scheme-full
        utillinux
        zbar
      ]}
  '';

  meta = {
    version = "1.0.0";
  };
}