diff options
author | Silvan Mosberger <contact@infinisil.com> | 2021-05-07 02:09:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-07 02:09:05 +0200 |
commit | 527861959b9b45678bc7d18fc8c3717b24bfb600 (patch) | |
tree | a3e2beff79e2667e32a839ede893e4fe4636b289 /lib | |
parent | 0633b6aa747385d495e925ddc64356ce9312a589 (diff) | |
parent | f39a5c4e50c3f0dfb108b399c2da2c963d4d1a98 (diff) | |
download | nixpkgs-527861959b9b45678bc7d18fc8c3717b24bfb600.tar nixpkgs-527861959b9b45678bc7d18fc8c3717b24bfb600.tar.gz nixpkgs-527861959b9b45678bc7d18fc8c3717b24bfb600.tar.bz2 nixpkgs-527861959b9b45678bc7d18fc8c3717b24bfb600.tar.lz nixpkgs-527861959b9b45678bc7d18fc8c3717b24bfb600.tar.xz nixpkgs-527861959b9b45678bc7d18fc8c3717b24bfb600.tar.zst nixpkgs-527861959b9b45678bc7d18fc8c3717b24bfb600.zip |
Merge pull request #119406 from sternenseemann/toDerivation-list
lib/attrsets: make toDerivation x always work when isStorePath x
Diffstat (limited to 'lib')
-rw-r--r-- | lib/strings.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/strings.nix b/lib/strings.nix index 2e502588bf8..49fa0196a0b 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 @@ -667,7 +667,7 @@ rec { => false */ isStorePath = x: - if isCoercibleToString x then + if !(isList x) && isCoercibleToString x then let str = toString x; in substring 0 1 str == "/" && dirOf str == storeDir |