diff options
author | lassulus <lass@lassul.us> | 2017-05-29 10:54:07 +0200 |
---|---|---|
committer | lassulus <lass@lassul.us> | 2017-05-29 10:54:07 +0200 |
commit | 35bc9f03a9bea7c6f864b95c95f5c095fa53e92b (patch) | |
tree | 059b5dc3b4fee6838b35f272a75dde3bd2ac785b /krebs/5pkgs/simple/cac-api | |
parent | 6e93f661e0b31c95f69d1bd3a6f208d26e3e0958 (diff) | |
parent | 4d1de57df5800879e7fcfcc38e5a10f0c1b993d7 (diff) |
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs/5pkgs/simple/cac-api')
-rw-r--r-- | krebs/5pkgs/simple/cac-api/default.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/krebs/5pkgs/simple/cac-api/default.nix b/krebs/5pkgs/simple/cac-api/default.nix new file mode 100644 index 000000000..e2bd8c148 --- /dev/null +++ b/krebs/5pkgs/simple/cac-api/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchgit, bc, cac-cert, coreutils, curl, dash, gnugrep, gnused, inotifyTools, jq, ncurses, openssh, sshpass, ... }: + +stdenv.mkDerivation { + name = "cac-api-1.1.2"; + + src = fetchgit { + url = http://cgit.ni.krebsco.de/cac-api; + rev = "67e93510e7742acae44db30275abbfe671aa9b7b"; + sha256 = "1vxh57j7vrq5sg9j1sam0538kkkhqpgf230vvdz2ifzgkj01z27l"; + }; + + phases = [ + "unpackPhase" + "installPhase" + ]; + + installPhase = '' + mkdir -p $out/bin + { cat <<\EOF + #! ${dash}/bin/dash + export PATH=${stdenv.lib.makeBinPath [ + bc + coreutils + curl + gnugrep + gnused + inotifyTools + jq + ncurses + openssh + sshpass + ]}:"$PATH" + EOF + # [1]: Disable fetching tasks; listtasks is currently broken: + # Unknown column 'iod.apitask.cid' in 'field list' + sed ' + /^\s*tasks \\$/d; # [1] + s|\<_cac_exec curl|<${cac-cert} & --cacert /dev/stdin| + ' cac-api + } > $out/bin/cac-api + chmod +x $out/bin/cac-api + ''; +} |