summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/htgen-imgur/default.nix
blob: 379150a85d98cf36bb9cc17083fcee52656fc867 (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
{ attr, coreutils, exiv2, findutils, gnugrep, jq, nix, stockholm, util-linux, stdenv }:
stdenv.mkDerivation rec {
  pname = "htgen-imgur";
  version = "1.2.0";

  src = ./src;

  buildPhase = ''
    (
      exec > htgen-imgur
      echo PATH=${stockholm.lib.makeBinPath [
        attr
        coreutils
        exiv2
        findutils
        gnugrep
        jq
        nix util-linux
      ]}
      echo STATEDIR=${stockholm.lib.shell.escape "\${STATEDIR-$HOME}"}
      cat $src/htgen-imgur
    )
  '';

  installPhase = ''
    install -D htgen-imgur $out/bin/htgen-imgur
  '';
}