[Nix-dev] store paths in string makes escape fail - Why?

Marc Weber marco-oweber at gmx.de
Fri Dec 18 08:15:05 CET 2009


I've hit this bug multiple times:

let pkgs = import /etc/nixos/nixpkgs/default.nix {};

    bug = true;
    s = "some / slashes / ";

# in  builtins.compareVersions "6.10.4" "ghc-6.10.4"
in pkgs.lib.escape ["/"] "${ if bug then pkgs.nano else s}/bin/sshfs-wrapped"

/ should be escaped in all cases.
But when a store path is inserted into the string escaping isn't done.
Why?

How to fix this?

Marc Weber



More information about the nix-dev mailing list