summary refs log tree commit diff
path: root/lib/strings.nix
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-04-14 12:02:36 +0200
committersternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-05-07 01:22:30 +0200
commit326d0970e067da3577b353c20cde29fc22a77265 (patch)
tree3f4ef3f97708f62d9d5ce82804f48377e7f0142f /lib/strings.nix
parent5af7d3ebbda6d9db0c7c5f98a6a135887ed6848a (diff)
downloadnixpkgs-326d0970e067da3577b353c20cde29fc22a77265.tar
nixpkgs-326d0970e067da3577b353c20cde29fc22a77265.tar.gz
nixpkgs-326d0970e067da3577b353c20cde29fc22a77265.tar.bz2
nixpkgs-326d0970e067da3577b353c20cde29fc22a77265.tar.lz
nixpkgs-326d0970e067da3577b353c20cde29fc22a77265.tar.xz
nixpkgs-326d0970e067da3577b353c20cde29fc22a77265.tar.zst
nixpkgs-326d0970e067da3577b353c20cde29fc22a77265.zip
lib/strings: fix example for isStorePath
Since it checks if dirOf x is the nix store dir, a trailing slash will
break this check and make it return false.
Diffstat (limited to 'lib/strings.nix')
-rw-r--r--lib/strings.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/strings.nix b/lib/strings.nix
index 2e502588bf8..dc287f8dd5c 100644
--- a/lib/strings.nix
+++ b/lib/strings.nix
@@ -659,7 +659,7 @@ rec {
      Example:
        isStorePath "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/bin/python"
        => false
-       isStorePath "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/"
+       isStorePath "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11"
        => true
        isStorePath pkgs.python
        => true