File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 104104 then
105105 let res = builtins . fetchGit src ;
106106 in if res . rev == "0000000000000000000000000000000000000000" then removeAttrs res [ "rev" "shortRev" ] else res
107- else { outPath = src ; } ;
107+ else {
108+ outPath =
109+ # Massage `src` into a store path.
110+ if builtins . isPath src
111+ then
112+ if dirOf ( toString src ) == builtins . storeDir
113+ then
114+ # If it's already a store path, don't copy it again.
115+ builtins . storePath src
116+ else
117+ "${ src } "
118+ else
119+ src ;
120+ } ;
108121 # NB git worktrees have a file for .git, so we don't check the type of .git
109122 isGit = builtins . pathExists ( src + "/.git" ) ;
110123 isShallow = builtins . pathExists ( src + "/.git/shallow" ) ;
149162
150163 subdir = if key == lockFile . root then "" else node . locked . dir or "" ;
151164
152- outPath = ( builtins . storePath sourceInfo ) + ( ( if subdir == "" then "" else "/" ) + subdir ) ;
165+ outPath = sourceInfo + ( ( if subdir == "" then "" else "/" ) + subdir ) ;
153166
154167 flake = import ( outPath + "/flake.nix" ) ;
155168
You can’t perform that action at this time.
0 commit comments