diff options
author | Shea Levy <shea@shealevy.com> | 2018-01-11 10:17:56 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-01-11 10:17:56 -0500 |
commit | 4e78aeb441075872c07e6d6dc45f2045a3d87e41 (patch) | |
tree | b5bcd070f4e7a1b0fc959e19385a1e2cd3fdd83e /lib/sources.nix | |
parent | 7fedfeabae0a721cc3d592e1e7cb16c40eaa8912 (diff) | |
download | nixlib-4e78aeb441075872c07e6d6dc45f2045a3d87e41.tar nixlib-4e78aeb441075872c07e6d6dc45f2045a3d87e41.tar.gz nixlib-4e78aeb441075872c07e6d6dc45f2045a3d87e41.tar.bz2 nixlib-4e78aeb441075872c07e6d6dc45f2045a3d87e41.tar.lz nixlib-4e78aeb441075872c07e6d6dc45f2045a3d87e41.tar.xz nixlib-4e78aeb441075872c07e6d6dc45f2045a3d87e41.tar.zst nixlib-4e78aeb441075872c07e6d6dc45f2045a3d87e41.zip |
callCabal2nix: Fix calling with a path in the store.
Diffstat (limited to 'lib/sources.nix')
-rw-r--r-- | lib/sources.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sources.nix b/lib/sources.nix index 703f5a71da6a..704711b20cd9 100644 --- a/lib/sources.nix +++ b/lib/sources.nix @@ -93,4 +93,8 @@ rec { else lib.head matchRef else throw ("Not a .git directory: " + path); in lib.flip readCommitFromFile "HEAD"; + + pathHasContext = builtins.hasContext or (lib.hasPrefix builtins.storeDir); + + canCleanSource = src: src ? _isLibCleanSourceWith || !(pathHasContext (toString src)); } |