Merge pull request #119406 from sternenseemann/toDerivation-list
lib/attrsets: make toDerivation x always work when isStorePath x
This commit is contained in:
commit
527861959b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user