summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/cyberlocker-tools/default.nix
blob: 80593bcae1321459c1bd7501215def3d61761871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ pkgs }:
pkgs.symlinkJoin {
  name = "cyberlocker-tools";
  paths = [
    (pkgs.writers.writeDashBin "cput" ''
      set -efu
      path=''${1:-$(hostname)}

      ${pkgs.curl}/bin/curl -Ss --data-binary @- "http://c.r/$path"
      echo "http://c.r/$path"
    '')
    (pkgs.writers.writeDashBin "cdel" ''
      set -efu
      path=$1

      ${pkgs.curl}/bin/curl -X DELETE "http://c.r/$path"
    '')
  ];
}