nixos/lib: use removePrefix in escapeSystemdPath
This commit is contained in:
parent
1b575dbd79
commit
8b07500163
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ rec {
|
||||||
# becomes dev-xyzzy. FIXME: slow.
|
# becomes dev-xyzzy. FIXME: slow.
|
||||||
escapeSystemdPath = s:
|
escapeSystemdPath = s:
|
||||||
replaceChars ["/" "-" " "] ["-" "\\x2d" "\\x20"]
|
replaceChars ["/" "-" " "] ["-" "\\x2d" "\\x20"]
|
||||||
(if hasPrefix "/" s then substring 1 (stringLength s) s else s);
|
(removePrefix "/" s);
|
||||||
|
|
||||||
# Returns a system path for a given shell package
|
# Returns a system path for a given shell package
|
||||||
toShellPath = shell:
|
toShellPath = shell:
|
||||||
|
|
Loading…
Reference in a new issue