{ pkgs, ... }:
{
  calc = "${pkgs.custom.pipethon}/bin/python -i ${pkgs.writeText "init.py" ''
    import sys
    sys.path.append("${../../scriptlib}")

    from scriptlib import *
  ''}  ";

  # sys.path.append("${pkgs.python314Packages.numpy}/lib/python3.14/site-packages/")
  cp-media =
    name: media:
    let
      s = pkgs.writeScriptBin "cp-${name}" ''
        echo "copying to library ${media}"
        echo "calculating hash"
        find "$1" - type f - print0 | sort - z | xargs - 0 sha1sum | awk '{
        print $1}' | sha1sum | awk '{print $1}' > "$1.hash"

        rsync -azP "$1" fili:/media/${media}
        rsync -azP "$1.hash" fili:/media/${media}
      '';
    in
    "${s}/bin/cp-${name}";
}
