mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 14:36:16 +02:00
89e21ab4bd
Commit 83c067c0fa
changed `builtins.pathExists`
to resolve symlinks before checking for existence. Consequently, if the path
refers to a symlink itself, existence of the target of the symlink (instead of
the symlink itself) was checked. Restore the previous behavior by skipping
symlink resolution in the last component.
34 lines
2 KiB
Nix
34 lines
2 KiB
Nix
builtins.pathExists (./lib.nix)
|
|
&& builtins.pathExists (builtins.toPath ./lib.nix)
|
|
&& builtins.pathExists (builtins.toString ./lib.nix)
|
|
&& !builtins.pathExists (builtins.toString ./lib.nix + "/")
|
|
&& !builtins.pathExists (builtins.toString ./lib.nix + "/.")
|
|
# FIXME
|
|
# && !builtins.pathExists (builtins.toString ./lib.nix + "/..")
|
|
# && !builtins.pathExists (builtins.toString ./lib.nix + "/a/..")
|
|
# && !builtins.pathExists (builtins.toString ./lib.nix + "/../lib.nix")
|
|
&& !builtins.pathExists (builtins.toString ./lib.nix + "/./")
|
|
&& !builtins.pathExists (builtins.toString ./lib.nix + "/./.")
|
|
&& builtins.pathExists (builtins.toString ./.. + "/lang/lib.nix")
|
|
&& !builtins.pathExists (builtins.toString ./.. + "lang/lib.nix")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/lib.nix")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/./lib.nix")
|
|
&& builtins.pathExists (builtins.toString ./.)
|
|
&& builtins.pathExists (builtins.toString ./. + "/")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/.")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/./")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang//./")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/..")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/../")
|
|
&& builtins.pathExists (builtins.toString ./. + "/../lang/..//")
|
|
&& builtins.pathExists (builtins.toPath (builtins.toString ./lib.nix))
|
|
&& !builtins.pathExists (builtins.toPath (builtins.toString ./bla.nix))
|
|
&& builtins.pathExists (builtins.toPath { __toString = x: builtins.toString ./lib.nix; })
|
|
&& builtins.pathExists (builtins.toPath { outPath = builtins.toString ./lib.nix; })
|
|
&& builtins.pathExists ./lib.nix
|
|
&& !builtins.pathExists ./bla.nix
|
|
&& builtins.pathExists ./symlink-resolution/foo/overlays/overlay.nix
|
|
&& builtins.pathExists ./symlink-resolution/broken
|
|
&& builtins.pathExists (builtins.toString ./symlink-resolution/foo/overlays + "/.")
|