summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/Reaktor/sed-plugin.nix
blob: a451e0d3ee63406a45c37ab5f77ea45e137c348a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ config, lib, pkgs, ... }:

with pkgs;
let
  script =  ./sed-plugin.py;
in {
  #TODO: this will eat up the last regex, fix Reaktor
  krebs.Reaktor.extraConfig = ''
  public_commands.append({
    'capname' : "sed-plugin",
    # only support s///gi
    'pattern' : '^(?P<args>.*)$$',
    'argv'    : ["${pkgs.python3}/bin/python3","${script}"],
    'env'     : { 'state_dir' : workdir,
                  'PATH':'${lib.makeSearchPath "bin" [pkgs.gnused]}' }})
  '';
}