You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
246 B

  1. pkgs: with pkgs.lib;
  2. rec {
  3. # Escape a path according to the systemd rules, e.g. /dev/xyzzy
  4. # becomes dev-xyzzy. FIXME: slow.
  5. escapeSystemdPath = s:
  6. replaceChars ["/" "-" " "] ["-" "\\x2d" "\\x20"] (substring 1 (stringLength s) s);
  7. }